[Freeswitch-trunk] [commit] r12856 - in freeswitch/trunk: libs/sofia-sip/libsofia-sip-ua/nta src src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Tue Mar 31 13:51:36 PDT 2009


Author: mikej
Date: Tue Mar 31 15:51:35 2009
New Revision: 12856

Log:
linux... how did that not crash every time

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/switch_event.c

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Tue Mar 31 15:51:35 2009
@@ -3319,8 +3319,10 @@
 
   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;
 }

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Tue Mar 31 15:51:35 2009
@@ -744,6 +744,7 @@
 							  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)), 

Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c	(original)
+++ freeswitch/trunk/src/switch_event.c	Tue Mar 31 15:51:35 2009
@@ -1119,9 +1119,10 @@
 
 	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;
 			}



More information about the Freeswitch-trunk mailing list