Merged revisions 303860 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 25 Jan 2011 18:56:23 +0000 (18:56 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 25 Jan 2011 18:56:23 +0000 (18:56 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303860 | tilghman | 2011-01-25 12:55:27 -0600 (Tue, 25 Jan 2011) | 12 lines

  Merged revisions 303858 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ........
    r303858 | tilghman | 2011-01-25 12:41:26 -0600 (Tue, 25 Jan 2011) | 5 lines

    Fix "sip show user <tab>", so that it actually shows results, instead of just completing the last entry.

    (closes issue #16675)
    Reported by: pj
  ........
................

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

channels/chan_sip.c

index e7de579..38b3905 100644 (file)
@@ -16744,6 +16744,9 @@ static char *complete_sip_user(const char *word, int state)
                }
                ao2_unlock(user);
                unref_peer(user, "complete sip user");
+               if (result) {
+                       break;
+               }
        }
        ao2_iterator_destroy(&user_iter);
        return result;