r3136 - trunk/libmsip/source
erik at minisip.org
erik at minisip.org
Sun Jan 21 12:00:56 CET 2007
Author: erik
Date: 2007-01-21 12:00:55 +0100 (Sun, 21 Jan 2007)
New Revision: 3136
Modified:
trunk/libmsip/source/SipCommandDispatcher.cxx
Log:
* The SipCommandDispatcher::run used a local static variable
called "runcount" to check that only a single thread was
running the function. The purpose was purely for debugging,
and was only used if libmsip was configured with
"--enable-debug".
Implementing the variable as static within the method was a bug
since the scope is global for the whole application, and if an
application uses more than one SipStack objects simultaneously,
then an "massert" could fail (if the "run" method in two
different SipStack::run delivers commands simultaneously).
I simply removed this check.
Modified: trunk/libmsip/source/SipCommandDispatcher.cxx
===================================================================
--- trunk/libmsip/source/SipCommandDispatcher.cxx 2007-01-21 10:43:18 UTC (rev 3135)
+++ trunk/libmsip/source/SipCommandDispatcher.cxx 2007-01-21 11:00:55 UTC (rev 3136)
@@ -47,7 +47,6 @@
//transportLayer->setSipSMCommandReceiver(this);
transportLayer->setDispatcher(this);
-
}
void SipCommandDispatcher::free(){
@@ -91,22 +90,11 @@
}
void SipCommandDispatcher::run(){
-#ifdef DEBUG_OUTPUT
- static int runcount = 1;
-#endif
while (keepRunning){
-#ifdef DEBUG_OUTPUT
- runcount--;
-#endif
mdbg << "DIALOG CONTAINER: waiting for command"<< end;
semaphore.dec();
-#ifdef DEBUG_OUTPUT
- runcount++;
- massert(runcount==1);
-#endif
-
struct queue_type item;
mlock.lock();
More information about the Minisip-devel
mailing list