r3292 - in trunk: libmikey/mikey libminisip/include/libminisip/media libminisip/source libminisip/source/ipprovider libminisip/source/subsystem_config libminisip/source/subsystem_gui libminisip/source/subsystem_media libminisip/source/subsystem_media/codecs libminisip/source/subsystem_media/soundcard libminisip/source/subsystem_media/soundcard/resampler libminisip/source/subsystem_signaling/sip libmnetutil/source libmsip/include/libmsip libmsip/source libmsip/source/dialogs libmsip/source/headers libmsip/source/messages libmsip/source/transactions libmutil/include/libmutil libmutil/source minisip/minisip/gui/gtkgui minisip/minisip/gui/textui

erik at minisip.org erik at minisip.org
Fri Jun 8 22:45:24 CEST 2007


Author: erik
Date: 2007-06-08 22:45:23 +0200 (Fri, 08 Jun 2007)
New Revision: 3292

Modified:
   trunk/libmikey/mikey/Mikey.cxx
   trunk/libminisip/include/libminisip/media/CallRecorder.h
   trunk/libminisip/source/Minisip.cxx
   trunk/libminisip/source/MinisipExceptions.cxx
   trunk/libminisip/source/ipprovider/SimpleIp6Provider.cxx
   trunk/libminisip/source/ipprovider/StunIpProvider.cxx
   trunk/libminisip/source/subsystem_config/ConfBackend.cxx
   trunk/libminisip/source/subsystem_config/MXmlConfBackend.cxx
   trunk/libminisip/source/subsystem_config/UserConfigPosix.cxx
   trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx
   trunk/libminisip/source/subsystem_media/RtpReceiver.cxx
   trunk/libminisip/source/subsystem_media/Session.cxx
   trunk/libminisip/source/subsystem_media/codecs/Codec.cxx
   trunk/libminisip/source/subsystem_media/soundcard/OssSoundDevice.cxx
   trunk/libminisip/source/subsystem_media/soundcard/SoundDriverRegistry.cxx
   trunk/libminisip/source/subsystem_media/soundcard/resampler/Resampler.cxx
   trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
   trunk/libminisip/source/subsystem_signaling/sip/Sip.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/SipDialogVoipClient.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx
   trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
   trunk/libmnetutil/source/NetworkFunctions.cxx
   trunk/libmsip/include/libmsip/SipSMCommand.h
   trunk/libmsip/source/SipAuthenticationDigest.cxx
   trunk/libmsip/source/SipCommandDispatcher.cxx
   trunk/libmsip/source/SipLayerDialog.cxx
   trunk/libmsip/source/SipLayerTransaction.cxx
   trunk/libmsip/source/SipLayerTransport.cxx
   trunk/libmsip/source/SipMessageContentMime.cxx
   trunk/libmsip/source/SipSMCommand.cxx
   trunk/libmsip/source/SipStackInternal.cxx
   trunk/libmsip/source/dialogs/SipDialog.cxx
   trunk/libmsip/source/dialogs/SipDialogManagement.cxx
   trunk/libmsip/source/dialogs/SipDialogRegister.cxx
   trunk/libmsip/source/headers/SipHeaderExpires.cxx
   trunk/libmsip/source/messages/SipMessage.cxx
   trunk/libmsip/source/transactions/SipTransaction.cxx
   trunk/libmsip/source/transactions/SipTransactionInviteServer.cxx
   trunk/libmsip/source/transactions/SipTransactionInviteServerUA.cxx
   trunk/libmsip/source/transactions/SipTransactionNonInviteServer.cxx
   trunk/libmutil/include/libmutil/MemObject.h
   trunk/libmutil/include/libmutil/StateMachine.h
   trunk/libmutil/include/libmutil/dbg.h
   trunk/libmutil/source/Library.cxx
   trunk/libmutil/source/MPlugin.cxx
   trunk/libmutil/source/ThreadPosix.cxx
   trunk/libmutil/source/dbg.cxx
   trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx
   trunk/minisip/minisip/gui/gtkgui/MainWindow.cxx
   trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx
Log:

 * Now we have the same implementation for "dbg" (mout, mdbg and merr) for
   both Windows Mobile and Linux et al.
 * Re-enabled the output callback functionality
 * Deprecated "end" (merr << end). It was only used because of problems
   with taking "endl" as parameter. This version should be fine.
 * Changed "end" to "endl" in the code.



Modified: trunk/libmikey/mikey/Mikey.cxx
===================================================================
--- trunk/libmikey/mikey/Mikey.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmikey/mikey/Mikey.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -120,24 +120,24 @@
 			}
 			catch( certificate_exception &e ){
 				// TODO: Tell the GUI
-				merr << "Could not open certificate " << e.what() << end;
+				merr << "Could not open certificate " << e.what() << endl;
 				setState( STATE_ERROR );
 			}
 			catch( MikeyExceptionUnacceptable &exc ){
-				merr << "MikeyException caught: "<<exc.what()<<end;
+				merr << "MikeyException caught: "<<exc.what()<<endl;
 				//FIXME! send SIP Unacceptable with Mikey Error message
 				setState( STATE_ERROR );
 			}
 			// Authentication failed
 			catch( MikeyExceptionAuthentication &exc ){
-				merr << "MikeyExceptionAuthentication caught: "<<exc.what()<<end;
+				merr << "MikeyExceptionAuthentication caught: "<<exc.what()<<endl;
 				//FIXME! send SIP Authorization failed with Mikey Error message
 				setState( STATE_ERROR );
 			}
 			// Message was invalid
 			catch( MikeyExceptionMessageContent &exc ){
 				MRef<MikeyMessage *> error_mes;
-				merr << "MikeyExceptionMesageContent caught: " << exc.what() << end;
+				merr << "MikeyExceptionMesageContent caught: " << exc.what() << endl;
 				error_mes = exc.errorMessage();
 				if( !error_mes.isNull() ){
 					//FIXME: send the error message!
@@ -145,14 +145,14 @@
 				setState( STATE_ERROR );
 			}
 			catch( MikeyException & exc ){
-				merr << "MikeyException caught: " << exc.what() << end;
+				merr << "MikeyException caught: " << exc.what() << endl;
 				setState( STATE_ERROR );
 			}
 		
 		}
 	}
 	else {
-		merr << "Unknown type of key agreement" << end;
+		merr << "Unknown type of key agreement" << endl;
 		secured = false;
 		setState( STATE_AUTHENTICATED );
 	}
@@ -163,7 +163,7 @@
 string Mikey::responderParse(){
 	
 	if( !ka ){
-		merr << "Unknown type of key agreement" << end;
+		merr << "Unknown type of key agreement" << endl;
 		setState( STATE_ERROR );
 		return "";
 	}
@@ -172,7 +172,7 @@
 	MRef<MikeyMessage *> initMessage = ka->initiatorData();
 
 	if( initMessage.isNull() ){
-		merr << "Uninitialized message, this is a bug" << end;
+		merr << "Uninitialized message, this is a bug" << endl;
 		setState( STATE_ERROR );
 		return "";
 	}
@@ -191,18 +191,18 @@
 	}
 	catch( certificate_exception &e ){
 		// TODO: Tell the GUI
-		merr << "Could not open certificate " << e.what() << end;
+		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
 	}
 	catch( MikeyExceptionUnacceptable & exc ){
-		merr << "MikeyException caught: "<<exc.what()<<end;
+		merr << "MikeyException caught: "<<exc.what()<<endl;
 		//FIXME! send SIP Unacceptable with Mikey Error message
 		setState( STATE_ERROR );
 	}
 	// Message was invalid
 	catch( MikeyExceptionMessageContent & exc ){
 		MRef<MikeyMessage *> error_mes;
-		merr << "MikeyExceptionMesageContent caught: " << exc.what() << end;
+		merr << "MikeyExceptionMesageContent caught: " << exc.what() << endl;
 		error_mes = exc.errorMessage();
 		if( !error_mes.isNull() ){
 			responseMessage = error_mes;
@@ -210,12 +210,12 @@
 		setState( STATE_ERROR );
 	}
 	catch( MikeyException & exc ){
-		merr << "MikeyException caught: " << exc.what() << end;
+		merr << "MikeyException caught: " << exc.what() << endl;
 		setState( STATE_ERROR );
 	}
 
 	if( !responseMessage.isNull() ){
-		//merr << "Created response message" << responseMessage->get_string() << end;
+		//merr << "Created response message" << responseMessage->get_string() << endl;
 		return responseMessage->b64Message();
 	}
 	else{
@@ -246,12 +246,12 @@
 	}
 	catch( certificate_exception &e ){
 		// FIXME: tell the GUI
-		merr << "Could not open certificate " << e.what() << end;
+		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
 		return "";
 	}
 	catch( MikeyException & exc ){
-		merr << "MikeyException caught: " << exc.what() << end;
+		merr << "MikeyException caught: " << exc.what() << endl;
 		setState( STATE_ERROR );
 		return "";
 	}
@@ -266,7 +266,7 @@
 		// get rid of the "mikey "
 		message = message.substr(6,message.length()-6);
 		if(message == ""){
-			merr << "No MIKEY message received" << end;
+			merr << "No MIKEY message received" << endl;
 			return false;
 		} else {
 			try{
@@ -301,13 +301,13 @@
 				setState( STATE_AUTHENTICATED );
 			}
 			catch(MikeyExceptionAuthentication &exc){
-				merr << "MikeyException caught: " << exc.what() << end;
+				merr << "MikeyException caught: " << exc.what() << endl;
 				//FIXME! send SIP Authorization failed with Mikey Error message
 				setState( STATE_ERROR );
 			}
 			catch(MikeyExceptionMessageContent &exc){
 				MRef<MikeyMessage *> error_mes;
-				merr << "MikeyExceptionMessageContent caught: " << exc.what() << end;
+				merr << "MikeyExceptionMessageContent caught: " << exc.what() << endl;
 				error_mes = exc.errorMessage();
 				if( !error_mes.isNull() ){
 					//FIXME: send the error message!
@@ -316,13 +316,13 @@
 			}
 				
 			catch(MikeyException &exc){
-				merr << "MikeyException caught: " << exc.what() << end;
+				merr << "MikeyException caught: " << exc.what() << endl;
 				setState( STATE_ERROR );
 			}
 		}
 	}
 	else{
-		merr << "Unknown key management method" << end;
+		merr << "Unknown key management method" << endl;
 		setState( STATE_ERROR );
 	}
 
@@ -333,7 +333,7 @@
 
 
 	if( !ka ){
-		merr << "Unknown type of key agreement" << end;
+		merr << "Unknown type of key agreement" << endl;
 		setState( STATE_ERROR );
 		return "";
 	}
@@ -344,7 +344,7 @@
 		MRef<MikeyMessage *> initMessage = ka->responderData();
 
 		if( initMessage.isNull() ){
-			merr << "Uninitialized MIKEY init message, this is a bug" << end;
+			merr << "Uninitialized MIKEY init message, this is a bug" << endl;
 			setState( STATE_ERROR );
 			return "";
 		}
@@ -360,18 +360,18 @@
 	}
 	catch( certificate_exception &e ){
 		// TODO: Tell the GUI
-		merr << "Could not open certificate " << e.what() << end;
+		merr << "Could not open certificate " << e.what() << endl;
 		setState( STATE_ERROR );
 	}
 	catch( MikeyExceptionUnacceptable &exc ){
-		merr << "MikeyException caught: "<<exc.what()<<end;
+		merr << "MikeyException caught: "<<exc.what()<<endl;
 		//FIXME! send SIP Unacceptable with Mikey Error message
 		setState( STATE_ERROR );
 	}
 	// Message was invalid
 	catch( MikeyExceptionMessageContent &exc ){
 		MRef<MikeyMessage *> error_mes;
-		merr << "MikeyExceptionMesageContent caught: " << exc.what() << end;
+		merr << "MikeyExceptionMesageContent caught: " << exc.what() << endl;
 		error_mes = exc.errorMessage();
 		if( !error_mes.isNull() ){
 			responseMessage = error_mes;
@@ -379,7 +379,7 @@
 		setState( STATE_ERROR );
 	}
 	catch( MikeyException & exc ){
-		merr << "MikeyException caught: " << exc.what() << end;
+		merr << "MikeyException caught: " << exc.what() << endl;
 		setState( STATE_ERROR );
 	}
 

Modified: trunk/libminisip/include/libminisip/media/CallRecorder.h
===================================================================
--- trunk/libminisip/include/libminisip/media/CallRecorder.h	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/include/libminisip/media/CallRecorder.h	2007-06-08 20:45:23 UTC (rev 3292)
@@ -130,24 +130,24 @@
 		void setEnabledMic( bool en ) { 
 			enabledMic = en; 
 			#ifdef DEBUG_OUTPUT
-			std::cerr << getDebugString() << "[1]"  << end;
+			std::cerr << getDebugString() << "[1]"  << std::endl;
 			#endif
 		};
 		void setEnabledNetwork( bool en ) { 
 			enabledNtwk = en; 
 			#ifdef DEBUG_OUTPUT
-			std::cerr << getDebugString() << "[2]"  << end;
+			std::cerr << getDebugString() << "[2]"  << std::endl;
 			#endif
 		};
 		
 		void setAllowStart( bool allow ) { 
 			allowStart = allow; 
 			#ifdef DEBUG_OUTPUT
-			std::cerr << getDebugString() << "[3]" << end; 
+			std::cerr << getDebugString() << "[3]" << std::endl;
 			#endif
 			if( getFilename() != "" ) {
 				std::cerr << "CallRecorder: Stopped recording to file <" 
-					<< getFilename() << ">" << end;
+					<< getFilename() << ">" << std::endl;
 			}
 		};
 		

Modified: trunk/libminisip/source/Minisip.cxx
===================================================================
--- trunk/libminisip/source/Minisip.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/Minisip.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -94,11 +94,11 @@
 #ifdef DEBUG_OUTPUT
 static void signal_handler( int signal ){
 	if( signal == SIGUSR1 ){
-		merr << "ERROR: Minisip was stopped (signal SIGUSR1 caught)" << end;
+		merr << "ERROR: Minisip was stopped (signal SIGUSR1 caught)" << endl;
 		ts.print();
 		exit( 1 );
 	} else {
-		merr << "ERROR: Minisip was stopped (some signal caught)" << end;
+		merr << "ERROR: Minisip was stopped (some signal caught)" << endl;
 	}
 }
 #endif
@@ -213,18 +213,18 @@
 	
 
 	#ifdef DEBUG_OUTPUT
-	mdbg << "Loading plugins"<<end;
+	mdbg << "Loading plugins"<<endl;
 	#endif
 
 	loadPlugins( pluginPath );
 
 	#ifdef DEBUG_OUTPUT
-	mout << "Initializing NetUtil"<<end;
+	mout << "Initializing NetUtil"<<endl;
 	#endif
 
 	if ( ! NetUtil::init()){
 		//printf("ERROR: Could not initialize Netutil package\n");
-		merr << "ERROR: Could not initialize NetUtil package"<<end;
+		merr << "ERROR: Could not initialize NetUtil package"<<endl;
 		exit();
 	}
 
@@ -235,7 +235,7 @@
 	//phoneConf->sip=NULL;
 
 	#ifdef DEBUG_OUTPUT
-	mout << BOLD << "init 1/9: Creating contact database" << PLAIN << end;
+	mout << BOLD << "init 1/9: Creating contact database" << PLAIN << endl;
 	#endif
 
 	/* Create the global contacts database */
@@ -296,15 +296,15 @@
 
 
 int Minisip::exit(){
-	mout << BOLD << "Minisip is Shutting down!!!" << PLAIN << end;
+	mout << BOLD << "Minisip is Shutting down!!!" << PLAIN << endl;
 
 	stop();
 #ifdef DEBUG_OUTPUT
-		mout << "Waiting for the SipStack to close ..." << end;
+		mout << "Waiting for the SipStack to close ..." << endl;
 #endif
 	join();
 	
-	mout << end << end << BOLD << "Minisip can't wait to see you again! Bye!" << PLAIN << end << end << end;
+	mout << endl << endl << BOLD << "Minisip can't wait to see you again! Bye!" << PLAIN << endl << endl << endl;
 	return 1;
 }
 
@@ -316,7 +316,7 @@
 #endif	
 
 	if( initParseConfig() < 0 ){
-		merr << "Minisip::startSip::initParseConfig - fatal error" << end;
+		merr << "Minisip::startSip::initParseConfig - fatal error" << endl;
 		return -1;
 	}
 
@@ -325,7 +325,7 @@
 		confMessageRouter =  new ConfMessageRouter();
 
 #ifdef DEBUG_OUTPUT
-		mout << BOLD << "init 4/9: Creating IP provider" << PLAIN << end;
+		mout << BOLD << "init 4/9: Creating IP provider" << PLAIN << endl;
 #endif
 		MRef<IpProvider *> ipProvider = IpProvider::create( phoneConf );
 		MRef<IpProvider *> ip6Provider;
@@ -349,7 +349,7 @@
 		udpSocket=NULL;
 
 #ifdef DEBUG_OUTPUT
-		mout << BOLD << "init 5/9: Creating MediaHandler" << PLAIN << end;
+		mout << BOLD << "init 5/9: Creating MediaHandler" << PLAIN << endl;
 #endif
 		mediaHandler = new MediaHandler( phoneConf, ipProvider, ip6Provider );
 		confMessageRouter->setMediaHandler( mediaHandler );
@@ -366,7 +366,7 @@
 		//                phoneConf->securityConfig.cert_db, DH_GROUP_OAKLEY5 );
 
 #ifdef DEBUG_OUTPUT
-		mout << BOLD << "init 6/9: Creating MSip SIP stack" << PLAIN << end;
+		mout << BOLD << "init 6/9: Creating MSip SIP stack" << PLAIN << endl;
 #endif
 
 		MRef<SipSim*> sim = phoneConf->defaultIdentity->getSim();
@@ -400,7 +400,7 @@
 		//		cerr << "Loaded " << pluginCount << " plugins from " << PLUGINS_PATH << endl;
 
 #ifdef DEBUG_OUTPUT
-		mout << BOLD << "init 7/9: Connecting GUI to SIP logic" << PLAIN << end;
+		mout << BOLD << "init 7/9: Connecting GUI to SIP logic" << PLAIN << endl;
 #endif
 		gui->setSipSoftPhoneConfiguration(phoneConf);
 		//messageRouter->setGui(gui);
@@ -444,14 +444,14 @@
 
 	catch(exception &exc){
 		//FIXME: Display message in GUI
-		merr << "Minisip caught an exception. Quitting."<< end;
-		merr << exc.what() << end;
+		merr << "Minisip caught an exception. Quitting."<< endl;
+		merr << exc.what() << endl;
 		ret = -1;
 	}
 	catch(...){
 		//FIXME: Display message in GUI
 #ifdef DEBUG_OUTPUT
-		merr << "Minisip caught an unknown exception (default). Quitting."<< end;
+		merr << "Minisip caught an unknown exception (default). Quitting."<< endl;
 #endif
 		ret = -1;
 	};
@@ -465,14 +465,14 @@
 	do{
 		try{
 #ifdef DEBUG_OUTPUT
-			mout << BOLD << "init 3/9: Parsing configuration" << PLAIN << end;
+			mout << BOLD << "init 3/9: Parsing configuration" << PLAIN << endl;
 #endif
 			MRef<ConfBackend *> confBackend =
 			ConfigRegistry::getInstance()->createBackend( confPath);
 			if( !confBackend ){
-				merr << "Minisip could not load a configuration" << end << 
-					"back end. The application will now" << end <<
-					"exit." << end;
+				merr << "Minisip could not load a configuration" << endl << 
+					"back end. The application will now" << endl <<
+					"exit." << endl;
 				throw new MinisipBadArgument("The configured backend could not be loaded");
 				//::exit( 1 );
 			}
@@ -484,7 +484,7 @@
 				if( ret == "ERROR" ) { //severe error
 					retGlobal = -1;
 				} else { //error, but not severe
-					merr << ret << end;
+					merr << ret << endl;
 				}
 			}
 #ifdef DEBUG_OUTPUT
@@ -499,9 +499,9 @@
 
 		}catch(XMLElementNotFound & enf){
 #ifdef DEBUG_OUTPUT
-			merr << FG_ERROR << "Element not found: "<< enf.what()<< PLAIN << end;
+			merr << FG_ERROR << "Element not found: "<< enf.what()<< PLAIN << endl;
 #endif
-			merr << string("ERROR: Could not parse configuration item: ")+enf.what() << end;
+			merr << string("ERROR: Could not parse configuration item: ")+enf.what() << endl;
 			gui->configDialog( phoneConf );
 			done=false;
 		}
@@ -522,7 +522,7 @@
 
 void Minisip::stopDebugger(){
 	if( ! consoleDbg.isNull() ) {
-		mout << end << "Stopping the Console Debugger thread" << end;
+		mout << endl << "Stopping the Console Debugger thread" << endl;
 		consoleDbg->stop(); //uufff ... we are killing the thread, not nice ...
 		consoleDbg->join();
 		consoleDbg->setMediaHandler( NULL );

Modified: trunk/libminisip/source/MinisipExceptions.cxx
===================================================================
--- trunk/libminisip/source/MinisipExceptions.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/MinisipExceptions.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -27,7 +27,7 @@
 
 using namespace std;
 
-MinisipException::MinisipException( const std::string& msg ) : Exception(msg){
+MinisipException::MinisipException( const std::string& m ) : Exception(m){
 
 }
 

Modified: trunk/libminisip/source/ipprovider/SimpleIp6Provider.cxx
===================================================================
--- trunk/libminisip/source/ipprovider/SimpleIp6Provider.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/ipprovider/SimpleIp6Provider.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -47,7 +47,7 @@
 			vector<string> addrs = iface->getIPStrings( true );
 			vector<string>::iterator iter;
 
-			mdbg << "Simple6IP: checking interface = " << iface->getName() << end;
+			mdbg << "Simple6IP: checking interface = " << iface->getName() << endl;
 
 			iter = find( addrs.begin(), addrs.end(), localIp );
 			if ( iter != addrs.end() ){
@@ -57,7 +57,7 @@
 		if (!ok){
 			merr << "Error: The IP address specified in the"
 				"configuration file ("<<localIp<<
-				") is not configured on any local interface."<< end;
+				") is not configured on any local interface."<< endl;
 			localIp = "";
                 }
 		else return;
@@ -66,17 +66,17 @@
 	for (unsigned i=0; i<ifaces.size(); i++){
 		void *ptr = &ifaces[i];
 
-		mdbg << "SimpleIP6Provider: checking ptr = " << ptr << end;
+		mdbg << "SimpleIP6Provider: checking ptr = " << ptr << endl;
 
 		MRef<NetworkInterface *> iface = ifaces[i];
 
 		if( iface ){
-			mdbg << "SimpleIP6Provider: checking interface = " << *iface << end;
+			mdbg << "SimpleIP6Provider: checking interface = " << *iface << endl;
 
 			vector<string> addrs = iface->getIPStrings( use_ipv6 );
 			vector<string>::iterator iter;
 
-			mdbg << "SimpleIP6Provider: checking interface = " << iface->getName() << end;
+			mdbg << "SimpleIP6Provider: checking interface = " << iface->getName() << endl;
 
 			for( iter = addrs.begin(); iter != addrs.end(); iter++ ){
 				string ipstr = *iter;
@@ -89,7 +89,7 @@
 
 				Scope scope = ipScope( ipstr );
 
-				mdbg << "SimpleIP6Provider: checking interface = " << ifaces[i] << " with IP=" << ipstr << " scope=" << scope << end;
+				mdbg << "SimpleIP6Provider: checking interface = " << ifaces[i] << " with IP=" << ipstr << " scope=" << scope << endl;
 				//only update the local ip i	f it is the first interface with a private
 				//ip different from localhost or a publi	c ip
 

Modified: trunk/libminisip/source/ipprovider/StunIpProvider.cxx
===================================================================
--- trunk/libminisip/source/ipprovider/StunIpProvider.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/ipprovider/StunIpProvider.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -44,7 +44,7 @@
         vector<string> ifaces = NetworkFunctions::getAllInterfaces();
         for (unsigned i=0; i<ifaces.size(); i++){
 		string ip = NetworkFunctions::getInterfaceIPStr(ifaces[i]);
-		mdbg << "Adding local ip: "<< ip <<  end;
+		mdbg << "Adding local ip: "<< ip <<  endl;
 		ret.push_back(ip);
         }
         return ret;
@@ -53,13 +53,13 @@
 static string findStunServer( MRef<SipSoftPhoneConfiguration *> phoneConf, uint16_t stunPort ){
 	
 #ifdef DEBUG_OUTPUT
-        mdbg << "Try 1, autodetect"<< end;
+        mdbg << "Try 1, autodetect"<< endl;
 #endif
         if (phoneConf->findStunServerFromSipUri){
-		mdbg << "Using SIP uri: "<<phoneConf->defaultIdentity->getSipUri().getString()<< end;
+		mdbg << "Using SIP uri: "<<phoneConf->defaultIdentity->getSipUri().getString()<< endl;
                 const SipUri &useruri = phoneConf->defaultIdentity->getSipUri();
 		const string &uridomain = useruri.getIp();
-                        mdbg << "domain=<"<<uridomain<<">"<< end;
+                        mdbg << "domain=<"<<uridomain<<">"<< endl;
                         if (uridomain.length()>0){
                                 uint16_t port;
                                 string proxy = NetworkFunctions::getHostHandlingService("_stun._udp",uridomain, port);
@@ -72,7 +72,7 @@
 	}
 
 #ifdef DEBUG_OUTPUT
-	mout << "Try 2, checkig if configured to use domain"<< end;
+	mout << "Try 2, checkig if configured to use domain"<< endl;
 #endif
 	if (phoneConf->findStunServerFromDomain && phoneConf->stunDomain.length()>0){
 		 uint16_t port;
@@ -85,18 +85,18 @@
 		 }
 	}
 #ifdef DEBUG_OUTPUT
-	mout << "Try 3, checking if user defined"<< end;
+	mout << "Try 3, checking if user defined"<< endl;
 #endif
 	if (phoneConf->useUserDefinedStunServer && 
 			phoneConf->userDefinedStunServer.length()>0){
 		uint16_t port=3478;
 		string addr = phoneConf->userDefinedStunServer;
 		if (addr.find(":")!=string::npos){
-			mdbg << "Found port"<< end;
+			mdbg << "Found port"<< endl;
 			string portstr = addr.substr(addr.find(":")+1);
 			addr = addr.substr(0,addr.find(":")-1);
-			mdbg << "Port parsed to <"<< portstr<<">"<< end;
-			mdbg << "Addr is now <"<< addr<<">" <<end;;
+			mdbg << "Port parsed to <"<< portstr<<">"<< endl;
+			mdbg << "Addr is now <"<< addr<<">" <<endl;
 			port = atoi(portstr.c_str());
 		}
 		phoneConf->stunServerIpString = addr;
@@ -123,7 +123,7 @@
 		}
 		catch(HostNotFound & ){
 			merr << "Could not find your STUN server. "
-			        "STUN will be disabled." << end;
+			        "STUN will be disabled." << endl;
 			return NULL;
 			done = false;
 		}
@@ -146,13 +146,13 @@
 	if( natType == STUN::STUN_ERROR ){
 		merr << "An error occured while minisip tried to "
 			"discover the NAT type with STUN. "
-			"STUN support will be disabled." << end;
+			"STUN support will be disabled." << endl;
 		return NULL;
 	}
 
 	if( natType == STUN::STUNTYPE_BLOCKED ){
 		merr << "minisip could not contact your STUN server. "
-			"STUN support will be disabled." << end;
+			"STUN support will be disabled." << endl;
 		return NULL;
 	}
 	
@@ -160,7 +160,7 @@
 #ifdef DEBUG_OUTPUT
 	mout << "NAT type is: " << STUN::typeToString( natType ) <<
                         " and the external contact IP is set to "<<
-                        externalIp << end;
+                        externalIp << endl;
 #endif
 
 	return (IpProvider*) new StunIpProvider( 

Modified: trunk/libminisip/source/subsystem_config/ConfBackend.cxx
===================================================================
--- trunk/libminisip/source/subsystem_config/ConfBackend.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_config/ConfBackend.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -56,13 +56,13 @@
 		}
 
 		if( !plugin ){
-			merr << "ConfigRegistry: Can't create config backend " << backendName << ::end;
+			merr << "ConfigRegistry: Can't create config backend " << backendName << ::endl;
 			return NULL;
 		}
 		
 		ConfigPlugin *config = dynamic_cast<ConfigPlugin*>(*plugin);
 		if( !config ){
-			merr << "ConfigRegistry: Not a config plugin " << plugin->getName() << ::end;
+			merr << "ConfigRegistry: Not a config plugin " << plugin->getName() << ::endl;
 			return NULL;
 		}
 
@@ -132,6 +132,6 @@
 		MPluginRegistry::registerPlugin( plugin );
 	}
 	else {
-		merr << "ConfigRegistry: Not a config plugin " << plugin->getName() << ::end;
+		merr << "ConfigRegistry: Not a config plugin " << plugin->getName() << endl;
 	}
 }

Modified: trunk/libminisip/source/subsystem_config/MXmlConfBackend.cxx
===================================================================
--- trunk/libminisip/source/subsystem_config/MXmlConfBackend.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_config/MXmlConfBackend.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -85,7 +85,7 @@
 		parser = new XMLFileParser( "" );
 	}
 	catch( XMLException &exc ){
-		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << end;
+		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << endl;
 		cerr << "Caught XMLException" << endl;
 		throw ConfBackendException();
 	}
@@ -106,7 +106,7 @@
 		parser->changeValue( key, xmlStr );
 	}
 	catch( XMLException &exc ){
-		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << end;
+		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << endl;
 		throw ConfBackendException();
 	}
 	
@@ -117,7 +117,7 @@
 		parser->changeValue( key, itoa( value ) );
 	}
 	catch( XMLException &exc ){
-		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << end;
+		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << endl;
 		throw ConfBackendException();
 	}
 }
@@ -132,7 +132,7 @@
 		ret = searchReplace( tmp, "&amp;", "&" );
 	}
 	catch( XMLException &exc ){
-		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << end;
+		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << endl;
 		throw ConfBackendException();
 	}
 
@@ -148,7 +148,7 @@
 		ret = parser->getIntValue( key, defaultValue );
 	}
 	catch( XMLException &exc ){
-		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << end;
+		mdbg << "MXmlConfBackend caught XMLException: " << exc.what() << endl;
 		throw ConfBackendException();
 	}
 

Modified: trunk/libminisip/source/subsystem_config/UserConfigPosix.cxx
===================================================================
--- trunk/libminisip/source/subsystem_config/UserConfigPosix.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_config/UserConfigPosix.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -39,7 +39,7 @@
 		return string(home)+ string("/.") + baseName;
 	}
 
-	merr << "WARNING: Could not determine home directory"<<end;
+	merr << "WARNING: Could not determine home directory"<<endl;
 
 	return string("/.") + baseName;
 }

Modified: trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx
===================================================================
--- trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_gui/ConsoleDebugger.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -302,7 +302,7 @@
 		int n=1;
 		MRef<certificate *> crt=config->sipStackConfig->cert->get_first();
 		while (crt){
-			cerr << "      certificate "<<n<<end
+			cerr << "      certificate "<<n<<endl
 			     << "        name="<<crt->get_name()<<endl
 			     << "        cn="<<crt->get_cn()<<endl
 			     << "        issuer="<<crt->get_issuer()<<endl

Modified: trunk/libminisip/source/subsystem_media/RtpReceiver.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/RtpReceiver.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/RtpReceiver.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -104,8 +104,8 @@
 		}
 	}
 	if( portretry == RTP_RECEIVER_MAX_RETRIES && !socket ) {
-			merr << "Minisip could not create a UDP socket!" << end;
-			merr << "Check your network settings." << end << "Quitting badly" << end;
+			merr << "Minisip could not create a UDP socket!" << endl;
+			merr << "Check your network settings." << endl << "Quitting badly" << endl;
 			exit( 1 );
 	}
 

Modified: trunk/libminisip/source/subsystem_media/Session.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/Session.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -573,17 +573,17 @@
 
 	/* If we have a sender for this format, activate it */
 #ifdef DEBUG_OUTPUT
-	mdbg << "Session::matchFormat: Starting senders loop" << end;
+	mdbg << "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"<< end;
+		mdbg << "Trying a sender"<< endl;
 #endif
 		if( (*iSStream)->matches( m, iFormat ) ){
 #ifdef DEBUG_OUTPUT
-			mdbg << "Found sender for " << (*iSStream)->getSdpMediaType()<< end;
+			mdbg << "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"<< end;
+	mdbg << "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()<< end;
+			mdbg << "Found receiver for " << (*iRStream)->getSdpMediaType()<< endl;
 #endif
 			return (*iRStream);
 		}
@@ -892,7 +892,7 @@
 	MRef<CallRecorder *> cr = dynamic_cast<CallRecorder *>(*callRecorder);
 	if( !cr ) {
 	#ifdef DEBUG_OUTPUT
-		cerr << "Session::stop - no call recorder?" << end;
+		cerr << "Session::stop - no call recorder?" << endl;
 	#endif
 	} else {
 		cr->setAllowStart( false );

Modified: trunk/libminisip/source/subsystem_media/codecs/Codec.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/codecs/Codec.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/codecs/Codec.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -44,7 +44,7 @@
 		MRef<AudioCodec*> codec = dynamic_cast<AudioCodec*>(*plugin);
 
 		if( !codec ){
-			merr << "Not an AudioCodec? " << plugin->getName() << ::end;
+			merr << "Not an AudioCodec? " << plugin->getName() << endl;
 		}
 
 		if( codec && codec->getSdpMediaType() == payloadType ){
@@ -52,7 +52,7 @@
 		}
 	}
 
-	merr << "AudioCodec not found pt: " << payloadType << ::end;
+	merr << "AudioCodec not found pt: " << payloadType << endl;
 	return NULL;
 }
 
@@ -67,7 +67,7 @@
 		MRef<AudioCodec*> codec = dynamic_cast<AudioCodec*>(*plugin);
 
 		if( !codec ){
-			merr << "Not an AudioCodec? " << plugin->getName() << ::end;
+			merr << "Not an AudioCodec? " << plugin->getName() << endl;
 		} 
 
 		if( codec && codec->getCodecName() == description ){
@@ -75,7 +75,7 @@
 		}
 	}
 
-	merr << "AudioCodec not found name: " << description << ::end;
+	merr << "AudioCodec not found name: " << description << endl;
 	return NULL;
 }
 

Modified: trunk/libminisip/source/subsystem_media/soundcard/OssSoundDevice.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/soundcard/OssSoundDevice.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/soundcard/OssSoundDevice.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -66,7 +66,7 @@
 	if( fdPlayback == -1 ){
 		merr << "Could not open the sound device " << dev << 
 			" for playback: "
-			<< strerror( errno ) << end;
+			<< strerror( errno ) << endl;
 		return -1;
 	}
 
@@ -199,7 +199,7 @@
 		#ifdef DEBUG_OUTPUT
 		merr << "Could not open the sound device " << dev << 
 			" for recording: "
-			<< strerror( errno ) << end;
+			<< strerror( errno ) << endl;
 		#endif
 		return -1;
 	}

Modified: trunk/libminisip/source/subsystem_media/soundcard/SoundDriverRegistry.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/soundcard/SoundDriverRegistry.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/soundcard/SoundDriverRegistry.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -41,9 +41,9 @@
 	vector<SoundDeviceName>::iterator iter;
 	vector<SoundDeviceName>::iterator stop = names.end();
 
-	mdbg << "Dumping sound device names:" << end;
+	mdbg << "Dumping sound device names:" << endl;
 	for( iter = names.begin(); iter != stop; iter++ ){
-		mdbg << iter->getName() << " " << iter->getDescription() << " in:" << iter->getMaxInputChannels() << ", out:" << iter->getMaxOutputChannels() << end;
+		mdbg << iter->getName() << " " << iter->getDescription() << " in:" << iter->getMaxInputChannels() << ", out:" << iter->getMaxOutputChannels() << endl;
 	}
 }
 #endif
@@ -79,7 +79,7 @@
 	string deviceId;
 
 #ifdef DEBUG_OUTPUT
-	mdbg << "SoundDriverRegistry: deviceName =  " << deviceName << ::end;
+	mdbg << "SoundDriverRegistry: deviceName =  " << deviceName << endl;
 #endif
 	size_t pos = deviceName.find( ':', 0 );
 	if( pos == string::npos ){
@@ -91,8 +91,8 @@
 		deviceId = deviceName.substr( pos + 1 );
 	}
 #ifdef DEBUG_OUTPUT
-	mdbg << "SoundDriverRegistry: deviceId =  " << deviceId << ::end;
-	mdbg << "SoundDriverRegistry: driverId =  " << driverId << ::end;
+	mdbg << "SoundDriverRegistry: deviceId =  " << deviceId << endl;
+	mdbg << "SoundDriverRegistry: driverId =  " << driverId << endl;
 #endif
 
 	vector< MRef<SoundDriver*> >::iterator iter;
@@ -102,12 +102,12 @@
 		MRef<SoundDriver*> driver = *iter;
 
 		if( driver->getId() == driverId ){
-			mdbg << "SoundDriverRegistry: device id found!!! =  " << deviceId << ::end;
+			mdbg << "SoundDriverRegistry: device id found!!! =  " << deviceId << endl;
 			return driver->createDevice( deviceId );
 		}
 	}
 
-	mdbg << "SoundDriverRegistry: device not found " << deviceName << ::end;
+	mdbg << "SoundDriverRegistry: device not found " << deviceName << endl;
 	return NULL;
 }
 
@@ -120,7 +120,7 @@
 		registerDriver( driver );
 	}
 	else {
-		merr << "Not SoundDriver!" << ::end;
+		merr << "Not SoundDriver!" << endl;
 	}
 }
 
@@ -131,11 +131,11 @@
 	iter = find( drivers.begin(), drivers.end(), driver );
 
 	if ( iter != drivers.end() ){
-		merr << "registerDriver: Driver already registered: " << driver->getId() << ::end;
+		merr << "registerDriver: Driver already registered: " << driver->getId() << endl;
 		return false;
 	}
 
-	mdbg << "SoundDriverRegistry: registering " << driver->getDescription() << " as " << driver->getId() << ::end;
+	mdbg << "SoundDriverRegistry: registering " << driver->getDescription() << " as " << driver->getId() << endl;
 	drivers.push_back( driver );
 	return true;
 }
@@ -146,7 +146,7 @@
 	iter = find( drivers.begin(), drivers.end(), driver );
 
 	if ( iter == drivers.end() ){
-		merr << "unregisterDriver: Driver not registered: " << driver->getId() << ::end;
+		merr << "unregisterDriver: Driver not registered: " << driver->getId() << endl;
 		return false;
 	}
 

Modified: trunk/libminisip/source/subsystem_media/soundcard/resampler/Resampler.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/soundcard/resampler/Resampler.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_media/soundcard/resampler/Resampler.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -64,7 +64,7 @@
 		return NULL;
 	}
 
-	mdbg << "Creating resampler " << resampler->getName() << ::end;
+	mdbg << "Creating resampler " << resampler->getName() << endl;
 
 	return resampler->createResampler( inputFreq, outputFreq,
 					   duration, nChannels );

Modified: trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/DefaultDialogHandler.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -138,7 +138,7 @@
 			MRef<SipIdentity *> id = lookupTarget(inv->getUri());
 
 #ifdef DEBUG_OUTPUT			
-			mdbg << "DefaultDialogHandler:: creating new SipDialogConfVoip" << end;
+			mdbg << "DefaultDialogHandler:: creating new SipDialogConfVoip" << endl;
 #endif			
 		
 
@@ -199,7 +199,7 @@
 			MRef<SipIdentity *> id = lookupTarget(inv->getUri());
 
 #ifdef DEBUG_OUTPUT			
-			mdbg << "DefaultDialogHandler:: creating new SipDialogConfVoip" << end;
+			mdbg << "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 << end;
+			mdbg << 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 << end;
+			mdbg << 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" << end;
+		mdbg << "DefaultDialogHandler:: creating new server transaction for incoming SipIMMessage" << endl;
 #endif			
 		sendIMOk( im );
 
@@ -313,7 +313,7 @@
 		return true;
 	}
 
-	mdbg << "DefaultDialogHandler ignoring " << pkt->getString() << end; 
+	mdbg << "DefaultDialogHandler ignoring " << pkt->getString() << endl; 
 
 	return false;
 
@@ -457,14 +457,14 @@
 	}
 #endif
 
-	mdbg << "DefaultDialogHandler ignoring command " << cmdstr.getString() << end; 
+	mdbg << "DefaultDialogHandler ignoring command " << cmdstr.getString() << endl; 
 
 	return false;
 }
 
 
 bool DefaultDialogHandler::handleCommand(const SipSMCommand &command){
-	mdbg << "DefaultDialogHandler: got command "<< command << end;
+	mdbg << "DefaultDialogHandler: got command "<< command << endl;
 	int dst = command.getDestination();
 	if ( dst!=SipSMCommand::dialog_layer)
 		return false;
@@ -480,7 +480,7 @@
 
 void DefaultDialogHandler::handleCommand(string subsystem, const CommandString &cmd){
 	assert(subsystem=="sip");
-	merr << "DefaultDialogHandler::handleCommand(subsystem,cmd): Can not handle: "<< cmd.getString() << end;
+	merr << "DefaultDialogHandler::handleCommand(subsystem,cmd): Can not handle: "<< cmd.getString() << endl;
 }
 
 CommandString DefaultDialogHandler::handleCommandResp(string subsystem, const CommandString &cmd){
@@ -625,7 +625,7 @@
 	}
 	else{
 #ifdef DEBUG_OUTPUT			
-		mdbg << "DefaultDialogHandler:: Unknown GroupListProtocol "<<prot<< end;
+		mdbg << "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!"<<end;
+		mdbg<<"DefaultDialogHandler::Couldn't find SipDialogP2T!"<<endl;
 		return;
 	}
 
@@ -950,9 +950,9 @@
 			// TODO: untested
 			dialogConfig->sipIdentity->setSipRegistrar(new SipRegistrar(proxy, iport));
 		}catch(HostNotFound & exc){
-			merr << "Could not resolve PSTN proxy address:" << end;
+			merr << "Could not resolve PSTN proxy address:" << endl;
 			merr << exc.what();
-			merr << "Will use default proxy instead" << end;
+			merr << "Will use default proxy instead" << endl;
 		}
 	
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/Sip.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/Sip.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/Sip.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -302,13 +302,13 @@
 
 	try{
 #ifdef DEBUG_OUTPUT
-		mout << BOLD << "init 8.1/9: Starting UDP transport worker thread" << PLAIN << end;
+		mout << BOLD << "init 8.1/9: Starting UDP transport worker thread" << PLAIN << endl;
 #endif
 		sipstack->startUdpServer();
 
 		if (phoneconfig->tcp_server){
 #ifdef DEBUG_OUTPUT
-			mout << BOLD << "init 8.2/9: Starting TCP transport worker thread" << PLAIN << end;
+			mout << BOLD << "init 8.2/9: Starting TCP transport worker thread" << PLAIN << endl;
 #endif
 
 			sipstack->startTcpServer();
@@ -318,11 +318,11 @@
 		if (phoneconfig->tls_server){
 			//if( phoneconfig->securityConfig.cert.isNull() ){
 			if( !phoneconfig->defaultIdentity->getSim() || phoneconfig->defaultIdentity->getSim()->getCertificateChain().isNull() ){
-				merr << "Certificate needed for TLS server. You will not be able to receive incoming TLS connections." << end;
+				merr << "Certificate needed for TLS server. You will not be able to receive incoming TLS connections." << endl;
 			}
 			else{
 #ifdef DEBUG_OUTPUT
-				mout << BOLD << "init 8.3/9: Starting TLS transport worker thread" << PLAIN << end;
+				mout << BOLD << "init 8.3/9: Starting TLS transport worker thread" << PLAIN << endl;
 #endif
 				sipstack->startTlsServer();
 			}
@@ -335,7 +335,7 @@
 	}
 
 #ifdef DEBUG_OUTPUT
-	mout << BOLD << "init 9/9: Registering Identities to registrar server" << PLAIN << end;
+	mout << BOLD << "init 9/9: Registering Identities to registrar server" << PLAIN << endl;
 #endif
 
 	//We would like to use the SipSMCommand::register_all_identities, which is managed by the

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogConfVoip.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -375,7 +375,7 @@
 		}
 		else{
 			merr << "ERROR: received response in SipDialogConfVoip"
-				" that could not be handled (unimplemented)"<< end;
+				" that could not be handled (unimplemented)"<< endl;
                 }
 		
 		getMediaSession()->stop();
@@ -408,7 +408,7 @@
 		string peerUri = command.getCommandPacket()->getFrom().getString();
 		//MRef<SipMessageContent *> Offer = *command.getCommandPacket()->getContent();
 		if(!sortMIME(*command.getCommandPacket()->getContent(), peerUri, 10)){
-			merr << "No MIME match" << end;
+			merr << "No MIME match" << endl;
 			return false;
 		}
 
@@ -1007,7 +1007,7 @@
 		// FIXME: this most probably means that the
 		// creation of the MIKEY message failed, it 
 		// should not happen
-		merr << "Sdp was NULL in sendInvite" << end;
+		merr << "Sdp was NULL in sendInvite" << endl;
 		return; 
 		}
 	}
@@ -1115,7 +1115,7 @@
 		// FIXME: this most probably means that the
 		// creation of the MIKEY message failed, it 
 		// should not happen
-		merr << "Sdp was NULL in sendInvite" << end;
+		merr << "Sdp was NULL in sendInvite" << endl;
 		return; 
 		}
 	}
@@ -1195,7 +1195,7 @@
 		// FIXME: this most probably means that the
 		// creation of the MIKEY message failed, it 
 		// should not happen
-		merr << "Sdp was NULL in sendInvite" << end;
+		merr << "Sdp was NULL in sendInvite" << endl;
 		return; 
 		}
 	}
@@ -1263,7 +1263,7 @@
 
 
 bool SipDialogConfVoip::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogConfVoip::handleCommand got "<< c << end;
+	mdbg << "SipDialogConfVoip::handleCommand got "<< c << endl;
 
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() != dialogState.callId )
@@ -1285,7 +1285,7 @@
 //			c.getCommandPacket()->getCSeq()!= command_seq_no)
 //		return false;
 	
-	mdbg << "SipDialogConfVoip::handlePacket() got "<< c << end;
+	mdbg << "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 +1294,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"<< end;
+			mdbg << "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"<< end;
+			mdbg << "Warning: SipDialogConfVoip ignoring packet with matching call id"<< endl;
 			return true;
 		}
 	}
@@ -1365,7 +1365,7 @@
 #endif
 					return true;
 				default:
-					merr << "No SDP match" << end;
+					merr << "No SDP match" << endl;
 					return false;
 			}
 		}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceClient.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -118,7 +118,7 @@
 				SipSMCommand::transaction_layer,
 				SipSMCommand::dialog_layer)){
 #ifdef DEBUG_OUTPUT
-		merr << "SipDialogPresenceClient::a0: Presence toUri is: <"<< command.getCommandString().getParam()<< ">"<< end;
+		merr << "SipDialogPresenceClient::a0: Presence toUri is: <"<< command.getCommandString().getParam()<< ">"<< endl;
 #endif
 		toUri = MRef<SipIdentity*>( new SipIdentity(command.getCommandString().getParam()) );
 		createSubscribeClientTransaction();
@@ -140,14 +140,14 @@
 		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"<<end;
+			mdbg << "WARNING: SipDialogPresenceClient did not contain any expires header - using 300 seconds"<<endl;
 			to = 300;
 		}
 		
 		requestTimeout(to * 1000, "timerDoSubscribe");
 		
 #ifdef DEBUG_OUTPUT
-		merr << "Subscribed for presence for user "<< toUri->getSipUri().getString()<< end;
+		merr << "Subscribed for presence for user "<< toUri->getSipUri().getString()<< endl;
 #endif
 		return true;
 	}else{
@@ -160,7 +160,7 @@
 				SipCommandString::transport_error,
 				SipSMCommand::transaction_layer,
 				SipSMCommand::dialog_layer )){
-		mdbg << "WARNING: Transport error when subscribing - trying again in five minutes"<< end;
+		mdbg << "WARNING: Transport error when subscribing - trying again in five minutes"<< endl;
 		requestTimeout(300 * 1000, "timerDoSubscribe");
 		return true;
 	}else{
@@ -389,7 +389,7 @@
 }
 
 bool SipDialogPresenceClient::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogPresenceClient::handleCommand got "<< c << end;
+	mdbg << "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 << end;
+	mdbg << "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"<< end;
+			mdbg << "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"<< end;
+			mdbg << "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-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogPresenceServer.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -311,7 +311,7 @@
 }
 
 bool SipDialogPresenceServer::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogPresenceServer::handleCommand got "<< c << end;
+	mdbg << "SipDialogPresenceServer::handleCommand got "<< c << endl;
 
 /*	if (c.getType()==SipSMCommand::COMMAND_STRING && callId.length()>0){
 		if (c.getCommandString().getDestinationId() != callId ){
@@ -340,7 +340,7 @@
 //		return false;
 	
 //	mdbg << "SipDialogPresenceServer::handlePacket() got "<< c << end;
-	merr << "SipDialogPresenceServer returning dialogs handleCommand"<< end;
+	merr << "SipDialogPresenceServer returning dialogs handleCommand"<< endl;
 	bool handled = SipDialog::handleCommand(c);
 	
 	if (!handled && c.getType()==SipSMCommand::COMMAND_STRING && c.getCommandString().getOp()==SipCommandString::no_transactions){

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoip.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -677,7 +677,7 @@
 }
 
 bool SipDialogVoip::handleCommand(const SipSMCommand &c){
-	mdbg << "SipDialogVoip::handleCommand got "<< c << end;
+	mdbg << "SipDialogVoip::handleCommand got "<< c << endl;
 
 	if (c.getType()==SipSMCommand::COMMAND_STRING && dialogState.callId.length()>0){
 		if (c.getCommandString().getDestinationId() != dialogState.callId )
@@ -695,7 +695,7 @@
 	
 	}
 	
-	mdbg << "SipDialogVoip::handleCommand() sending command to Dialog: "<< c << end;
+	mdbg << "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 +704,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"<< end;
+			mdbg << "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"<< end;
+			mdbg << "Warning: SipDialogVoIP ignoring packet with matching call id"<< endl;
 			return true;
 		}
 	}
@@ -775,7 +775,7 @@
 #endif
 					return true;
 				default:
-					merr << "No SDP match" << end;
+					merr << "No SDP match" << endl;
 					return false;
 			}
 		}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipClient.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipClient.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipClient.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -558,7 +558,7 @@
 			// FIXME: this most probably means that the
 			// creation of the MIKEY message failed, it 
 			// should not happen
-			merr << "Sdp was NULL in sendInvite" << end;
+			merr << "Sdp was NULL in sendInvite" << endl;
 			return; 
 		}
 
@@ -634,7 +634,7 @@
 		// FIXME: this most probably means that the
 		// creation of the MIKEY message failed, it 
 		// should not happen
-		merr << "Sdp was NULL in sendInviteOk" << end;
+		merr << "Sdp was NULL in sendInviteOk" << endl;
 		return; 
 		}
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipDialogVoipServer.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -173,7 +173,7 @@
 	string peerUri = peer.getProtocolId() + ":" + peer.getUserIpString();
 		
 	if(!sortMIME(*command.getCommandPacket()->getContent(), peerUri, 10)){
-		merr << "No MIME match" << end;
+		merr << "No MIME match" << endl;
 		return false;
 	}
 
@@ -201,7 +201,7 @@
 		string peerUri = peer.getProtocolId() + ":" + peer.getUserIpString();
 		
 		if(!sortMIME(*inv->getContent(), peerUri, 10)){
-			merr << "No MIME match" << end;
+			merr << "No MIME match" << endl;
 			return false;
 		}
 		
@@ -640,7 +640,7 @@
 		// FIXME: this most probably means that the
 		// creation of the MIKEY message failed, it 
 		// should not happen
-		merr << "Sdp was NULL in sendInviteOk" << end;
+		merr << "Sdp was NULL in sendInviteOk" << endl;
 		return; 
 		}
 	}
@@ -751,7 +751,7 @@
 			// FIXME: this most probably means that the
 			// creation of the MIKEY message failed, it 
 			// should not happen
-			merr << "Sdp was NULL in sendInviteOk" << end;
+			merr << "Sdp was NULL in sendInviteOk" << endl;
 			return; 
 		}
 	}

Modified: trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -227,7 +227,7 @@
 					iDir ++;
 					break;
 				default:
-					merr<< "Warning: unknown certificate object type"<<end;
+					merr<< "Warning: unknown certificate object type"<<endl;
 			}
 
 			caDbItem = cert_db->get_next();
@@ -524,7 +524,7 @@
 		else{
 			ident->ka_type = KEY_MGMT_METHOD_MIKEY_PSK;
 #ifdef DEBUG_OUTPUT
-			merr << "Invalid KA type in config file, default to PSK"<<end;
+			merr << "Invalid KA type in config file, default to PSK"<<endl;
 #endif
 		}
 
@@ -572,7 +572,7 @@
 				certchain->add_certificate( cert );
 			}
 			catch( certificate_exception & ){
-				merr << "Could not open the given certificate " << certFile <<end;
+				merr << "Could not open the given certificate " << certFile <<endl;
 			}
 
 			if( privateKeyFile != "" ){
@@ -581,10 +581,11 @@
 					cert->set_pk( privateKeyFile );
 				}
 				catch( certificate_exception_pkey & ){
-					merr << "The given private key " << privateKeyFile << " does not match the certificate"<<end;                        }
+					merr << "The given private key " << privateKeyFile << " does not match the certificate"<<endl; 
+				}
 
 				catch( certificate_exception &){
-					merr << "Could not open the given private key "<< privateKeyFile << end;
+					merr << "Could not open the given private key "<< privateKeyFile << endl;
 				}
 			}
 		}
@@ -608,7 +609,7 @@
 							"httpsrp:///"+user + "/certificate_chain" );
 					certchain->add_certificate( cert );
 				} catch(certificate_exception &) {
-					merr << "Could not open the given certificate" << end;
+					merr << "Could not open the given certificate" << endl;
 				}
 			}
 		}
@@ -623,7 +624,7 @@
 				certchain->add_certificate( cert );
 			}
 			catch( certificate_exception &){
-				merr << "Could not open the given certificate" << end;
+				merr << "Could not open the given certificate" << endl;
 			}
 			iCertFile ++;
 			certFile = backend->loadString(accountPath + "certificate_chain["+itoa(iCertFile)+"]","");
@@ -653,7 +654,7 @@
 					cert_db->add_certificate( cert );
 				}
 				catch( certificate_exception &){
-					merr << "Could not open the CA certificate" << end;
+					merr << "Could not open the CA certificate" << endl;
 				}
 			}
 		}
@@ -667,7 +668,7 @@
 				cert_db->add_file( certFile );
 			}
 			catch( certificate_exception &e){
-				merr << "Could not open the CA certificate " << e.what() << end;
+				merr << "Could not open the CA certificate " << e.what() << endl;
 			}
 			iCertFile ++;
 			certFile = backend->loadString(accountPath + "ca_file["+itoa(iCertFile)+"]","");
@@ -682,7 +683,7 @@
 				cert_db->add_directory( certFile );
 			}
 			catch( certificate_exception &){
-				merr << "Could not open the CA certificate directory " << certFile << end;
+				merr << "Could not open the CA certificate directory " << certFile << endl;
 			}
 			iCertFile ++;
 			certFile = backend->loadString(accountPath + "ca_dir["+itoa(iCertFile)+"]","");
@@ -835,7 +836,7 @@
 			if( !pb.isNull() ){
 				phonebooks.push_back(pb);
 			} else{
-				merr << "Could not open the phonebook " << end;
+				merr << "Could not open the phonebook " << endl;
 			}
 		}
 		i++;

Modified: trunk/libmnetutil/source/NetworkFunctions.cxx
===================================================================
--- trunk/libmnetutil/source/NetworkFunctions.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmnetutil/source/NetworkFunctions.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -256,7 +256,7 @@
 		MRef<NetworkInterface*> interface = i->second;
 
 		if( !interface ){
-			mdbg << "NetworkFunctions::mapToVector: No interface!" << end;
+			mdbg << "NetworkFunctions::mapToVector: No interface!" << endl;
 			continue;
 		}
 

Modified: trunk/libmsip/include/libmsip/SipSMCommand.h
===================================================================
--- trunk/libmsip/include/libmsip/SipSMCommand.h	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/include/libmsip/SipSMCommand.h	2007-06-08 20:45:23 UTC (rev 3292)
@@ -88,11 +88,10 @@
 
 		MRef<SipMessage*> getCommandPacket() const;
 		CommandString getCommandString() const;
-#ifdef _WIN32_WCE
         friend LIBMSIP_API Dbg & operator<<(Dbg &, const SipSMCommand &);	
-#else
+//#ifdef _WIN32_WCE
         friend LIBMSIP_API std::ostream & operator<<(std::ostream &, const SipSMCommand &);
-#endif
+//#endif
 
 	private:
 		int type;

Modified: trunk/libmsip/source/SipAuthenticationDigest.cxx
===================================================================
--- trunk/libmsip/source/SipAuthenticationDigest.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipAuthenticationDigest.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -50,14 +50,14 @@
 
 bool SipAuthenticationDigest::update( MRef<SipHeaderValueProxyAuthenticate*> auth ){
 	if( type > -1 && type != auth->getType() ){
-		mdbg << "SipAuthenticationDigest::update non-matching header type" << end;
+		mdbg << "SipAuthenticationDigest::update non-matching header type" << endl;
 		return false;
 	}
 	type = auth->getType();
 
 	string realmParam = unquote( auth->getParameter("realm") );
 	if( realm != nullStr && realm != realmParam ){
-		mdbg << "SipAuthenticationDigest::update non-matching realm" << end;
+		mdbg << "SipAuthenticationDigest::update non-matching realm" << endl;
 		return false;
 	}
 	realm = realmParam;

Modified: trunk/libmsip/source/SipCommandDispatcher.cxx
===================================================================
--- trunk/libmsip/source/SipCommandDispatcher.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipCommandDispatcher.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -95,7 +95,7 @@
 void SipCommandDispatcher::run(){
 
 	while (keepRunning){
-		mdbg << "DIALOG CONTAINER: waiting for command"<< end;
+		mdbg << "DIALOG CONTAINER: waiting for command"<< endl;
                 semaphore.dec();
 
 		struct queue_type item;
@@ -109,11 +109,11 @@
 		}
                 mlock.unlock();
 #ifdef DEBUG_OUTPUT
-		mdbg << "DISPATCHER: got command!"<<end;
+		mdbg << "DISPATCHER: got command!"<<endl;
 		if (item.type==TYPE_COMMAND)
-			mdbg << "command: "<< **item.command << end;
+			mdbg << "command: "<< **item.command << endl;
 		else
-			mdbg << "timeout: "<< **item.command << end;
+			mdbg << "timeout: "<< **item.command << endl;
 #endif
 
 
@@ -125,9 +125,9 @@
 		// Timeouts have a known receiver set in the queue item.
 #ifdef DEBUG_OUTPUT
 		if (item.type==TYPE_COMMAND){
-			mdbg << "SipDialogContainer::run delivering command :: "<< **item.command << end;
+			mdbg << "SipDialogContainer::run delivering command :: "<< **item.command << endl;
 		}else{
-			mdbg << "SipDialogContainer::run delivering timeout :: "<< **item.command << end;
+			mdbg << "SipDialogContainer::run delivering timeout :: "<< **item.command << endl;
 		}
 #endif
 		
@@ -336,7 +336,7 @@
 			return true;
 		}else{
 #ifdef DEBUG_OUTPUT
-			mdbg << "SipCommandDispatcher: Error: maintainenceHandleCommand did not understand command: "<< c << end;
+			mdbg << "SipCommandDispatcher: Error: maintainenceHandleCommand did not understand command: "<< c << endl;
 #endif
 			return false;
 		}

Modified: trunk/libmsip/source/SipLayerDialog.cxx
===================================================================
--- trunk/libmsip/source/SipLayerDialog.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipLayerDialog.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -106,7 +106,7 @@
 	assert(c.getDestination()==SipSMCommand::dialog_layer);
 
 #ifdef DEBUG_OUTPUT
-	mdbg<< "SipLayerDialog: got command: "<< c <<end;
+	mdbg<< "SipLayerDialog: got command: "<< c <<endl;
 #endif
 
 	string cid = c.getDestinationId();

Modified: trunk/libmsip/source/SipLayerTransaction.cxx
===================================================================
--- trunk/libmsip/source/SipLayerTransaction.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipLayerTransaction.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -170,7 +170,7 @@
 		bool hasSeqMethod = (seqMethod!="");
 
 		if (!hasBranch){
-			mdbg <<  "WARNING: SipLayerTransaction::handleCommand could not find branch parameter from packet - trying all transactions"<<end;
+			mdbg <<  "WARNING: SipLayerTransaction::handleCommand could not find branch parameter from packet - trying all transactions"<<endl;
 		}
 
 		map<string, MRef<SipTransaction*> >::iterator i;

Modified: trunk/libmsip/source/SipLayerTransport.cxx
===================================================================
--- trunk/libmsip/source/SipLayerTransport.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipLayerTransport.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -332,7 +332,7 @@
 		if (packet[i]=='\n')
 			mout << header<<": ";
 	}
-	mout << end;
+	mout << endl;
 }
 
 SipLayerTransport::SipLayerTransport(MRef<certificate_chain *> cchain,
@@ -457,7 +457,7 @@
 			return "UDP";
 
 		default:
-			mdbg<< "SipLayerTransport: Unknown transport protocol " + socket->getType() <<end;
+			mdbg<< "SipLayerTransport: Unknown transport protocol " + socket->getType() <<endl;
 			// TODO more describing exception and message
 			throw NetworkException();
 	}
@@ -680,7 +680,7 @@
 			}
 		}
 		else{
-			mdbg << "SipLayerTransport: URI invalid " << end;
+			mdbg << "SipLayerTransport: URI invalid " << endl;
 		}
 	}
 
@@ -940,7 +940,7 @@
 		string message = exc.what();
 		string callId = pack->getCallId();
 #ifdef DEBUG_OUTPUT
-		mdbg << "Transport error in SipLayerTransport: " << message << end;
+		mdbg << "Transport error in SipLayerTransport: " << message << endl;
 		cerr << "SipLayerTransport: sendMessage: exception thrown! " << message << endl;
 #endif
 		CommandString transportError( pack->getBranch()+pack->getCSeqMethod(), 
@@ -954,7 +954,7 @@
 		if (dispatcher)
 			dispatcher->enqueueCommand( transportErrorCommand, LOW_PRIO_QUEUE );
 		else
-			mdbg<< "SipLayerTransport: ERROR: NO SIP COMMAND RECEIVER - DROPPING COMMAND"<<end;
+			mdbg<< "SipLayerTransport: ERROR: NO SIP COMMAND RECEIVER - DROPPING COMMAND"<<endl;
 	}
 	
 }
@@ -992,7 +992,7 @@
 	string peerAddr = from->getString();
 
 	if( !via ){
-		merr << "No Via header in incoming message!" << end;
+		merr << "No Via header in incoming message!" << endl;
 		return;
 	}
 
@@ -1037,7 +1037,7 @@
 			nread = sock->recvFrom((void *)buffer, UDP_MAX_SIZE, from, port);
 			
 			if (nread == -1){
-				mdbg << "Some error occured while reading from UdpSocket"<<end;
+				mdbg << "Some error occured while reading from UdpSocket"<<endl;
 				return;
 			}
 
@@ -1082,7 +1082,7 @@
 					if (dispatcher)
 						dispatcher->enqueueCommand( cmd, LOW_PRIO_QUEUE );
 					else
-						mdbg<< "SipLayerTransport: ERROR: NO SIP MESSAGE RECEIVER - DROPPING MESSAGE"<<end;
+						mdbg<< "SipLayerTransport: ERROR: NO SIP MESSAGE RECEIVER - DROPPING MESSAGE"<<endl;
 				}
 				pack=NULL;
 			}
@@ -1091,7 +1091,7 @@
 				/* Probably we don't have enough data
 				 * so go back to reading */
 #ifdef DEBUG_OUTPUT
-				mdbg << "Invalid data on UDP socket, discarded" << end;
+				mdbg << "Invalid data on UDP socket, discarded" << endl;
 #endif
 				return;
 			}
@@ -1101,7 +1101,7 @@
 				// packet, close the connection
 				
 #ifdef DEBUG_OUTPUT
-				mdbg << "Invalid data on UDP socket, discarded" << end;
+				mdbg << "Invalid data on UDP socket, discarded" << endl;
 #endif
 				return;
 			}
@@ -1125,13 +1125,13 @@
 			nread = socket->read( buffer, STREAM_MAX_PKT_SIZE);
 
 			if (nread == -1){
-				mdbg << "Some error occured while reading from StreamSocket" << end;
+				mdbg << "Some error occured while reading from StreamSocket" << endl;
 				return;
 			}
 
 			if ( nread == 0){
 				// Connection was closed
-				mdbg << "Connection was closed" << end;
+				mdbg << "Connection was closed" << endl;
 				transport->removeSocket( socket );
 				return;
 			}
@@ -1161,7 +1161,7 @@
 							if (transport->dispatcher){
 								transport->dispatcher->enqueueCommand( cmd, LOW_PRIO_QUEUE );
 							}else
-								mdbg<< "SipLayerTransport: ERROR: NO SIP MESSAGE RECEIVER - DROPPING MESSAGE"<<end;
+								mdbg<< "SipLayerTransport: ERROR: NO SIP MESSAGE RECEIVER - DROPPING MESSAGE"<<endl;
 						}
 						pack=NULL;
 					}

Modified: trunk/libmsip/source/SipMessageContentMime.cxx
===================================================================
--- trunk/libmsip/source/SipMessageContentMime.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipMessageContentMime.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -94,7 +94,7 @@
 			if (contentFactory)
 				addPart(contentFactory(content.substr(index1,index2-index1+1), cont));
 			else //TODO: Better error handling
-				merr << "WARNING: No SipMessageContentFactory found for content type "<<cont <<end;
+				merr << "WARNING: No SipMessageContentFactory found for content type "<<cont <<endl;
 			//End of one bodypart becomes beginning of the next
 			index1 = index2 + 5;	
 		}

Modified: trunk/libmsip/source/SipSMCommand.cxx
===================================================================
--- trunk/libmsip/source/SipSMCommand.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipSMCommand.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -40,11 +40,26 @@
 const int SipSMCommand::dispatcher=5;
 const int SipSMCommand::transport_layer=6;
 
-#ifdef _WIN32_WCE
+
 Dbg & operator<<(Dbg &o, const SipSMCommand &c){
-#else
+	const char *s[6]={"(illegal)","dialog_layer","transaction_layer","(illegal)","dispatcher","transport_layer"};
+	if (c.type==SipSMCommand::COMMAND_PACKET){
+                
+		o <<"COMMAND_PACKET:"
+                    << (**c.getCommandPacket()).getDescription() 
+                    <<" source="<< s[c.source-1]
+                    <<" dest="<<s[c.destination-1];
+        }else{
+		o <<"COMMAND_STRING:"<<c.getCommandString().getString()
+                    <<",source="<< s[c.source-1]
+                    <<" dest="<<s[c.destination-1];
+		
+        }
+	return o;
+}
+
+#ifndef _WIN32_WCE
 ostream & operator<<(ostream &o, const SipSMCommand &c){
-#endif
 	const char *s[6]={"(illegal)","dialog_layer","transaction_layer","(illegal)","dispatcher","transport_layer"};
 	if (c.type==SipSMCommand::COMMAND_PACKET){
                 
@@ -60,6 +75,7 @@
         }
 	return o;
 }
+#endif
 
 int SipSMCommand::getType() const {
 	return type;

Modified: trunk/libmsip/source/SipStackInternal.cxx
===================================================================
--- trunk/libmsip/source/SipStackInternal.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/SipStackInternal.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -469,7 +469,7 @@
 		merr << "You need a personal certificate to run "
 			"a TLS server. Please specify one in "
 			"the certificate settings. minisip will "
-			"now disable the TLS server." << end;
+			"now disable the TLS server." << endl;
 		return;
 	}
 

Modified: trunk/libmsip/source/dialogs/SipDialog.cxx
===================================================================
--- trunk/libmsip/source/dialogs/SipDialog.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/dialogs/SipDialog.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -159,10 +159,10 @@
 
 bool SipDialog::handleCommand(const SipSMCommand &command){
 
-	mdbg << "SipDialog("<<getMemObjectType()<<")::handleCommand got command "<< command << "("<<getName()<<")"<<end;
+	mdbg << "SipDialog("<<getMemObjectType()<<")::handleCommand got command "<< command << "("<<getName()<<")"<<endl;
 	
 	if (! (command.getDestination()==SipSMCommand::dialog_layer) ){
-		mdbg << "SipDialog::handleCommand: returning false based on command destination"<< end;
+		mdbg << "SipDialog::handleCommand: returning false based on command destination"<< endl;
 		
 		return false;
 	}
@@ -170,17 +170,17 @@
 	if (command.getType()==SipSMCommand::COMMAND_PACKET 
 			&& dialogState.callId != "" 
 			&& dialogState.callId != command.getCommandPacket()->getCallId()){
-		mdbg << "SipDialog: denying command based on destination id"<< end;
+		mdbg << "SipDialog: denying command based on destination id"<< endl;
 		
 		return false;
 	}
 
-	mdbg << "SipDialog::handleCommand: sending command to state machine"<< end;
+	mdbg << "SipDialog::handleCommand: sending command to state machine"<< endl;
 	
 	bool ret;
 	ret=StateMachine<SipSMCommand,string>::handleCommand(command);
 	
-	mdbg << "SipDialog::handleCommand returning "<< ret << end;
+	mdbg << "SipDialog::handleCommand returning "<< ret << endl;
 	
 
 	return ret;
@@ -260,7 +260,7 @@
 	MRef<SipHeaderValue *> value = resp->getHeaderValueNo( SIP_HEADER_TYPE_RSEQ, 0 );
 
 	if( !value ){
-		mdbg << "SipDialog: Missing RSeq in response" << end;
+		mdbg << "SipDialog: Missing RSeq in response" << endl;
 		return NULL;
 	}
 

Modified: trunk/libmsip/source/dialogs/SipDialogManagement.cxx
===================================================================
--- trunk/libmsip/source/dialogs/SipDialogManagement.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/dialogs/SipDialogManagement.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -64,9 +64,9 @@
 				SipSMCommand::dialog_layer)) {
 
 		pendingHangUps = pendingDeRegs = 0;
-		merr << end;
-		merr << "MiniSIP's SipStack is shutting down ... " << end;
-		merr << "     ... it won't take long to finish, be patient. Thanks!" << end;
+		merr << endl;
+		merr << "MiniSIP's SipStack is shutting down ... " << endl;
+		merr << "     ... it won't take long to finish, be patient. Thanks!" << endl;
 		SipSMCommand cmd( CommandString( "", SipCommandString::terminate_all_calls),
 			SipSMCommand::dispatcher,
 			SipSMCommand::dispatcher);
@@ -698,8 +698,8 @@
 	list<MRef<SipDialog *> > dlgs;
 	dlgs = getSipStack()->getDialogs();
 
-	merr << end; 
-	merr << "Terminating all ongoing calls:" << end;
+	merr << endl; 
+	merr << "Terminating all ongoing calls:" << endl;
 	for( list<MRef<SipDialog *> >::iterator it = dlgs.begin();
 							it != dlgs.end();
 							it ++  ) {
@@ -713,10 +713,10 @@
 				SipSMCommand::dialog_layer);
 		getSipStack()->enqueueCommand(cmd, HIGH_PRIO_QUEUE);
 		pendingHangUps++;
-		merr << "    - Hanging up " << (*it)->dialogState.remoteUri << end;
+		merr << "    - Hanging up " << (*it)->dialogState.remoteUri << endl;
 	}
 	if( pendingHangUps <= 0 ) {
-		merr << "    CALLS: No ongoing calls!" << end;
+		merr << "    CALLS: No ongoing calls!" << endl;
 		//if we have not sent any hang_ups ... notify all calls terminated
 		SipSMCommand cmd( CommandString( "", SipCommandString::terminate_all_calls_done),
 				SipSMCommand::dispatcher,
@@ -729,7 +729,7 @@
 bool SipDialogManagement::receivedCallTerminateEarly() {
 	pendingHangUps --;
 	if( pendingHangUps <= 0 ) {
-		merr << "    CALLS: all calls have been terminated!" << end;
+		merr << "    CALLS: all calls have been terminated!" << endl;
 		SipSMCommand cmd( CommandString( "", SipCommandString::terminate_all_calls_done),
 				SipSMCommand::dispatcher,
 				SipSMCommand::dispatcher);
@@ -741,8 +741,8 @@
 bool SipDialogManagement::deRegisterAll() {
 	list<MRef<SipDialog *> > dlgs;
 	dlgs = getSipStack()->getDialogs();
-	merr << end; 
-	merr << "De-Registering all identities from their registrar:" << end;
+	merr << endl; 
+	merr << "De-Registering all identities from their registrar:" << endl;
 	for( list<MRef<SipDialog *> >::iterator it = dlgs.begin();
 							it != dlgs.end();
 							it ++  ) {
@@ -766,11 +766,11 @@
 		getSipStack()->enqueueCommand(cmd, HIGH_PRIO_QUEUE);
 		pendingDeRegs++;
 		merr << "    De-registration request sent (username = " << 
-			(*it)->getDialogConfig()->sipIdentity->getSipUri().getString() << ")" << end;
+			(*it)->getDialogConfig()->sipIdentity->getSipUri().getString() << ")" << endl;
 	}
 	if( pendingDeRegs == 0 ) {
 		//if we have not sent any de-regs ... notify all un-registered
-		merr << "    DE-REGISTER: all identities were already not registered!" << end;
+		merr << "    DE-REGISTER: all identities were already not registered!" << endl;
 		SipSMCommand cmd( CommandString( "", SipCommandString::unregister_all_identities_done),
 				SipSMCommand::dispatcher,
 				SipSMCommand::dispatcher);
@@ -782,8 +782,8 @@
 bool SipDialogManagement::registerAll() {
 	list<MRef<SipDialog *> > dlgs;
 	dlgs = getSipStack()->getDialogs();
-	merr << end; 
-	merr << "Registering all identities to their registrar:" << end;
+	merr << endl; 
+	merr << "Registering all identities to their registrar:" << endl;
 	for( list<MRef<SipDialog *> >::iterator it = dlgs.begin();
 							it != dlgs.end();
 							it ++  ) {
@@ -808,11 +808,11 @@
 		getSipStack()->enqueueCommand(cmd, HIGH_PRIO_QUEUE);
 		pendingDeRegs++;
 		merr << "    Registration request sent (username = " << 
-			(*it)->getDialogConfig()->sipIdentity->getSipUri().getString() << ")" << end;
+			(*it)->getDialogConfig()->sipIdentity->getSipUri().getString() << ")" << endl;
 	}
 	if( pendingDeRegs == 0 ) {
 		//if we have not sent any de-regs ... notify all un-registered
-		merr << "    REGISTER: all identities were already registered!" << end;
+		merr << "    REGISTER: all identities were already registered!" << endl;
 		SipSMCommand cmd( CommandString( "", SipCommandString::unregister_all_identities_done),
 				SipSMCommand::dispatcher,
 				SipSMCommand::dispatcher);
@@ -827,13 +827,13 @@
 	pendingDeRegs--;
 	if( pendingDeRegs <= 0 ) {
 		if( deregistering ) {
-			merr << "    DE-REGISTER: all identities have been de-registered correctly!" << end;
+			merr << "    DE-REGISTER: all identities have been de-registered correctly!" << endl;
 			SipSMCommand cmd( CommandString( "", SipCommandString::unregister_all_identities_done),
 				SipSMCommand::dispatcher,
 				SipSMCommand::dispatcher);
 			getSipStack()->enqueueCommand(cmd, HIGH_PRIO_QUEUE);
 		} else {
-			merr << "    REGISTER: all identities have been registered correctly!" << end;
+			merr << "    REGISTER: all identities have been registered correctly!" << endl;
 			SipSMCommand cmd( CommandString( "", SipCommandString::register_all_identities_done),
 				SipSMCommand::dispatcher,
 				SipSMCommand::dispatcher);
@@ -851,14 +851,14 @@
 			return false;
 		} 
 		//else ... shutdown ... nothing else to do ...
-		merr << end << "SipStack Shutdown process is completed."<< end;
+		merr << endl << "SipStack Shutdown process is completed."<< endl;
 	} else {
-		merr << "Shutdown process timed out (there was some problem): "<< end;
+		merr << "Shutdown process timed out (there was some problem): "<< endl;
 		if( pendingHangUps > 0 ) {
-			merr << "      CALLS: Not all calls could be correctly hung up."<< end;
+			merr << "      CALLS: Not all calls could be correctly hung up."<< endl;
 		}
 		if( pendingDeRegs > 0 ) {
-			merr << "      DE-REGISTER: Not all identities were correctly de-registered."<< end;
+			merr << "      DE-REGISTER: Not all identities were correctly de-registered."<< endl;
 		}
 	}
 	

Modified: trunk/libmsip/source/dialogs/SipDialogRegister.cxx
===================================================================
--- trunk/libmsip/source/dialogs/SipDialogRegister.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/dialogs/SipDialogRegister.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -276,7 +276,7 @@
 		getDialogConfig()->sipIdentity->setIsRegistered ( false );
 	
 #ifdef DEBUG_OUTPUT
-		mdbg << "WARNING: SipDialogRegister::a9: unimplemented section reached"<<end;
+		mdbg << "WARNING: SipDialogRegister::a9: unimplemented section reached"<<endl;
 #endif
 		return true;
 	}else{
@@ -489,7 +489,7 @@
 	if (command.getType()==SipSMCommand::COMMAND_PACKET 
 			&& !(command.getDestination()==SipSMCommand::dialog_layer 
 			/*|| command.getDestination()==SipSMCommand::ANY*/)){
-		merr << "WARNING: UNEXPECTED: received packet in SipDialogRegister: "<<command.getCommandPacket()->getDescription() << end;
+		merr << "WARNING: UNEXPECTED: received packet in SipDialogRegister: "<<command.getCommandPacket()->getDescription() << endl;
 		return false;
 	}
 

Modified: trunk/libmsip/source/headers/SipHeaderExpires.cxx
===================================================================
--- trunk/libmsip/source/headers/SipHeaderExpires.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/headers/SipHeaderExpires.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -59,7 +59,7 @@
 	if (*endptr==0){
 		timeout=n;
 	}else{
-		merr << "WARNING: Could not parse Expires header - setting to 300 instead"<<end;
+		merr << "WARNING: Could not parse Expires header - setting to 300 instead"<<endl;
 		timeout=300;
 	}
 }

Modified: trunk/libmsip/source/messages/SipMessage.cxx
===================================================================
--- trunk/libmsip/source/messages/SipMessage.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/messages/SipMessage.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -124,7 +124,7 @@
 
 void SipMessage::addHeader(MRef<SipHeader*> header){
 	if( header.isNull() ) {
-		merr << "ERROR: trying to add null header to message!"<<end;
+		merr << "ERROR: trying to add null header to message!"<<endl;
 		return;
 	}
 	headers.push_back(header);
@@ -186,7 +186,7 @@
 	//This filters the sipfrag messages we receive ... like in NOTIFY ... which most of the times come without any header
 	if( startIndex + 4 >= endBuf ) {
 		#ifdef DEBUG_OUTPUT
-		mdbg << "SipMessage::parseHeaders: Info: SipMessage without headers ... only request line" << end;
+		mdbg << "SipMessage::parseHeaders: Info: SipMessage without headers ... only request line" << endl;
 		#endif
 		return i;
 	}
@@ -210,11 +210,11 @@
 // 			<< eoh-i+1 << "]" << end;
 		if( header == "" ) {
 			#ifdef DEBUG_OUTPUT
-			mdbg << "SipMessage::parseHeaders: Info: Could not copy line to new Message: (empty line)" << end;
+			mdbg << "SipMessage::parseHeaders: Info: Could not copy line to new Message: (empty line)" << endl;
 			#endif
 		} else if (!addLine(header)){
 			#ifdef DEBUG_OUTPUT
-			mdbg << "SipMessage::parseHeaders: Info: Could not copy line to new Message: " << header << " (unknown)" << end;
+			mdbg << "SipMessage::parseHeaders: Info: Could not copy line to new Message: " << header << " (unknown)" << endl;
 			#endif
 		}
 		i=eoh+1;
@@ -255,11 +255,11 @@
 				MRef<SipMessageContent*> smcref = contentFactory(contentbuf, contentType );
 				setContent(smcref);
 			}else{ //TODO: Better error handling
-				merr << "WARNING: No SipMessageContentFactory found for content type "<<contentType <<end;
+				merr << "WARNING: No SipMessageContentFactory found for content type "<<contentType <<endl;
 			}
 			
 		}else{ //TODO: Better error handling
-			merr << "WARNING: Sip message has content, but no content type! Content ignored."<< end;
+			merr << "WARNING: Sip message has content, but no content type! Content ignored."<< endl;
 		}
 	}
 }
@@ -310,7 +310,7 @@
 	if (seq){
 		return ((SipHeaderValueCSeq*)*seq)->getCSeq();
 	}else{
-		mdbg << "ERROR: Could not find command sequence number in sip Message."<< end;
+		mdbg << "ERROR: Could not find command sequence number in sip Message."<< endl;
 		return -1;
 	}
 }
@@ -345,7 +345,7 @@
 	if (seq){
 		return ((SipHeaderValueCSeq*)*seq)->getMethod();
 	}else{
-		mdbg << "ERROR: Could not find command sequence method in sip Message."<< end;
+		mdbg << "ERROR: Could not find command sequence method in sip Message."<< endl;
 		return "";
 	}
 }

Modified: trunk/libmsip/source/transactions/SipTransaction.cxx
===================================================================
--- trunk/libmsip/source/transactions/SipTransaction.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/transactions/SipTransaction.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -202,7 +202,7 @@
 			setSocket( *pack->getSocket() );
 
 #ifdef DEBUG_OUTPUT
-		mdbg<< "SipTransaction::send: WARNING: Ignoring created socket"<<end;
+		mdbg<< "SipTransaction::send: WARNING: Ignoring created socket"<<endl;
 #endif
 		
 		return;
@@ -211,7 +211,7 @@
 //FIXME: set the reliability ...
 bool SipTransaction::isUnreliable() { 
 	if( !socket ) {
-		mdbg << "FIXME: SipTransaction::isUnrealiable: socket not initialized. Returning _unreliable_transport_ by default" << end;
+		mdbg << "FIXME: SipTransaction::isUnrealiable: socket not initialized. Returning _unreliable_transport_ by default" << endl;
 		return true;
 	}
 	if( socket->getType() == SOCKET_TYPE_UDP )

Modified: trunk/libmsip/source/transactions/SipTransactionInviteServer.cxx
===================================================================
--- trunk/libmsip/source/transactions/SipTransactionInviteServer.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/transactions/SipTransactionInviteServer.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -148,7 +148,7 @@
 		MRef<SipResponse*> resp = lastResponse;
 		if (resp.isNull()){
 #ifdef DEBUG_OUTPUT
-			merr << FG_ERROR << "Invite server transaction failed to deliver response before remote side retransmitted. Bug?"<< PLAIN << end;
+			merr << FG_ERROR << "Invite server transaction failed to deliver response before remote side retransmitted. Bug?"<< PLAIN << endl;
 #endif
 		}else{
 			send(MRef<SipMessage*>(*resp), false);

Modified: trunk/libmsip/source/transactions/SipTransactionInviteServerUA.cxx
===================================================================
--- trunk/libmsip/source/transactions/SipTransactionInviteServerUA.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/transactions/SipTransactionInviteServerUA.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -128,7 +128,7 @@
 	
 	bool success = s_proceeding->removeTransition("transition_proceeding_terminated_2xx");
 	if (!success){
-		merr << "ERROR: Could not remove transition from state machine in SipTransactionInviteServerUA (BUGBUG!!)"<<end;
+		merr << "ERROR: Could not remove transition from state machine in SipTransactionInviteServerUA (BUGBUG!!)"<<endl;
 		massert(0==1);
 	}
 	

Modified: trunk/libmsip/source/transactions/SipTransactionNonInviteServer.cxx
===================================================================
--- trunk/libmsip/source/transactions/SipTransactionNonInviteServer.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmsip/source/transactions/SipTransactionNonInviteServer.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -141,7 +141,7 @@
 bool SipTransactionNonInviteServer::a4_proceeding_proceeding_request(
 		const SipSMCommand &command)
 {
-	merr << "CESC: SipTransNIS::a4 ... " << end;
+	merr << "CESC: SipTransNIS::a4 ... " << endl;
 	if (command.getSource()!=SipSMCommand::transport_layer)
 		return false;
 	

Modified: trunk/libmutil/include/libmutil/MemObject.h
===================================================================
--- trunk/libmutil/include/libmutil/MemObject.h	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/include/libmutil/MemObject.h	2007-06-08 20:45:23 UTC (rev 3292)
@@ -338,7 +338,7 @@
 #ifndef _MSC_VER
 				merr << "MRef::~MRef: WARNING: deleteing object with negative reference count (" 
 					<< rc
-					<< ") - created without reference?" << end;
+					<< ") - created without reference?" << std::endl;
 #endif
 			}       
 			delete getPointer();

Modified: trunk/libmutil/include/libmutil/StateMachine.h
===================================================================
--- trunk/libmutil/include/libmutil/StateMachine.h	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/include/libmutil/StateMachine.h	2007-06-08 20:45:23 UTC (rev 3292)
@@ -352,7 +352,7 @@
 		#ifdef MSM_DEBUG_COMMAND
 					merr << " ("<< c << ")";
 		#endif
-					merr << end;
+					merr << std::endl;
 				}
 #endif
 			}

Modified: trunk/libmutil/include/libmutil/dbg.h
===================================================================
--- trunk/libmutil/include/libmutil/dbg.h	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/include/libmutil/dbg.h	2007-06-08 20:45:23 UTC (rev 3292)
@@ -32,112 +32,82 @@
 #include<string>
 #include<iostream>
 #include<sstream>
+#include<set>
 
-#define DBG_INFO 0
-#define DBG_ERROR 1
 
-//==================================================================
-//if not win ce, pocket pc ... inherit from iostream and stringbuf
-//otherwise, use an old version of the debug class (release 1923)
-#ifndef _WIN32_WCE
+/**
+ * Normal operation:
+ *   merr << "hello"<<endl;
+ *   mdbg << "hello"<<endl;
+ * Filters:
+ *   You can filter what output you want to include/exclude.
+ *   Example 1, make output with a "output class" associated with it:
+ *      dbg("myapp/gui") << "Gui started"<<endl;
+ *
+ *   Example 2, set dbg to default exclude anything that is not explicitely
+ *   included: 
+ *      dbg.exclude("");
+ * 
+ *   Example 3, make dbg default include everything
+ *      dbg.include("");
+ *
+ *   Example 4, make dgb include "myapp/gui" and all sub-classes.
+ *      dbg.include("myapp/gui");
+ *    
+*/
 
-	class LIBMUTIL_API DbgHandler {
-		public:
-			virtual ~DbgHandler(){}
-		protected:
-			virtual void displayMessage(std::string output,int style=-1)=0;
-		private:
-			friend class Dbg;
-			friend class DbgBuf;
-	};
+class LIBMUTIL_API DbgEndl{
+public:
+	DbgEndl(){}
+private:
+	int i;
+};
 
-	class LIBMUTIL_API DbgBuf : public std::stringbuf {
-		public:
-			DbgBuf( DbgHandler * dbgHandler );
-			virtual ~DbgBuf();
-			virtual void setExternalHandler(DbgHandler * dbgHandler);
-		protected:
-			virtual int sync();
-		private:
-			DbgHandler * debugHandler;
-	};
 
-	class LIBMUTIL_API Dbg: public std::ostream {
-		public:
-		Dbg(bool error_output=false, bool enabled=true);
-		virtual ~Dbg();
-		void setEnabled(bool enabled);
-		bool getEnabled();
-		void setExternalHandler(DbgHandler * dbgHandler);
+class LIBMUTIL_API DbgHandler{
+public:
+	virtual ~DbgHandler(){}
+protected:
+	virtual void displayMessage(std::string output,int style=-1)=0;
+private:
+	friend class Dbg;
+};
 
-		protected:
-		void updateBuf();
+class LIBMUTIL_API Dbg{
+public:
+	Dbg(bool error_output=false, bool enabled=true);
 
-		private:
-		bool error_out;
-		bool enabled;
-		bool external_out;
-		DbgBuf dbgBuf;
-	};
+	Dbg &operator<<( const std::string& );
+	Dbg &operator<<( int );
+	Dbg &operator<<( unsigned int );
+	Dbg &operator<<( long long );
+	Dbg &operator<<( char );
+	Dbg &operator<<( void *);
 
+	LIBMUTIL_DEPRECATED
+	Dbg& operator<<(const DbgEndl &);
 
-	extern LIBMUTIL_API Dbg mout;
-	extern LIBMUTIL_API Dbg merr;
-	extern LIBMUTIL_API Dbg mdbg;
+	//accepts std::endl as parameter
+	Dbg &operator<<( std::ostream&(*arg)(std::ostream&) );
 
-	extern LIBMUTIL_API bool outputStateMachineDebug;
-	
-	extern LIBMUTIL_API std::ostream &end(std::ostream &os);
+	void setEnabled(bool enabled);
+	bool getEnabled();
+	void setExternalHandler(DbgHandler * dbgHandler);
 
-//==================================================================
-//if wince, use the old interface ... ======================
-#else
+private:
+	bool error_out;
+	bool enabled;
+	std::string str;
+	DbgHandler * debugHandler;
+};
 
-	class LIBMUTIL_API DbgEndl{
-		public:
-			DbgEndl(){}
-		private:
-			int i;
-	};
+extern LIBMUTIL_API Dbg mout;
+extern LIBMUTIL_API Dbg merr;
+extern LIBMUTIL_API Dbg mdbg;
 
-	class LIBMUTIL_API DbgHandler{
-		public:
-			virtual ~DbgHandler(){}
-		protected:
-			virtual void displayMessage(std::string output,int style=-1)=0;
-		private:
-			friend class Dbg;
-	};
+extern LIBMUTIL_API DbgEndl end; /// DEPRECATED - use std::endl instead
 
-	class LIBMUTIL_API Dbg{
-		public:
-			static const DbgEndl endl;
-			Dbg(bool error_output=false, bool enabled=true);
+extern LIBMUTIL_API bool outputStateMachineDebug;
 
-			Dbg &operator<<(std::string);
-			Dbg &operator<<(int);
-			Dbg &operator<<(char);
-			Dbg &operator<<(DbgEndl &endl);
-
-			void setEnabled(bool enabled);
-			bool getEnabled();
-			void setExternalHandler(DbgHandler * dbgHandler);
-
-		private:
-			bool error_out;
-			bool enabled;
-			std::string str;
-			DbgHandler * debugHandler;
-	};
-
-	extern LIBMUTIL_API Dbg mout;
-	extern LIBMUTIL_API Dbg merr;
-	extern LIBMUTIL_API Dbg mdbg;
-	extern LIBMUTIL_API DbgEndl end;
-
-	extern LIBMUTIL_API bool outputStateMachineDebug;
-
 #endif
 
-#endif
-

Modified: trunk/libmutil/source/Library.cxx
===================================================================
--- trunk/libmutil/source/Library.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/source/Library.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -48,7 +48,7 @@
 	handle = lt_dlopenext(path.c_str());
 #ifdef DEBUG_OUTPUT
 	if( !handle ){
-		cerr << "Library: " << lt_dlerror() << end;
+		cerr << "Library: " << lt_dlerror() << endl;
 	}
 #endif
 }

Modified: trunk/libmutil/source/MPlugin.cxx
===================================================================
--- trunk/libmutil/source/MPlugin.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/source/MPlugin.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -92,7 +92,7 @@
 	lib = Library::open( filename );
 
 	if( !lib ){
-		mdbg << "MPluginManager: Can't load " << filename << end;
+		mdbg << "MPluginManager: Can't load " << filename << endl;
 		// Continue;
 		return -1;
 	}
@@ -101,7 +101,7 @@
 		MRef<Library *> cur = *iLib;
 
 		if( cur->getPath() == lib->getPath() ){
-			mdbg << "MPluginManager: Already loaded " << filename << end;
+			mdbg << "MPluginManager: Already loaded " << filename << endl;
 			return -1;
 		}
 	}
@@ -122,19 +122,19 @@
 				}
 			}
 			else {
-				merr << "MPluginManager: No plugin for ep: " << *iEP << end;
+				merr << "MPluginManager: No plugin for ep: " << *iEP << endl;
 			}
 		}
 	}
 	else{
-		merr << "MPluginManager: No entrypoints in " << filename << end;
+		merr << "MPluginManager: No entrypoints in " << filename << endl;
 	}
 
 	if( nPlugins > 0 ){
 		libraries.push_back( lib );
 	}
 	else {
-		mdbg << "MPluginManager: No plugins loaded from " << lib->getPath() << end;
+		mdbg << "MPluginManager: No plugins loaded from " << lib->getPath() << endl;
 	}
 	return nPlugins;
 }
@@ -166,7 +166,7 @@
 
 	int res = lt_dlforeachfile(path.c_str(), ltdl_callback, &info);
 	if( res < 0 ){
-		merr << lt_dlerror() << end;
+		merr << lt_dlerror() << endl;
 	}
 	return info.nTotalPlugins;
 }
@@ -218,7 +218,7 @@
 		MRef<MPlugin *> pp = creatorFunction( lib );
 		
 		if( !pp.isNull() ){
-			mdbg << "MPluginManager: loaded " << pp->getName() << "(" << pp->getDescription() << ")" << end;
+			mdbg << "MPluginManager: loaded " << pp->getName() << "(" << pp->getDescription() << ")" << endl;
 			return pp;
 		}
 	}
@@ -250,7 +250,7 @@
 }
 
 bool MPluginManager::setSearchPath( const std::string &searchPath ){
-	mdbg << "MPluginManager: setSearchPath " << searchPath << end;
+	mdbg << "MPluginManager: setSearchPath " << searchPath << endl;
 
 	bool res = lt_dlsetsearchpath( searchPath.c_str() );
 	return res;

Modified: trunk/libmutil/source/ThreadPosix.cxx
===================================================================
--- trunk/libmutil/source/ThreadPosix.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/source/ThreadPosix.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -232,14 +232,14 @@
 	MRef<Runnable *> self = *(static_cast<MRef <Runnable *> *>(arg));
 	delete (static_cast<MRef <Runnable *> *>(arg));
 #ifdef DEBUG_OUTPUT
-	mdbg << "LinuxThreadStarter: thread created"<< end;
+	mdbg << "LinuxThreadStarter: thread created"<< endl;
 #endif	// DEBUG_OUTPUT
 
 	startRunnable(self);
 	//self->run();
 
 #ifdef DEBUG_OUTPUT
-	mdbg <<"LinuxThreadStarter: thread terminated"<< end;
+	mdbg <<"LinuxThreadStarter: thread terminated"<< endl;
 #endif	// DEBUG_OUTPUT
 	return NULL;
 	//pthread_exit( (void *) 0 ); //cesc
@@ -250,14 +250,14 @@
 	setupDefaultSignalHandling();
 #endif	// HAVE_EXECINFO_H
 	#ifdef DEBUG_OUTPUT
-		mdbg << "LinuxStaticThreadStarter: thread created"<< end;
+		mdbg << "LinuxStaticThreadStarter: thread created"<< endl;
 	#endif
 	void* (*f)();
 	f=(void* (*)())arg;
 	//(*f)();
 	startFunction(f);
 	#ifdef DEBUG_OUTPUT
-		mdbg <<"LinuxStaticThreadStarter: thread terminated"<< end;
+		mdbg <<"LinuxStaticThreadStarter: thread terminated"<< endl;
 	#endif	// DEBUG_OUTPUT
 	return NULL;
 }
@@ -267,7 +267,7 @@
 	setupDefaultSignalHandling();
 #endif	// HAVE_EXECINFO_H
 	#ifdef DEBUG_OUTPUT
-		mdbg << "LinuxStaticThreadStarter: thread created"<< end;
+		mdbg << "LinuxStaticThreadStarter: thread created"<< endl;
 	#endif	// DEBUG_OUTPUT
         tmpstruct *tmp = (tmpstruct*)arg;
         void* (*f)(void*);
@@ -277,7 +277,7 @@
         startFunctionArg(f, argptr);
 
 	#ifdef DEBUG_OUTPUT
-		mdbg <<"LinuxStaticThreadStarter: thread terminated"<< end;
+		mdbg <<"LinuxStaticThreadStarter: thread terminated"<< endl;
 	#endif	// DEBUG_OUTPUT
 	return NULL;
 }
@@ -324,12 +324,12 @@
 		merror("Thread::Thread: pthread_create");
                 delete self;
 		#ifdef DEBUG_OUTPUT
-			merr << "In Thread, linux part - thread NOT created" << end;
+			merr << "In Thread, linux part - thread NOT created" << endl;
 		#endif	// DEBUG_OUTPUT
 		throw ThreadException("Could not create thread.");
 	}
 	#ifdef DEBUG_OUTPUT
-		mdbg << "In Thread, linux part - thread created" << end;
+		mdbg << "In Thread, linux part - thread created" << endl;
 	#endif	// DEBUG_OUTPUT
 
 }
@@ -346,7 +346,7 @@
 	//pthread_t threadHandle;
 	ThreadHandle h;
 	#ifdef DEBUG_OUTPUT
- 		mdbg << "Running createThread"<< end;
+ 		mdbg << "Running createThread"<< endl;
 	#endif	// DEBUG_OUTPUT
 	pthread_create( /* (pthread_t*)h.hptr*/ (pthread_t*)((void*)&h.handle), NULL, LinuxStaticThreadStarter, (void*)f);
 	return h;
@@ -359,7 +359,7 @@
  
 	ThreadHandle h;
 	#ifdef DEBUG_OUTPUT
-		mdbg << "Running createThread" << end;
+		mdbg << "Running createThread" << endl;
 	#endif	// DEBUG_OUTPUT
 	pthread_create(/* (pthread_t*)h.hptr*/ (pthread_t*)((void*)&h.handle), NULL, LinuxStaticThreadStarterArg, argptr);
 	return h;
@@ -370,7 +370,7 @@
 	int ret;
 	
 	#ifdef DEBUG_OUTPUT
-		mdbg << "Thread::join(): before join" << end;
+		mdbg << "Thread::join(): before join" << endl;
 	#endif	// DEBUG_OUTPUT
 	ret = pthread_join( 
 			//*((pthread_t *)handle.hptr), 
@@ -405,14 +405,14 @@
 	int ret;
 	
 	#ifdef DEBUG_OUTPUT
-		mdbg << "Thread::kill(): before cancel" << end;
+		mdbg << "Thread::kill(): before cancel" << endl;
 	#endif	// DEBUG_OUTPUT
 	//ret = pthread_cancel( *( (pthread_t *)handle) );
 	ret = pthread_cancel( /* *( (pthread_t *)handle.hptr)*/ (pthread_t)handle.handle );
 	
 	if( ret != 0 ){
 		#ifdef DEBUG_OUTPUT
-			merr << "Thread::kill(): ERROR" << end;
+			merr << "Thread::kill(): ERROR" << endl;
 		#endif	// DEBUG_OUTPUT
 		return false;
 	} 
@@ -424,13 +424,13 @@
 	int ret;
 	
 	#ifdef DEBUG_OUTPUT
-		mdbg << "Thread::kill(): before cancel" << end;
+		mdbg << "Thread::kill(): before cancel" << endl;
 	#endif	// DEBUG_OUTPUT
 	ret = pthread_cancel( /* *((pthread_t*)h.hptr) */ (pthread_t)h.handle );
 	
 	if( ret != 0 ){
 		#ifdef DEBUG_OUTPUT
-			merr << "Thread::kill(): ERROR" << end;
+			merr << "Thread::kill(): ERROR" << endl;
 		#endif	// DEBUG_OUTPUT
 		return false;
 	} 

Modified: trunk/libmutil/source/dbg.cxx
===================================================================
--- trunk/libmutil/source/dbg.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/libmutil/source/dbg.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -33,104 +33,14 @@
 
 #include<libmutil/stringutils.h>
 
-//==================================================================
-//if not win ce, pocket pc ... inherit from iostream and stringbuf
-//otherwise, use an old version of the debug class (release 1923)
-#ifndef _WIN32_WCE
 
 Dbg mout;
 Dbg merr(false);
 Dbg mdbg(true, false);
 
-//#ifdef SM_DEBUG
-LIBMUTIL_API bool outputStateMachineDebug = false;
-//#endif
-
-DbgBuf::DbgBuf( DbgHandler * dbgHandler ) : 
-		std::stringbuf( std::ios_base::out ),
-		debugHandler( dbgHandler )
-{
-}
-
-DbgBuf::~DbgBuf()
-{
-}
-
-void DbgBuf::setExternalHandler( DbgHandler * dbgHandler )
-{
-	sync();
-	debugHandler = dbgHandler;
-}
-
-int DbgBuf::sync()
-{
-	if( debugHandler ){
-		std::string curStr = str();
-
-		debugHandler->displayMessage(curStr, 0);
-		str("");
-	}
-	return 1;
-}
-
-Dbg::Dbg(bool error_output, bool isEnabled):
-			std::ostream(NULL), 
-			error_out(error_output), 
-			enabled(isEnabled), 
-			external_out( false ), 
-			dbgBuf( NULL ){
-	updateBuf();
-}
-
-Dbg::~Dbg()
-{
-}
-
-void Dbg::updateBuf()
-{
-	std::streambuf *buf = NULL;
-
-	if( enabled ){
-		if( external_out )
-			buf = &dbgBuf;
-		else if( error_out )
-			buf = std::cerr.rdbuf();
-		else
-			buf = std::cout.rdbuf();
-	}
-	rdbuf( buf );
-}
-
-void Dbg::setEnabled(bool e){
-	enabled = e;
-	updateBuf();
-}
-
-bool Dbg::getEnabled(){
-	return enabled;
-}
-
-void Dbg::setExternalHandler(DbgHandler * dbgHandler )
-{
-	dbgBuf.setExternalHandler( dbgHandler );
-	external_out = dbgHandler != NULL;
-	updateBuf();
-}
-
-std::ostream &end(std::ostream &os)
-{
-	return std::endl( os );
-}
-
-//==================================================================
-//if wince, use the old interface ... ======================
-#else
-
-Dbg mout;
-Dbg merr(false);
-Dbg mdbg(true, false);
 DbgEndl end;
 
+
 LIBMUTIL_API bool outputStateMachineDebug = false;
 
 Dbg::Dbg(bool error_output, bool isEnabled):error_out(error_output), enabled(isEnabled), debugHandler(NULL){
@@ -144,14 +54,15 @@
 	return enabled;
 }
 
-Dbg &Dbg::operator<<(std::string s){
+Dbg &Dbg::operator<<(const std::string& s){
 	if (!enabled)
 		return *this;
-	//    std::cerr << "Doing textui output"<< std::endl;
 	
+	bool doFlush = s.size()>0 && (s[s.size()-1]=='\n');
+
 	if (debugHandler!=NULL){
-		str +=s;
-		if (str[str.size()-1]=='\n'){
+		str += s;
+		if (doFlush){
 			if (error_out)
 				std::cerr << str << std::flush;
 			else
@@ -159,66 +70,49 @@
 			str="";
 		}
 	}else{
-		if (error_out)
+		if (error_out){
 			std::cerr << s;
-		else
+			if (doFlush)
+				std::cerr << std::flush;
+		}else{
 			std::cout<<s;
+			if (doFlush)
+				std::cout << std::flush;
+		}
 	}
 	return *this;
 }
 
-Dbg &Dbg::operator<<(DbgEndl &){
+Dbg &Dbg::operator<<( std::ostream&(*)(std::ostream&) ){
+	return (*this)<<"\n";
+}
 
-	if (!enabled)
-		return *this;
-	//    std::cerr << "DbgEndl called"<< std::endl;
-	if (debugHandler!=NULL){
-		str+="\n";
-		(*this)<< "";
-	}else{
-		if (error_out)
-			std::cerr << std::endl;
-		else
-			std::cout << std::endl;
-	}
-
-	return *this;
+Dbg &Dbg::operator<<(const DbgEndl &){
+	return (*this)<<"\n";
 }
 
 Dbg& Dbg::operator<<(int i){
+	return (*this)<<itoa(i);
+}
 
-	if (!enabled)
-		return *this;
-    
-    if (debugHandler!=NULL)
-        str += itoa(i);
-    else{
-	if (error_out)
-		std::cerr << i;
-	else
-		std::cout << i;
-    }
-    return (*this);
+
+Dbg& Dbg::operator<<(unsigned int i){
+	return (*this)<<itoa(i);
 }
 
+Dbg& Dbg::operator<<(long long ll){
+	return (*this)<<itoa(ll);
+}
+
 Dbg& Dbg::operator<<(char c){
+	return (*this)<<std::string("")+c;
+}
 
-	if (!enabled)
-		return *this;
-
-	if (debugHandler!=NULL)
-		str += c;
-	else{
-		if (error_out)
-			std::cerr << c;
-		else
-			std::cout << c;
-	}
-	return *this;
+Dbg& Dbg::operator<<(void *p){
+	return (*this)<<(long long)p;
 }
 
-void Dbg::setExternalHandler(DbgHandler * debugHandler){
-	this->debugHandler = debugHandler;
+void Dbg::setExternalHandler(DbgHandler * dh){
+	this->debugHandler = dh;
 }
 
-#endif

Modified: trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/minisip/minisip/gui/gtkgui/AccountsList.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -142,7 +142,7 @@
 			#ifdef DEBUG_OUTPUT
 			cerr << "AccountList::saveToConfig:: Account <" << name << "> warning: " << retProxy << endl; 
 			#endif
-			merr << retProxy << end; 
+			merr << retProxy << endl; 
 		}
 
 		string username = 

Modified: trunk/minisip/minisip/gui/gtkgui/MainWindow.cxx
===================================================================
--- trunk/minisip/minisip/gui/gtkgui/MainWindow.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/minisip/minisip/gui/gtkgui/MainWindow.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -1023,7 +1023,7 @@
 	}
 #endif
 
-	merr << "Can't find data file: " << baseName << end;
+	merr << "Can't find data file: " << baseName << endl;
 	return "";
 }
 

Modified: trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx
===================================================================
--- trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx	2007-06-07 10:35:21 UTC (rev 3291)
+++ trunk/minisip/minisip/gui/textui/MinisipTextUI.cxx	2007-06-08 20:45:23 UTC (rev 3292)
@@ -149,7 +149,7 @@
 
 void MinisipTextUI::handleCommand(const CommandString &cmd){
 #ifdef DEBUG_OUTPUT
-	mdbg << FG_MAGENTA << "MinisipTextUI::handleCommand: Got "<<cmd.getString() << PLAIN <<end;
+	mdbg << FG_MAGENTA << "MinisipTextUI::handleCommand: Got "<<cmd.getString() << PLAIN <<endl;
 #endif
 	bool handled = false;
 
@@ -632,7 +632,7 @@
 	if (command.substr(0,8) == "register"){
 		displayMessage("Registering to proxy", blue);
 		regproxy = trim(command.substr(8));
-		mdbg << "Regproxy=<"<<regproxy<<">"<< end;
+		mdbg << "Regproxy=<"<<regproxy<<">"<< endl;
 		CommandString command("",SipCommandString::proxy_register/*, regproxy*/);
 
 //		if (regproxy=="pstn")



More information about the Minisip-devel mailing list