fix to work with astobj stuff

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant 2004-12-26 18:08:06 +00:00
parent a479a033a1
commit 1866e93ff6
1 changed files with 5 additions and 2 deletions

View File

@ -8377,8 +8377,9 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v)
user = (struct sip_user *)malloc(sizeof(struct sip_user));
if (user) {
suserobjs++;
memset(user, 0, sizeof(struct sip_user));
suserobjs++;
ASTOBJ_INIT(user);
strncpy(user->name, name, sizeof(user->name)-1);
oldha = user->ha;
user->ha = NULL;
@ -8521,8 +8522,10 @@ static struct sip_peer *temp_peer(char *name)
if (!peer)
return NULL;
apeerobjs++;
memset(peer, 0, sizeof(struct sip_peer));
apeerobjs++;
ASTOBJ_INIT(peer);
peer->expire = -1;
peer->pokeexpire = -1;
strncpy(peer->name, name, sizeof(peer->name)-1);