*** ./libs/libmythupnp/Makefile- 2010-09-24 10:13:25.000000000 -0600 --- ./libs/libmythupnp/Makefile 2010-09-24 13:35:55.000000000 -0600 *************** *** 13,19 **** DEFINES = -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -pipe -fomit-frame-pointer -O3 -std=c99 -g -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -D_REENTRANT -DPIC -fPIC $(DEFINES) CXXFLAGS = -pipe -fomit-frame-pointer -O3 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DPIC -fPIC $(DEFINES) ! INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include -I/usr/local -I../libmythdb -I.. -I. LINK = g++ LFLAGS = -Wl,-O1 -shared -Wl,-soname,libmythupnp-0.23.1.so.0 LIBS = $(SUBLIBS) -L/usr/lib -L../libmythdb -lmythdb-0.23.1 -ldl -lfreetype -lz -L/usr/lib -ldirectfb -lfusion -ldirect -L/usr/X11R6/lib -lXinerama -lX11 -lXext -lXxf86vm -lXv -lXrandr -lXvMCW -lXvMC -lGL -lGLU -lpulse -L/usr/local/lib -lpthread -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore --- 13,19 ---- DEFINES = -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -pipe -fomit-frame-pointer -O3 -std=c99 -g -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -D_REENTRANT -DPIC -fPIC $(DEFINES) CXXFLAGS = -pipe -fomit-frame-pointer -O3 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DPIC -fPIC $(DEFINES) ! INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include -I/usr/local -I../libmythdb -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/UsageEnvironment/include -I.. -I. LINK = g++ LFLAGS = -Wl,-O1 -shared -Wl,-soname,libmythupnp-0.23.1.so.0 LIBS = $(SUBLIBS) -L/usr/lib -L../libmythdb -lmythdb-0.23.1 -ldl -lfreetype -lz -L/usr/lib -ldirectfb -lfusion -ldirect -L/usr/X11R6/lib -lXinerama -lX11 -lXext -lXxf86vm -lXv -lXrandr -lXvMCW -lXvMC -lGL -lGLU -lpulse -L/usr/local/lib -lpthread -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore *** ./libs/libmythupnp/upnptasksearch.cpp- 2009-12-30 23:13:25.000000000 -0700 --- ./libs/libmythupnp/upnptasksearch.cpp 2010-09-24 13:58:07.000000000 -0600 *************** *** 30,35 **** --- 30,36 ---- #include "upnp.h" #include "upnptasksearch.h" #include "compat.h" + #include "GroupsockHelper.hh" ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// *************** *** 107,115 **** it != m_addressList.end(); ++it ) { QString sHeader = QString ( "HTTP/1.1 200 OK\r\n" "LOCATION: http://%1:%2/getDeviceDesc\r\n" ) ! .arg( *it ) .arg( m_nServicePort); --- 108,121 ---- it != m_addressList.end(); ++it ) { + char const* str = (*it).toAscii(); + NetAddressList addresses( str ); + if (addresses.numAddresses() == 0) continue; + struct in_addr anAddress; + anAddress.s_addr = *(in_addr_t*)(addresses.firstAddress()->data()); QString sHeader = QString ( "HTTP/1.1 200 OK\r\n" "LOCATION: http://%1:%2/getDeviceDesc\r\n" ) ! .arg( our_inet_ntoa( anAddress ) ) .arg( m_nServicePort); *** ./libs/libmythupnp/upnptasknotify.cpp- 2009-12-30 23:13:25.000000000 -0700 --- ./libs/libmythupnp/upnptasknotify.cpp 2010-09-24 16:09:12.000000000 -0600 *************** *** 36,41 **** --- 36,42 ---- #include "compat.h" #include "mythverbose.h" + #include "GroupsockHelper.hh" ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// *************** *** 118,129 **** continue; } QString sHeader = QString( "NOTIFY * HTTP/1.1\r\n" "HOST: %1:%2\r\n" "LOCATION: http://%3:%4/getDeviceDesc\r\n" ) .arg( SSDP_GROUP ) // pSocket->address().toString() ) .arg( SSDP_PORT ) // pSocket->port() ) ! .arg( *it ) .arg( m_nServicePort); QString sPacket = sHeader + sData; --- 119,135 ---- continue; } + char const* str = (*it).toAscii(); + NetAddressList addresses( str ); + if (addresses.numAddresses() == 0) continue; + struct in_addr anAddress; + anAddress.s_addr = *(in_addr_t*)(addresses.firstAddress()->data()); QString sHeader = QString( "NOTIFY * HTTP/1.1\r\n" "HOST: %1:%2\r\n" "LOCATION: http://%3:%4/getDeviceDesc\r\n" ) .arg( SSDP_GROUP ) // pSocket->address().toString() ) .arg( SSDP_PORT ) // pSocket->port() ) ! .arg( our_inet_ntoa( anAddress ) ) .arg( m_nServicePort); QString sPacket = sHeader + sData; *** ./programs/mythbackend/upnpcdsmusic.cpp- 2009-11-17 10:41:55.000000000 -0700 --- ./programs/mythbackend/upnpcdsmusic.cpp 2010-09-24 18:08:56.000000000 -0600 *************** *** 15,20 **** --- 15,21 ---- #include "upnpcdsmusic.h" #include "httprequest.h" #include "mythcontext.h" + #include "GroupsockHelper.hh" /* Music Music *************** *** 288,294 **** // if (!m_mapBackendPort.contains( sHostName )) // m_mapBackendPort[ sHostName ] = gContext->GetSettingOnHost("BackendStatusPort", sHostName); ! QString sServerIp = gContext->GetSetting( "BackendServerIp" ); QString sPort = gContext->GetSetting( "BackendStatusPort" ); // ---------------------------------------------------------------------- --- 289,299 ---- // if (!m_mapBackendPort.contains( sHostName )) // m_mapBackendPort[ sHostName ] = gContext->GetSettingOnHost("BackendStatusPort", sHostName); ! char const* str = (gContext->GetSetting( "BackendServerIp" ) ).toAscii(); ! NetAddressList addresses( str ); ! struct in_addr anAddress; ! anAddress.s_addr = *(in_addr_t*)(addresses.firstAddress()->data()); ! QString sServerIp = our_inet_ntoa( anAddress ); QString sPort = gContext->GetSetting( "BackendStatusPort" ); // ---------------------------------------------------------------------- *** ./programs/mythbackend/Makefile- 2010-09-24 10:25:53.000000000 -0600 --- ./programs/mythbackend/Makefile 2010-09-24 17:25:43.000000000 -0600 *************** *** 13,19 **** DEFINES = -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DUSING_OSS -DUSING_DVB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -pipe -fomit-frame-pointer -O3 -std=c99 -g -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -D_REENTRANT $(DEFINES) CXXFLAGS = -pipe -fomit-frame-pointer -O3 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT $(DEFINES) ! INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include -I/usr/local -I../.. -I../../libs -I../../libs/libmyth -I../../libs/libmythtv -I../../libs/libavutil -I../../libs/libavformat -I../../libs/libavcodec -I../../libs/libmythupnp -I../../libs/libmythui -I../../libs/libmythlivemedia -I../../libs/libmythdb -I../../libmythhdhomerun -I../../libs/libmythdvdnav -I/usr/X11R6/include -I. LINK = g++ LFLAGS = -Wl,-O1 LIBS = $(SUBLIBS) -L/usr/lib -L../../libs/libmyth -L../../libs/libmythtv -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat -L../../libs/libswscale -L../../libs/libmythdb -L../../libs/libmythui -L../../libs/libmythupnp -lmythtv-0.23.1 -lmythavformat-0.23.1 -lmythavutil-0.23.1 -lmythavcodec-0.23.1 -lmythswscale-0.23.1 -lmythupnp-0.23.1 -lmythdb-0.23.1 -lmythui-0.23.1 -lmyth-0.23.1 -L../../libs/libmythlivemedia -lmythlivemedia-0.23.1 -L../../libs/libmythfreemheg -lmythfreemheg-0.23.1 -L../../libs/libmythhdhomerun -lmythhdhomerun-0.23.1 -ldl -lfreetype -lz -L/usr/lib -ldirectfb -lfusion -ldirect -L/usr/X11R6/lib -lXinerama -lX11 -lXext -lXxf86vm -lXv -lXrandr -lXvMCW -lXvMC -lpulse -L/usr/local/lib -lpthread -lGLU -lGL -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore --- 13,19 ---- DEFINES = -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DUSING_OSS -DUSING_DVB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -pipe -fomit-frame-pointer -O3 -std=c99 -g -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -D_REENTRANT $(DEFINES) CXXFLAGS = -pipe -fomit-frame-pointer -O3 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT $(DEFINES) ! INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include -I/usr/local -I../.. -I../../libs -I../../libs/libmyth -I../../libs/libmythtv -I../../libs/libavutil -I../../libs/libavformat -I../../libs/libavcodec -I../../libs/libmythupnp -I../../libs/libmythui -I../../libs/libmythlivemedia -I../../libs/libmythlivemedia/groupsock/include -I../../libs/libmythlivemedia/UsageEnvironment/include -I../../libs/libmythdb -I../../libmythhdhomerun -I../../libs/libmythdvdnav -I/usr/X11R6/include -I. LINK = g++ LFLAGS = -Wl,-O1 LIBS = $(SUBLIBS) -L/usr/lib -L../../libs/libmyth -L../../libs/libmythtv -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat -L../../libs/libswscale -L../../libs/libmythdb -L../../libs/libmythui -L../../libs/libmythupnp -lmythtv-0.23.1 -lmythavformat-0.23.1 -lmythavutil-0.23.1 -lmythavcodec-0.23.1 -lmythswscale-0.23.1 -lmythupnp-0.23.1 -lmythdb-0.23.1 -lmythui-0.23.1 -lmyth-0.23.1 -L../../libs/libmythlivemedia -lmythlivemedia-0.23.1 -L../../libs/libmythfreemheg -lmythfreemheg-0.23.1 -L../../libs/libmythhdhomerun -lmythhdhomerun-0.23.1 -ldl -lfreetype -lz -L/usr/lib -ldirectfb -lfusion -ldirect -L/usr/X11R6/lib -lXinerama -lX11 -lXext -lXxf86vm -lXv -lXrandr -lXvMCW -lXvMC -lpulse -L/usr/local/lib -lpthread -lGLU -lGL -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore *** ./programs/mythbackend/upnpcdstv.cpp- 2009-12-22 07:16:01.000000000 -0700 --- ./programs/mythbackend/upnpcdstv.cpp 2010-09-24 21:11:33.000000000 -0600 *************** *** 17,22 **** --- 17,23 ---- #include "storagegroup.h" #include "util.h" #include "mythcontext.h" + #include "GroupsockHelper.hh" /* *************** *** 264,270 **** // ---------------------------------------------------------------------- if (!m_mapBackendIp.contains( sHostName )) ! m_mapBackendIp[ sHostName ] = gContext->GetSettingOnHost( "BackendServerIp", sHostName); if (!m_mapBackendPort.contains( sHostName )) m_mapBackendPort[ sHostName ] = gContext->GetSettingOnHost("BackendStatusPort", sHostName); --- 265,278 ---- // ---------------------------------------------------------------------- if (!m_mapBackendIp.contains( sHostName )) ! { ! char const* str = (gContext->GetSettingOnHost( "BackendServerIp", sHostName ) ).toAscii(); ! cout << "TV BackendServerIp: " << str << endl; ! NetAddressList addresses( str ); ! struct in_addr anAddress; ! anAddress.s_addr = *(in_addr_t*)(addresses.firstAddress()->data()); ! m_mapBackendIp[ sHostName ] = our_inet_ntoa( anAddress ); ! } if (!m_mapBackendPort.contains( sHostName )) m_mapBackendPort[ sHostName ] = gContext->GetSettingOnHost("BackendStatusPort", sHostName); *** ./programs/mythbackend/upnpcdsvideo.cpp- 2009-06-30 14:33:11.000000000 -0600 --- ./programs/mythbackend/upnpcdsvideo.cpp 2010-09-24 21:41:08.000000000 -0600 *************** *** 16,21 **** --- 16,22 ---- #include "upnpmedia.h" #include "util.h" #include "mythcontext.h" + #include "GroupsockHelper.hh" #define LOC QString("UPnpCDSVideo: ") #define LOC_WARN QString("UPnpCDSVideo, Warning: ") *************** *** 391,398 **** // ---------------------------------------------------------------------- // Cache Host ip Address & Port // ---------------------------------------------------------------------- ! QString sServerIp = gContext->GetSetting("BackendServerIp" ); ! QString sPort = gContext->GetSetting("BackendStatusPort" ); // ---------------------------------------------------------------------- // Build Support Strings --- 392,409 ---- // ---------------------------------------------------------------------- // Cache Host ip Address & Port // ---------------------------------------------------------------------- ! if (!m_mapBackendIp.contains( "BackendServerIp" )) ! { ! char const* str = (gContext->GetSetting( "BackendServerIp" ) ).toAscii(); ! cout << "Video BackendServerIp: " << str << endl; ! NetAddressList addresses( str ); ! struct in_addr anAddress; ! anAddress.s_addr = *(in_addr_t*)(addresses.firstAddress()->data()); ! m_mapBackendIp[ "BackendServerIp" ] = our_inet_ntoa( anAddress ); ! } ! ! if (!m_mapBackendPort.contains( "BackendServerIp" )) ! m_mapBackendPort[ "BackendServerIp" ] = gContext->GetSetting("BackendStatusPort" ); // ---------------------------------------------------------------------- // Build Support Strings *************** *** 401,408 **** QString sName = sTitle; QString sURIBase = QString( "http://%1:%2/Myth/" ) ! .arg( sServerIp ) ! .arg( sPort ); QString sURIParams = QString( "/Id%1" ).arg( nVidID ); QString sId = QString( "Videos/0/item%1").arg( sURIParams ); --- 412,419 ---- QString sName = sTitle; QString sURIBase = QString( "http://%1:%2/Myth/" ) ! .arg( m_mapBackendIp[ "BackendServerIp" ] ) ! .arg( m_mapBackendPort[ "BackendServerIp" ] ); QString sURIParams = QString( "/Id%1" ).arg( nVidID ); QString sId = QString( "Videos/0/item%1").arg( sURIParams );