[svn-commits] file: trunk r60796 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Apr 8 17:47:06 MST 2007


Author: file
Date: Sun Apr  8 19:47:06 2007
New Revision: 60796

URL: http://svn.digium.com/view/asterisk?view=rev&rev=60796
Log:
Add counter for sip show registry CLI command. (issue #9352 reported by junky)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=60796&r1=60795&r2=60796
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sun Apr  8 19:47:06 2007
@@ -10911,7 +10911,7 @@
 	char host[80];
 	char tmpdat[256];
 	struct tm tm;
-
+	int counter = 0;
 
 	if (argc != 3)
 		return RESULT_SHOWUSAGE;
@@ -10926,7 +10926,9 @@
 			tmpdat[0] = '\0';
 		ast_cli(fd, FORMAT, host, iterator->username, iterator->refresh, regstate2str(iterator->regstate), tmpdat);
 		ASTOBJ_UNLOCK(iterator);
+		counter++;
 	} while(0));
+	ast_cli(fd, "%d SIP registrations.\n", counter);
 	return RESULT_SUCCESS;
 #undef FORMAT
 #undef FORMAT2



More information about the svn-commits mailing list