add count of files used to build Asterisk/modules (issue #4992 with text mod)
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 22 Aug 2005 18:45:41 +0000 (18:45 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 22 Aug 2005 18:45:41 +0000 (18:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6350 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c

index ca3aec3..fd28291 100755 (executable)
@@ -218,6 +218,7 @@ static int handle_show_version_files(int fd, int argc, char *argv[])
        regex_t regexbuf;
        int havepattern = 0;
        int havename = 0;
+       int count_files = 0;
 
        switch (argc) {
        case 5:
@@ -248,11 +249,14 @@ static int handle_show_version_files(int fd, int argc, char *argv[])
                        continue;
 
                ast_cli(fd, FORMAT, iterator->file, iterator->version);
-
+               count_files++;
                if (havename)
                        break;
        }
        AST_LIST_UNLOCK(&file_versions);
+       if (!havename) {
+               ast_cli(fd, "%d files listed.\n", count_files);
+       }
 
        if (havepattern)
                regfree(&regexbuf);