diff --git a/ChangeLog b/ChangeLog index c18d9c1..ecdb408 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,25 @@ Version 1.6.6 ******************************************************************************* +2008-04-24 Marcelo Jimenez + * Added thread id's to the UpnpPrintf debug messages. Thanks to + Charles Nepveu for the idea. + +2008-04-24 Marcelo Jimenez + * SF Bug Tracker [ 1948586 ] + Uppercase U in in "xmlns:U" in Invoke Action causes seg. f. + Submitted By: Thomas Norheim - kjakan_no + Device no longer segfaults with the following malformed xml action: + + 2 + + +2008-04-23 Marcelo Jimenez + * Use -O0 in debug builds so that variables do not get optimized out. + +2008-04-10 Marcelo Jimenez + * Apostolos Syropoulos changes for OpenSolaris x86. + 2008-03-20 Marcelo Jimenez * Andre Sodermans (wienerschnitzel) patch for building libupnp under windows systems with VC9. diff --git a/THANKS b/THANKS index ebe0d89..a917e4f 100644 --- a/THANKS +++ b/THANKS @@ -8,9 +8,11 @@ exempt of errors. - Alex (afaucher) - Andre Sodermans (wienerschnitzel) +- Apostolos Syropoulos - Arno Willig - Bob Ciora - Chaos +- Charles Nepveu (cnepveu) - Chris Pickel - Craig Nelson - David Maass diff --git a/build/vc8/ixml.vcproj b/build/vc8/ixml.vcproj new file mode 100644 index 0000000..f8902c2 --- /dev/null +++ b/build/vc8/ixml.vcproj @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/vc8/libupnp.sln b/build/vc8/libupnp.sln index 299144e..fba448a 100644 --- a/build/vc8/libupnp.sln +++ b/build/vc8/libupnp.sln @@ -3,6 +3,31 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcproj", "{24884928-0501-4CF2-BC8A-180AFC23B2AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcproj", "{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcproj", "{F592B023-E1F3-4A1E-841E-662DEE497435}" + ProjectSection(ProjectDependencies) = postProject + {6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125} + {24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF} + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcproj", "{BC1557D9-9E84-4BA5-861E-CB04D767FBDC}" + ProjectSection(ProjectDependencies) = postProject + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} + {24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF} + {6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcproj", "{B5D74697-F615-4DCB-AA8B-935F6372F01C}" + ProjectSection(ProjectDependencies) = postProject + {6227F51A-1498-4C4A-B213-F6FDED605125} = {6227F51A-1498-4C4A-B213-F6FDED605125} + {24884928-0501-4CF2-BC8A-180AFC23B2AF} = {24884928-0501-4CF2-BC8A-180AFC23B2AF} + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} = {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -13,6 +38,26 @@ Global {6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32 {6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32 {6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32 + {24884928-0501-4CF2-BC8A-180AFC23B2AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {24884928-0501-4CF2-BC8A-180AFC23B2AF}.Debug|Win32.Build.0 = Debug|Win32 + {24884928-0501-4CF2-BC8A-180AFC23B2AF}.Release|Win32.ActiveCfg = Release|Win32 + {24884928-0501-4CF2-BC8A-180AFC23B2AF}.Release|Win32.Build.0 = Release|Win32 + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Debug|Win32.Build.0 = Debug|Win32 + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Release|Win32.ActiveCfg = Release|Win32 + {AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}.Release|Win32.Build.0 = Release|Win32 + {F592B023-E1F3-4A1E-841E-662DEE497435}.Debug|Win32.ActiveCfg = Debug|Win32 + {F592B023-E1F3-4A1E-841E-662DEE497435}.Debug|Win32.Build.0 = Debug|Win32 + {F592B023-E1F3-4A1E-841E-662DEE497435}.Release|Win32.ActiveCfg = Release|Win32 + {F592B023-E1F3-4A1E-841E-662DEE497435}.Release|Win32.Build.0 = Release|Win32 + {BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Debug|Win32.ActiveCfg = Debug|Win32 + {BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Debug|Win32.Build.0 = Debug|Win32 + {BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Release|Win32.ActiveCfg = Release|Win32 + {BC1557D9-9E84-4BA5-861E-CB04D767FBDC}.Release|Win32.Build.0 = Release|Win32 + {B5D74697-F615-4DCB-AA8B-935F6372F01C}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5D74697-F615-4DCB-AA8B-935F6372F01C}.Debug|Win32.Build.0 = Debug|Win32 + {B5D74697-F615-4DCB-AA8B-935F6372F01C}.Release|Win32.ActiveCfg = Release|Win32 + {B5D74697-F615-4DCB-AA8B-935F6372F01C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/vc8/libupnp.vcproj b/build/vc8/libupnp.vcproj index fbb96b5..df0ddd1 100644 --- a/build/vc8/libupnp.vcproj +++ b/build/vc8/libupnp.vcproj @@ -111,8 +111,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/vc8/tvcombo.vcproj b/build/vc8/tvcombo.vcproj new file mode 100644 index 0000000..3f4ce28 --- /dev/null +++ b/build/vc8/tvcombo.vcproj @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/vc8/tvctrlpt.vcproj b/build/vc8/tvctrlpt.vcproj new file mode 100644 index 0000000..833f340 --- /dev/null +++ b/build/vc8/tvctrlpt.vcproj @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/vc8/tvdevice.vcproj b/build/vc8/tvdevice.vcproj new file mode 100644 index 0000000..372410b --- /dev/null +++ b/build/vc8/tvdevice.vcproj @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configure.ac b/configure.ac index d3e06fa..130bda7 100644 --- a/configure.ac +++ b/configure.ac @@ -134,16 +134,18 @@ dnl ############################################################################ dnl # Release 1.6.6: dnl # "current:revision:age" dnl # +dnl # - Code has changed in threadutil +dnl # revision: 2 -> 3 dnl # - Code has changed in upnp dnl # revision: 4 -> 5 dnl # dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0]) -dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2]) +dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:3:2]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0]) dnl # dnl ############################################################################ AC_SUBST([LT_VERSION_IXML], [2:4:0]) -AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2]) +AC_SUBST([LT_VERSION_THREADUTIL], [4:3:2]) AC_SUBST([LT_VERSION_UPNP], [3:5:0]) dnl ############################################################################ dnl # Repeating the algorithm to place it closer to the modificatin place: @@ -299,7 +301,9 @@ freebsd*) echo "Using non-specific system compiler settings" if test x"$enable_debug" = xyes; then # AC_PROG_CC already sets CFLAGS to "-g -O2" by default - : + #: + # Use -O0 in debug so that variables do not get optimized out + AX_CFLAGS_GCC_OPTION([-O0]) else # add optimise for size AX_CFLAGS_GCC_OPTION([-Os]) diff --git a/ixml/src/node.c b/ixml/src/node.c index 3a55bdb..e3f01ff 100644 --- a/ixml/src/node.c +++ b/ixml/src/node.c @@ -261,7 +261,7 @@ ixmlNode_setLocalName( IN IXML_Node * nodeptr, } /*================================================================ -* ixmlNode_getNodeNamespaceURI +* ixmlNode_getNamespaceURI * Returns the node namespaceURI * External function. * Returns: diff --git a/threadutil/src/ThreadPool.c b/threadutil/src/ThreadPool.c index 0161546..21fde9c 100644 --- a/threadutil/src/ThreadPool.c +++ b/threadutil/src/ThreadPool.c @@ -391,7 +391,7 @@ static void SetSeed() srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p ); #elif defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() ); -#elif defined(__linux__) +#elif defined(__linux__) || defined(__sun) srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() ); #else { diff --git a/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c index 51d103a..581de2f 100644 --- a/upnp/src/api/upnpapi.c +++ b/upnp/src/api/upnpapi.c @@ -31,54 +31,61 @@ #include "config.h" + + +#include + + #include #include #include #include -#include + + #ifndef WIN32 - #include - #include - #include #include - - #ifndef SPARC_SOLARIS -// #include - #include - #else - #include - #include - #include - #endif - + #include + #include #include + #include + #include + #include #include + + #include - #include - #if (defined(BSD) && BSD >= 199306) + + #if defined(_sun) + #include + #include + #elif defined(BSD) && BSD >= 199306 #include #endif -#endif +#endif /* WIN32 */ + + #include "upnpapi.h" #include "httpreadwrite.h" +#include "membuffer.h" #include "ssdplib.h" #include "soaplib.h" #include "ThreadPool.h" -#include "membuffer.h" -#include "httpreadwrite.h" // Needed for GENA #include "gena.h" -#include "service_table.h" #include "miniserver.h" +#include "service_table.h" + #ifdef INTERNAL_WEB_SERVER #include "webserver.h" #include "urlconfig.h" #endif // INTERNAL_WEB_SERVER + +// virtualDirList *pVirtualDirList; // Mutex to synchronize the subscription handling at the client side diff --git a/upnp/src/api/upnpdebug.c b/upnp/src/api/upnpdebug.c index 25f01d6..d2f0fab 100644 --- a/upnp/src/api/upnpdebug.c +++ b/upnp/src/api/upnpdebug.c @@ -310,17 +310,30 @@ void UpnpDisplayFileAndLine( IN const char *DbgFileName, IN int DbgLineNo) { - int starlength = 66; - const char *lines[2]; - char FileAndLine[500]; - lines[0] = "DEBUG"; - if (DbgFileName) { - sprintf(FileAndLine, - "FILE: %s, LINE: %d", - DbgFileName, DbgLineNo); - lines[1] = FileAndLine; +#define NLINES 2 +#define MAX_LINE_SIZE 512 +#define NUMBER_OF_STARS 80 + const char *lines[NLINES]; + char buf[NLINES][MAX_LINE_SIZE]; + int i; + + /* Initialize the pointer array */ + for (i = 0; i < NLINES; i++) { + lines[i] = buf[i]; } - UpnpDisplayBanner(fd, lines, 2, starlength); + + /* Put the debug lines in the buffer */ + sprintf(buf[0], "DEBUG - THREAD ID: 0x%lX", + (unsigned long int)ithread_self()); + if (DbgFileName) { + sprintf(buf[1], + "FILE: %s, LINE: %d", + DbgFileName, + DbgLineNo); + } + + /* Show the lines centered */ + UpnpDisplayBanner(fd, lines, NLINES, NUMBER_OF_STARS); fflush(fd); } #endif diff --git a/upnp/src/soap/soap_device.c b/upnp/src/soap/soap_device.c index 2ecf733..f24db28 100644 --- a/upnp/src/soap/soap_device.c +++ b/upnp/src/soap/soap_device.c @@ -443,9 +443,9 @@ check_soap_body( IN IXML_Document * doc, if( actionNode ) { ns = ixmlNode_getNamespaceURI( actionNode ); name = ixmlNode_getLocalName( actionNode ); - - if( ( !strcmp( actionName, name ) ) - && ( !strcmp( urn, ns ) ) ) { + if (name && ns && + !strcmp( actionName, name ) && + !strcmp( urn, ns ) ) { ret_code = UPNP_E_SUCCESS; } }