Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv11507
Modified Files:
asterisk.c
Log Message:
the last round of file version tags
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- asterisk.c 6 Jun 2005 22:12:18 -0000 1.163
+++ asterisk.c 6 Jun 2005 22:39:31 -0000 1.164
@@ -210,6 +210,7 @@
struct file_version *iterator;
regex_t regexbuf;
int havepattern = 0;
+ int havename = 0;
switch (argc) {
case 5:
@@ -220,6 +221,9 @@
} else
return RESULT_SHOWUSAGE;
break;
+ case 4:
+ havename = 1;
+ break;
case 3:
break;
default:
@@ -230,10 +234,16 @@
ast_cli(fd, FORMAT, "----", "--------");
AST_LIST_LOCK(&file_versions);
AST_LIST_TRAVERSE(&file_versions, iterator, list) {
+ if (havename && strcasecmp(iterator->file, argv[3]))
+ continue;
+
if (havepattern && regexec(®exbuf, iterator->file, 0, NULL,
0))
continue;
ast_cli(fd, FORMAT, iterator->file, iterator->version);
+
+ if (havename)
+ break;
}
AST_LIST_UNLOCK(&file_versions);
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs