]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed May 7 15:54:41 EDT 2008 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 9 May 2008 17:47:20 +0000 (17:47 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 9 May 2008 17:47:20 +0000 (17:47 +0000)
  * 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

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nua/outbound.c

index bf08cb30bbb3e66509485e333850ce8d9125f93a..766f924c79e31f56d9f2f4b0c08e6cfd1dae4ea7 100644 (file)
@@ -1 +1 @@
-Fri May  9 13:46:29 EDT 2008
+Fri May  9 13:47:15 EDT 2008
index 1d2244e5cf42532eb7270784f85ca8b4a7df15af..6778662b6d957f51c75d6058f0d18c5d4282b85c 100644 (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;