git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@402 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2008-06-02 22:59:53 +00:00
parent c1ac15fccc
commit eb66b253e2
2 changed files with 18 additions and 8 deletions

View File

@@ -98,26 +98,33 @@
/*! This structure is for virtual directory callbacks */
struct VirtualDirCallbacks virtualDirCallback;
/*! */
/*! Pointer to the virtual directory list. */
virtualDirList *pVirtualDirList;
#ifdef INCLUDE_CLIENT_APIS
/*! Mutex to synchronize the subscription handling at the client side */
/*! Mutex to synchronize the subscription handling at the client side. */
ithread_mutex_t GlobalClientSubscribeMutex;
#endif /* INCLUDE_CLIENT_APIS */
/*! rwlock to synchronize handles (root device or control point handle) */
/*! rwlock to synchronize handles (root device or control point handle). */
ithread_rwlock_t GlobalHndRWLock;
/*! Mutex to synchronize the uuid creation process */
/*! Mutex to synchronize the uuid creation process. */
ithread_mutex_t gUUIDMutex;
/*! Initialization mutex. */
ithread_mutex_t gSDKInitMutex = PTHREAD_MUTEX_INITIALIZER;
/*! Global timer thread. */
TimerThread gTimerThread;
/*! Send thread pool. */
ThreadPool gSendThreadPool;
/*! Receive thread pool. */
ThreadPool gRecvThreadPool;
/*! Mini server thread pool. */
ThreadPool gMiniServerThreadPool;
/*! Flag to indicate the state of web server */
@@ -135,8 +142,10 @@ char gIF_IPV6[65]/* INET6_ADDRSTRLEN*/ = { '\0' };
/*! Contains interface index. (extern'ed in upnp.h) */
int gIF_INDEX = -1;
/*! local IPv4 and IPv6 ports for the mini-server */
/*! local IPv4 port for the mini-server */
unsigned short LOCAL_PORT_V4;
/*! local IPv6 port for the mini-server */
unsigned short LOCAL_PORT_V6;
/*! UPnP device and control point handle table */
@@ -194,18 +203,18 @@ int UpnpInit(const char *HostIP, unsigned short DestPort)
{
int retVal;
ithread_mutex_lock( &gSDKInitMutex );
ithread_mutex_lock(&gSDKInitMutex);
// Check if we're already initialized.
if( UpnpSdkInit == 1 ) {
ithread_mutex_unlock( &gSDKInitMutex );
ithread_mutex_unlock(&gSDKInitMutex);
return UPNP_E_INIT;
}
// Perform initialization preamble.
retVal = UpnpInitPreamble();
if( retVal != UPNP_E_SUCCESS ) {
ithread_mutex_unlock( &gSDKInitMutex );
ithread_mutex_unlock(&gSDKInitMutex);
return retVal;
}

View File

@@ -48,6 +48,7 @@
#include "uri.h"
/*! Maximum action header buffer length. */
#define HEADER_LENGTH 2000