Fixed: the nel tracer/printer for libwww

This commit is contained in:
vl 2010-07-28 09:36:22 +02:00
parent 003104a4f3
commit d37b773aca

View file

@ -234,16 +234,24 @@ void _VerifyLibWWW(const char *function, bool ok, const char *file, int line)
int NelPrinter (const char * fmt, va_list pArgs) int NelPrinter (const char * fmt, va_list pArgs)
{ {
nlinfo (fmt, pArgs); char info[1024];
return 0; int ret;
ret = vsnprintf(info, sizeof(info), fmt, pArgs);
nlinfo("%s", info);
return ret;
} }
// *************************************************************************** // ***************************************************************************
int NelTracer (const char * fmt, va_list pArgs) int NelTracer (const char * fmt, va_list pArgs)
{ {
nlwarning (fmt, pArgs); char err[1024];
return 0; int ret;
ret = vsnprintf(err, sizeof(err), fmt, pArgs);
nlwarning ("%s", err);
return ret;
} }
// *************************************************************************** // ***************************************************************************
@ -518,12 +526,14 @@ void setCurrentDomain(const std::string &url)
} }
} }
void initLibWWW() void initLibWWW()
{ {
static bool initialized = false; static bool initialized = false;
if (!initialized) if (!initialized)
{ {
// log all libwww
//WWW_TraceFlag = SHOW_ALL_TRACE;
//HTProfile_newNoCacheClient("Ryzom", "1.1"); //HTProfile_newNoCacheClient("Ryzom", "1.1");
/* Need our own trace and print functions */ /* Need our own trace and print functions */