Optimisation of --disable-webserver

Do not compile webserver.c if --disable-webserver is used.
(cherry picked from commit 7aef73d7eb0206db0d07744ef258f7d04e206f0e)
This commit is contained in:
Fabrice Fontaine 2012-03-09 23:13:53 +01:00 committed by Marcelo Roberto Jimenez
parent 2fc9200b85
commit a12d5a6f7d
3 changed files with 15 additions and 4 deletions

View File

@ -318,6 +318,12 @@ Version 1.8.0
Version 1.6.16 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> 2012-03-09 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Improve threadutil Improve threadutil

View File

@ -649,8 +649,10 @@ int UpnpFinish(void)
UpnpUnRegisterClient(client_handle); UpnpUnRegisterClient(client_handle);
#endif #endif
TimerThreadShutdown(&gTimerThread); TimerThreadShutdown(&gTimerThread);
#if EXCLUDE_WEB_SERVER == 0 #if EXCLUDE_MINISERVER == 0
StopMiniServer(); StopMiniServer();
#endif
#if EXCLUDE_WEB_SERVER == 0
web_server_destroy(); web_server_destroy();
#endif #endif
ThreadPoolShutdown(&gMiniServerThreadPool); ThreadPoolShutdown(&gMiniServerThreadPool);
@ -4084,7 +4086,7 @@ void UpnpRemoveAllVirtualDirs(void)
int UpnpEnableWebserver(int enable) int UpnpEnableWebserver(int enable)
{ {
int retVal; int retVal = UPNP_E_SUCCESS;
if( UpnpSdkInit != 1 ) { if( UpnpSdkInit != 1 ) {
return UPNP_E_FINISH; return UPNP_E_FINISH;
@ -4107,10 +4109,10 @@ int UpnpEnableWebserver(int enable)
break; break;
#endif /* INTERNAL_WEB_SERVER */ #endif /* INTERNAL_WEB_SERVER */
default: 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" #include "config.h"
#if EXCLUDE_WEB_SERVER == 0
#include "webserver.h" #include "webserver.h"
@ -1534,4 +1536,5 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
membuffer_destroy(&headers); membuffer_destroy(&headers);
membuffer_destroy(&filename); membuffer_destroy(&filename);
} }
#endif /* EXCLUDE_WEB_SERVER */