Changed thread names to be uniform and easily readable.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2733 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2009-06-22 14:48:26 +00:00
parent 46761a8933
commit 5499650213
25 changed files with 42 additions and 40 deletions

View File

@ -2473,7 +2473,7 @@ void QtWindow::updatePosSize()
* QtClient
*/
QtClient::QtClient()
: Client("QtClient")
: Client("Qt Client")
{
m_oneThread = Engine::config().getBoolValue("client","onethread",true);

View File

@ -82,7 +82,7 @@ class EnginePrivate : public Thread
{
public:
EnginePrivate()
: Thread("EnginePrivate")
: Thread("Engine Worker")
{ count++; }
~EnginePrivate()
{ count--; }

View File

@ -81,12 +81,12 @@ static TokenDict s_serviceType[] = {
};
static TokenDict s_threadNames[] = {
{"Jabber stream connect", JBThread::StreamConnect},
{"Engine receive", JBThread::EngineReceive},
{"Engine process", JBThread::EngineProcess},
{"Presence", JBThread::Presence},
{"Jingle", JBThread::Jingle},
{"Message", JBThread::Message},
{"Jabber Connect", JBThread::StreamConnect},
{"Jabber Receive", JBThread::EngineReceive},
{"Jabber Process", JBThread::EngineProcess},
{"Jabber Presence", JBThread::Presence},
{"Jabber Messages", JBThread::Message},
{"Jingle Events", JBThread::Jingle},
{0,0}
};

View File

@ -224,7 +224,7 @@ AsyncFFT* AsyncFFT::create(unsigned int length, WinType window, Priority prio)
}
AsyncFFT::AsyncFFT(unsigned int length, WinType window, Priority prio)
: Thread("AsyncFFT",prio),
: Thread("Async FFT",prio),
m_ready(false), m_start(false), m_stop(false), m_notify(0),
m_length(0), m_window(0), m_real(0), m_imag(0), m_nBits(0), m_winName(0)
{

View File

@ -86,7 +86,7 @@ class GenThread : public Thread
{
public:
GenThread()
: Thread("CallGen")
: Thread("CallGen Caller")
{ }
virtual void run();
};
@ -95,7 +95,7 @@ class CleanThread : public Thread
{
public:
CleanThread()
: Thread("GenCleaner")
: Thread("CallGen Cleaner")
{ }
virtual void run();
};

View File

@ -167,7 +167,7 @@ bool AlsaSource::init()
{
m_brate = 16000;
m_total = 0;
start("AlsaSource",Thread::High);
start("Alsa Source",Thread::High);
return true;
}

View File

@ -174,7 +174,7 @@ bool OssSource::init()
Debug(DebugWarn, "Unable to set input mode");
return false;
}
start("OssSource");
start("Oss Source");
return true;
}

View File

@ -269,7 +269,7 @@ class ExtThread : public Thread
{
public:
ExtThread(ExtModReceiver* receiver)
: Thread("ExtModule"), m_receiver(receiver)
: Thread("ExtMod Receiver"), m_receiver(receiver)
{ }
virtual void run()
{ m_receiver->run(); }
@ -369,7 +369,7 @@ ExtModSource::ExtModSource(Stream* str, ExtModChan* chan)
Debug(DebugAll,"ExtModSource::ExtModSource(%p) [%p]",str,this);
if (m_str) {
chan->setRunning(true);
start("ExtModSource");
start("ExtMod Source");
}
}
@ -1619,7 +1619,8 @@ bool ExtModCommand::complete(const String& partLine, const String& partWord, Str
ExtListener::ExtListener(const char* name)
: Thread("ExtListener"), m_name(name), m_role(ExtModReceiver::RoleUnknown)
: Thread("ExtMod Listener"),
m_name(name), m_role(ExtModReceiver::RoleUnknown)
{
}

View File

@ -61,7 +61,7 @@ class FaxThread : public Thread
{
public:
inline FaxThread(FaxWrapper* wrapper)
: Thread("Fax"), m_wrap(wrapper)
: Thread("Fax Wrapper"), m_wrap(wrapper)
{ }
virtual void run();
private:

View File

@ -161,7 +161,7 @@ class FileSourceWorker : public Thread
{
public:
inline FileSourceWorker(FileSource* src, Thread::Priority prio = Thread::Normal)
: Thread("FileSource worker",prio), m_source(src)
: Thread("FileSource Worker",prio), m_source(src)
{}
virtual void cleanup();
virtual void run();

View File

@ -167,7 +167,7 @@ MOHSource* MOHSource::getSource(String& name, const NamedList& params)
}
if (cmd) {
MOHSource *s = new MOHSource(name,cmd);
if (s->start("MOHSource")) {
if (s->start("MOH Source")) {
sources.append(s);
return s;
} else

View File

@ -3131,7 +3131,7 @@ ModuleGroup* AnalogDriver::findGroup(const char* name, bool useFxo)
* AnalogWorkerThread
*/
AnalogWorkerThread::AnalogWorkerThread(ModuleGroup* group)
: Thread("AnalogWorkerThread"),
: Thread("Analog Worker"),
m_client(group),
m_groupName(group ? group->debugName() : "")
{

View File

@ -462,7 +462,7 @@ YSIGFACTORY2(SLT);
*/
RudpThread::RudpThread(RudpSocket* rudp, Priority prio)
: Thread("RudpRunner",prio),
: Thread("RUDP Runner",prio),
m_rudp(rudp), m_stop(false)
{
}

View File

@ -90,7 +90,7 @@ class DbThread : public Thread
{
public:
inline DbThread(MyConn* conn)
: Thread("mysqldb"), m_conn(conn)
: Thread("Mysql Connection"), m_conn(conn)
{ }
virtual void run();
virtual void cleanup();

View File

@ -509,7 +509,7 @@ bool CallCdrHandler::received(Message& msg)
* QueuedCallWorker
*/
QueuedCallWorker::QueuedCallWorker(Priority prio)
: Thread("QueuedCallWorker",prio)
: Thread("QueuedCall Worker",prio)
{
s_thread = this;
}

View File

@ -87,7 +87,8 @@ class TdmThread : public Thread
{
public:
inline TdmThread(TdmWorker* worker, const String& addr, Priority prio = Normal)
: Thread(s_threadName,prio), m_worker(worker), m_address(addr)
: Thread(s_threadName,prio),
m_worker(worker), m_address(addr)
{}
virtual ~TdmThread();
virtual void run();
@ -486,7 +487,7 @@ void TdmWorker::stop()
Thread::yield();
}
const char* TdmThread::s_threadName = "TdmWorker";
const char* TdmThread::s_threadName = "Tdm Worker";
TdmThread::~TdmThread()
{

View File

@ -268,7 +268,7 @@ class WpSigThread : public Thread
friend class WpInterface;
public:
inline WpSigThread(WpInterface* iface, Priority prio = Normal)
: Thread("WpInterfaceThread",prio), m_interface(iface)
: Thread("Wp Interface",prio), m_interface(iface)
{}
virtual ~WpSigThread();
virtual void run();
@ -406,7 +406,7 @@ class WpSpanThread : public Thread
friend class WpSpan;
public:
inline WpSpanThread(WpSpan* data, Priority prio = Normal)
: Thread("WpSpanThread",prio), m_data(data)
: Thread("Wp Span",prio), m_data(data)
{}
virtual ~WpSpanThread();
virtual void run();

View File

@ -509,7 +509,7 @@ class SigTrunkThread : public Thread
friend class SigTrunk; // SigTrunk will set m_timeout when needded
public:
inline SigTrunkThread(SigTrunk* trunk, unsigned long sleepUsec)
: Thread("SigTrunkThread"),
: Thread("YSIG Trunk"),
m_trunk(trunk), m_timeout(0), m_sleepUsec(sleepUsec)
{ }
virtual ~SigTrunkThread();

View File

@ -660,7 +660,7 @@ void ZapWorkerClient::stop()
/**
* ZapWorkerThread
*/
const char* ZapWorkerThread::s_threadName = "ZapWorkerThread";
const char* ZapWorkerThread::s_threadName = "Zap Worker";
ZapWorkerThread::~ZapWorkerThread()
{

View File

@ -461,7 +461,7 @@ void ToneSource::zeroRefs()
bool ToneSource::startup()
{
DDebug(&__plugin,DebugAll,"ToneSource::startup(\"%s\") tone=%p",m_name.c_str(),m_tone);
return m_tone && start("ToneSource");
return m_tone && start("Tone Source");
}
const ToneDesc* ToneSource::getBlock(String& tone)

View File

@ -186,7 +186,7 @@ void WaveSource::init(const String& file, bool autorepeat)
if (file == "-") {
m_nodata = true;
m_brate = 8000;
start("WaveSource");
start("Wave Source");
return;
}
m_stream = new File;
@ -228,7 +228,7 @@ void WaveSource::init(const String& file, bool autorepeat)
if (autorepeat)
m_repeatPos = m_stream->seek(Stream::SeekCurrent);
asyncDelete(s_asyncDelete);
start("WaveSource");
start("Wave Source");
}
else {
Debug(DebugWarn,"Unable to compute data rate for file '%s'",file.c_str());

View File

@ -967,11 +967,11 @@ void YIAXEngine::start(u_int16_t listenThreadCount, u_int16_t eventThreadCount,
if (!trunkThreadCount)
Debug(this,DebugWarn,"YIAXEngine. No trunking threads(s)!");
for (; listenThreadCount; listenThreadCount--)
(new YIAXListener(this,"YIAXListener thread",s_priority))->startup();
(new YIAXListener(this,"YIAX Listener",s_priority))->startup();
for (; eventThreadCount; eventThreadCount--)
(new YIAXGetEvent(this,"YIAXGetEvent thread"))->startup();
(new YIAXGetEvent(this,"YIAX GetEvent"))->startup();
for (; trunkThreadCount; trunkThreadCount--)
(new YIAXTrunking(this,"YIAXTrunking thread",s_priority))->startup();
(new YIAXTrunking(this,"YIAX Trunking",s_priority))->startup();
m_threadsCreated = true;
}

View File

@ -3502,7 +3502,7 @@ void YJGConnection::handleAudioInfoEvent(JGEvent* event)
* Transfer thread (route and execute)
*/
YJGTransfer::YJGTransfer(YJGConnection* conn, const char* subject)
: Thread("Jingle transfer"),
: Thread("Jingle Transfer"),
m_msg("call.route")
{
if (!conn)

View File

@ -2105,7 +2105,7 @@ bool YateSIPEndPoint::generic(SIPEvent* e, SIPTransaction* t)
YateSIPRefer::YateSIPRefer(const String& transferorID, const String& transferredID,
Driver* transferredDrv, Message* msg, SIPMessage* sipNotify,
SIPTransaction* transaction)
: Thread("YSIP Transfer Thread"),
: Thread("YSIP Transfer"),
m_transferorID(transferorID), m_transferredID(transferredID),
m_transferredDrv(transferredDrv), m_msg(msg), m_sipNotify(sipNotify),
m_notifyCode(200), m_transaction(0), m_rspCode(500)

View File

@ -1187,7 +1187,7 @@ class YSocksWrapperWorker: public Thread
{
public:
inline YSocksWrapperWorker(YSocksWrapper* w, Thread::Priority prio = Thread::Normal)
: Thread("SOCKS wrapper worker thread",prio),
: Thread("SOCKS Wrapper",prio),
m_wrapper(w)
{}
// Check if the thread should terminate
@ -1245,7 +1245,7 @@ public:
unsigned int backlog, bool blocking, unsigned int sleepMs = 20,
Thread::Priority prio = Thread::Normal)
: SOCKSListener(engine,proxy,backlog,blocking,sleepMs),
Thread("SOCKS listener thread",prio)
Thread("SOCKS Listener",prio)
{}
// Add the listener to engine and start it
@ -1268,7 +1268,7 @@ class YSocksProcessThread : public Thread
{
public:
inline YSocksProcessThread(Thread::Priority prio = Thread::Normal)
: Thread("SOCKS engine processor thread",prio)
: Thread("SOCKS Processor",prio)
{}
void run();
};