Summary:ASTERISK-04643: [patch] Change format of "show version file"
Reporter:Olle Johansson (oej)Labels:
Date Opened:2005-07-21 08:27:54Date Closed:2008-01-15 15:42:38.000-0600
Versions:Frequency of
Environment:Attachments:( 0) fileversion.txt
( 1) rev.txt
Description:THis patch changes the format of show version file. In some of my own development versions I want to add a string to the version text to separate the files and be able to check which version I'm actually using...
Comments:By: Clod Patry (junky) 2005-07-21 11:36:25

You means show version files?
I wonder why we have the word Revision on each line btw.
File                      Revision
----                      --------
app_waitforsilence.c      Revision: 1.8
app_db.c                  Revision: 1.12
app_math.c                Revision: 1.12
app_talkdetect.c          Revision: 1.10

could be:
File                      Revision
----                      --------
app_waitforsilence.c      1.8
app_db.c                  1.12
app_math.c                1.12
app_talkdetect.c          1.10

Because, we know it's Revision 1.8, since it's in the field Revision.

By: Clod Patry (junky) 2005-07-21 11:51:21

That patch take all Revision when doing show version files like said in my last note.
Plus it looks that:
asterisk*CLI> show version files pbx.c
File                      Revision
----                      --------
pbx.c                     1.259

for individual search.

and that works for oej needs too:
[13:03:24] <JunK-U> asterisk*CLI> show version files pbx.c
[13:03:24] <JunK-U> File                      Revision
[13:03:24] <JunK-U> ----                      --------
[13:03:24] <JunK-U> pbx.c                     Olle-544
[13:03:27] <JunK-U> which works too.

The only thing we have to type is: "Revision: Olle-544"

And ive disclaimer on file.

By: Kevin P. Fleming (kpfleming) 2005-07-25 18:11:48

Junky, your patch is not correct; if there is no space in the string, strstr() will return NULL and Asterisk will segfault.

By: Kevin P. Fleming (kpfleming) 2005-07-25 18:13:12

Committed to CVS HEAD, thanks!

(Junky, I'm not sure your patch is a good idea, we can't assume that everyone will want the first word of the string stripped or will know that they can't use spaces in the string).

By: Digium Subversion (svnbot) 2008-01-15 15:42:38.000-0600

Repository: asterisk
Revision: 6210

U   trunk/asterisk.c

r6210 | kpfleming | 2008-01-15 15:42:37 -0600 (Tue, 15 Jan 2008) | 2 lines

allow longer file version strings (bug ASTERISK-4643)