fix potential seg fault in my patch that just went in, oops

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-04-15 06:55:21 +00:00
parent fdff1f69b5
commit a3168fdc23

View File

@@ -300,7 +300,7 @@ static struct agent_pvt *add_agent(char *agent, int pending)
}
strncpy(p->password, password ? password : "", sizeof(p->password) - 1);
strncpy(p->name, !ast_strlen_zero(name) ? name : "---", sizeof(p->name) - 1);
strncpy(p->name, name ? name : "", sizeof(p->name) - 1);
strncpy(p->moh, moh, sizeof(p->moh) - 1);
p->ackcall = ackcall;
p->autologoff = autologoff;