[Asterisk-cvs] asterisk/channels chan_h323.c,1.13,1.14

jeremy at lists.digium.com jeremy at lists.digium.com
Thu Dec 18 12:57:13 CST 2003


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

Modified Files:
	chan_h323.c 
Log Message:
remove debug and switch printf's out


Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- chan_h323.c	18 Dec 2003 18:24:36 -0000	1.13
+++ chan_h323.c	18 Dec 2003 18:48:47 -0000	1.14
@@ -952,12 +952,6 @@
 	info->addr = inet_ntoa(us.sin_addr);
 	info->port = ntohs(us.sin_port);
 
-#if 0
-	printf("  us: %s:%d\n", inet_ntoa(us.sin_addr), ntohs(us.sin_port));
-	printf("them: %s:%d\n", inet_ntoa(them.sin_addr), ntohs(them.sin_port));
-
-	printf("info: %s:%d\n", info->addr, info->port);	
-#endif
 
 	return info;
 }
@@ -992,11 +986,11 @@
 	p->cd.call_dest_e164 = cd.call_dest_e164;
 
 	if (h323debug) {
-		printf("	== Setting up Call\n");
-		printf("	   -- Calling party name:  [%s]\n", p->cd.call_source_aliases);
-		printf("	   -- Calling party number:  [%s]\n", p->cd.call_source_e164);
-		printf("	   -- Called  party name:  [%s]\n", p->cd.call_dest_alias);
-		printf("	   -- Called  party number:  [%s]\n", p->cd.call_dest_e164);
+		ast_verbose(VERBOSE_PREFIX_3 "	== Setting up Call\n");
+		ast_verbose(VERBOSE_PREFIX_3 "	   -- Calling party name:  [%s]\n", p->cd.call_source_aliases);
+		ast_verbose(VERBOSE_PREFIX_3 "	   -- Calling party number:  [%s]\n", p->cd.call_source_e164);
+		ast_verbose(VERBOSE_PREFIX_3 "	   -- Called  party name:  [%s]\n", p->cd.call_dest_alias);
+		ast_verbose(VERBOSE_PREFIX_3 "	   -- Called  party number:  [%s]\n", p->cd.call_dest_e164);
 	}
 
 	/* Decide if we are allowing Gatekeeper routed calls*/
@@ -1012,8 +1006,6 @@
 				ast_log(LOG_ERROR, "Call for %s rejected, alias not found\n", cd.call_dest_alias);
 				return 0;
 			}
-			printf("Alias found: %s and %s\n", alias->name, alias->context);
-
 			strncpy(p->exten, alias->name, sizeof(p->exten)-1);
 			strncpy(p->context, alias->context, sizeof(p->context)-1);
 		}
@@ -1074,10 +1066,8 @@
 
 			if (strlen(p->cd.call_dest_e164)) {
 				strncpy(p->exten, cd.call_dest_e164, sizeof(p->exten)-1);
-				printf("e164: [%s]\n", p->exten);
 			} else {
 				strncpy(p->exten, cd.call_dest_alias, sizeof(p->exten)-1);		
-				printf("dest alias: %s\n", p->exten);
 			}
 			if (strlen(user->accountcode)) {
 				strncpy(p->accountcode, user->accountcode, sizeof(p->accountcode)-1);
@@ -1164,7 +1154,7 @@
 
 
 	if (!p->owner) {
-		printf("Channel has no owner\n");
+		ast_log(LOG_ERROR, "Channel has no owner\n");
 		return;
 	}
 	c = p->owner;	
@@ -1477,7 +1467,7 @@
 				gkroute = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "context")) {
 			strncpy(default_context, v->value, sizeof(default_context)-1);
-			printf("  == Setting default context to %s\n", default_context);	
+			ast_verbose(VERBOSE_PREFIX_3 "  == Setting default context to %s\n", default_context);	
 		} else if (!strcasecmp(v->name, "dtmfmode")) {
 			if (!strcasecmp(v->value, "inband"))
 				dtmfmode=H323_DTMF_INBAND;
@@ -1702,9 +1692,6 @@
 	ast_rtp_get_peer(rtp, &them);	
 	ast_rtp_get_us(rtp, &us);
 
-	printf("peer is now: %s:%d\n", inet_ntoa(them.sin_addr), htons(them.sin_port));
-	printf("Us is: %s\n", inet_ntoa(us.sin_addr));
-		
 
 	h323_native_bridge(p->cd.call_token, inet_ntoa(them.sin_addr), mode);
 	




More information about the svn-commits mailing list