Renamed DebugGoOn to DebugCrit so it better matches its purpose.

Swapped order of DebugCall and DebugNote so DebugCall is less visible.
Changed default debug level to DebugNote.
Modified a few inadequate uses of DebugCrit.


git-svn-id: http://yate.null.ro/svn/yate/trunk@6250 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2017-08-01 13:08:23 +00:00
parent 7d4da59ace
commit c4c9e994f0
53 changed files with 181 additions and 180 deletions

View File

@ -511,7 +511,7 @@ static void qtMsgHandler(QtMsgType type, const char* text)
dbg = DebugWarn; dbg = DebugWarn;
break; break;
case QtCriticalMsg: case QtCriticalMsg:
dbg = DebugGoOn; dbg = DebugCrit;
break; break;
case QtFatalMsg: case QtFatalMsg:
dbg = DebugFail; dbg = DebugFail;
@ -3502,7 +3502,7 @@ bool QtClient::createWindow(const String& name, const String& alias)
return true; return true;
} }
else else
Debug(QtDriver::self(),DebugGoOn,"Could not create window name=%s alias=%s", Debug(QtDriver::self(),DebugCrit,"Could not create window name=%s alias=%s",
name.c_str(),alias.c_str()); name.c_str(),alias.c_str());
return false; return false;
} }

View File

@ -269,7 +269,7 @@ void CallEndpoint::setLastPeerId()
return; return;
Lock lock(s_mutex,5000000); Lock lock(s_mutex,5000000);
if (!checkRetry(lock)) { if (!checkRetry(lock)) {
Alarm("engine","bug",DebugGoOn,"Set last peer ID failed - timeout on call endpoint mutex owned by '%s'!",s_mutex.owner()); Alarm("engine","bug",DebugCrit,"Set last peer ID failed - timeout on call endpoint mutex owned by '%s'!",s_mutex.owner());
return; return;
} }
if (m_peer) { if (m_peer) {
@ -475,7 +475,7 @@ void Channel::initChan()
Lock mylock(m_driver); Lock mylock(m_driver);
#ifndef NDEBUG #ifndef NDEBUG
if (m_driver->channels().find(this)) { if (m_driver->channels().find(this)) {
Debug(DebugGoOn,"Channel '%s' already in list of '%s' driver [%p]", Debug(DebugCrit,"Channel '%s' already in list of '%s' driver [%p]",
id().c_str(),m_driver->name().c_str(),this); id().c_str(),m_driver->name().c_str(),this);
return; return;
} }

View File

@ -136,7 +136,7 @@ public:
virtual bool received(Message& msg) { virtual bool received(Message& msg) {
Client::s_engineStarted = true; Client::s_engineStarted = true;
if (!(Client::self() && Client::self()->postpone(msg,Client::EngineStart))) if (!(Client::self() && Client::self()->postpone(msg,Client::EngineStart)))
Debug(DebugGoOn,"Failed to postpone %s in client",msg.c_str()); Debug(DebugCrit,"Failed to postpone %s in client",msg.c_str());
return false; return false;
} }
}; };
@ -2859,7 +2859,7 @@ bool Client::addLogic(ClientLogic* logic)
if (logic->priority() < 0) if (logic->priority() < 0)
logic->m_prio = -logic->priority(); logic->m_prio = -logic->priority();
bool dup = (0 != s_logics.find(logic->toString())); bool dup = (0 != s_logics.find(logic->toString()));
Debug(dup ? DebugGoOn : DebugInfo,"Adding client logic%s %p name=%s prio=%d", Debug(dup ? DebugCrit : DebugInfo,"Adding client logic%s %p name=%s prio=%d",
dup ? " [DUPLICATE]" : "",logic,logic->toString().c_str(),logic->priority()); dup ? " [DUPLICATE]" : "",logic,logic->toString().c_str(),logic->priority());
for (ObjList* l = s_logics.skipNull(); l; l = l->skipNext()) { for (ObjList* l = s_logics.skipNull(); l; l = l->skipNext()) {

View File

@ -609,7 +609,7 @@ bool DataSource::attach(DataConsumer* consumer, bool override)
src2->detach(consumer); src2->detach(consumer);
s_consSrcMutex.lock(); s_consSrcMutex.lock();
if (src) { if (src) {
Debug(DebugGoOn,"DataSource %p raced us attaching consumer %p [%p]", Debug(DebugCrit,"DataSource %p raced us attaching consumer %p [%p]",
src,consumer,this); src,consumer,this);
s_consSrcMutex.unlock(); s_consSrcMutex.unlock();
consumer->deref(); consumer->deref();

View File

@ -1279,7 +1279,7 @@ SLib::~SLib()
if (fini || m_nounload) { if (fini || m_nounload) {
count -= plugins.count(); count -= plugins.count();
if (count != m_count) if (count != m_count)
Debug(DebugGoOn,"Finalizing '%s' removed %u out of %u plugins", Debug(DebugCrit,"Finalizing '%s' removed %u out of %u plugins",
c_str(),count,m_count); c_str(),count,m_count);
checkPoint(); checkPoint();
return; return;
@ -1288,19 +1288,19 @@ SLib::~SLib()
} }
int err = dlclose(m_handle); int err = dlclose(m_handle);
if (err) if (err)
Debug(DebugGoOn,"Error %d on dlclose(%p) of '%s'",err,m_handle,c_str()); Debug(DebugCrit,"Error %d on dlclose(%p) of '%s'",err,m_handle,c_str());
else if (s_keepclosing) { else if (s_keepclosing) {
int tries; int tries;
for (tries=0; tries<10; tries++) for (tries=0; tries<10; tries++)
if (dlclose(m_handle)) if (dlclose(m_handle))
break; break;
if (tries) if (tries)
Debug(DebugGoOn,"Made %d attempts to dlclose(%p) '%s'", Debug(DebugCrit,"Made %d attempts to dlclose(%p) '%s'",
tries,m_handle,c_str()); tries,m_handle,c_str());
} }
count -= plugins.count(); count -= plugins.count();
if (count != m_count) if (count != m_count)
Debug(DebugGoOn,"Unloading '%s' removed %u out of %u plugins", Debug(DebugWarn,"Unloading '%s' removed %u out of %u plugins",
c_str(),count,m_count); c_str(),count,m_count);
checkPoint(); checkPoint();
} }
@ -1427,7 +1427,7 @@ int Engine::engineInit()
WSADATA wsaData; WSADATA wsaData;
int errc = ::WSAStartup(MAKEWORD(2,2), &wsaData); int errc = ::WSAStartup(MAKEWORD(2,2), &wsaData);
if (errc) { if (errc) {
Debug(DebugGoOn,"Failed to initialize the Windows Sockets library, error code %d",errc); Debug(DebugCrit,"Failed to initialize the Windows Sockets library, error code %d",errc);
return errc & 127; return errc & 127;
} }
#else #else
@ -1776,7 +1776,7 @@ int Engine::engineCleanup()
unsigned int cnt = plugins.count(); unsigned int cnt = plugins.count();
plugins.clear(); plugins.clear();
if (mux || cnt) if (mux || cnt)
Debug(DebugGoOn,"Exiting with %d locked mutexes and %u plugins loaded!",mux,cnt); Debug(DebugWarn,"Exiting with %d locked mutexes and %u plugins loaded!",mux,cnt);
if (GenObject::getObjCounting()) { if (GenObject::getObjCounting()) {
String str; String str;
int obj = EngineStatusHandler::objects(str); int obj = EngineStatusHandler::objects(str);
@ -2353,7 +2353,7 @@ int Engine::cleanupLibrary()
if (mux < 0) if (mux < 0)
mux = 0; mux = 0;
if (mux) if (mux)
Debug(DebugGoOn,"Exiting with %d locked mutexes!",mux); Debug(DebugCrit,"Exiting with %d locked mutexes!",mux);
if (GenObject::getObjCounting()) { if (GenObject::getObjCounting()) {
String str; String str;
int obj = EngineStatusHandler::objects(str); int obj = EngineStatusHandler::objects(str);

View File

@ -235,7 +235,7 @@ MutexPrivate::~MutexPrivate()
Debug(DebugFail,"MutexPrivate '%s' owned by '%s' destroyed with %u locks, %u waiting [%p]", Debug(DebugFail,"MutexPrivate '%s' owned by '%s' destroyed with %u locks, %u waiting [%p]",
m_name,m_owner,m_locked,m_waiting,this); m_name,m_owner,m_locked,m_waiting,this);
else if (warn) else if (warn)
Debug(DebugGoOn,"MutexPrivate '%s' owned by '%s' unlocked in destructor [%p]", Debug(DebugCrit,"MutexPrivate '%s' owned by '%s' unlocked in destructor [%p]",
m_name,m_owner,this); m_name,m_owner,this);
} }

View File

@ -2028,7 +2028,7 @@ bool Socket::select(bool* readok, bool* writeok, bool* except, struct timeval* t
if (tmp >= (SOCKET)FD_SETSIZE) { if (tmp >= (SOCKET)FD_SETSIZE) {
if (localFail) { if (localFail) {
localFail = false; localFail = false;
Alarm("engine","socket",DebugGoOn,"Socket::select: handle %d larger than compiled in maximum %d", Alarm("engine","socket",DebugCrit,"Socket::select: handle %d larger than compiled in maximum %d",
tmp,FD_SETSIZE); tmp,FD_SETSIZE);
} }
return false; return false;

View File

@ -1051,21 +1051,21 @@ static char* string_printf(unsigned int& length, const char* format, va_list& va
if (len < 0) { if (len < 0) {
#ifdef _WINDOWS #ifdef _WINDOWS
if (errno == ERANGE) { if (errno == ERANGE) {
XDebug("String",DebugGoOn,"string_printf() incomplete write"); XDebug("String",DebugCrit,"string_printf() incomplete write");
buf[length] = 0; buf[length] = 0;
length = 0; length = 0;
return buf; return buf;
} }
#endif #endif
::free(buf); ::free(buf);
Debug("String",DebugGoOn,"string_printf(): vsnprintf() failed!"); Debug("String",DebugCrit,"string_printf(): vsnprintf() failed!");
return 0; return 0;
} }
if (len < (int)length) if (len < (int)length)
length = len; length = len;
#ifdef XDEBUG #ifdef XDEBUG
else if (len > (int)length || buf[len]) else if (len > (int)length || buf[len])
Debug("String",DebugGoOn,"string_printf() incomplete write"); Debug("String",DebugCrit,"string_printf() incomplete write");
#endif #endif
buf[length] = 0; buf[length] = 0;
return buf; return buf;

View File

@ -101,6 +101,7 @@ namespace TelEngine {
#define DebugMin DebugFail #define DebugMin DebugFail
#define DebugVis DebugConf #define DebugVis DebugConf
#define DebugDef DebugNote
#define DebugMax DebugAll #define DebugMax DebugAll
#define OUT_BUFFER_SIZE 8192 #define OUT_BUFFER_SIZE 8192
@ -111,7 +112,7 @@ namespace TelEngine {
#define REFOBJECT_MUTEX_COUNT 47 #define REFOBJECT_MUTEX_COUNT 47
#endif #endif
static int s_debug = DebugWarn; static int s_debug = DebugDef;
static int s_indent = 0; static int s_indent = 0;
static bool s_debugging = true; static bool s_debugging = true;
static bool s_abort = false; static bool s_abort = false;
@ -122,13 +123,13 @@ static Debugger::Formatting s_fmtstamp = Debugger::None;
static const char* const s_colors[11] = { static const char* const s_colors[11] = {
"\033[5;41;1;33m\033[K",// DebugFail - blinking yellow on red "\033[5;41;1;33m\033[K",// DebugFail - blinking yellow on red
"\033[44;1;37m\033[K", // DebugTest - white on blue "\033[44;1;37m\033[K", // DebugTest - white on blue
"\033[41;1;37m\033[K", // DebugGoOn - white on red "\033[41;1;37m\033[K", // DebugCrit - white on red
"\033[41;37m\033[K", // DebugConf - gray on red "\033[41;37m\033[K", // DebugConf - gray on red
"\033[40;31m\033[K", // DebugStub - red on black "\033[40;31m\033[K", // DebugStub - red on black
"\033[40;1;31m\033[K", // DebugWarn - light red on black "\033[40;1;31m\033[K", // DebugWarn - light red on black
"\033[40;1;33m\033[K", // DebugMild - yellow on black "\033[40;1;33m\033[K", // DebugMild - yellow on black
"\033[40;1;37m\033[K", // DebugCall - white on black
"\033[40;1;32m\033[K", // DebugNote - light green on black "\033[40;1;32m\033[K", // DebugNote - light green on black
"\033[40;1;37m\033[K", // DebugCall - white on black
"\033[40;1;36m\033[K", // DebugInfo - light cyan on black "\033[40;1;36m\033[K", // DebugInfo - light cyan on black
"\033[40;36m\033[K" // DebugAll - cyan on black "\033[40;36m\033[K" // DebugAll - cyan on black
}; };
@ -136,13 +137,13 @@ static const char* const s_colors[11] = {
static const char* const s_levels[11] = { static const char* const s_levels[11] = {
"FAIL", "FAIL",
"TEST", "TEST",
"GOON", "CRIT",
"CONF", "CONF",
"STUB", "STUB",
"WARN", "WARN",
"MILD", "MILD",
"CALL",
"NOTE", "NOTE",
"CALL",
"INFO", "INFO",
"ALL", "ALL",
}; };

View File

@ -227,7 +227,7 @@ ThreadPrivate* ThreadPrivate::create(Thread* t,const char* name,Thread::Priority
::pthread_attr_destroy(&attr); ::pthread_attr_destroy(&attr);
#endif #endif
if (e) { if (e) {
Alarm("engine","system",DebugGoOn,"Error %d while creating pthread in '%s' [%p]",e,name,p); Alarm("engine","system",DebugCrit,"Error %d while creating pthread in '%s' [%p]",e,name,p);
p->m_thread = 0; p->m_thread = 0;
p->destroy(); p->destroy();
return 0; return 0;
@ -373,7 +373,7 @@ bool ThreadPrivate::cancel(bool hard)
} }
m_running = false; m_running = false;
#ifdef _WINDOWS #ifdef _WINDOWS
Debug(DebugGoOn,"ThreadPrivate '%s' terminating win32 thread %lu [%p]", Debug(DebugCrit,"ThreadPrivate '%s' terminating win32 thread %lu [%p]",
m_name,thread,this); m_name,thread,this);
ret = ::TerminateThread(reinterpret_cast<HANDLE>(thread),0) != 0; ret = ::TerminateThread(reinterpret_cast<HANDLE>(thread),0) != 0;
#else #else
@ -382,7 +382,7 @@ bool ThreadPrivate::cancel(bool hard)
m_name,&thread,this); m_name,&thread,this);
ret = !::pthread_cancel(thread); ret = !::pthread_cancel(thread);
#else #else
Debug(DebugGoOn,"ThreadPrivate '%s' cannot terminate %p on this platform [%p]", Debug(DebugCrit,"ThreadPrivate '%s' cannot terminate %p on this platform [%p]",
m_name,&thread,this); m_name,&thread,this);
#endif #endif
#endif /* _WINDOWS */ #endif /* _WINDOWS */
@ -487,14 +487,14 @@ void ThreadPrivate::killall()
else { else {
if (ok) { if (ok) {
#ifdef _WINDOWS #ifdef _WINDOWS
Debug(DebugGoOn,"Could not kill %p but seems OK to delete it (library bug?)",t); Debug(DebugWarn,"Could not kill %p but seems OK to delete it (library bug?)",t);
s_tmutex.unlock(); s_tmutex.unlock();
t->destroy(); t->destroy();
s_tmutex.lock(); s_tmutex.lock();
if (t != l->get()) if (t != l->get())
c = 1; c = 1;
#else #else
Debug(DebugGoOn,"Could not kill cancelled %p so we'll abandon it (library bug?)",t); Debug(DebugCrit,"Could not kill cancelled %p so we'll abandon it (library bug?)",t);
l->remove(t,false); l->remove(t,false);
c = 1; c = 1;
#endif #endif
@ -502,7 +502,7 @@ void ThreadPrivate::killall()
} }
Thread::msleep(1); Thread::msleep(1);
if (++c >= HARD_KILLS) { if (++c >= HARD_KILLS) {
Debug(DebugGoOn,"Could not kill %p, will use sledgehammer later.",t); Debug(DebugWarn,"Could not kill %p, will use sledgehammer later.",t);
sledgehammer = true; sledgehammer = true;
t->m_thread = 0; t->m_thread = 0;
l = l->next(); l = l->next();
@ -515,10 +515,10 @@ void ThreadPrivate::killall()
// usually too big since many libraries have threads of their own... // usually too big since many libraries have threads of their own...
if (sledgehammer) { if (sledgehammer) {
#ifdef THREAD_KILL #ifdef THREAD_KILL
Debug(DebugGoOn,"Brutally killing remaining threads!"); Debug(DebugCrit,"Brutally killing remaining threads!");
::pthread_kill_other_threads_np(); ::pthread_kill_other_threads_np();
#else #else
Debug(DebugGoOn,"Aargh! I cannot kill remaining threads on this platform!"); Debug(DebugCrit,"Cannot kill remaining threads on this platform!");
#endif #endif
} }
} }

View File

@ -1138,7 +1138,7 @@ u_int8_t IAXFrame::packSubclass(u_int32_t value)
return i | 0x80; return i | 0x80;
v <<= 1; v <<= 1;
} }
Debug(DebugGoOn,"IAXFrame could not pack subclass %u (0x%x)",value,value); Debug(DebugCrit,"IAXFrame could not pack subclass %u (0x%x)",value,value);
return 0; return 0;
} }
@ -1525,7 +1525,7 @@ unsigned int IAXMetaTrunkFrame::add(u_int16_t sCallNo, const DataBlock& data, u_
return 0; return 0;
// Avoid buffer overflow // Avoid buffer overflow
if (data.length() > m_maxDataLen) { if (data.length() > m_maxDataLen) {
Debug(m_engine,DebugGoOn, Debug(m_engine,DebugWarn,
"Trunk frame '%s:%d' can't add %u bytes (max=%u) for call %u [%p]", "Trunk frame '%s:%d' can't add %u bytes (max=%u) for call %u [%p]",
m_addr.host().c_str(),m_addr.port(),data.length(),m_maxDataLen,sCallNo,this); m_addr.host().c_str(),m_addr.port(),data.length(),m_maxDataLen,sCallNo,this);
return 0; return 0;

View File

@ -2002,7 +2002,7 @@ JBStreamSet::JBStreamSet(JBStreamSetList* owner)
JBStreamSet::~JBStreamSet() JBStreamSet::~JBStreamSet()
{ {
if (m_clients.skipNull()) if (m_clients.skipNull())
Debug(m_owner->engine(),DebugGoOn, Debug(m_owner->engine(),DebugCrit,
"JBStreamSet(%s) destroyed while owning %u streams [%p]", "JBStreamSet(%s) destroyed while owning %u streams [%p]",
m_owner->toString().c_str(),m_clients.count(),this); m_owner->toString().c_str(),m_clients.count(),this);
m_owner->remove(this); m_owner->remove(this);

View File

@ -598,7 +598,7 @@ void MGCPEngine::cleanup(bool gracefully, const char* text)
while (m_threads.skipNull()) { while (m_threads.skipNull()) {
mylock.drop(); mylock.drop();
if (Time::now() > maxWait) { if (Time::now() > maxWait) {
Debug(this,DebugGoOn,"Private threads did not terminate!"); Debug(this,DebugCrit,"Private threads did not terminate!");
return; return;
} }
Thread::idle(); Thread::idle();

View File

@ -132,7 +132,7 @@ bool MultiRouter::received(Message& msg, int id)
info = m_list.find(call); info = m_list.find(call);
if (info) { if (info) {
if (*info != chanid) { if (*info != chanid) {
Debug(DebugGoOn,"Channel mismatch! call=%p id='%s' stored='%s'", Debug(DebugCrit,"Channel mismatch! call=%p id='%s' stored='%s'",
call,chanid.c_str(),info->c_str()); call,chanid.c_str(),info->c_str());
return false; return false;
} }
@ -145,7 +145,7 @@ bool MultiRouter::received(Message& msg, int id)
else if (!info->call()) else if (!info->call())
info->setCall(call); info->setCall(call);
else if (info->call() != call) { else if (info->call() != call) {
Debug(DebugGoOn,"Channel mismatch! id='%s' call=%p stored=%p", Debug(DebugCrit,"Channel mismatch! id='%s' call=%p stored=%p",
chanid.c_str(),call,info->call()); chanid.c_str(),call,info->call());
return false; return false;
} }

View File

@ -187,7 +187,7 @@ RTPTransport::~RTPTransport()
DDebug(DebugAll,"RTPTransport::~RTPTransport() [%p]",this); DDebug(DebugAll,"RTPTransport::~RTPTransport() [%p]",this);
RTPGroup* g = group(); RTPGroup* g = group();
if (g) if (g)
Debug(DebugGoOn,"RTPTransport destroyed while in RTPGroup %p [%p]",g,this); Debug(DebugCrit,"RTPTransport destroyed while in RTPGroup %p [%p]",g,this);
group(0); group(0);
setProcessor(); setProcessor();
setMonitor(); setMonitor();

View File

@ -299,7 +299,7 @@ SignallingEngine::SignallingEngine(const char* name)
SignallingEngine::~SignallingEngine() SignallingEngine::~SignallingEngine()
{ {
if (m_thread) { if (m_thread) {
Debug(this,DebugGoOn, Debug(this,DebugCrit,
"Engine destroyed with worker thread still running [%p]",this); "Engine destroyed with worker thread still running [%p]",this);
stop(); stop();
} }
@ -469,7 +469,7 @@ bool SignallingEngine::start(const char* name, Thread::Priority prio, unsigned l
return true; return true;
} }
delete tmp; delete tmp;
Debug(this,DebugGoOn,"Engine failed to start worker thread [%p]",this); Debug(this,DebugCrit,"Engine failed to start worker thread [%p]",this);
return false; return false;
} }

View File

@ -45,7 +45,7 @@ const TokenDict SignallingInterface::s_notifName[] = {
SignallingInterface::~SignallingInterface() SignallingInterface::~SignallingInterface()
{ {
if (m_receiver) if (m_receiver)
Debug(this,DebugGoOn,"Destroyed with receiver (%p) attached",m_receiver); Debug(this,DebugCrit,"Destroyed with receiver (%p) attached",m_receiver);
} }
void SignallingInterface::attach(SignallingReceiver* receiver) void SignallingInterface::attach(SignallingReceiver* receiver)
@ -105,7 +105,7 @@ SignallingReceiver::SignallingReceiver(const char* name)
SignallingReceiver::~SignallingReceiver() SignallingReceiver::~SignallingReceiver()
{ {
if (m_interface) if (m_interface)
Debug(this,DebugGoOn,"Destroyed with interface (%p) attached",m_interface); Debug(this,DebugCrit,"Destroyed with interface (%p) attached",m_interface);
TelEngine::destruct(attach(0)); TelEngine::destruct(attach(0));
} }

View File

@ -4270,11 +4270,11 @@ SS7MSU* SS7ISUP::buildMSU(SS7MsgISUP::Type type, unsigned char sio,
const IsupParam* param = getParamDesc(ptype); const IsupParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we don't know the length // this is fatal as we don't know the length
Debug(this,DebugGoOn,"Missing description of fixed ISUP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of fixed ISUP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
if (!param->size) { if (!param->size) {
Debug(this,DebugGoOn,"Invalid (variable) description of fixed ISUP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Invalid (variable) description of fixed ISUP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
len += param->size; len += param->size;
@ -4286,7 +4286,7 @@ SS7MSU* SS7ISUP::buildMSU(SS7MsgISUP::Type type, unsigned char sio,
const IsupParam* param = getParamDesc(ptype); const IsupParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we won't be able to populate later // this is fatal as we won't be able to populate later
Debug(this,DebugGoOn,"Missing description of variable ISUP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of variable ISUP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
if (param->size) if (param->size)
@ -4327,7 +4327,7 @@ SS7MSU* SS7ISUP::buildMSU(SS7MsgISUP::Type type, unsigned char sio,
continue; continue;
} }
if (!encodeParam(this,*msu,param,params,exclude,prefix,d)) if (!encodeParam(this,*msu,param,params,exclude,prefix,d))
Debug(this,DebugGoOn,"Could not encode fixed ISUP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Could not encode fixed ISUP parameter %s [%p]",param->name,this);
d += param->size; d += param->size;
} }
// now populate with mandatory variable parameters // now populate with mandatory variable parameters
@ -4346,11 +4346,11 @@ SS7MSU* SS7ISUP::buildMSU(SS7MsgISUP::Type type, unsigned char sio,
unsigned char size = encodeParam(this,*msu,param,params,exclude,prefix); unsigned char size = encodeParam(this,*msu,param,params,exclude,prefix);
d = msu->getData(0,len+1); d = msu->getData(0,len+1);
if (!(size && d)) { if (!(size && d)) {
Debug(this,DebugGoOn,"Could not encode variable ISUP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Could not encode variable ISUP parameter %s [%p]",param->name,this);
continue; continue;
} }
if ((d[len] != size) || (msu->length() != (len+1+size))) { if ((d[len] != size) || (msu->length() != (len+1+size))) {
Debug(this,DebugGoOn,"Invalid encoding variable ISUP parameter %s (len=%u size=%u stor=%u) [%p]", Debug(this,DebugCrit,"Invalid encoding variable ISUP parameter %s (len=%u size=%u stor=%u) [%p]",
param->name,len,size,d[len],this); param->name,len,size,d[len],this);
continue; continue;
} }
@ -4513,11 +4513,11 @@ bool SS7ISUP::decodeMessage(NamedList& msg,
const IsupParam* param = getParamDesc(ptype); const IsupParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we don't know the length // this is fatal as we don't know the length
Debug(this,DebugGoOn,"Missing description of fixed ISUP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of fixed ISUP parameter 0x%02x [%p]",ptype,this);
return false; return false;
} }
if (!param->size) { if (!param->size) {
Debug(this,DebugGoOn,"Invalid (variable) description of fixed ISUP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Invalid (variable) description of fixed ISUP parameter %s [%p]",param->name,this);
return false; return false;
} }
if (paramLen < param->size) { if (paramLen < param->size) {
@ -4539,7 +4539,7 @@ bool SS7ISUP::decodeMessage(NamedList& msg,
const IsupParam* param = getParamDesc(ptype); const IsupParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// we could skip over unknown mandatory variable length but it's still bad // we could skip over unknown mandatory variable length but it's still bad
Debug(this,DebugGoOn,"Missing description of variable ISUP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of variable ISUP parameter 0x%02x [%p]",ptype,this);
return false; return false;
} }
if (param->size) if (param->size)

View File

@ -1751,7 +1751,7 @@ ISDNLayer2::ISDNLayer2(const NamedList& params, const char* name, u_int8_t tei)
ISDNLayer2::~ISDNLayer2() ISDNLayer2::~ISDNLayer2()
{ {
if (m_layer3) if (m_layer3)
Debug(this,DebugGoOn,"Destroyed with Layer 3 (%p) attached",m_layer3); Debug(this,DebugCrit,"Destroyed with Layer 3 (%p) attached",m_layer3);
attach(0); attach(0);
XDebug(this,DebugAll,"~ISDNLayer2"); XDebug(this,DebugAll,"~ISDNLayer2");
} }

View File

@ -1249,7 +1249,7 @@ bool SS7Router::setRouteSpecificState(SS7PointCode::Type type, unsigned int pack
continue; continue;
SS7Route* r = l3->findRoute(type,packedPC); SS7Route* r = l3->findRoute(type,packedPC);
if (!r) { if (!r) {
Debug(this,DebugGoOn,"Route to %u not found in network '%s'",packedPC,l3->toString().c_str()); Debug(this,DebugWarn,"Route to %u not found in network '%s'",packedPC,l3->toString().c_str());
continue; continue;
} }
ok = true; ok = true;

View File

@ -1447,9 +1447,9 @@ SCCP::~SCCP()
DDebug(this,DebugAll,"Destroying SCCP [%p]",this); DDebug(this,DebugAll,"Destroying SCCP [%p]",this);
// If we have undetached users scream as hard as we can // If we have undetached users scream as hard as we can
if (m_users.skipNull()) if (m_users.skipNull())
Debug(this,DebugGoOn,"Destroying SCCP with %d undetached users!!!",m_users.count()); Debug(this,DebugCrit,"Destroying SCCP with %d undetached users!!!",m_users.count());
if (m_translator) if (m_translator)
Debug(this,DebugGoOn,"Destroying SCCP with an valid translator!!!"); Debug(this,DebugCrit,"Destroying SCCP with a valid translator!!!");
} }
void SCCP::attach(SCCPUser* user) void SCCP::attach(SCCPUser* user)
@ -2953,7 +2953,7 @@ int SS7SCCP::transmitMessage(SS7MsgSCCP* sccpMsg, bool local)
if (!sccpMsg || !sccpMsg->getData()) if (!sccpMsg || !sccpMsg->getData())
return -1; return -1;
if (unknownPointCodeType()) { if (unknownPointCodeType()) {
Debug(this,DebugGoOn,"SCCP unavailable!! Reason Unknown pointcode type %s",SS7PointCode::lookup(m_type)); Debug(this,DebugConf,"SCCP unavailable!! Reason Unknown pointcode type %s",SS7PointCode::lookup(m_type));
return -1; return -1;
} }
Lock lock(this); Lock lock(this);
@ -3147,7 +3147,7 @@ void SS7SCCP::checkSCLCOptParams(SS7MsgSCCP* msg)
int SS7SCCP::sendMessage(DataBlock& data, const NamedList& params) int SS7SCCP::sendMessage(DataBlock& data, const NamedList& params)
{ {
if (unknownPointCodeType()) { if (unknownPointCodeType()) {
Debug(this,DebugGoOn,"SCCP unavailable!! Reason Unknown pointcode type %s",SS7PointCode::lookup(m_type)); Debug(this,DebugConf,"SCCP unavailable!! Reason Unknown pointcode type %s",SS7PointCode::lookup(m_type));
return -1; return -1;
} }
#ifdef XDEBUG #ifdef XDEBUG
@ -3234,7 +3234,7 @@ void SS7SCCP::getMaxDataLen(const SS7MsgSCCP* msg, const SS7Label& label,
unsigned int& udt, unsigned int& xudt, unsigned int& ludt) unsigned int& udt, unsigned int& xudt, unsigned int& ludt)
{ {
if (!network()) { if (!network()) {
Debug(this,DebugGoOn,"No Network Attached!!!"); Debug(this,DebugConf,"No Network Attached!!!");
return; return;
} }
@ -3411,7 +3411,7 @@ int SS7SCCP::segmentMessage(SS7MsgSCCP* origMsg, const SS7Label& label, bool loc
ajustMessageParams(origMsg->params(),origMsg->type()); ajustMessageParams(origMsg->params(),origMsg->type());
SS7MSU* msu = buildMSU(origMsg,label,false); SS7MSU* msu = buildMSU(origMsg,label,false);
if (!msu) { if (!msu) {
Debug(this,DebugGoOn,"Failed to build msu from sccpMessage %s", Debug(this,DebugWarn,"Failed to build MSU from sccpMessage %s",
SS7MsgSCCP::lookup(origMsg->type())); SS7MsgSCCP::lookup(origMsg->type()));
return -1; return -1;
} }
@ -3475,7 +3475,7 @@ int SS7SCCP::segmentMessage(SS7MsgSCCP* origMsg, const SS7Label& label, bool loc
msg->removeData(); msg->removeData();
temp.clear(false); temp.clear(false);
if (!msu) { if (!msu) {
Debug(this,DebugGoOn,"Failed to build msu from sccpMessage %s", Debug(this,DebugWarn,"Failed to build MSU from sccpMessage %s",
SS7MsgSCCP::lookup(msgType)); SS7MsgSCCP::lookup(msgType));
TelEngine::destruct(msg); TelEngine::destruct(msg);
TelEngine::destruct(listSegments); TelEngine::destruct(listSegments);
@ -3518,7 +3518,7 @@ int SS7SCCP::segmentMessage(SS7MsgSCCP* origMsg, const SS7Label& label, bool loc
msg->removeData(); msg->removeData();
temp.clear(false); temp.clear(false);
if (!msu) { if (!msu) {
Debug(this,DebugGoOn,"Failed to build msu from sccpMessage %s", Debug(this,DebugWarn,"Failed to build MSU from sccpMessage %s",
SS7MsgSCCP::lookup(msgType)); SS7MsgSCCP::lookup(msgType));
TelEngine::destruct(msg); TelEngine::destruct(msg);
TelEngine::destruct(listSegments); TelEngine::destruct(listSegments);
@ -3610,11 +3610,11 @@ SS7MSU* SS7SCCP::buildMSU(SS7MsgSCCP* msg, const SS7Label& label, bool checkLeng
const SCCPParam* param = getParamDesc(ptype); const SCCPParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we don't know the length // this is fatal as we don't know the length
Debug(this,DebugGoOn,"Missing description of fixed SCCP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of fixed SCCP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
if (!param->size) { if (!param->size) {
Debug(this,DebugGoOn,"Invalid (variable) description of fixed SCCP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Invalid (variable) description of fixed SCCP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
len += param->size; len += param->size;
@ -3628,7 +3628,7 @@ SS7MSU* SS7SCCP::buildMSU(SS7MsgSCCP* msg, const SS7Label& label, bool checkLeng
const SCCPParam* param = getParamDesc(ptype); const SCCPParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we won't be able to populate later // this is fatal as we won't be able to populate later
Debug(this,DebugGoOn,"Missing description of variable SCCP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of variable SCCP parameter 0x%02x [%p]",ptype,this);
return 0; return 0;
} }
if (param->size) if (param->size)
@ -3656,7 +3656,7 @@ SS7MSU* SS7SCCP::buildMSU(SS7MsgSCCP* msg, const SS7Label& label, bool checkLeng
continue; continue;
} }
if (!encodeParam(this,*msu,param,&msg->params(),exclude,prefix,d)) if (!encodeParam(this,*msu,param,&msg->params(),exclude,prefix,d))
Debug(this,DebugGoOn,"Could not encode fixed SCCP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Could not encode fixed SCCP parameter %s [%p]",param->name,this);
d += param->size; d += param->size;
} }
// now populate with mandatory variable parameters // now populate with mandatory variable parameters
@ -3688,11 +3688,11 @@ SS7MSU* SS7SCCP::buildMSU(SS7MsgSCCP* msg, const SS7Label& label, bool checkLeng
size = encodeParam(this,*msu,param,&msg->params(),exclude,prefix); size = encodeParam(this,*msu,param,&msg->params(),exclude,prefix);
d = msu->getData(0,len+1); d = msu->getData(0,len+1);
if (!(size && d)) { if (!(size && d)) {
Debug(this,DebugGoOn,"Could not encode variable SCCP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Could not encode variable SCCP parameter %s [%p]",param->name,this);
continue; continue;
} }
if (ptype != SS7MsgSCCP::LongData && ((d[len] != size) || (msu->length() != (len + size + 1)))) { if (ptype != SS7MsgSCCP::LongData && ((d[len] != size) || (msu->length() != (len + size + 1)))) {
Debug(this,DebugGoOn,"Invalid encoding variable SCCP parameter %s (len=%u size=%u stor=%u msuLength = %u) [%p]", Debug(this,DebugCrit,"Invalid encoding variable SCCP parameter %s (len=%u size=%u stor=%u msuLength = %u) [%p]",
param->name,len,size,d[len],msu->length(),this); param->name,len,size,d[len],msu->length(),this);
continue; continue;
} }
@ -4217,11 +4217,11 @@ bool SS7SCCP::decodeMessage(SS7MsgSCCP* msg, SS7PointCode::Type pcType,
const SCCPParam* param = getParamDesc(ptype); const SCCPParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// this is fatal as we don't know the length // this is fatal as we don't know the length
Debug(this,DebugGoOn,"Missing description of fixed SCCP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of fixed SCCP parameter 0x%02x [%p]",ptype,this);
return false; return false;
} }
if (!param->size) { if (!param->size) {
Debug(this,DebugGoOn,"Invalid (variable) description of fixed SCCP parameter %s [%p]",param->name,this); Debug(this,DebugCrit,"Invalid (variable) description of fixed SCCP parameter %s [%p]",param->name,this);
return false; return false;
} }
if (paramLen < param->size) { if (paramLen < param->size) {
@ -4245,13 +4245,13 @@ bool SS7SCCP::decodeMessage(SS7MsgSCCP* msg, SS7PointCode::Type pcType,
const SCCPParam* param = getParamDesc(ptype); const SCCPParam* param = getParamDesc(ptype);
if (!param) { if (!param) {
// we could skip over unknown mandatory variable length but it's still bad // we could skip over unknown mandatory variable length but it's still bad
Debug(this,DebugGoOn,"Missing description of variable SCCP parameter 0x%02x [%p]",ptype,this); Debug(this,DebugCrit,"Missing description of variable SCCP parameter 0x%02x [%p]",ptype,this);
return false; return false;
} }
if (param->size) if (param->size)
Debug(this,DebugMild,"Invalid (fixed) description of variable SCCP parameter %s [%p]",param->name,this); Debug(this,DebugMild,"Invalid (fixed) description of variable SCCP parameter %s [%p]",param->name,this);
if (!paramPtr || paramLen <= 0) { if (!paramPtr || paramLen <= 0) {
Debug(this,DebugGoOn, Debug(this,DebugWarn,
"Unexpected end of stream!! Expecting to decode variabile parameter %s but there is no data left!!!", "Unexpected end of stream!! Expecting to decode variabile parameter %s but there is no data left!!!",
param->name); param->name);
return false; return false;

View File

@ -277,7 +277,7 @@ SS7TCAP::~SS7TCAP()
{ {
Debug(this,DebugAll,"SS7TCAP::~SS7TCAP() [%p] destroyed, refCount=%d, usersCount=%d",this,refcount(),m_users.count()); Debug(this,DebugAll,"SS7TCAP::~SS7TCAP() [%p] destroyed, refCount=%d, usersCount=%d",this,refcount(),m_users.count());
if (m_users.count()) { if (m_users.count()) {
Debug(this,DebugGoOn,"SS7TCAP destroyed while having %d user(s) still attached [%p]",m_users.count(),this); Debug(this,DebugCrit,"SS7TCAP destroyed while having %d user(s) still attached [%p]",m_users.count(),this);
ListIterator iter(m_users); ListIterator iter(m_users);
for (;;) { for (;;) {
TCAPUser* user = static_cast<TCAPUser*>(iter.get()); TCAPUser* user = static_cast<TCAPUser*>(iter.get());

View File

@ -209,7 +209,7 @@ void SIPMessage::complete(SIPEngine* engine, const char* user, const char* domai
if (!getParty()) { if (!getParty()) {
engine->buildParty(this); engine->buildParty(this);
if (!getParty()) { if (!getParty()) {
Debug(engine,DebugGoOn,"Could not complete party-less SIP message [%p]",this); Debug(engine,DebugCrit,"Could not complete party-less SIP message [%p]",this);
return; return;
} }
} }

View File

@ -183,7 +183,7 @@ bool SIPTransaction::changeState(int newstate)
if ((newstate < 0) || (newstate == m_state)) if ((newstate < 0) || (newstate == m_state))
return false; return false;
if (m_state == Invalid) { if (m_state == Invalid) {
Debug(getEngine(),DebugGoOn,"SIPTransaction is already invalid [%p]",this); Debug(getEngine(),DebugWarn,"SIPTransaction is already invalid [%p]",this);
return false; return false;
} }
DDebug(getEngine(),DebugAll,"SIPTransaction state changed from %s to %s [%p]", DDebug(getEngine(),DebugAll,"SIPTransaction state changed from %s to %s [%p]",

View File

@ -676,13 +676,13 @@ void CallGenPlugin::initialize()
CleanThread* cln = new CleanThread; CleanThread* cln = new CleanThread;
if (!cln->startup()) { if (!cln->startup()) {
Debug(DebugGoOn,"Failed to start call generator cleaner thread"); Debug(DebugCrit,"Failed to start call generator cleaner thread");
delete cln; delete cln;
return; return;
} }
GenThread* gen = new GenThread; GenThread* gen = new GenThread;
if (!gen->startup()) { if (!gen->startup()) {
Debug(DebugGoOn,"Failed to start call generator thread"); Debug(DebugCrit,"Failed to start call generator thread");
delete gen; delete gen;
} }
} }

View File

@ -182,23 +182,23 @@ bool DSoundPlay::init()
{ {
HRESULT hr; HRESULT hr;
if (FAILED(hr = ::CoInitializeEx(NULL,COINIT_MULTITHREADED))) { if (FAILED(hr = ::CoInitializeEx(NULL,COINIT_MULTITHREADED))) {
Debug(DebugGoOn,"Could not initialize the COM library, code 0x%X",hr); Debug(DebugCrit,"Could not initialize the COM library, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = ::CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, if (FAILED(hr = ::CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER,
IID_IDirectSound, (void**)&m_ds)) || !m_ds) { IID_IDirectSound, (void**)&m_ds)) || !m_ds) {
Debug(DebugGoOn,"Could not create the DirectSound object, code 0x%X",hr); Debug(DebugCrit,"Could not create the DirectSound object, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = m_ds->Initialize(m_device))) { if (FAILED(hr = m_ds->Initialize(m_device))) {
Debug(DebugGoOn,"Could not initialize the DirectSound object, code 0x%X",hr); Debug(DebugWarn,"Could not initialize the DirectSound object, code 0x%X",hr);
return false; return false;
} }
HWND wnd = GetForegroundWindow(); HWND wnd = GetForegroundWindow();
if (!wnd) if (!wnd)
wnd = GetDesktopWindow(); wnd = GetDesktopWindow();
if (FAILED(hr = m_ds->SetCooperativeLevel(wnd,s_primary ? DSSCL_WRITEPRIMARY : DSSCL_EXCLUSIVE))) { if (FAILED(hr = m_ds->SetCooperativeLevel(wnd,s_primary ? DSSCL_WRITEPRIMARY : DSSCL_EXCLUSIVE))) {
Debug(DebugGoOn,"Could not set the DirectSound cooperative level, code 0x%X",hr); Debug(DebugCrit,"Could not set the DirectSound cooperative level, code 0x%X",hr);
return false; return false;
} }
@ -234,23 +234,23 @@ bool DSoundPlay::init()
bdesc.lpwfxFormat = &fmt; bdesc.lpwfxFormat = &fmt;
} }
if (FAILED(hr = m_ds->CreateSoundBuffer(&bdesc, &m_dsb, NULL)) || !m_dsb) { if (FAILED(hr = m_ds->CreateSoundBuffer(&bdesc, &m_dsb, NULL)) || !m_dsb) {
Debug(DebugGoOn,"Could not create the DirectSound buffer, code 0x%X",hr); Debug(DebugCrit,"Could not create the DirectSound buffer, code 0x%X",hr);
return false; return false;
} }
// format can be changed only for primary buffers // format can be changed only for primary buffers
if (s_primary && FAILED(hr = m_dsb->SetFormat(&fmt))) { if (s_primary && FAILED(hr = m_dsb->SetFormat(&fmt))) {
Debug(DebugGoOn,"Could not set the DirectSound buffer format, code 0x%X",hr); Debug(DebugWarn,"Could not set the DirectSound buffer format, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = m_dsb->GetFormat(&fmt,sizeof(fmt),0))) { if (FAILED(hr = m_dsb->GetFormat(&fmt,sizeof(fmt),0))) {
Debug(DebugGoOn,"Could not get the DirectSound buffer format, code 0x%X",hr); Debug(DebugWarn,"Could not get the DirectSound buffer format, code 0x%X",hr);
return false; return false;
} }
if ((fmt.wFormatTag != WAVE_FORMAT_PCM) || if ((fmt.wFormatTag != WAVE_FORMAT_PCM) ||
(fmt.nChannels != nChannels) || (fmt.nChannels != nChannels) ||
(fmt.nSamplesPerSec != m_rate) || (fmt.nSamplesPerSec != m_rate) ||
(fmt.wBitsPerSample != 16)) { (fmt.wBitsPerSample != 16)) {
Debug(DebugGoOn,"DirectSound does not support %dHz 16bit %s PCM format, " Debug(DebugWarn,"DirectSound does not support %dHz 16bit %s PCM format, "
"got fmt=%u, chans=%d samp=%d size=%u",m_rate,nChannels == 1 ? "mono" : "stereo", "got fmt=%u, chans=%d samp=%d size=%u",m_rate,nChannels == 1 ? "mono" : "stereo",
fmt.wFormatTag,fmt.nChannels,fmt.nSamplesPerSec,fmt.wBitsPerSample); fmt.wFormatTag,fmt.nChannels,fmt.nSamplesPerSec,fmt.wBitsPerSample);
return false; return false;
@ -258,14 +258,14 @@ bool DSoundPlay::init()
DSBCAPS caps; DSBCAPS caps;
caps.dwSize = sizeof(caps); caps.dwSize = sizeof(caps);
if (FAILED(hr = m_dsb->GetCaps(&caps))) { if (FAILED(hr = m_dsb->GetCaps(&caps))) {
Debug(DebugGoOn,"Could not get the DirectSound buffer capabilities, code 0x%X",hr); Debug(DebugCrit,"Could not get the DirectSound buffer capabilities, code 0x%X",hr);
return false; return false;
} }
m_buffSize = caps.dwBufferBytes; m_buffSize = caps.dwBufferBytes;
Debug(&__plugin,DebugInfo,"DirectSound buffer size %u",m_buffSize); Debug(&__plugin,DebugInfo,"DirectSound buffer size %u",m_buffSize);
if (FAILED(hr = m_dsb->Play(0,0,DSBPLAY_LOOPING))) { if (FAILED(hr = m_dsb->Play(0,0,DSBPLAY_LOOPING))) {
if ((hr != DSERR_BUFFERLOST) || FAILED(hr = m_dsb->Restore())) { if ((hr != DSERR_BUFFERLOST) || FAILED(hr = m_dsb->Restore())) {
Debug(DebugGoOn,"Could not play the DirectSound buffer, code 0x%X",hr); Debug(DebugWarn,"Could not play the DirectSound buffer, code 0x%X",hr);
return false; return false;
} }
m_dsb->Play(0,0,DSBPLAY_LOOPING); m_dsb->Play(0,0,DSBPLAY_LOOPING);
@ -449,16 +449,16 @@ bool DSoundRec::init()
{ {
HRESULT hr; HRESULT hr;
if (FAILED(hr = ::CoInitializeEx(NULL,COINIT_MULTITHREADED))) { if (FAILED(hr = ::CoInitializeEx(NULL,COINIT_MULTITHREADED))) {
Debug(DebugGoOn,"Could not initialize the COM library, code 0x%X",hr); Debug(DebugCrit,"Could not initialize the COM library, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = ::CoCreateInstance(CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, if (FAILED(hr = ::CoCreateInstance(CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER,
IID_IDirectSoundCapture, (void**)&m_ds)) || !m_ds) { IID_IDirectSoundCapture, (void**)&m_ds)) || !m_ds) {
Debug(DebugGoOn,"Could not create the DirectSoundCapture object, code 0x%X",hr); Debug(DebugCrit,"Could not create the DirectSoundCapture object, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = m_ds->Initialize(m_device))) { if (FAILED(hr = m_ds->Initialize(m_device))) {
Debug(DebugGoOn,"Could not initialize the DirectSoundCapture object, code 0x%X",hr); Debug(DebugWarn,"Could not initialize the DirectSoundCapture object, code 0x%X",hr);
return false; return false;
} }
WAVEFORMATEX fmt; WAVEFORMATEX fmt;
@ -476,18 +476,18 @@ bool DSoundRec::init()
bdesc.dwBufferBytes = 4 * m_rate / 25; bdesc.dwBufferBytes = 4 * m_rate / 25;
bdesc.lpwfxFormat = &fmt; bdesc.lpwfxFormat = &fmt;
if (FAILED(hr = m_ds->CreateCaptureBuffer(&bdesc, &m_dsb, NULL)) || !m_dsb) { if (FAILED(hr = m_ds->CreateCaptureBuffer(&bdesc, &m_dsb, NULL)) || !m_dsb) {
Debug(DebugGoOn,"Could not create the DirectSoundCapture buffer, code 0x%X",hr); Debug(DebugCrit,"Could not create the DirectSoundCapture buffer, code 0x%X",hr);
return false; return false;
} }
if (FAILED(hr = m_dsb->GetFormat(&fmt,sizeof(fmt),0))) { if (FAILED(hr = m_dsb->GetFormat(&fmt,sizeof(fmt),0))) {
Debug(DebugGoOn,"Could not get the DirectSoundCapture buffer format, code 0x%X",hr); Debug(DebugCrit,"Could not get the DirectSoundCapture buffer format, code 0x%X",hr);
return false; return false;
} }
if ((fmt.wFormatTag != WAVE_FORMAT_PCM) || if ((fmt.wFormatTag != WAVE_FORMAT_PCM) ||
(fmt.nChannels != 1) || (fmt.nChannels != 1) ||
(fmt.nSamplesPerSec != m_rate) || (fmt.nSamplesPerSec != m_rate) ||
(fmt.wBitsPerSample != 16)) { (fmt.wBitsPerSample != 16)) {
Debug(DebugGoOn,"DirectSoundCapture does not support %dHz 16bit mono PCM format, " Debug(DebugWarn,"DirectSoundCapture does not support %dHz 16bit mono PCM format, "
"got fmt=%u, chans=%d samp=%d size=%u",m_rate, "got fmt=%u, chans=%d samp=%d size=%u",m_rate,
fmt.wFormatTag,fmt.nChannels,fmt.nSamplesPerSec,fmt.wBitsPerSample); fmt.wFormatTag,fmt.nChannels,fmt.nSamplesPerSec,fmt.wBitsPerSample);
return false; return false;
@ -495,13 +495,13 @@ bool DSoundRec::init()
DSCBCAPS caps; DSCBCAPS caps;
caps.dwSize = sizeof(caps); caps.dwSize = sizeof(caps);
if (FAILED(hr = m_dsb->GetCaps(&caps))) { if (FAILED(hr = m_dsb->GetCaps(&caps))) {
Debug(DebugGoOn,"Could not get the DirectSoundCapture buffer capabilities, code 0x%X",hr); Debug(DebugCrit,"Could not get the DirectSoundCapture buffer capabilities, code 0x%X",hr);
return false; return false;
} }
m_buffSize = caps.dwBufferBytes; m_buffSize = caps.dwBufferBytes;
Debug(&__plugin,DebugInfo,"DirectSoundCapture buffer size %u",m_buffSize); Debug(&__plugin,DebugInfo,"DirectSoundCapture buffer size %u",m_buffSize);
if (FAILED(hr = m_dsb->Start(DSCBSTART_LOOPING))) { if (FAILED(hr = m_dsb->Start(DSCBSTART_LOOPING))) {
Debug(DebugGoOn,"Could not record to the DirectSoundCapture buffer, code 0x%X",hr); Debug(DebugWarn,"Could not record to the DirectSoundCapture buffer, code 0x%X",hr);
return false; return false;
} }
return true; return true;

View File

@ -325,7 +325,7 @@ void EnumModule::initialize()
if (Resolver::available(Resolver::Naptr)) if (Resolver::available(Resolver::Naptr))
Engine::install(new EnumHandler(cfg.getIntValue("general","priority",prio))); Engine::install(new EnumHandler(cfg.getIntValue("general","priority",prio)));
else else
Debug(&emodule,DebugGoOn,"NAPTR resolver is not available on this platform"); Debug(&emodule,DebugCrit,"NAPTR resolver is not available on this platform");
} }
}; // anonymous namespace }; // anonymous namespace

View File

@ -1694,7 +1694,7 @@ bool ExtModHandler::received(Message& msg)
else if (t == "playrec") else if (t == "playrec")
typ = ExtModChan::DataBoth; typ = ExtModChan::DataBoth;
else { else {
Debug(DebugGoOn,"Invalid ExtModule method '%s', use 'nochan', 'nodata', 'play', 'record' or 'playrec'", Debug(DebugConf,"Invalid ExtModule method '%s', use 'nochan', 'nodata', 'play', 'record' or 'playrec'",
t.c_str()); t.c_str());
return false; return false;
} }
@ -1711,7 +1711,7 @@ bool ExtModHandler::received(Message& msg)
ExtModChan *em = ExtModChan::build(dest.matchString(2).c_str(), ExtModChan *em = ExtModChan::build(dest.matchString(2).c_str(),
dest.matchString(3).c_str(),typ); dest.matchString(3).c_str(),typ);
if (!em) { if (!em) {
Debug(DebugGoOn,"Failed to create ExtMod for '%s'",dest.matchString(2).c_str()); Debug(DebugCrit,"Failed to create ExtMod for '%s'",dest.matchString(2).c_str());
return false; return false;
} }
ExtModReceiver* recv = em->receiver(); ExtModReceiver* recv = em->receiver();

View File

@ -356,7 +356,7 @@ void FaxWrapper::debugName(const char* name)
level |= SPAN_LOG_PROTOCOL_ERROR; level |= SPAN_LOG_PROTOCOL_ERROR;
else if (debugAt(DebugWarn)) else if (debugAt(DebugWarn))
level |= SPAN_LOG_WARNING; level |= SPAN_LOG_WARNING;
else if (debugAt(DebugGoOn)) else if (debugAt(DebugCrit))
level |= SPAN_LOG_ERROR; level |= SPAN_LOG_ERROR;
span_log_set_tag(&m_t30->logging,m_name); span_log_set_tag(&m_t30->logging,m_name);
span_log_set_level(&m_t30->logging,level); span_log_set_level(&m_t30->logging,level);

View File

@ -981,7 +981,7 @@ BOOL YateGatekeeperServer::Init()
if (AddListener(new H323GatekeeperListener(m_endpoint,*this,name,trans))) if (AddListener(new H323GatekeeperListener(m_endpoint,*this,name,trans)))
Debug(&hplugin,DebugAll,"Started Gk listener on %s:%d",addr,port); Debug(&hplugin,DebugAll,"Started Gk listener on %s:%d",addr,port);
else else
Alarm(&hplugin,"config",DebugGoOn,"Can't start the Gk listener for address: %s",addr); Alarm(&hplugin,"config",DebugCrit,"Can't start the Gk listener for address: %s",addr);
} }
i = s_cfg.getIntValue("gk","ttl",600); i = s_cfg.getIntValue("gk","ttl",600);
if (i > 0) { if (i > 0) {
@ -1356,7 +1356,7 @@ bool YateH323EndPoint::startGkClient(int mode, int retry, const char* name)
while (m_thread) { while (m_thread) {
hplugin.unlock(); hplugin.unlock();
if (!--retries) { if (!--retries) {
Debug(&hplugin,DebugGoOn, Debug(&hplugin,DebugCrit,
"Endpoint(%s) old Gk client thread not finished [%p]",safe(),this); "Endpoint(%s) old Gk client thread not finished [%p]",safe(),this);
return false; return false;
} }
@ -1394,7 +1394,7 @@ void YateH323EndPoint::stopGkClient(bool notify, const char* reason, bool waitGk
} }
} }
if (m_thread) { if (m_thread) {
Debug(&hplugin,DebugGoOn,"Endpoint(%s) abandoning old Gk client thread (%p) [%p]", Debug(&hplugin,DebugCrit,"Endpoint(%s) abandoning old Gk client thread (%p) [%p]",
safe(),m_thread,this); safe(),m_thread,this);
m_thread->setOrphan(); m_thread->setOrphan();
m_thread = 0; m_thread = 0;
@ -1598,7 +1598,7 @@ bool YateH323EndPoint::checkListener(const NamedList* params, bool& changed)
retries = 1; retries = 1;
} }
} }
int level = DebugGoOn; int level = DebugCrit;
String extra; String extra;
if (retries) { if (retries) {
level = DebugWarn; level = DebugWarn;
@ -1625,7 +1625,7 @@ bool YateH323EndPoint::checkListener(const NamedList* params, bool& changed)
return true; return true;
} }
if (retries) if (retries)
Alarm(&hplugin,"config",DebugGoOn,"Endpoint(%s) unable to start H323 Listener on %s [%p]", Alarm(&hplugin,"config",DebugCrit,"Endpoint(%s) unable to start H323 Listener on %s [%p]",
safe(),(const char*)addr.AsString(),this); safe(),(const char*)addr.AsString(),this);
String reason = "Cannot listen on "; String reason = "Cannot listen on ";
reason << m_listenAddr << ":" << m_listenPort; reason << m_listenAddr << ":" << m_listenPort;
@ -1700,7 +1700,7 @@ void YateGkRegThread::Main()
m_ep->m_retry = false; m_ep->m_retry = false;
} }
hplugin.unlock(); hplugin.unlock();
Debug(&hplugin,ok ? DebugAll : DebugGoOn, Debug(&hplugin,ok ? DebugAll : DebugCrit,
"Endpoint(%s) client thread (%p) finished [%p]", "Endpoint(%s) client thread (%p) finished [%p]",
epName.safe(),this,m_ep); epName.safe(),this,m_ep);
m_ep = 0; m_ep = 0;
@ -2196,7 +2196,7 @@ BOOL YateH323Connection::OpenAudioChannel(BOOL isEncoding, unsigned bufferSize,
{ {
Debug(this,DebugInfo,"YateH323Connection::OpenAudioChannel chan=%p [%p]",m_chan,this); Debug(this,DebugInfo,"YateH323Connection::OpenAudioChannel chan=%p [%p]",m_chan,this);
if (!m_nativeRtp) { if (!m_nativeRtp) {
Debug(DebugGoOn,"YateH323Connection::OpenAudioChannel for non-native RTP in [%p]",this); Debug(DebugCrit,"YateH323Connection::OpenAudioChannel for non-native RTP in [%p]",this);
if (m_needMedia) if (m_needMedia)
ClearCall(EndedByCapabilityExchange); ClearCall(EndedByCapabilityExchange);
return FALSE; return FALSE;

View File

@ -269,13 +269,14 @@ public:
debugChain(&__plugin); debugChain(&__plugin);
MKDEBUG(Fail); MKDEBUG(Fail);
MKDEBUG(Test); MKDEBUG(Test);
MKDEBUG(Crit);
MKDEBUG(GoOn); MKDEBUG(GoOn);
MKDEBUG(Conf); MKDEBUG(Conf);
MKDEBUG(Stub); MKDEBUG(Stub);
MKDEBUG(Warn); MKDEBUG(Warn);
MKDEBUG(Mild); MKDEBUG(Mild);
MKDEBUG(Call);
MKDEBUG(Note); MKDEBUG(Note);
MKDEBUG(Call);
MKDEBUG(Info); MKDEBUG(Info);
MKDEBUG(All); MKDEBUG(All);
MKTIME(Wall); MKTIME(Wall);

View File

@ -418,7 +418,7 @@ SslSocket::SslSocket(SOCKET handle, bool server, int verify, SslContext* context
::SSL_set_fd(m_ssl,handle); ::SSL_set_fd(m_ssl,handle);
BIO* bio = ::SSL_get_rbio(m_ssl); BIO* bio = ::SSL_get_rbio(m_ssl);
if (!(bio && BIO_set_close(bio,BIO_NOCLOSE))) if (!(bio && BIO_set_close(bio,BIO_NOCLOSE)))
Debug(&__plugin,DebugGoOn,"SslSocket::SslSocket(%d) no BIO or cannot set NOCLOSE [%p]", Debug(&__plugin,DebugCrit,"SslSocket::SslSocket(%d) no BIO or cannot set NOCLOSE [%p]",
handle,this); handle,this);
if (server) if (server)
::SSL_set_accept_state(m_ssl); ::SSL_set_accept_state(m_ssl);
@ -555,12 +555,12 @@ bool SslHandler::received(Message& msg)
addRand(msg.msgTime()); addRand(msg.msgTime());
Socket** ppSock = static_cast<Socket**>(msg.userObject(YATOM("Socket*"))); Socket** ppSock = static_cast<Socket**>(msg.userObject(YATOM("Socket*")));
if (!ppSock) { if (!ppSock) {
Debug(&__plugin,DebugGoOn,"SslHandler: No pointer to Socket"); Debug(&__plugin,DebugCrit,"SslHandler: No pointer to Socket");
return false; return false;
} }
Socket* pSock = *ppSock; Socket* pSock = *ppSock;
if (!pSock) { if (!pSock) {
Debug(&__plugin,DebugGoOn,"SslHandler: NULL Socket pointer"); Debug(&__plugin,DebugCrit,"SslHandler: NULL Socket pointer");
return false; return false;
} }
if (!pSock->valid()) { if (!pSock->valid()) {

View File

@ -221,13 +221,13 @@ CustomTextEdit::CustomTextEdit(const char* name, const NamedList& params, QWidge
m_items.addParam(new CustomTextFormat(String(-1),"white")); // Output() or client set status m_items.addParam(new CustomTextFormat(String(-1),"white")); // Output() or client set status
m_items.addParam(new CustomTextFormat(String(0),"yellow","red")); // DebugFail - blinking yellow on red m_items.addParam(new CustomTextFormat(String(0),"yellow","red")); // DebugFail - blinking yellow on red
m_items.addParam(new CustomTextFormat(String(1),"yellow","red")); // Unnamed - yellow on red m_items.addParam(new CustomTextFormat(String(1),"yellow","red")); // Unnamed - yellow on red
m_items.addParam(new CustomTextFormat(String(2),"white","red")); // DebugGoOn - white on red m_items.addParam(new CustomTextFormat(String(2),"white","red")); // DebugCrit - white on red
m_items.addParam(new CustomTextFormat(String(3),"lightgrey","red")); // DebugConf - gray on red m_items.addParam(new CustomTextFormat(String(3),"lightgrey","red")); // DebugConf - gray on red
m_items.addParam(new CustomTextFormat(String(4),"red")); // DebugStub - red on black m_items.addParam(new CustomTextFormat(String(4),"red")); // DebugStub - red on black
m_items.addParam(new CustomTextFormat(String(5),"orangered")); // DebugWarn - light red on black m_items.addParam(new CustomTextFormat(String(5),"orangered")); // DebugWarn - light red on black
m_items.addParam(new CustomTextFormat(String(6),"yellow")); // DebugMild - yellow on black m_items.addParam(new CustomTextFormat(String(6),"yellow")); // DebugMild - yellow on black
m_items.addParam(new CustomTextFormat(String(7),"white")); // DebugCall - white on black m_items.addParam(new CustomTextFormat(String(7),"lightgreen")); // DebugNote - light green on black
m_items.addParam(new CustomTextFormat(String(8),"lightgreen")); // DebugNote - light green on black m_items.addParam(new CustomTextFormat(String(8),"white")); // DebugCall - white on black
m_items.addParam(new CustomTextFormat(String(9),"cyan")); // DebugInfo - light cyan on black m_items.addParam(new CustomTextFormat(String(9),"cyan")); // DebugInfo - light cyan on black
m_items.addParam(new CustomTextFormat(String(10),"teal")); // DebugAll - cyan on black m_items.addParam(new CustomTextFormat(String(10),"teal")); // DebugAll - cyan on black
} }

View File

@ -2562,11 +2562,11 @@ private:
void stopThreads(); void stopThreads();
inline unsigned int checkDev(const char* loc) { inline unsigned int checkDev(const char* loc) {
return m_devHandle ? 0 : return m_devHandle ? 0 :
showError(RadioInterface::NotInitialized,"not open",loc,0,DebugGoOn); showError(RadioInterface::NotInitialized,"not open",loc,0,DebugCrit);
} }
inline unsigned int checkCalStatus(const char* loc) { inline unsigned int checkCalStatus(const char* loc) {
return (Calibrating != m_calibrateStatus) ? 0 : return (Calibrating != m_calibrateStatus) ? 0 :
showError(RadioInterface::NotCalibrated,"calibrating",loc,0,DebugGoOn); showError(RadioInterface::NotCalibrated,"calibrating",loc,0,DebugCrit);
} }
inline unsigned int checkPubFuncEntry(bool internal, const char* loc) { inline unsigned int checkPubFuncEntry(bool internal, const char* loc) {
unsigned int status = 0; unsigned int status = 0;
@ -3445,7 +3445,7 @@ unsigned int BrfDevTmpAltSet::restore()
"Restored alt interface to %s after '%s' [%p]", "Restored alt interface to %s after '%s' [%p]",
altSetName(m_tmpAltSet),m_oper,m_device->owner()); altSetName(m_tmpAltSet),m_oper,m_device->owner());
else else
Debug(m_device->owner(),DebugGoOn, Debug(m_device->owner(),DebugCrit,
"Failed to restore alt interface after '%s': %s [%p]", "Failed to restore alt interface after '%s': %s [%p]",
m_oper,e.c_str(),m_device->owner()); m_oper,e.c_str(),m_device->owner());
m_tmpAltSet = BRF_ALTSET_INVALID; m_tmpAltSet = BRF_ALTSET_INVALID;
@ -4400,7 +4400,7 @@ unsigned int BrfLibUsbDevice::initialize(const NamedList& params)
return 0; return 0;
} }
if (status != RadioInterface::Pending) if (status != RadioInterface::Pending)
Debug(m_owner,DebugGoOn,"Failed to initialize: %s [%p]", Debug(m_owner,DebugCrit,"Failed to initialize: %s [%p]",
e.safe("Unknown error"),m_owner); e.safe("Unknown error"),m_owner);
return status; return status;
} }
@ -5999,7 +5999,7 @@ unsigned int BrfLibUsbDevice::internalSetSampleRate(bool tx, uint32_t value,
// Enforce minimum sample rate // Enforce minimum sample rate
reduceRational(rate); reduceRational(rate);
if (rate.integer < BRF_SAMPLERATE_MIN) if (rate.integer < BRF_SAMPLERATE_MIN)
Debug(m_owner,DebugGoOn, Debug(m_owner,DebugConf,
"Requested %s sample rate %u is smaller than allowed minimum value [%p]", "Requested %s sample rate %u is smaller than allowed minimum value [%p]",
brfDir(tx),value,m_owner); brfDir(tx),value,m_owner);
// Setup the multisynth enables and index // Setup the multisynth enables and index
@ -6808,7 +6808,7 @@ unsigned int BrfLibUsbDevice::syncTransfer(int ep, uint8_t* data, unsigned int l
unsigned int BrfLibUsbDevice::gpioRead(uint8_t addr, uint32_t& value, uint8_t len, unsigned int BrfLibUsbDevice::gpioRead(uint8_t addr, uint32_t& value, uint8_t len,
String* error, const char* loc) String* error, const char* loc)
{ {
len = clampInt(len,1,sizeof(value),"GPIO read items",DebugGoOn); len = clampInt(len,1,sizeof(value),"GPIO read items",DebugCrit);
uint8_t t[sizeof(value)]; uint8_t t[sizeof(value)];
unsigned int status = accessPeripheral(UartDevGPIO,false,addr,t,error,len,loc); unsigned int status = accessPeripheral(UartDevGPIO,false,addr,t,error,len,loc);
if (status) if (status)
@ -6835,9 +6835,9 @@ unsigned int BrfLibUsbDevice::gpioWrite(uint8_t addr, uint32_t value, uint8_t le
else if (m_devSpeed == LIBUSB_SPEED_HIGH) else if (m_devSpeed == LIBUSB_SPEED_HIGH)
value |= BRF_GPIO_SMALL_DMA_XFER; value |= BRF_GPIO_SMALL_DMA_XFER;
else else
Debug(m_owner,DebugGoOn,"GPIO write: unhandled speed [%p]",m_owner); Debug(m_owner,DebugStub,"GPIO write: unhandled speed [%p]",m_owner);
} }
len = clampInt(len,1,sizeof(value),"GPIO write items",DebugGoOn); len = clampInt(len,1,sizeof(value),"GPIO write items",DebugCrit);
uint8_t t[sizeof(value)]; uint8_t t[sizeof(value)];
// Data is in little endian order // Data is in little endian order
#ifdef LITTLE_ENDIAN #ifdef LITTLE_ENDIAN
@ -8035,7 +8035,7 @@ void BrfLibUsbDevice::initBuffers(bool* txSet, unsigned int totalSamples, unsign
for (unsigned int i = 0; !lck.devLocked() && i < 3; i++) for (unsigned int i = 0; !lck.devLocked() && i < 3; i++)
lck.wait(&error,1000000); lck.wait(&error,1000000);
if (!lck.devLocked()) { if (!lck.devLocked()) {
Debug(m_owner,DebugGoOn,"Failed to initialize %s buffers: serialize [%p]", Debug(m_owner,DebugCrit,"Failed to initialize %s buffers: serialize [%p]",
brfDir(tx),m_owner); brfDir(tx),m_owner);
continue; continue;
} }
@ -8123,7 +8123,7 @@ void BrfLibUsbDevice::ioBufCheckLimit(bool tx, unsigned int nBufs)
} }
} }
if (invalid) if (invalid)
Debug(m_owner,DebugGoOn,"%s: sample value out of range buffers=%u:%s [%p]", Debug(m_owner,DebugConf,"%s: sample value out of range buffers=%u:%s [%p]",
brfDir(tx),nBufs,invalid.c_str(),m_owner); brfDir(tx),nBufs,invalid.c_str(),m_owner);
} }
@ -10218,7 +10218,7 @@ void BrfLibUsbDevice::stopThreads()
unsigned int BrfLibUsbDevice::waitCancel(const char* loc, const char* reason, unsigned int BrfLibUsbDevice::waitCancel(const char* loc, const char* reason,
String* error) String* error)
{ {
Debug(m_owner,DebugGoOn,"%s: %s. Waiting for cancel... [%p]",loc,reason,m_owner); Debug(m_owner,DebugCrit,"%s: %s. Waiting for cancel... [%p]",loc,reason,m_owner);
unsigned int status = 0; unsigned int status = 0;
while (!status && !m_calibrateStop) { while (!status && !m_calibrateStop) {
Thread::idle(); Thread::idle();

View File

@ -338,13 +338,13 @@ bool RManagerListener::initSocket()
m_socket.create(AF_INET, SOCK_STREAM); m_socket.create(AF_INET, SOCK_STREAM);
if (!m_socket.valid()) { if (!m_socket.valid()) {
Alarm("RManager","socket",DebugGoOn,"Unable to create the listening socket: %s", Alarm("RManager","socket",DebugCrit,"Unable to create the listening socket: %s",
strerror(m_socket.error())); strerror(m_socket.error()));
return false; return false;
} }
if (!m_socket.setBlocking(false)) { if (!m_socket.setBlocking(false)) {
Alarm("RManager","socket",DebugGoOn, "Failed to set listener to nonblocking mode: %s", Alarm("RManager","socket",DebugCrit, "Failed to set listener to nonblocking mode: %s",
strerror(m_socket.error())); strerror(m_socket.error()));
return false; return false;
} }
@ -355,12 +355,12 @@ bool RManagerListener::initSocket()
m_address << sa.host() << ":" << sa.port(); m_address << sa.host() << ":" << sa.port();
m_socket.setReuse(); m_socket.setReuse();
if (!m_socket.bind(sa)) { if (!m_socket.bind(sa)) {
Alarm("RManager","socket",DebugGoOn,"Failed to bind to %s : %s", Alarm("RManager","socket",DebugCrit,"Failed to bind to %s : %s",
m_address.c_str(),strerror(m_socket.error())); m_address.c_str(),strerror(m_socket.error()));
return false; return false;
} }
if (!m_socket.listen(2)) { if (!m_socket.listen(2)) {
Alarm("RManager","socket",DebugGoOn,"Unable to listen on socket: %s", Alarm("RManager","socket",DebugCrit,"Unable to listen on socket: %s",
strerror(m_socket.error())); strerror(m_socket.error()));
return false; return false;
} }
@ -420,7 +420,7 @@ Connection* RManagerListener::checkCreate(Socket* sock, const char* addr)
} }
} }
else if (!sock->setBlocking(false)) { else if (!sock->setBlocking(false)) {
Debug("RManager",DebugGoOn, "Failed to set tcp socket to nonblocking mode: %s", Debug("RManager",DebugCrit, "Failed to set tcp socket to nonblocking mode: %s",
strerror(sock->error())); strerror(sock->error()));
delete sock; delete sock;
return 0; return 0;

View File

@ -1069,7 +1069,7 @@ void Cache::adjustToLimit(CacheItem* skipAdded)
m_count--; m_count--;
continue; continue;
} }
Debug(&__plugin,DebugGoOn, Debug(&__plugin,DebugCrit,
"Cache(%s) can't find the oldest item count=%u limit=%u [%p]", "Cache(%s) can't find the oldest item count=%u limit=%u [%p]",
m_name.c_str(),m_count,m_limit,this); m_name.c_str(),m_count,m_limit,this);
m_count = m_list.count(); m_count = m_list.count();

View File

@ -366,7 +366,7 @@ int MyConn::queryDbInternal(DbQuery* query)
if (columns[c]) if (columns[c])
columns[c]->set(new String(fields[c].name)); columns[c]->set(new String(fields[c].name));
else else
Debug(&module,DebugGoOn,"No array for column %u",c); Debug(&module,DebugCrit,"No array for column %u",c);
} }
// and now data row by row // and now data row by row
for (unsigned int r = 1; r <= rows; r++) { for (unsigned int r = 1; r <= rows; r++) {
@ -480,7 +480,7 @@ int MyAcct::initConns()
mySqlConn->m_conn = mysql_init(mySqlConn->m_conn); mySqlConn->m_conn = mysql_init(mySqlConn->m_conn);
if (!mySqlConn->m_conn) { if (!mySqlConn->m_conn) {
Debug(&module,DebugGoOn,"Could not start connection %d for '%s'",i,c_str()); Debug(&module,DebugCrit,"Could not start connection %d for '%s'",i,c_str());
return i; return i;
} }
DDebug(&module,DebugAll,"Connection '%s' for account '%s' was created",mySqlConn->c_str(),c_str()); DDebug(&module,DebugAll,"Connection '%s' for account '%s' was created",mySqlConn->c_str(),c_str());

View File

@ -214,7 +214,7 @@ bool PgConn::initDbInternal(int retry)
u_int64_t timeout = Time::now() + m_account->m_timeout; u_int64_t timeout = Time::now() + m_account->m_timeout;
m_conn = PQconnectStart(m_account->m_connection.c_str()); m_conn = PQconnectStart(m_account->m_connection.c_str());
if (!m_conn) { if (!m_conn) {
Debug(&module,DebugGoOn,"Could not start connection for '%s' [%p]",c_str(),m_account); Debug(&module,DebugCrit,"Could not start connection for '%s' [%p]",c_str(),m_account);
return false; return false;
} }
PQsetnonblocking(m_conn,1); PQsetnonblocking(m_conn,1);
@ -351,7 +351,7 @@ int PgConn::queryDbInternal(const char* query, Message* dest)
if (column) if (column)
column->set(new String(PQfname(res,k))); column->set(new String(PQfname(res,k)));
else { else {
Debug(&module,DebugGoOn, Debug(&module,DebugCrit,
"Query '%s' for '%s': No array column for %d [%p]", "Query '%s' for '%s': No array column for %d [%p]",
query,c_str(),k,m_account); query,c_str(),k,m_account);
continue; continue;
@ -360,7 +360,7 @@ int PgConn::queryDbInternal(const char* query, Message* dest)
column = column->next(); column = column->next();
if (!column) { if (!column) {
// Stop now: we won't get the next row // Stop now: we won't get the next row
Debug(&module,DebugGoOn, Debug(&module,DebugCrit,
"Query '%s' for '%s': No array row %d in column %d [%p]", "Query '%s' for '%s': No array row %d in column %d [%p]",
query,c_str(),j + 1,k,m_account); query,c_str(),j + 1,k,m_account);
break; break;

View File

@ -501,7 +501,7 @@ bool ListenerThread::addAddress(const NamedList &param)
} }
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug("ListenerThread",DebugGoOn,"Failed to cast socket"); Debug("ListenerThread",DebugCrit,"Failed to cast socket");
return false; return false;
} }
if (!s->bindx(o)) { if (!s->bindx(o)) {
@ -884,7 +884,7 @@ bool Transport::addAddress(const NamedList &param, Socket* socket)
} }
SctpSocket* s = static_cast<SctpSocket*>(socket); SctpSocket* s = static_cast<SctpSocket*>(socket);
if (!s) { if (!s) {
Debug(this,DebugGoOn,"Failed to cast socket"); Debug(this,DebugCrit,"Failed to cast socket");
return false; return false;
} }
if (!s->bindx(o)) { if (!s->bindx(o)) {
@ -992,7 +992,7 @@ bool Transport::connectSocket()
} }
SctpSocket* s = static_cast<SctpSocket*>(sock); SctpSocket* s = static_cast<SctpSocket*>(sock);
if (!s) { if (!s) {
Debug(this,DebugGoOn,"Failed to cast socket"); Debug(this,DebugCrit,"Failed to cast socket");
return false; return false;
} }
if (!s->connectx(o)) { if (!s->connectx(o)) {
@ -1228,7 +1228,7 @@ bool StreamReader::sendBuffer(int streamId)
if (m_transport->transType() == Transport::Sctp) { if (m_transport->transType() == Transport::Sctp) {
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug(m_transport,DebugGoOn,"Sctp conversion failed"); Debug(m_transport,DebugCrit,"Sctp conversion failed");
return false; return false;
} }
if (m_transport->status() == Transport::Up) if (m_transport->status() == Transport::Up)
@ -1310,7 +1310,7 @@ bool StreamReader::readData()
if (m_transport->transType() == Transport::Sctp) { if (m_transport->transType() == Transport::Sctp) {
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug(m_transport,DebugGoOn,"Sctp conversion failed"); Debug(m_transport,DebugCrit,"Sctp conversion failed");
return false; return false;
} }
len = s->recvMsg((void*)buf,m_headerLen,addr,stream,flags); len = s->recvMsg((void*)buf,m_headerLen,addr,stream,flags);
@ -1369,7 +1369,7 @@ bool StreamReader::readData()
if (m_transport->transType() == Transport::Sctp) { if (m_transport->transType() == Transport::Sctp) {
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug(m_transport,DebugGoOn,"Sctp conversion failed"); Debug(m_transport,DebugCrit,"Sctp conversion failed");
return false; return false;
} }
len = s->recvMsg((void*)buf1,m_totalPacketLen,addr,stream,flags); len = s->recvMsg((void*)buf1,m_totalPacketLen,addr,stream,flags);
@ -1548,7 +1548,7 @@ bool MessageReader::sendMSG(const DataBlock& header, const DataBlock& msg, int s
if (m_transport->transType() == Transport::Sctp) { if (m_transport->transType() == Transport::Sctp) {
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug(m_transport,DebugGoOn,"Sctp conversion failed"); Debug(m_transport,DebugCrit,"Sctp conversion failed");
break; break;
} }
int flags = 0; int flags = 0;
@ -1617,7 +1617,7 @@ bool MessageReader::readData()
int flags = 0; int flags = 0;
SctpSocket* s = static_cast<SctpSocket*>(m_socket); SctpSocket* s = static_cast<SctpSocket*>(m_socket);
if (!s) { if (!s) {
Debug(m_transport,DebugGoOn,"Sctp conversion failed"); Debug(m_transport,DebugCrit,"Sctp conversion failed");
return false; return false;
} }
SocketAddr addr; SocketAddr addr;

View File

@ -1773,7 +1773,7 @@ int WpSpan::readData()
if (r == -1) if (r == -1)
return -1; return -1;
if (r < WP_HEADER) { if (r < WP_HEADER) {
Debug(m_group,DebugGoOn,"WpSpan('%s'). Short read %u byte(s) [%p]", Debug(m_group,DebugCrit,"WpSpan('%s'). Short read %u byte(s) [%p]",
id().safe(),r,this); id().safe(),r,this);
return -1; return -1;
} }
@ -1783,9 +1783,8 @@ int WpSpan::readData()
unsigned char err = m_buffer[WP_RD_ERROR]; unsigned char err = m_buffer[WP_RD_ERROR];
#endif #endif
if (err) { if (err) {
m_readErrors++; if (++m_readErrors >= MAX_READ_ERRORS) {
if (m_readErrors == MAX_READ_ERRORS) { Debug(m_group,DebugCrit,"WpSpan('%s'). Read error 0x%02X [%p]",
Debug(m_group,DebugGoOn,"WpSpan('%s'). Read error 0x%02X [%p]",
id().safe(),err,this); id().safe(),err,this);
m_readErrors = 0; m_readErrors = 0;
} }

View File

@ -1230,14 +1230,13 @@ int WpSpan::readData()
if (r == -1) if (r == -1)
return -1; return -1;
if (r < WP_HEADER) { if (r < WP_HEADER) {
Debug(m_group,DebugGoOn,"WpSpan('%s'). Short read %u byte(s) [%p]", Debug(m_group,DebugCrit,"WpSpan('%s'). Short read %u byte(s) [%p]",
id().safe(),r,this); id().safe(),r,this);
return -1; return -1;
} }
if (SANG_STATUS_SUCCESS != m_buffer.api_header.operation_status) { if (SANG_STATUS_SUCCESS != m_buffer.api_header.operation_status) {
m_readErrors++; if (++m_readErrors >= MAX_READ_ERRORS) {
if (m_readErrors == MAX_READ_ERRORS) { Debug(m_group,DebugCrit,"WpSpan('%s'). Read error %u (%s) [%p]",
Debug(m_group,DebugGoOn,"WpSpan('%s'). Read error %u (%s) [%p]",
id().safe(),m_buffer.api_header.operation_status, id().safe(),m_buffer.api_header.operation_status,
SDLA_DECODE_SANG_STATUS(m_buffer.api_header.operation_status),this); SDLA_DECODE_SANG_STATUS(m_buffer.api_header.operation_status),this);
m_readErrors = 0; m_readErrors = 0;

View File

@ -633,7 +633,7 @@ RadAttrib::RadAttrib(const char* name, const char* value)
return; return;
m_type = find(name,&m_vendor); m_type = find(name,&m_vendor);
if (!m_type) { if (!m_type) {
Debug(&__plugin,DebugGoOn,"Failed to find item %s in dictionary",name); Debug(&__plugin,DebugWarn,"Failed to find item %s in dictionary",name);
return; return;
} }
assign(value); assign(value);
@ -647,7 +647,7 @@ RadAttrib::RadAttrib(const char* name, int value)
return; return;
m_type = find(name,&m_vendor); m_type = find(name,&m_vendor);
if (!m_type) { if (!m_type) {
Debug(&__plugin,DebugGoOn,"Failed to find item %s in dictionary",name); Debug(&__plugin,DebugWarn,"Failed to find item %s in dictionary",name);
return; return;
} }
assign(value); assign(value);
@ -660,7 +660,7 @@ RadAttrib::RadAttrib(const char* name, unsigned char subType, const char* value)
return; return;
m_type = find(name,&m_vendor); m_type = find(name,&m_vendor);
if (!m_type) { if (!m_type) {
Debug(&__plugin,DebugGoOn,"Failed to find item %s in dictionary",name); Debug(&__plugin,DebugWarn,"Failed to find item %s in dictionary",name);
return; return;
} }
assign(subType,value); assign(subType,value);
@ -699,7 +699,7 @@ bool RadAttrib::assign(const char* value)
} }
break; break;
default: default:
Debug(&__plugin,DebugGoOn,"Ignoring unknown attribute of type %d",m_type->type); Debug(&__plugin,DebugWarn,"Ignoring unknown attribute of type %d",m_type->type);
return false; return false;
} }
return true; return true;
@ -729,7 +729,7 @@ bool RadAttrib::assign(int value)
} }
break; break;
default: default:
Debug(&__plugin,DebugGoOn,"Ignoring unknown attribute of type %d",m_type->type); Debug(&__plugin,DebugWarn,"Ignoring unknown attribute of type %d",m_type->type);
return false; return false;
} }
return true; return true;
@ -965,7 +965,7 @@ int RadiusClient::makeRequest(int port, unsigned char request, unsigned char* re
} }
int datalen = 20 + attrdata.length(); int datalen = 20 + attrdata.length();
if (datalen > RADIUS_MAXLEN) { if (datalen > RADIUS_MAXLEN) {
Debug(&__plugin,DebugGoOn,"Packet of %u bytes exceeds RADIUS maximum",datalen); Debug(&__plugin,DebugWarn,"Packet of %u bytes exceeds RADIUS maximum %u",datalen,RADIUS_MAXLEN);
return UnknownErr; return UnknownErr;
} }
@ -1009,7 +1009,7 @@ int RadiusClient::makeRequest(int port, unsigned char request, unsigned char* re
// we have the data ready, send it and wait for an answer // we have the data ready, send it and wait for an answer
for (int r = m_retries; r > 0; r--) { for (int r = m_retries; r > 0; r--) {
if (socket()->sendTo(radpckt.data(),radpckt.length(),sockAddr) == Socket::socketError()) { if (socket()->sendTo(radpckt.data(),radpckt.length(),sockAddr) == Socket::socketError()) {
Alarm(&__plugin,"socket",DebugGoOn,"Packet sending error %d to %s:%d", Alarm(&__plugin,"socket",DebugCrit,"Packet sending error %d to %s:%d",
socket()->error(),sockAddr.host().c_str(),sockAddr.port()); socket()->error(),sockAddr.host().c_str(),sockAddr.port());
return UnknownErr; return UnknownErr;
} }
@ -1692,11 +1692,11 @@ void RadiusModule::initialize()
// we only have UDP support // we only have UDP support
if (!s_localSock.create(PF_INET,SOCK_DGRAM,IPPROTO_IP)) { if (!s_localSock.create(PF_INET,SOCK_DGRAM,IPPROTO_IP)) {
Alarm(this,"socket",DebugGoOn,"Error creating socket. Radius functions unavailable"); Alarm(this,"socket",DebugCrit,"Error creating socket. Radius functions unavailable");
return; return;
} }
if (!s_localSock.bind(s_localAddr)) { if (!s_localSock.bind(s_localAddr)) {
Alarm(this,"socket",DebugWarn,"Error %d binding to %s:%d. Radius functions unavailable", Alarm(this,"socket",DebugCrit,"Error %d binding to %s:%d. Radius functions unavailable",
s_localSock.error(),s_localAddr.host().c_str(),s_localAddr.port()); s_localSock.error(),s_localAddr.host().c_str(),s_localAddr.port());
return; return;
} }

View File

@ -2514,7 +2514,7 @@ void SigDriver::handleEvent(SignallingEvent* event)
return; return;
} }
if (!event->message() && event->type() != SignallingEvent::Circuit) { if (!event->message() && event->type() != SignallingEvent::Circuit) {
Debug(this,DebugGoOn,"Received event (%p,'%s') without message",event,event->name()); Debug(this,DebugCrit,"Received event (%p,'%s') without message",event,event->name());
return; return;
} }
// Ok. Send the message to the channel if we have one // Ok. Send the message to the channel if we have one
@ -2820,7 +2820,7 @@ bool SigDriver::appendOnDemand(SignallingComponent* cmp, int type)
return false; return false;
Lock lock(m_onDemandMutex); Lock lock(m_onDemandMutex);
if (m_onDemand.find(sccp->toString())) { if (m_onDemand.find(sccp->toString())) {
Debug(this,DebugGoOn,"Request to append duplicat of on demand component (%p): '%s'.", Debug(this,DebugCrit,"Request to append duplicate of on demand component (%p): '%s'.",
cmp,cmp->toString().c_str()); cmp,cmp->toString().c_str());
return false; return false;
} }

View File

@ -2078,7 +2078,7 @@ bool ZapSpan::init(ZapDevice::Type type, unsigned int offset,
continue; continue;
} }
TelEngine::destruct(cic); TelEngine::destruct(cic);
Debug(m_group,DebugGoOn, Debug(m_group,DebugConf,
"ZapSpan('%s'). Duplicate circuit code=%u (channel=%u) [%p]", "ZapSpan('%s'). Duplicate circuit code=%u (channel=%u) [%p]",
id().safe(),code,channel,this); id().safe(),code,channel,this);
} }

View File

@ -673,7 +673,7 @@ static bool encodeParam(const Parameter* param, DataBlock& data, XmlElement* ele
!(param->type == TcapXApplication::HexString || param->type == TcapXApplication::SequenceOf !(param->type == TcapXApplication::HexString || param->type == TcapXApplication::SequenceOf
|| param->type == TcapXApplication::Sequence || param->type == TcapXApplication::Choice || param->type == TcapXApplication::Sequence || param->type == TcapXApplication::Choice
|| param->type == TcapXApplication::SetOf)) || param->type == TcapXApplication::SetOf))
Debug(&__plugin,DebugGoOn,"Encoding definition conflict for param='%s', tag is defined as contructor" Debug(&__plugin,DebugCrit,"Encoding definition conflict for param='%s', tag is defined as contructor"
" while its type is primitive",param->name.c_str()); " while its type is primitive",param->name.c_str());
ok = type->encode(param,type,data,child,err); ok = type->encode(param,type,data,child,err);
} }
@ -7272,7 +7272,7 @@ bool XMLConnListener::createConn(Socket* skt, String& addr)
return false; return false;
} }
if (!skt->setBlocking(false)) { if (!skt->setBlocking(false)) {
Debug(m_user,DebugGoOn, "Failed to set TCP socket to nonblocking mode: %s", Debug(m_user,DebugCrit, "Failed to set TCP socket to nonblocking mode: %s",
strerror(skt->error())); strerror(skt->error()));
delete skt; delete skt;
return false; return false;

View File

@ -573,7 +573,7 @@ const short* ToneData::data()
} }
short* dat = (short*)::malloc((len+1)*sizeof(short)); short* dat = (short*)::malloc((len+1)*sizeof(short));
if (!dat) { if (!dat) {
Debug(&__plugin,DebugGoOn,"ToneData::data() cold not allocate memory for %d elements",len); Debug(&__plugin,DebugCrit,"ToneData::data() cold not allocate memory for %d elements",len);
return 0; return 0;
} }
short* tmp = dat; short* tmp = dat;

View File

@ -782,7 +782,7 @@ Disconnector::~Disconnector()
bool Disconnector::init() bool Disconnector::init()
{ {
if (error() || !startup()) { if (error() || !startup()) {
Debug(&__plugin,DebugGoOn,"Error starting disconnector thread %p",this); Debug(&__plugin,DebugCrit,"Error starting disconnector thread %p",this);
delete this; delete this;
return false; return false;
} }

View File

@ -458,11 +458,11 @@ YRTPWrapper::~YRTPWrapper()
TelEngine::destruct(m_udptl); TelEngine::destruct(m_udptl);
} }
if (m_source) { if (m_source) {
Debug(&splugin,DebugGoOn,"There is still a RTP source %p [%p]",m_source,this); Debug(&splugin,DebugCrit,"There is still a RTP source %p [%p]",m_source,this);
TelEngine::destruct(m_source); TelEngine::destruct(m_source);
} }
if (m_consumer) { if (m_consumer) {
Debug(&splugin,DebugGoOn,"There is still a RTP consumer %p [%p]",m_consumer,this); Debug(&splugin,DebugCrit,"There is still a RTP consumer %p [%p]",m_consumer,this);
TelEngine::destruct(m_consumer); TelEngine::destruct(m_consumer);
} }
splugin.changed(); splugin.changed();
@ -1158,7 +1158,7 @@ YRTPSource::~YRTPSource()
tmp->m_source = 0; tmp->m_source = 0;
s_srcMutex.unlock(); s_srcMutex.unlock();
if (s != this) if (s != this)
Debug(&splugin,DebugGoOn,"Wrapper %p held source %p not [%p]",tmp,s,this); Debug(&splugin,DebugCrit,"Wrapper %p held source %p not [%p]",tmp,s,this);
// we have just to wait for any YRTPSession::rtpRecvData() to finish // we have just to wait for any YRTPSession::rtpRecvData() to finish
while (m_busy) while (m_busy)
Thread::yield(); Thread::yield();
@ -1192,7 +1192,7 @@ YRTPConsumer::~YRTPConsumer()
tmp->m_consumer = 0; tmp->m_consumer = 0;
tmp->deref(); tmp->deref();
if (c != this) if (c != this)
Debug(&splugin,DebugGoOn,"Wrapper %p held consumer %p not [%p]",tmp,c,this); Debug(&splugin,DebugCrit,"Wrapper %p held consumer %p not [%p]",tmp,c,this);
} }
} }

View File

@ -8966,7 +8966,7 @@ bool SIPDriver::received(Message& msg, int id)
m_endpoint->m_mutex.lock(); m_endpoint->m_mutex.lock();
n = m_endpoint->m_transports.count(); n = m_endpoint->m_transports.count();
if (n) if (n)
Debug(this,DebugGoOn,"Exiting with %u transports in queue",n); Debug(this,DebugCrit,"Exiting with %u transports in queue",n);
m_endpoint->m_mutex.unlock(); m_endpoint->m_mutex.unlock();
m_endpoint->cancel(); m_endpoint->cancel();
} }

View File

@ -1899,7 +1899,7 @@ SOCKSPacket* SOCKSConn::processSocks(const Time& now, bool& error, bool& timeout
return 0; return 0;
// Sanity check // Sanity check
if (!m_waitMsg) { if (!m_waitMsg) {
Debug(m_engine,DebugGoOn, Debug(m_engine,DebugCrit,
"SOCKSConn(%s) inconsistent status (no msg in %s status) [%p]", "SOCKSConn(%s) inconsistent status (no msg in %s status) [%p]",
m_id.c_str(),statusName(m_status),this); m_id.c_str(),statusName(m_status),this);
error = true; error = true;
@ -3447,7 +3447,7 @@ bool YSocksWrapper::startWorker()
if (m_thread->startup()) if (m_thread->startup())
return true; return true;
m_thread = 0; m_thread = 0;
Debug(this,DebugGoOn,"Failed to start worker thread [%p]",this); Debug(this,DebugCrit,"Failed to start worker thread [%p]",this);
return false; return false;
} }

View File

@ -1010,7 +1010,7 @@ bool YStunSocketFilter::install(Socket* sock, const Message* msg)
m_userId = msg->getValue("userid"); m_userId = msg->getValue("userid");
// Install // Install
if (!sock->installFilter(this)) { if (!sock->installFilter(this)) {
Debug(&iplugin,DebugGoOn, Debug(&iplugin,DebugCrit,
"Error installing filter for '%s'. [%p]", "Error installing filter for '%s'. [%p]",
m_userId.c_str(),this); m_userId.c_str(),this);
return false; return false;
@ -1195,7 +1195,7 @@ bool StunHandler::received(Message& msg)
{ {
Socket* socket = static_cast<Socket*>(msg.userObject(YATOM("Socket"))); Socket* socket = static_cast<Socket*>(msg.userObject(YATOM("Socket")));
if (!socket) { if (!socket) {
Debug(&iplugin,DebugGoOn,"StunHandler: No socket to install filter for."); Debug(&iplugin,DebugWarn,"StunHandler: No socket to install filter for.");
return true; return true;
} }
YStunSocketFilter* filter = new YStunSocketFilter(); YStunSocketFilter* filter = new YStunSocketFilter();

View File

@ -449,7 +449,7 @@ bool ZLibModule::received(Message& msg, int id)
return true; return true;
Compressor** pp = static_cast<Compressor**>(msg.userObject(YATOM("Compressor*"))); Compressor** pp = static_cast<Compressor**>(msg.userObject(YATOM("Compressor*")));
if (!pp) { if (!pp) {
Debug(this,DebugGoOn,"No pointer in %s message",msg.c_str()); Debug(this,DebugWarn,"No pointer in %s message",msg.c_str());
return false; return false;
} }
bool comp = msg.getBoolValue("comp",true); bool comp = msg.getBoolValue("comp",true);

View File

@ -254,13 +254,14 @@ YATE_API bool abortOnBug(bool doAbort);
enum DebugLevel { enum DebugLevel {
DebugFail = 0, DebugFail = 0,
DebugTest = 1, DebugTest = 1,
DebugGoOn = 2, DebugCrit = 2,
DebugGoOn = DebugCrit,
DebugConf = 3, DebugConf = 3,
DebugStub = 4, DebugStub = 4,
DebugWarn = 5, DebugWarn = 5,
DebugMild = 6, DebugMild = 6,
DebugCall = 7, DebugNote = 7,
DebugNote = 8, DebugCall = 8,
DebugInfo = 9, DebugInfo = 9,
DebugAll = 10 DebugAll = 10
}; };