Wed May 7 15:54:41 EDT 2008 Pekka Pessi <first.last@nokia.com>

* outbound.c: fix sofia-sip.org bug #1930055
  
  If the initial REGISTER was not challenged, the natted contact did not get
  unregistered.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8338 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-09 17:47:20 +00:00
parent 439ad8460e
commit 8eb03e0895
2 changed files with 10 additions and 2 deletions

View File

@ -1 +1 @@
Fri May 9 13:46:29 EDT 2008
Fri May 9 13:47:15 EDT 2008

View File

@ -97,7 +97,7 @@ struct outbound {
/** Source of Contact header */
unsigned ob_by_stack:1;
/** Self-generated contacts */
unsigned ob_contacts:1, :0;
unsigned ob_contacts:1;
/* The registration state machine. */
/** Initial REGISTER containing ob_rcontact has been sent */
@ -336,6 +336,14 @@ int outbound_get_contacts(outbound_t *ob,
if (ob) {
if (ob->ob_contacts)
*return_current_contact = ob->ob_rcontact;
else {
sip_contact_t *contact = *return_current_contact;
if (contact) {
if (ob->ob_rcontact)
msg_header_free_all(ob->ob_home, (msg_header_t*)ob->ob_rcontact);
ob->ob_rcontact = sip_contact_dup(ob->ob_home, contact);
}
}
*return_previous_contact = ob->ob_previous;
}
return 0;