[Asterisk-cvs] asterisk/channels chan_iax2.c,1.283,1.284

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun May 15 00:45:45 CDT 2005


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

Modified Files:
	chan_iax2.c 
Log Message:
fix up help text and output for 'iax2 trunk debug' CLI command (bug #4191)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -d -r1.283 -r1.284
--- chan_iax2.c	15 May 2005 03:21:51 -0000	1.283
+++ chan_iax2.c	15 May 2005 04:51:13 -0000	1.284
@@ -4465,7 +4465,7 @@
 static struct ast_cli_entry  cli_debug =
 	{ { "iax2", "debug", NULL }, iax2_do_debug, "Enable IAX debugging", debug_usage };
 static struct ast_cli_entry  cli_trunk_debug =
-	{ { "iax2", "trunk", "debug", NULL }, iax2_do_trunk_debug, "Request IAX trunk debug", debug_trunk_usage };
+	{ { "iax2", "trunk", "debug", NULL }, iax2_do_trunk_debug, "Request snapshot of IAX trunk states", debug_trunk_usage };
 static struct ast_cli_entry  cli_no_debug =
 	{ { "iax2", "no", "debug", NULL }, iax2_no_debug, "Disable IAX debugging", no_debug_usage };
 static struct ast_cli_entry  cli_test_losspct =
@@ -5779,11 +5779,11 @@
 		/* Any appropriate call will do */
 		fr->data = fr->afdata;
 		fr->datalen = tpeer->trunkdatalen + sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr);
-#if 0
-		ast_log(LOG_DEBUG, "Trunking %d calls in %d bytes, ts=%d\n", calls, fr->datalen, ntohl(mth->ts));
-#endif		
 		res = transmit_trunk(fr, &tpeer->addr, tpeer->sockfd);
 		calls = tpeer->calls;
+#if 0
+		ast_log(LOG_DEBUG, "Trunking %d call chunks in %d bytes to %s:%d, ts=%d\n", calls, fr->datalen, ast_inet_ntoa(iabuf, sizeof(iabuf), tpeer->addr.sin_addr), ntohs(tpeer->addr.sin_port), ntohl(mth->ts));
+#endif		
 		/* Reset transmit trunk side data */
 		tpeer->trunkdatalen = 0;
 		tpeer->calls = 0;
@@ -5814,7 +5814,7 @@
 #endif
 	struct timeval now;
 	if (iaxtrunkdebug)
-		ast_verbose("Beginning trunk processing\n");
+		ast_verbose("Beginning trunk processing. Trunk queue ceiling is %d bytes per host\n", MAX_TRUNKDATA);
 	gettimeofday(&now, NULL);
 	if (events & AST_IO_PRI) {
 #ifdef ZT_TIMERACK
@@ -5852,7 +5852,7 @@
 		} else {
 			res = send_trunk(tpeer, &now);
 			if (iaxtrunkdebug)
-				ast_verbose("Processed trunk peer (%s:%d) with %d call(s)\n", ast_inet_ntoa(iabuf, sizeof(iabuf), tpeer->addr.sin_addr), ntohs(tpeer->addr.sin_port), res);
+				ast_verbose(" - Trunk peer (%s:%d) has %d call chunk(s) in transit, %d bytes backloged and has hit a high water mark of %d bytes\n", ast_inet_ntoa(iabuf, sizeof(iabuf), tpeer->addr.sin_addr), ntohs(tpeer->addr.sin_port), res, tpeer->trunkdatalen, tpeer->trunkdataalloc);
 		}		
 		totalcalls += res;	
 		res = 0;
@@ -5873,7 +5873,7 @@
 		
 	}
 	if (iaxtrunkdebug)
-		ast_verbose("Ending trunk processing with %d peers and %d calls processed\n", processed, totalcalls);
+		ast_verbose("Ending trunk processing with %d peers and %d call chunks processed\n", processed, totalcalls);
 	iaxtrunkdebug =0;
 	return 1;
 }




More information about the svn-commits mailing list