[asterisk-commits] file: trunk r59080 - /trunk/main/db.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 20 19:46:03 MST 2007


Author: file
Date: Tue Mar 20 21:46:02 2007
New Revision: 59080

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59080
Log:
Make the database show command spit out how many results it got. (issue #9332 reported by junky)

Modified:
    trunk/main/db.c

Modified: trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/trunk/main/db.c?view=diff&rev=59080&r1=59079&r2=59080
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Tue Mar 20 21:46:02 2007
@@ -358,6 +358,7 @@
 	char *keys, *values;
 	int res;
 	int pass;
+	int counter = 0;
 
 	if (argc == 3) {
 		/* Key only */
@@ -389,9 +390,11 @@
 		}
 		if (subkeymatch(keys, suffix)) {
 				ast_cli(fd, "%-50s: %-25s\n", keys, values);
+				counter++;
 		}
 	}
 	ast_mutex_unlock(&dblock);
+	ast_cli(fd, "%d results found.\n", counter);
 	return RESULT_SUCCESS;	
 }
 



More information about the asterisk-commits mailing list