yWeb 2.8.a.4

- updated nhttpd
- Code clean up
- changes to nhttpd.conf
- some changes for logo display

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@416 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
yjogol
2010-02-25 20:00:09 +00:00
parent eabc0f1644
commit bad0521f6c
30 changed files with 1711 additions and 1905 deletions

View File

@@ -24,16 +24,14 @@ CLogging *CLogging::instance = NULL;
//-----------------------------------------------------------------------------
// There is only one Instance
//-----------------------------------------------------------------------------
CLogging *CLogging::getInstance(void)
{
CLogging *CLogging::getInstance(void) {
if (!instance)
instance = new CLogging();
return instance;
}
//-----------------------------------------------------------------------------
void CLogging::deleteInstance(void)
{
void CLogging::deleteInstance(void) {
if (instance)
delete instance;
instance = NULL;
@@ -42,30 +40,26 @@ void CLogging::deleteInstance(void)
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
CLogging::CLogging(void)
{
Debug = false;
LogToFile = false; //not implemented
LogLevel = 0;
Logfile = NULL;
CLogging::CLogging(void) {
Debug = false;
LogToFile = false; //not implemented
LogLevel = 0;
Logfile = NULL;
pthread_mutex_init(&Log_mutex, NULL);
}
//-----------------------------------------------------------------------------
CLogging::~CLogging(void)
{
CLogging::~CLogging(void) {
}
//=============================================================================
//-----------------------------------------------------------------------------
void CLogging::setDebug(bool _debug)
{
Debug = _debug;
void CLogging::setDebug(bool _debug) {
Debug = _debug;
}
//-----------------------------------------------------------------------------
bool CLogging::getDebug(void)
{
return Debug;
bool CLogging::getDebug(void) {
return Debug;
}
//=============================================================================
// Logging Calls
@@ -74,22 +68,19 @@ bool CLogging::getDebug(void)
//=============================================================================
#define bufferlen 1024*8
//-----------------------------------------------------------------------------
void CLogging::printf ( const char *fmt, ... )
{
void CLogging::printf(const char *fmt, ...) {
char buffer[bufferlen];
va_list arglist;
va_start( arglist, fmt );
if(arglist)
vsnprintf( buffer, bufferlen, fmt, arglist );
va_start(arglist, fmt);
vsnprintf(buffer, bufferlen, fmt, arglist);
va_end(arglist);
pthread_mutex_lock( &Log_mutex );
pthread_mutex_lock(&Log_mutex);
::printf(buffer);
if(LogToFile) {
; //FIXME Logging to File
if (LogToFile) {
; //FIXME Logging to File
}
pthread_mutex_unlock( &Log_mutex );
pthread_mutex_unlock(&Log_mutex);
}