Exit message goes to the end of the UpnpFinish().
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@243 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
27af41e562
commit
e3865bf6b6
@ -268,7 +268,7 @@ int UpnpInit( IN const char *HostIP,
|
|||||||
|
|
||||||
if( ThreadPoolInit( &gMiniServerThreadPool, &attr ) != UPNP_E_SUCCESS ) {
|
if( ThreadPoolInit( &gMiniServerThreadPool, &attr ) != UPNP_E_SUCCESS ) {
|
||||||
UpnpSdkInit = 0;
|
UpnpSdkInit = 0;
|
||||||
UpnpFinish( );
|
UpnpFinish();
|
||||||
return UPNP_E_INIT_FAILED;
|
return UPNP_E_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ UpnpFinish()
|
|||||||
struct Handle_Info *temp;
|
struct Handle_Info *temp;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// WSACleanup( );
|
// WSACleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( UpnpSdkInit != 1 ) {
|
if( UpnpSdkInit != 1 ) {
|
||||||
@ -410,14 +410,14 @@ UpnpFinish()
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"Inside UpnpFinish : UpnpSdkInit is :%d:\n",
|
"Inside UpnpFinish : UpnpSdkInit is :%d:\n", UpnpSdkInit );
|
||||||
UpnpSdkInit );
|
|
||||||
if( UpnpSdkInit == 1 ) {
|
if( UpnpSdkInit == 1 ) {
|
||||||
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"UpnpFinish : UpnpSdkInit is ONE\n" );
|
"UpnpFinish : UpnpSdkInit is ONE\n" );
|
||||||
}
|
}
|
||||||
PrintThreadPoolStats(&gRecvThreadPool, __FILE__, __LINE__, "Recv Thread Pool");
|
PrintThreadPoolStats(&gRecvThreadPool, __FILE__, __LINE__, "Recv Thread Pool");
|
||||||
PrintThreadPoolStats(&gSendThreadPool, __FILE__, __LINE__, "Send Thread Pool");
|
PrintThreadPoolStats(&gSendThreadPool, __FILE__, __LINE__, "Send Thread Pool");
|
||||||
|
|
||||||
#ifdef INCLUDE_DEVICE_APIS
|
#ifdef INCLUDE_DEVICE_APIS
|
||||||
if( GetDeviceHandleInfo( &device_handle, &temp ) == HND_DEVICE )
|
if( GetDeviceHandleInfo( &device_handle, &temp ) == HND_DEVICE )
|
||||||
UpnpUnRegisterRootDevice( device_handle );
|
UpnpUnRegisterRootDevice( device_handle );
|
||||||
@ -429,7 +429,6 @@ UpnpFinish()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
TimerThreadShutdown( &gTimerThread );
|
TimerThreadShutdown( &gTimerThread );
|
||||||
|
|
||||||
StopMiniServer();
|
StopMiniServer();
|
||||||
|
|
||||||
#if EXCLUDE_WEB_SERVER == 0
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
@ -438,11 +437,9 @@ UpnpFinish()
|
|||||||
|
|
||||||
ThreadPoolShutdown(&gSendThreadPool);
|
ThreadPoolShutdown(&gSendThreadPool);
|
||||||
ThreadPoolShutdown(&gRecvThreadPool);
|
ThreadPoolShutdown(&gRecvThreadPool);
|
||||||
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
|
||||||
"Exiting UpnpFinish : UpnpSdkInit is :%d:\n", UpnpSdkInit);
|
|
||||||
PrintThreadPoolStats(&gRecvThreadPool, __FILE__, __LINE__, "Recv Thread Pool");
|
PrintThreadPoolStats(&gRecvThreadPool, __FILE__, __LINE__, "Recv Thread Pool");
|
||||||
PrintThreadPoolStats(&gSendThreadPool, __FILE__, __LINE__, "Send Thread Pool");
|
PrintThreadPoolStats(&gSendThreadPool, __FILE__, __LINE__, "Send Thread Pool");
|
||||||
UpnpCloseLog();
|
|
||||||
|
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
ithread_mutex_destroy(&GlobalClientSubscribeMutex);
|
ithread_mutex_destroy(&GlobalClientSubscribeMutex);
|
||||||
@ -456,11 +453,14 @@ UpnpFinish()
|
|||||||
// allow static linking
|
// allow static linking
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifdef PTW32_STATIC_LIB
|
#ifdef PTW32_STATIC_LIB
|
||||||
pthread_win32_thread_detach_np ();
|
pthread_win32_thread_detach_np();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UpnpSdkInit = 0;
|
UpnpSdkInit = 0;
|
||||||
|
UpnpPrintf( UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
|
"Exiting UpnpFinish : UpnpSdkInit is :%d:\n", UpnpSdkInit);
|
||||||
|
UpnpCloseLog();
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user