From: Sean Bright Date: Fri, 18 Apr 2008 13:33:32 +0000 (+0000) Subject: Only complete the SIP channel name once for 'sip show channel ' X-Git-Tag: 1.4.20-rc1~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da91e55eaf8d0fdabebb20f74bd9d29e80001981;p=thirdparty%2Fasterisk.git Only complete the SIP channel name once for 'sip show channel ' git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114245 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0f13438770..9e7146a2ef 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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) {