]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fri Aug 8 08:09:34 EDT 2008 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Tue, 12 Aug 2008 17:07:38 +0000 (17:07 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 12 Aug 2008 17:07:38 +0000 (17:07 +0000)
  * nua: fix bug #2041747 with Organization header

  Using Organization tags crashed the nua stack.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9278 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nua/check_session.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c

index bb8a062df46cd39eda163969ec8ffad3587d5e0b..3063c5e187062f7333e715dc12155932453df454 100644 (file)
@@ -1 +1 @@
-Tue Aug 12 13:07:15 EDT 2008
+Tue Aug 12 13:07:33 EDT 2008
index 57174ee9654b9377de1c7f0eda74321c701ff8ac..510ee9d6ccfc0e0058dd106988a2019ecca7fb3f 100644 (file)
@@ -60,7 +60,8 @@ static void call_setup(void)
 {
   s2_case("0.1.1", "Setup for Call Tests", "");
 
-  nua = s2_nua_setup(TAG_END());
+  nua = s2_nua_setup(SIPTAG_ORGANIZATION_STR("Pussy Galore's Flying Circus"),
+                    TAG_END());
 
   soa = soa_create(NULL, s2->root, NULL);
 
index ded0dd37aaec3e0ffecc991c93443b9a0f8d90f2..4e799a29651bdec3e8351dd7d4cc8b7eedc6853a 100644 (file)
@@ -1716,7 +1716,8 @@ int nua_server_respond(nua_server_request_t *sr, tagi_t const *tags)
                        NH_PGET(nh, user_agent)) < 0)
     ;
   else if (!sip->sip_organization && NH_PGET(nh, organization) &&
-          sip_add_dup(msg, sip, (void *)NH_PGET(nh, organization)) < 0)
+          sip_add_make(msg, sip, sip_organization_class,
+                       NH_PGET(nh, organization)) < 0)
     ;
   else if (!sip->sip_allow && NH_PGET(nh, allow) &&
           sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow)) < 0)
@@ -2561,7 +2562,7 @@ int nua_client_request_sendmsg(nua_client_request_t *cr, msg_t *msg, sip_t *sip)
     sip_add_make(msg, sip, sip_supported_class, "path");
   
   if (!sip->sip_organization && NH_PGET(nh, organization))
-    sip_add_dup(msg, sip, (sip_header_t *)NH_PGET(nh, organization));
+    sip_add_make(msg, sip, sip_organization_class, NH_PGET(nh, organization));
 
   if (!sip->sip_user_agent && NH_PGET(nh, user_agent))
     sip_add_make(msg, sip, sip_user_agent_class, NH_PGET(nh, user_agent));