aboutsummaryrefslogtreecommitdiffstats
path: root/main/db.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-21 02:46:02 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-21 02:46:02 +0000
commitcc9533e362526204e19e49a33b27fb303174d6ac (patch)
tree1cd3ad25bb4d672efdb51a20ca3f68acca127e63 /main/db.c
parent04e530983c7e2129c57fb83571934bba64d2b47c (diff)
Make the database show command spit out how many results it got. (issue #9332 reported by junky)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59080 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/db.c')
-rw-r--r--main/db.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/db.c b/main/db.c
index de53ab78b..34041cba2 100644
--- a/main/db.c
+++ b/main/db.c
@@ -358,6 +358,7 @@ static int database_showkey(int fd, int argc, char *argv[])
char *keys, *values;
int res;
int pass;
+ int counter = 0;
if (argc == 3) {
/* Key only */
@@ -389,9 +390,11 @@ static int database_showkey(int fd, int argc, char *argv[])
}
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;
}