[Home]

Summary:ASTERISK-05949: [patch] handle_show_version_files code clean
Reporter:Peng Yong (ppyy)Labels:
Date Opened:2006-01-02 09:01:32.000-0600Date Closed:2011-06-07 14:10:05
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch.show_files
( 1) show_version.patch
Description:1. remove havename variable
2. only run following statement when count_files > 1:

ast_cli(fd, "%d files listed.\n", count_files);
Comments:By: Matt O'Gorman (mogorman) 2006-01-18 15:17:40.000-0600

hey ppyy this patch segfaults if you run show version files and hit enter....

By: Peng Yong (ppyy) 2006-01-18 22:07:49.000-0600

mog, there are some fault in the previous patch.

and here is another only to show how many files when files > 1

Index: asterisk.c
===================================================================
--- asterisk.c  (revision 8241)
+++ asterisk.c  (working copy)
@@ -313,7 +313,7 @@
                       break;
       }
       AST_LIST_UNLOCK(&file_versions);
-       if (!havename) {
+       if (count_files > 1) {
               ast_cli(fd, "%d files listed.\n", count_files);
       }

By: Clod Patry (junky) 2006-01-19 02:04:41.000-0600

ppyy: could you try to update your patch when that patch doesnt apply to latest trunk?
Thanks.

By: Matt O'Gorman (mogorman) 2006-01-19 13:39:21.000-0600

still segfaults with your patch ppyy.... please update

By: Peng Yong (ppyy) 2006-01-20 05:42:41.000-0600

i found it's better to have "havename" variable.

this patch contain only a little  fix

By: Clod Patry (junky) 2006-02-13 23:14:28.000-0600

I think that way:
polux*CLI> show version files like utilssadf
File                      Revision
----                      --------
0 files listed.

is pretty clear, dont you?

polux*CLI> show version files like utilssadf
File                      Revision
----                      --------
polux*CLI>

its almost the same thing, since we already have the havename var.