r3297 - in trunk/libminisip/source: . subsystem_media subsystem_signaling/sip

erik at minisip.org erik at minisip.org
Mon Jun 11 15:30:21 CEST 2007


Author: erik
Date: 2007-06-11 15:30:21 +0200 (Mon, 11 Jun 2007)
New Revision: 3297

Modified:
   trunk/libminisip/source/Minisip.cxx
   trunk/libminisip/source/subsystem_media/MediaStream.cxx
   trunk/libminisip/source/subsystem_media/Session.cxx
   trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceServer.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
Log:

 * Added type information to some of the debug output in libminisip.



Modified: trunk/libminisip/source/Minisip.cxx
===================================================================
--- trunk/libminisip/source/Minisip.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/Minisip.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -213,7 +213,7 @@
 	
 
 	#ifdef DEBUG_OUTPUT
-	mdbg << "Loading plugins"<<endl;
+	mdbg("init") << "Loading plugins"<<endl;
 	#endif
 
 	loadPlugins( pluginPath );
@@ -246,7 +246,7 @@
 		osso_context_t * ossoCtxt = NULL;
 		ossoCtxt = osso_initialize( PACKAGE_NAME, PACKAGE_VERSION, TRUE, NULL );
 		if( !ossoCtxt ){
-			mdbg << "Could not initialize osso context" << end;
+			mdbg("init") << "Could not initialize osso context" << end;
 		}
 	#endif
 
@@ -416,7 +416,7 @@
 #endif
 
 		/*
-		   mdbg << "Starting presence server"<< end;
+		   mdbg("init") << "Starting presence server"<< end;
 		   CommandString subscribeserver("", SipCommandString::start_presence_server);
 		   SipSMCommand sipcmdss(subscribeserver, SipSMCommand::remote, SipSMCommand::TU);
 		   sip->getSipStack()->handleCommand(sipcmdss);

Modified: trunk/libminisip/source/subsystem_media/MediaStream.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/MediaStream.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_media/MediaStream.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -504,7 +504,7 @@
                                 unsigned char* payload, int payLen) {
 
 	if (this->remoteAddress.isNull()) {
-		mdbg << " MediaStreamSender::sendZrtp called before " <<
+		mdbg("media/zrtp") << " MediaStreamSender::sendZrtp called before " <<
 			"setRemoteAddress!" << endl;
 		return;
 	}
@@ -537,7 +537,7 @@
 
 void MediaStreamSender::send( byte_t * data, uint32_t length, uint32_t * givenTs, bool marker, bool dtmf ){
 	if (this->remoteAddress.isNull()) {
-		mdbg << " MediaStreamSender::send called before " <<
+		mdbg("media") << " MediaStreamSender::send called before " <<
 			"setRemoteAddress!" << endl;
 		return;
 	}
@@ -601,7 +601,7 @@
 }
 
 void MediaStreamSender::setRemoteAddress( MRef<IPAddress *> ra){
-	mdbg << "MediaStreamSender::setRemoteAddress: " <<
+	mdbg("media") << "MediaStreamSender::setRemoteAddress: " <<
 		ra->getString() << endl;
 	this->remoteAddress = ra;
 #ifdef ZRTP_SUPPORT

Modified: trunk/libminisip/source/subsystem_media/Session.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -573,17 +573,17 @@
 
 	/* If we have a sender for this format, activate it */
 #ifdef DEBUG_OUTPUT
-	mdbg << "Session::matchFormat: Starting senders loop" << endl;
+	mdbg("media") << "Session::matchFormat: Starting senders loop" << endl;
 #endif
 	uint8_t j = 1;
 	mediaStreamSendersLock.lock();
 	for( iSStream =  mediaStreamSenders.begin(); iSStream != mediaStreamSenders.end(); iSStream++,j++ ){
 #ifdef DEBUG_OUTPUT
-		mdbg << "Trying a sender"<< endl;
+		mdbg("media") << "Trying a sender"<< endl;
 #endif
 		if( (*iSStream)->matches( m, iFormat ) ){
 #ifdef DEBUG_OUTPUT
-			mdbg << "Found sender for " << (*iSStream)->getSdpMediaType()<< endl;
+			mdbg("media") << "Found sender for " << (*iSStream)->getSdpMediaType()<< endl;
 #endif
 
 #if 0
@@ -607,12 +607,12 @@
 	mediaStreamSendersLock.unlock();
 	/* Look for a receiver */
 #ifdef DEBUG_OUTPUT
-	mdbg << "Starting receivers loop"<< endl;
+	mdbg("media") << "Starting receivers loop"<< endl;
 #endif
 	for( iRStream =  mediaStreamReceivers.begin(); iRStream != mediaStreamReceivers.end(); iRStream ++ ){
 		if( (*iRStream)->matches( m, iFormat ) ){
 #ifdef DEBUG_OUTPUT
-			mdbg << "Found receiver for " << (*iRStream)->getSdpMediaType()<< endl;
+			mdbg("media") << "Found receiver for " << (*iRStream)->getSdpMediaType()<< endl;
 #endif
 			return (*iRStream);
 		}

Modified: trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -138,7 +138,7 @@
 			MRef<SipIdentity *> id = lookupTarget(inv->getUri());
 
 #ifdef DEBUG_OUTPUT			
-			mdbg << "DefaultDialogHandler:: creating new SipDialogConfVoip" << endl;
+			mdbg("signaling/sip") << "DefaultDialogHandler:: creating new SipDialogConfVoip" << endl;
 #endif			
 		
 
@@ -199,7 +199,7 @@
 			MRef<SipIdentity *> id = lookupTarget(inv->getUri());
 
 #ifdef DEBUG_OUTPUT			
-			mdbg << "DefaultDialogHandler:: creating new SipDialogConfVoip" << endl;
+			mdbg("signaling/sip") << "DefaultDialogHandler:: creating new SipDialogConfVoip" << endl;
 #endif			
 
 
@@ -223,7 +223,7 @@
 			SipSMCommand cmd(pkt, SipSMCommand::transaction_layer, SipSMCommand::dialog_layer);
 
 			sipStack->enqueueCommand(cmd, HIGH_PRIO_QUEUE );
-			mdbg << cmd << endl;
+			mdbg("signaling/sip") << cmd << endl;
 		}
 		//start SipDialogVoIP
 		else{
@@ -252,7 +252,7 @@
 			SipSMCommand cmd(pkt, SipSMCommand::transaction_layer, SipSMCommand::dialog_layer);
 
 			sipStack->enqueueCommand(cmd, HIGH_PRIO_QUEUE );
-			mdbg << cmd << endl;
+			mdbg("signaling/sip") << cmd << endl;
 		}
 		return true;
 	}
@@ -263,7 +263,7 @@
 		MRef<SipRequest*> im = (SipRequest*)*pkt;
 
 #ifdef DEBUG_OUTPUT			
-		mdbg << "DefaultDialogHandler:: creating new server transaction for incoming SipIMMessage" << endl;
+		mdbg("signaling/sip") << "DefaultDialogHandler:: creating new server transaction for incoming SipIMMessage" << endl;
 #endif			
 		sendIMOk( im );
 
@@ -313,7 +313,7 @@
 		return true;
 	}
 
-	mdbg << "DefaultDialogHandler ignoring " << pkt->getString() << endl; 
+	mdbg("signaling/sip") << "DefaultDialogHandler ignoring " << pkt->getString() << endl; 
 
 	return false;
 
@@ -457,14 +457,14 @@
 	}
 #endif
 
-	mdbg << "DefaultDialogHandler ignoring command " << cmdstr.getString() << endl; 
+	mdbg("signaling/sip") << "DefaultDialogHandler ignoring command " << cmdstr.getString() << endl; 
 
 	return false;
 }
 
 
 bool DefaultDialogHandler::handleCommand(const SipSMCommand &command){
-	mdbg << "DefaultDialogHandler: got command "<< command << endl;
+	mdbg("signaling/sip") << "DefaultDialogHandler: got command "<< command << endl;
 	int dst = command.getDestination();
 	if ( dst!=SipSMCommand::dialog_layer)
 		return false;
@@ -625,7 +625,7 @@
 	}
 	else{
 #ifdef DEBUG_OUTPUT			
-		mdbg << "DefaultDialogHandler:: Unknown GroupListProtocol "<<prot<< endl;
+		mdbg("signaling/sip") << "DefaultDialogHandler:: Unknown GroupListProtocol "<<prot<< endl;
 #endif
 		return;
 	}
@@ -756,7 +756,7 @@
 	//get P2TDialog
 	MRef<SipDialogP2T*> p2tDialog;
 	if(getP2TDialog(command.getCommandString().getParam(), p2tDialog)==false){	
-		mdbg<<"DefaultDialogHandler::Couldn't find SipDialogP2T!"<<endl;
+		mdbg("signaling/sip") << "DefaultDialogHandler::Couldn't find SipDialogP2T!"<<endl;
 		return;
 	}
 

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -256,7 +256,6 @@
 	if (transitionMatch("BYE", command, SipSMCommand::transaction_layer, SipSMCommand::dialog_layer)){
 		MRef<SipRequest*> bye = (SipRequest*) *command.getCommandPacket();
 
-		//mdbg << "log stuff"<< end;
 		if( getLogEntry() ){
 			((LogEntrySuccess *)(*( getLogEntry() )))->duration = 
 			time( NULL ) - getLogEntry()->start; 
@@ -974,8 +973,6 @@
 }
 
 void SipDialogConfVoip::sendInvite(){
-	//	mdbg << "ERROR: SipDialogVoip::sendInvite() UNIMPLEMENTED"<< end;
-	
 	MRef<SipRequest*> inv;
 	string keyAgreementMessage;
 
@@ -1263,7 +1260,7 @@
 
 
 bool SipDialogConfVoip::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogConfVoip::handleCommand got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogConfVoip::handleCommand got "<< c << endl;
 
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() != dialogState.callId )
@@ -1285,7 +1282,7 @@
 //			c.getCommandPacket()->getCSeq()!= command_seq_no)
 //		return false;
 	
-	mdbg << "SipDialogConfVoip::handlePacket() got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogConfVoip::handlePacket() got "<< c << endl;
 	bool handled = SipDialog::handleCommand(c);
 	
 	if (!handled && c.getType()==SipSMCommand::COMMAND_STRING && c.getCommandString().getOp()==SipCommandString::no_transactions){
@@ -1294,13 +1291,13 @@
 	
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() == dialogState.callId ){
-			mdbg << "Warning: SipDialogConfVoip ignoring command with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogConfVoip ignoring command with matching call id"<< endl;
 			return true;
 		}
 	}
 	if (c.getType()==SipSMCommand::COMMAND_PACKET && dialogState.callId.length()>0){
 		if (c.getCommandPacket()->getCallId() == dialogState.callId){
-			mdbg << "Warning: SipDialogConfVoip ignoring packet with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogConfVoip ignoring packet with matching call id"<< endl;
 			return true;
 		}
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -140,7 +140,7 @@
 		if (statehdr && statehdr->hasParameter("expires")){
 			to = atoi(statehdr->getParameter("expires").c_str());
 		}else{
-			mdbg << "WARNING: SipDialogPresenceClient did not contain any expires header - using 300 seconds"<<endl;
+			mdbg("signaling/sip") << "WARNING: SipDialogPresenceClient did not contain any expires header - using 300 seconds"<<endl;
 			to = 300;
 		}
 		
@@ -160,7 +160,7 @@
 				SipCommandString::transport_error,
 				SipSMCommand::transaction_layer,
 				SipSMCommand::dialog_layer )){
-		mdbg << "WARNING: Transport error when subscribing - trying again in five minutes"<< endl;
+		mdbg("signaling/sip") << "WARNING: Transport error when subscribing - trying again in five minutes"<< endl;
 		requestTimeout(300 * 1000, "timerDoSubscribe");
 		return true;
 	}else{
@@ -235,7 +235,7 @@
 		++dialogState.seqNo;
 
 		if( !updateAuthentications( resp ) ){
-			mdbg << "Auth failed" << endl;
+			mdbg("signaling/sip") << "Auth failed" << endl;
 			return true;
 		}
 
@@ -389,7 +389,7 @@
 }
 
 bool SipDialogPresenceClient::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogPresenceClient::handleCommand got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogPresenceClient::handleCommand got "<< c << endl;
 
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() != dialogState.callId ){
@@ -409,7 +409,7 @@
 	
 	}
 	
-	mdbg << "SipDialogPresenceClient::handlePacket() got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogPresenceClient::handlePacket() got "<< c << endl;
 	bool handled = SipDialog::handleCommand(c);
 	
 	if (!handled && c.getType()==SipSMCommand::COMMAND_STRING && c.getCommandString().getOp()==SipCommandString::no_transactions){
@@ -418,13 +418,13 @@
 	
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() == dialogState.callId ){
-			mdbg << "Warning: SipDialogPresenceClient ignoring command with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogPresenceClient ignoring command with matching call id"<< endl;
 			return true;
 		}
 	}
 	if (c.getType()==SipSMCommand::COMMAND_PACKET && dialogState.callId.length()>0){
 		if (c.getCommandPacket()->getCallId() == dialogState.callId){
-			mdbg << "Warning: SipDialogPresenceClient ignoring packet with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogPresenceClient ignoring packet with matching call id"<< endl;
 			return true;
 		}
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceServer.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceServer.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceServer.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -311,7 +311,7 @@
 }
 
 bool SipDialogPresenceServer::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogPresenceServer::handleCommand got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogPresenceServer::handleCommand got "<< c << endl;
 
 /*	if (c.getType()==SipSMCommand::COMMAND_STRING && callId.length()>0){
 		if (c.getCommandString().getDestinationId() != callId ){

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -171,7 +171,6 @@
 	    dialogState.remoteTag != ""){
 		MRef<SipRequest*> bye = (SipRequest*) *command.getCommandPacket();
 
-		//mdbg << "log stuff"<< end;
 		if( getLogEntry() ){
 			((LogEntrySuccess *)(*( getLogEntry() )))->duration = 
 			time( NULL ) - getLogEntry()->start; 
@@ -677,7 +676,7 @@
 }
 
 bool SipDialogVoip::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogVoip::handleCommand got "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogVoip::handleCommand got "<< c << endl;
 
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() != dialogState.callId )
@@ -695,7 +694,7 @@
 	
 	}
 	
-	mdbg << "SipDialogVoip::handleCommand() sending command to Dialog: "<< c << endl;
+	mdbg("signaling/sip") << "SipDialogVoip::handleCommand() sending command to Dialog: "<< c << endl;
 	bool handled = SipDialog::handleCommand(c);
 	
 	if (!handled && c.getType()==SipSMCommand::COMMAND_STRING && c.getCommandString().getOp()==SipCommandString::no_transactions){
@@ -704,13 +703,13 @@
 	
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (!handled && c.getCommandString().getDestinationId() == dialogState.callId ){
-			mdbg << "Warning: SipDialogVoIP ignoring command with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogVoIP ignoring command with matching call id"<< endl;
 			return true;
 		}
 	}
 	if (c.getType()==SipSMCommand::COMMAND_PACKET && dialogState.callId.length()>0){
 		if (!handled && c.getCommandPacket()->getCallId() == dialogState.callId){
-			mdbg << "Warning: SipDialogVoIP ignoring packet with matching call id"<< endl;
+			mdbg("signaling/sip") << "Warning: SipDialogVoIP ignoring packet with matching call id"<< endl;
 			return true;
 		}
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -301,7 +301,6 @@
 	    dialogState.remoteTag != ""){
 		MRef<SipRequest*> bye = (SipRequest*) *command.getCommandPacket();
 
-		//mdbg << "log stuff"<< end;
 		if( getLogEntry() ){
 			((LogEntrySuccess *)(*( getLogEntry() )))->duration = 
 			time( NULL ) - getLogEntry()->start; 

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-11 13:29:19 UTC (rev 3296)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-11 13:30:21 UTC (rev 3297)
@@ -433,7 +433,7 @@
 
 		if( find( audioCodecs.begin(), audioCodecs.end(), name ) == audioCodecs.end() ){
 			audioCodecs.push_back( name );
-			mdbg << "SipSoftPhoneConfiguration: Add codec " << name << endl;
+			mdbg("signaling/sip") << "SipSoftPhoneConfiguration: Add codec " << name << endl;
 			modified = true;
 		}
 	}



More information about the Minisip-devel mailing list