r3272 - trunk/libmsip/source
erik at minisip.org
erik at minisip.org
Wed May 9 14:48:40 CEST 2007
Author: erik
Date: 2007-05-09 14:17:35 +0200 (Wed, 09 May 2007)
New Revision: 3272
Modified:
trunk/libmsip/source/SipStackInternal.cxx
Log:
Fixes to libmsip debug output:
* Debug string fix ("+" command): A transaction in a dialog was
often listed as outside of a dialog because of a bug. This
only affected how the internal state was presented, and was
not a bug for end users.
* Formating fix for "+" debug output
Modified: trunk/libmsip/source/SipStackInternal.cxx
===================================================================
--- trunk/libmsip/source/SipStackInternal.cxx 2007-05-08 19:27:58 UTC (rev 3271)
+++ trunk/libmsip/source/SipStackInternal.cxx 2007-05-09 12:17:35 UTC (rev 3272)
@@ -270,8 +270,7 @@
for (uint32_t j=0; jj!=torequests.end(); j++){
if ( ((*sm)) == *((*jj).getSubscriber()) ){
int ms= (*jj).getMsToTimeout();
- ret+= ind +"timeout: "
- + (*jj).getCommand()
+ ret+= ind + (*jj).getCommand()
+ " Time: " + itoa(ms/1000) + "." + itoa(ms%1000)+"\n";
ntimeouts++;
torequests.erase(jj);
@@ -295,7 +294,7 @@
ret = ind+ (*t)->getName() + " State: " + (*t)->getCurrentStateName()+"\n";
ret+= ind+"Timeouts:\n";
- ret+=getTimeoutDebugString(*t,torequests,2);
+ ret+= ind+getTimeoutDebugString(*t,torequests,2);
return ret;
}
@@ -320,13 +319,15 @@
//cerr << " Transactions:"<< endl;
string did=d->getCallId();
int n=0;
+ bool restart;
for (list<MRef<SipTransaction*> >::iterator t = transactions.begin();
- t!=transactions.end(); t++){
+ t!=transactions.end(); restart ? t=transactions.begin() : t++){
+ restart=false;
if ((*t)->getCallId()==did){
ret+=getTransactionDebugString(*t, torequests, indent+1);
n++;
transactions.erase(t);
- t=transactions.begin();
+ restart=true; // t is invalidated, and we'll restart the loop
}
}
More information about the Minisip-devel
mailing list