Mark unused vars as comment

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@104 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
mws
2009-12-21 16:23:09 +00:00
parent 7b87012631
commit 1b13da2617
87 changed files with 1685 additions and 1684 deletions

View File

@@ -17,7 +17,7 @@
#include "ylogging.h"
#include "yhook.h"
#ifdef Y_CONFIG_USE_YPARSER
#ifdef Y_CONFIG_USE_YPARSER
#include "mod_yparser.h"
static CyParser yParser;
#endif
@@ -47,12 +47,12 @@ static CTesthook *testhook = NULL;
static CmWebLog *weblog = NULL;
#endif
#ifdef Y_CONFIG_USE_SENDFILE
#ifdef Y_CONFIG_USE_SENDFILE
#include "mod_sendfile.h"
static CmodSendfile *mod_sendfile = NULL;
#endif
#ifdef Y_CONFIG_USE_CACHE
#ifdef Y_CONFIG_USE_CACHE
#include "mod_cache.h"
static CmodCache mod_cache; // static instance
#endif
@@ -77,7 +77,7 @@ static void sig_catch(int msignal)
switch (msignal) {
// case SIGTERM:
// case SIGINT:
case SIGPIPE:
aprintf("got signal PIPE, nice!\n");
break;
@@ -109,7 +109,7 @@ void yhttpd_reload_config()
// Main Entry
//-----------------------------------------------------------------------------
//int main(int argc, char **argv)
void * nhttpd_main_thread(void *data)
void * nhttpd_main_thread(void */*data*/)
{
//int argc = 1;
//char **argv;
@@ -182,11 +182,11 @@ void * nhttpd_main_thread(void *data)
// Start Webserver: fork ist if not in debug mode
aprintf("Webserver starting...\n");
dprintf("Start in Debug-Mode\n"); // non forked debugging loop
yhttpd->run();
}
delete yhttpd;
aprintf("Main end\n");
return (void *) EXIT_SUCCESS;
}
@@ -221,7 +221,7 @@ bool Cyhttpd::Configure()
struct group *grp = NULL;
std::string username = ConfigList["server.user_name"];
std::string groupname= ConfigList["server.group_name"];
// get user data
if(username != "")
{
@@ -240,7 +240,7 @@ bool Cyhttpd::Configure()
return false;
}
}
#endif
#endif
// change root directory
#ifdef Y_CONFIG_FEATURE_CHROOT
if(!ConfigList["server.chroot"].empty())
@@ -259,12 +259,12 @@ bool Cyhttpd::Configure()
return false;
}
}
#endif
#endif
#ifdef Y_CONFIG_FEATURE_HTTPD_USER
if(username != "" && pwd != NULL && grp != NULL)
{
log_level_printf(2, "set user and groups\n");
// drop root privileges
setgid(grp->gr_gid);
setgroups(0, NULL);
@@ -297,7 +297,7 @@ void Cyhttpd::run()
else
aprintf("Error initializing WebServer\n");
}
//-----------------------------------------------------------------------------
// Show Version Text and Number
//-----------------------------------------------------------------------------
@@ -322,7 +322,7 @@ void Cyhttpd::usage(FILE *dest)
}
//-----------------------------------------------------------------------------
// Stop WebServer
// Stop WebServer
//-----------------------------------------------------------------------------
void Cyhttpd::stop_webserver()
{
@@ -353,12 +353,12 @@ void Cyhttpd::hooks_attach()
CyhookHandler::attach(NeutrinoAPI->NeutrinoYParser);
CyhookHandler::attach(NeutrinoAPI->ControlAPI);
#else
#ifdef Y_CONFIG_USE_YPARSER
#ifdef Y_CONFIG_USE_YPARSER
CyhookHandler::attach(&yParser);
#endif
#endif
#ifdef Y_CONFIG_USE_CACHE
#ifdef Y_CONFIG_USE_CACHE
CyhookHandler::attach(&mod_cache);
#endif
@@ -366,14 +366,14 @@ void Cyhttpd::hooks_attach()
mod_sendfile = new CmodSendfile();
CyhookHandler::attach(mod_sendfile);
#endif
#ifdef Y_CONFIG_USE_WEBLOG
#ifdef Y_CONFIG_USE_WEBLOG
weblog = new CmWebLog();
CyhookHandler::attach(weblog);
#endif
}
//-----------------------------------------------------------------------------
// Detach hooks & Destroy
// Detach hooks & Destroy
//-----------------------------------------------------------------------------
void Cyhttpd::hooks_detach()
{
@@ -390,12 +390,12 @@ void Cyhttpd::hooks_detach()
#ifdef CONFIG_SYSTEM_TUXBOX
CyhookHandler::detach(NeutrinoAPI->NeutrinoYParser);
#else
#ifdef Y_CONFIG_USE_YPARSER
#ifdef Y_CONFIG_USE_YPARSER
CyhookHandler::detach(&yParser);
#endif
#endif
#ifdef Y_CONFIG_USE_CACHE
#ifdef Y_CONFIG_USE_CACHE
CyhookHandler::detach(&mod_cache);
#endif
@@ -403,7 +403,7 @@ void Cyhttpd::hooks_detach()
CyhookHandler::detach(mod_sendfile);
#endif
#ifdef Y_CONFIG_USE_WEBLOG
#ifdef Y_CONFIG_USE_WEBLOG
CyhookHandler::detach(weblog);
delete weblog;
#endif
@@ -415,7 +415,7 @@ void Cyhttpd::hooks_detach()
//-----------------------------------------------------------------------------
void Cyhttpd::ReadConfig(void)
{
log_level_printf(3,"ReadConfig Start\n");
log_level_printf(3,"ReadConfig Start\n");
CConfigFile *Config = new CConfigFile(',');
bool have_config = false;
if(access(HTTPD_CONFIGFILE,4) == 0)
@@ -427,7 +427,7 @@ void Cyhttpd::ReadConfig(void)
{
CConfigFile OrgConfig = *Config;
Config->clear();
Config->setInt32("server.log.loglevel", OrgConfig.getInt32("LogLevel", 0));
Config->setString("configfile.version", "1");
Config->setString("webserver.websites", "WebsiteMain");
@@ -445,11 +445,11 @@ void Cyhttpd::ReadConfig(void)
Config->setString("mod_auth.password", OrgConfig.getString("AuthPassword", AUTHPASSWORD));
Config->setString("mod_auth.no_auth_client", OrgConfig.getString("NoAuthClient", ""));
Config->setString("mod_auth.authenticate", OrgConfig.getString("Authenticate", "false"));
Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT);
Config->saveConfig(HTTPD_CONFIGFILE);
}
// configure debugging & logging
if(CLogging::getInstance()->LogLevel == 0)
@@ -473,7 +473,7 @@ void Cyhttpd::ReadConfig(void)
ConfigList["SSL"] = Config->getString("WebsiteMain.ssl", "false");
ConfigList["SSL_pemfile"] = Config->getString("WebsiteMain.ssl_pemfile", SSL_PEMFILE);
ConfigList["SSL_CA_file"] = Config->getString("WebsiteMain.ssl_ca_file", SSL_CA_FILE);
CySocket::SSL_pemfile = ConfigList["SSL_pemfile"];
CySocket::SSL_CA_file = ConfigList["SSL_CA_file"];
if(ConfigList["SSL"] == "true")
@@ -486,10 +486,10 @@ void Cyhttpd::ReadConfig(void)
// Read App specifig settings by Hook
CyhookHandler::Hooks_ReadConfig(Config, ConfigList);
// Save if new defaults are set
if (!have_config)
Config->saveConfig(HTTPD_CONFIGFILE);
log_level_printf(3,"ReadConfig End\n");
log_level_printf(3,"ReadConfig End\n");
delete Config;
}