]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix bogus output from 'show agents' with no name (bug #4030)
authorRussell Bryant <russell@russellbryant.com>
Fri, 15 Apr 2005 07:06:40 +0000 (07:06 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 15 Apr 2005 07:06:40 +0000 (07:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 84819a2bfce0fb0e104112642689d0c8e6ce8e49..96b83d25aa8818d6367062f9505b2576dd633652 100755 (executable)
@@ -193,12 +193,12 @@ static struct agent_pvt *add_agent(char *agent, int pending)
        if ((password = strchr(tmp, ','))) {
                *password = '\0';
                password++;
-               while (*password < 33) password++;
+               while (*password && *password < 33) password++;
        }
        if (password && (name = strchr(password, ','))) {
                *name = '\0';
                name++;
-               while (*name < 33) name++; 
+               while (*name && *name < 33) name++; 
        }
        prev=NULL;
        p = agents;