]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Only complete the SIP channel name once for 'sip show channel <channel>'
authorSean Bright <sean@malleable.com>
Fri, 18 Apr 2008 13:33:32 +0000 (13:33 +0000)
committerSean Bright <sean@malleable.com>
Fri, 18 Apr 2008 13:33:32 +0000 (13:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114245 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0f134387703b2c896793cd8d83c5abc2c6a66ade..9e7146a2ef9cb5335ed5ce4a4719a0888821b6e3 100644 (file)
@@ -10872,6 +10872,10 @@ static char *complete_sipch(const char *line, const char *word, int pos, int sta
        char *c = NULL;
        int wordlen = strlen(word);
 
+       if (pos != 3) {
+               return NULL;
+       }
+
        ast_mutex_lock(&iflock);
        for (cur = iflist; cur; cur = cur->next) {
                if (!strncasecmp(word, cur->callid, wordlen) && ++which > state) {