Optimisation of --disable-webserver

Do not compile webserver.c if --disable-webserver is used.
This commit is contained in:
Fabrice Fontaine 2012-03-09 23:13:53 +01:00
parent 77c73884b8
commit 7aef73d7eb
3 changed files with 15 additions and 4 deletions

View File

@ -2,6 +2,12 @@
Version 1.6.16
*******************************************************************************
2012-03-09 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Optimisation of --disable-webserver
Do not compile webserver.c if --disable-webserver is used.
2012-03-09 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Improve threadutil

View File

@ -616,8 +616,10 @@ int UpnpFinish(void)
UpnpUnRegisterClient(client_handle);
#endif
TimerThreadShutdown(&gTimerThread);
#if EXCLUDE_WEB_SERVER == 0
#if EXCLUDE_MINISERVER == 0
StopMiniServer();
#endif
#if EXCLUDE_WEB_SERVER == 0
web_server_destroy();
#endif
ThreadPoolShutdown(&gMiniServerThreadPool);
@ -3982,7 +3984,7 @@ void UpnpRemoveAllVirtualDirs(void)
int UpnpEnableWebserver(int enable)
{
int retVal;
int retVal = UPNP_E_SUCCESS;
if( UpnpSdkInit != 1 ) {
return UPNP_E_FINISH;
@ -4005,10 +4007,10 @@ int UpnpEnableWebserver(int enable)
break;
#endif /* INTERNAL_WEB_SERVER */
default:
return UPNP_E_INVALID_PARAM;
retVal = UPNP_E_INVALID_PARAM;
}
return UPNP_E_SUCCESS;
return retVal;
}

View File

@ -39,6 +39,8 @@
#include "config.h"
#if EXCLUDE_WEB_SERVER == 0
#include "webserver.h"
#include "httpparser.h"
@ -1531,4 +1533,5 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
membuffer_destroy(&headers);
membuffer_destroy(&filename);
}
#endif /* EXCLUDE_WEB_SERVER */