diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-15 07:06:40 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-15 07:06:40 +0000 |
commit | 572c1c6479ed34869aba57365157dbe826aabddf (patch) | |
tree | 3509e200eaed386471b5e8d3ee9a57c51634aa22 /channels/chan_agent.c | |
parent | 31a1527bae50f4a3378263d417a38799c4bdd162 (diff) |
fix bogus output from 'show agents' with no name (bug #4030)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@5474 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rwxr-xr-x | channels/chan_agent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 84819a2bf..96b83d25a 100755 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -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; |