[Asterisk-cvs] asterisk/channels chan_iax2.c,1.314,1.315

kpfleming at lists.digium.com kpfleming at lists.digium.com
Thu Jul 7 18:23:39 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv16526/channels

Modified Files:
	chan_iax2.c 
Log Message:
make CLI output use singular/plural when appropriate (bug #4654)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.314
retrieving revision 1.315
diff -u -d -r1.314 -r1.315
--- chan_iax2.c	24 Jun 2005 04:38:59 -0000	1.314
+++ chan_iax2.c	7 Jul 2005 22:32:20 -0000	1.315
@@ -4348,7 +4348,7 @@
 		}
 		ast_mutex_unlock(&iaxsl[x]);
 	}
-	ast_cli(fd, "%d active IAX channel(s)\n", numchans);
+	ast_cli(fd, "%d active IAX channel%s\n", numchans, (numchans != 1) ? "s" : "");
 	return RESULT_SUCCESS;
 #undef FORMAT
 #undef FORMAT2
@@ -4443,7 +4443,7 @@
 	ast_cli(fd, "                                -------- LOCAL ---------------------  -------- REMOTE --------------------\n");
 	ast_cli(fd, "Channel                    RTT  Jit  Del  Lost   %%  Drop  OOO  Kpkts  Jit  Del  Lost   %%  Drop  OOO  Kpkts\n");
 	numchans = ast_cli_netstats(fd, 1);
-	ast_cli(fd, "%d active IAX channel(s)\n", numchans);
+	ast_cli(fd, "%d active IAX channel%s\n", numchans, (numchans != 1) ? "s" : "");
 	return RESULT_SUCCESS;
 }
 
@@ -5887,7 +5887,7 @@
 		} else {
 			res = send_trunk(tpeer, &now);
 			if (iaxtrunkdebug)
-				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);
+				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, (res != 1) ? "s" : "", tpeer->trunkdatalen, tpeer->trunkdataalloc);
 		}		
 		totalcalls += res;	
 		res = 0;




More information about the svn-commits mailing list