Patch Submitted by BKW on 5/10/2004 to chan_sip.c
authorAnthony Minessale II <anthmct@yahoo.com>
Mon, 10 May 2004 18:45:20 +0000 (18:45 +0000)
committerAnthony Minessale II <anthmct@yahoo.com>
Mon, 10 May 2004 18:45:20 +0000 (18:45 +0000)
Fixing 'show help' inefficency.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
cli.c

index d2c25fd..79f4614 100755 (executable)
@@ -3749,7 +3749,7 @@ static int parse_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_req
        /* Save User agent */
        useragent = get_header(req, "User-Agent");
        if(useragent && strcasecmp(useragent, p->useragent)) {
-               strncpy(p->useragent, get_header(req, "User-Agent"),sizeof(p->useragent));
+               strncpy(p->useragent, useragent, sizeof(p->useragent));
                if (option_verbose > 2) {
                        ast_verbose(VERBOSE_PREFIX_3 "Saved useragent \"%s\" for peer %s\n",p->useragent,p->name);  
                }
diff --git a/cli.c b/cli.c
index af9aa45..a48ce4b 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -770,7 +770,7 @@ static int help_workhorse(int fd, char *match[])
                                continue;
                        }
                }
-               ast_cli(fd, "%20.20s   %s\n", fullcmd, e->summary);
+               ast_cli(fd, "%25.25s  %s\n", fullcmd, e->summary);
        }
        return 0;
 }