diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-27 23:49:44 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-27 23:49:44 +0000 |
commit | 0d346196f902203b34c480881c27367ae49b522d (patch) | |
tree | b25ed7eb6c5b783d90d166a2ead302152d031526 /channels | |
parent | 044fafcb98cc900ca09e01d624abf0d756995858 (diff) |
Issue #6736 - use flags for OPTIONs messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15382 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | 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 5ad3affed..c3b7f9e2c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5584,7 +5584,7 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth, p->sa.sin_port = htons(r->portno); else /* Set registry port to the port set from the peer definition/srv or default */ r->portno = p->sa.sin_port; - ast_set_flag(p, SIP_OUTGOING); /* Registration is outgoing call */ + ast_set_flag(&p->flags[0], SIP_OUTGOING); /* Registration is outgoing call */ r->call=p; /* Save pointer to SIP packet */ p->registry = ASTOBJ_REF(r); /* Add pointer to registry in packet */ if (!ast_strlen_zero(r->secret)) /* Secret (password) */ @@ -11668,6 +11668,7 @@ static int sip_poke_noanswer(void *data) static int sip_poke_peer(struct sip_peer *peer) { struct sip_pvt *p; + if (!peer->maxms || !peer->addr.sin_addr.s_addr) { /* IF we have no IP, or this isn't to be monitored, return imeediately after clearing things out */ @@ -11688,8 +11689,10 @@ static int sip_poke_peer(struct sip_peer *peer) memcpy(&p->sa, &peer->addr, sizeof(p->sa)); memcpy(&p->recv, &peer->addr, sizeof(p->sa)); + ast_copy_flags(&peer->flags[0], &global_flags[0], SIP_FLAGS_TO_COPY); + ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY); - /* Send options to peer's fullcontact */ + /* Send OPTIONs to peer's fullcontact */ if (!ast_strlen_zero(peer->fullcontact)) ast_string_field_set(p, fullcontact, peer->fullcontact); |