[Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp,1.77,1.78

jeremy at lists.digium.com jeremy at lists.digium.com
Sat May 21 12:23:26 CDT 2005


Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv26464

Modified Files:
	ast_h323.cpp 
Log Message:
Make debug output more precise. Bug #4345

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- ast_h323.cpp	19 May 2005 19:13:19 -0000	1.77
+++ ast_h323.cpp	21 May 2005 16:27:57 -0000	1.78
@@ -957,16 +957,13 @@
   */
 BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
 {    
-	if (h323debug) {
-		cout << "\t-- Started logical channel: ";	
-		cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" ")); 
-		cout << (const char *)(channel.GetCapability()).GetFormatName() << endl;
-	}
-
 	/* Increase the count of channels we have open */
 	channelsOpen++;
 
 	if (h323debug) {
+		cout << "\t-- Started logical channel: ";
+		cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" "));
+		cout << (const char *)(channel.GetCapability()).GetFormatName() << endl;
 		cout <<  "\t\t-- channelsOpen = " << channelsOpen << endl;
 	}
 	return connectionState != ShuttingDownConnection;
@@ -1208,14 +1205,18 @@
 	MyH323Connection *conn;
 
 	if (!h323_end_point_exist()) {
-		cout << " ERROR: [h323_set_capablity] No Endpoint, this is bad" << endl;
+		cout << " ERROR: [h323_set_capablities] No Endpoint, this is bad" << endl;
+		return 1;
+	}
+	if (!token || !*token) {
+		cout << " ERROR: [h323_set_capabilities] Invalid call token specified." << endl;
 		return 1;
 	}
 
 	PString myToken(token);
 	conn = (MyH323Connection *)endPoint->FindConnectionWithLock(myToken);
 	if (!conn) {
-		cout << " ERROR: [h323_set_capability] Unable to find connection " << token << endl;
+		cout << " ERROR: [h323_set_capabilities] Unable to find connection " << token << endl;
 		return 1;
 	}
 	conn->SetCapabilities(cap, dtmfMode);
@@ -1274,7 +1275,7 @@
 	if (strlen(alias->prefix)) {
 		p = prefix = strdup(alias->prefix);
 		while((num = strsep(&p, ",")) != (char *)NULL) {
-	        cout << "== Adding Prefix \"" << num << "\" to endpoint" << endl;
+			cout << "== Adding Prefix \"" << num << "\" to endpoint" << endl;
 			endPoint->SupportedPrefixes += PString(num);
 			endPoint->SetGateway();
 		}




More information about the svn-commits mailing list