]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
linux... how did that not crash every time
authorMichael Jerris <mike@jerris.com>
Tue, 31 Mar 2009 20:51:35 +0000 (20:51 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 31 Mar 2009 20:51:35 +0000 (20:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12856 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/libsofia-sip-ua/nta/nta.c
src/mod/endpoints/mod_sofia/sofia.c
src/switch_event.c

index 362d9ae960be9f4795f91916fc46010fa1f6a936..f1ca960cf952c14adf14d16c6de49409633bd87f 100644 (file)
@@ -3319,8 +3319,10 @@ msg_t *nta_msg_create_for_transport(nta_agent_t *agent, int flags,
 
   msg_maxsize(msg, agent->sa_maxsize);
 
-  if (agent->sa_preload)
-    su_home_preload(msg_home(msg), 1, dlen + agent->sa_preload);
+  if (1 || agent->sa_preload) {
+         isize_t preload = (dlen + agent->sa_preload + 1023) & ~1023;
+         su_home_preload(msg_home(msg), 1, preload);
+  }
 
   return msg;
 }
index 28f3f03554a13795b50981e5d22e5a93e6552dbc..52ee28a7635c5145bcf8ac6dd29a554f6cbdd324 100644 (file)
@@ -744,6 +744,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
                                                          sofia_event_callback, /* Callback for processing events */
                                                          profile,      /* Additional data to pass to callback */
                                                          NUTAG_URL(profile->bindurl),
+                                                         NTATAG_PRELOAD(2048),
                                                          TAG_IF(!strchr(profile->sipip, ':'), SOATAG_AF(SOA_AF_IP4_ONLY)),
                                                          TAG_IF(strchr(profile->sipip, ':'), SOATAG_AF(SOA_AF_IP6_ONLY)),
                                                          TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), NUTAG_SIPS_URL(profile->tls_bindurl)), 
index c94ddc161ccff3eadc591ab3c1ac951f846316b8..40e0f5c98a2b7c5fa1c3c18d8e7673ebf62deb3a 100644 (file)
@@ -1119,9 +1119,10 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(const char *file, con
 
        for (;;) {
                for (index = (*event)->priority; index < 3; index++) {
+                       int was = (*event)->priority;
                        if (switch_queue_trypush(EVENT_QUEUE[index], *event) == SWITCH_STATUS_SUCCESS) {
-                               if (index != (*event)->priority) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "queued event at a lower priority!\n");
+                               if (index != was) {
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "queued event at a lower priority %d/%d!\n", index, was);
                                }
                                goto end;
                        }