[mythtv-commits] Ticket #12006: upnp broken by Changeset 3d9155909

MythTV noreply at mythtv.org
Tue Jan 7 19:45:52 UTC 2014


#12006: upnp broken by Changeset 3d9155909
--------------------------------------+-------------------------
     Reporter:  steve_g@…             |      Owner:  dblain
         Type:  Bug Report - General  |     Status:  new
     Priority:  major                 |  Milestone:  0.28
    Component:  MythTV - UPnP         |    Version:  Master Head
     Severity:  high                  |   Keywords:  upnp soap
Ticket locked:  0                     |
--------------------------------------+-------------------------
 Changeset 3d9155909  needs either to be reverted or the attached patch
 done.

 There are 2 places in libmythupnp where the incomin packets are decoded,
 in one place they are converted to lowercase, in the other place they are
 not.
 This patch had made it lowercase in both places but did not change the
 code that accessed the data,
 the caused serious discombobulation and the end of upnp watching through
 out the world.

 ---attach starts here diff --git a/mythtv/libs/libmythupnp/upnpcds.cpp
 b/mythtv/libs/libmythupnp/upnpcds.cpp
 index 3cb0eb1..a36ef52 100644
 --- a/mythtv/libs/libmythupnp/upnpcds.cpp
 +++ b/mythtv/libs/libmythupnp/upnpcds.cpp
 @@ -296,17 +296,17 @@ void UPnpCDS::HandleBrowse( HTTPRequest *pRequest )
      UPnpCDSRequest           request;

      DetermineClient( pRequest, &request );
 -    request.m_sObjectId         = pRequest->m_mapParams[ "ObjectID"
 ];
 -    request.m_sContainerID      = pRequest->m_mapParams[ "ContainerID"
 ];
 +    request.m_sObjectId         = pRequest->m_mapParams[ "objectid"
 ];
 +    request.m_sContainerID      = pRequest->m_mapParams[ "containerid"
 ];
      request.m_sParentId         = "0";
      request.m_eBrowseFlag       =
 -        GetBrowseFlag( pRequest->m_mapParams[ "BrowseFlag"    ] );
 -    request.m_sFilter           = pRequest->m_mapParams[ "Filter"
 ];
 +        GetBrowseFlag( pRequest->m_mapParams[ "browseflag"    ] );
 +    request.m_sFilter           = pRequest->m_mapParams[ "filter"
 ];
      request.m_nStartingIndex    =
 -        pRequest->m_mapParams[ "StartingIndex" ].toLong();
 +        pRequest->m_mapParams[ "startingindex" ].toLong();
      request.m_nRequestedCount   =
 -        pRequest->m_mapParams[ "RequestedCount"].toLong();
 -    request.m_sSortCriteria     = pRequest->m_mapParams[ "SortCriteria"
 ];
 +        pRequest->m_mapParams[ "requestedcount"].toLong();
 +    request.m_sSortCriteria     = pRequest->m_mapParams[ "sortcriteria"
 ];

  #if 0
      LOG(VB_UPNP, LOG_DEBUG, QString("UPnpCDS::ProcessRequest \n"
 @@ -493,15 +493,15 @@ void UPnpCDS::HandleSearch( HTTPRequest *pRequest )
      QString       sResultXML;

      DetermineClient( pRequest, &request );
 -    request.m_sObjectId         = pRequest->m_mapParams[ "ObjectID"
 ];
 -    request.m_sContainerID      = pRequest->m_mapParams[ "ContainerID"
 ];
 -    request.m_sFilter           = pRequest->m_mapParams[ "Filter"
 ];
 +    request.m_sObjectId         = pRequest->m_mapParams[ "objectid"
 ];
 +    request.m_sContainerID      = pRequest->m_mapParams[ "containerid"
 ];
 +    request.m_sFilter           = pRequest->m_mapParams[ "filter"
 ];
      request.m_nStartingIndex    =
 -        pRequest->m_mapParams[ "StartingIndex" ].toLong();
 +        pRequest->m_mapParams[ "startingIndex" ].toLong();
      request.m_nRequestedCount   =
 -        pRequest->m_mapParams[ "RequestedCount"].toLong();
 -    request.m_sSortCriteria     = pRequest->m_mapParams[ "SortCriteria"
 ];
 -    request.m_sSearchCriteria   = pRequest->m_mapParams[
 "SearchCriteria"];
 +        pRequest->m_mapParams[ "requestedcount"].toLong();
 +    request.m_sSortCriteria     = pRequest->m_mapParams[ "sortcriteria"
 ];
 +    request.m_sSearchCriteria   = pRequest->m_mapParams[
 "searchcriteria"];

      LOG(VB_UPNP, LOG_INFO,
          QString("UPnpCDS::HandleSearch ObjectID=%1, ContainerId=%2")



 The attached patch changes where the array is accessed to lowercase.

 tested on v0.28-pre-673-g3bbc531-dirty

--
Ticket URL: <http://code.mythtv.org/trac/ticket/12006>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list