mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
fix bogus output from 'show agents' with no name (bug #4030)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -193,12 +193,12 @@ static struct agent_pvt *add_agent(char *agent, int pending)
|
|||||||
if ((password = strchr(tmp, ','))) {
|
if ((password = strchr(tmp, ','))) {
|
||||||
*password = '\0';
|
*password = '\0';
|
||||||
password++;
|
password++;
|
||||||
while (*password < 33) password++;
|
while (*password && *password < 33) password++;
|
||||||
}
|
}
|
||||||
if (password && (name = strchr(password, ','))) {
|
if (password && (name = strchr(password, ','))) {
|
||||||
*name = '\0';
|
*name = '\0';
|
||||||
name++;
|
name++;
|
||||||
while (*name < 33) name++;
|
while (*name && *name < 33) name++;
|
||||||
}
|
}
|
||||||
prev=NULL;
|
prev=NULL;
|
||||||
p = agents;
|
p = agents;
|
||||||
|
Reference in New Issue
Block a user