diff options
author | Russell Bryant <russell@russellbryant.com> | 2004-12-26 18:08:06 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2004-12-26 18:08:06 +0000 |
commit | 1866e93ff6e06be50d2a41b131f294c322175673 (patch) | |
tree | f8c068f517209653ea4feb5a4b34a0c2a608dc42 /channels | |
parent | a479a033a1c5d08cfb68995c995f2d24b8298195 (diff) |
fix to work with astobj stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5b586222f..781584d37 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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); |