SF Bug Tracker [ 1825929 ] woker thread still alive after UpnpFinish()

Submitted By: Luke Kim - nereusuj
	Worker thread still alive after calling UpnpFinish() because
	ThreadPoolShutdown() is in the #ifdef DEBUG block.
	421
	422 #ifdef DEBUG
	423 ThreadPoolShutdown( &gSendThreadPool );
	424 ThreadPoolShutdown( &gRecvThreadPool );



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@228 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2007-11-05 13:07:54 +00:00
parent c69e16b347
commit 5b744169d5
2 changed files with 15 additions and 7 deletions

View File

@ -2,6 +2,16 @@
Version 1.6.1
*******************************************************************************
2007-05-26 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* SF Bug Tracker [ 1825929 ] woker thread still alive after UpnpFinish()
Submitted By: Luke Kim - nereusuj
Worker thread still alive after calling UpnpFinish() because
ThreadPoolShutdown() is in the #ifdef DEBUG block.
421
422 #ifdef DEBUG
423 ThreadPoolShutdown( &gSendThreadPool );
424 ThreadPoolShutdown( &gRecvThreadPool );
2007-08-28 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Changed the calls to virtualDirCallback.open(filename, UPNP_WRITE)
to (virtualDirCallback.open)(filename, UPNP_WRITE) (notice the

View File

@ -389,11 +389,11 @@ UpnpFinish()
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
"Inside UpnpFinish : UpnpSdkInit is :%d:\n",
UpnpSdkInit );
#ifdef DEBUG
if( UpnpSdkInit == 1 ) {
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
"UpnpFinish : UpnpSdkInit is ONE\n" );
}
#ifdef DEBUG
ThreadPoolGetStats( &gRecvThreadPool, &stats );
PrintThreadPoolStats (__FILE__, __LINE__,
"Recv Thread Pool", &stats);
@ -419,20 +419,20 @@ UpnpFinish()
web_server_destroy();
#endif
#ifdef DEBUG
ThreadPoolShutdown( &gSendThreadPool );
ThreadPoolShutdown( &gRecvThreadPool );
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
"Exiting UpnpFinish : UpnpSdkInit is :%d:\n",
UpnpSdkInit );
#ifdef DEBUG
ThreadPoolGetStats( &gRecvThreadPool, &stats );
PrintThreadPoolStats( __FILE__, __LINE__,
"Recv Thread Pool", &stats);
ThreadPoolGetStats( &gSendThreadPool, &stats );
PrintThreadPoolStats(__FILE__, __LINE__,
"Send Thread Pool", &stats);
UpnpCloseLog();
#endif
UpnpCloseLog();
#ifdef INCLUDE_CLIENT_APIS
ithread_mutex_destroy( &GlobalClientSubscribeMutex );
@ -3300,9 +3300,9 @@ UpnpDownloadXmlDoc( const char *url,
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
"****************** END OF Parsed XML Doc *****************\n" );
ixmlFreeDOMString( xml_buf );
#endif
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
"Exiting UpnpDownloadXmlDoc\n" );
#endif
return UPNP_E_SUCCESS;
}
}
@ -3635,7 +3635,6 @@ int PrintHandleInfo( IN UpnpClient_Handle Hnd )
struct Handle_Info * HndInfo;
if (HandleTable[Hnd] != NULL) {
HndInfo = HandleTable[Hnd];
#ifdef DEBUG
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"Printing information for Handle_%d\n", Hnd);
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
@ -3644,7 +3643,6 @@ int PrintHandleInfo( IN UpnpClient_Handle Hnd )
if(HndInfo->HType != HND_CLIENT)
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
"DescURL_%s\n", HndInfo->DescURL );
#endif
#endif
} else {
return UPNP_E_INVALID_HANDLE;