r3578 - trunk/libmsip/source

erik at minisip.org erik at minisip.org
Thu May 15 19:44:52 CEST 2008


Author: erik
Date: 2008-05-15 19:44:51 +0200 (Thu, 15 May 2008)
New Revision: 3578

Modified:
   trunk/libmsip/source/SipCommandDispatcher.cxx
Log:

 * libmsip bug fix: If you use SipDialogRegister, but does not use a dialog
      management dialog, then libmsip crashed. Thanks to Guillem for
      finding.



Modified: trunk/libmsip/source/SipCommandDispatcher.cxx
===================================================================
--- trunk/libmsip/source/SipCommandDispatcher.cxx	2008-04-22 15:52:00 UTC (rev 3577)
+++ trunk/libmsip/source/SipCommandDispatcher.cxx	2008-05-15 17:44:51 UTC (rev 3578)
@@ -313,7 +313,7 @@
 			return true;
 		}else if (c.getCommandString().getOp()==SipCommandString::call_terminated){
 			return dialogLayer->removeDialog(c.getDestinationId());
-		}else if ( 	c.getCommandString().getOp() == SipCommandString::sip_stack_shutdown ||
+		}else if (  managementHandler && (c.getCommandString().getOp() == SipCommandString::sip_stack_shutdown ||
 				c.getCommandString().getOp() == SipCommandString::register_all_identities ||
 				c.getCommandString().getOp() == SipCommandString::register_all_identities_done ||
 				c.getCommandString().getOp() == SipCommandString::unregister_all_identities ||
@@ -321,7 +321,7 @@
 				c.getCommandString().getOp() == SipCommandString::terminate_all_calls ||
 				c.getCommandString().getOp() == SipCommandString::terminate_all_calls_done ||
 				c.getCommandString().getOp() == SipCommandString::call_terminated_early ||
-				c.getCommandString().getOp() == SipCommandString::register_ok) { 
+				c.getCommandString().getOp() == SipCommandString::register_ok ) ) { 
 			//commands that are only interesting to the management dialog ...
 			//Refurbish the command ... or the SipDialog::handleCmd won't let it through
 			SipSMCommand cmd( c.getCommandString(),
@@ -330,7 +330,7 @@
 			managementHandler->handleCommand(cmd);
 			return true;
 			
-		}else if ( c.getCommandString().getOp() == SipCommandString::sip_stack_shutdown_done) { 
+		}else if ( managementHandler && c.getCommandString().getOp() == SipCommandString::sip_stack_shutdown_done) { 
 			
 //			SipSMCommand cmd( c.getCommandString(),
 //					SipSMCommand::dispatcher,



More information about the Minisip-devel mailing list