Revision
14319
Author
anthm
Date
2009-07-22 14:14:47 -0500 (Wed, 22 Jul 2009)

Log Message

MODSOFIA-18

Modified Paths

Diff

Modified: freeswitch/trunk/src/include/private/switch_core_pvt.h (14318 => 14319)


--- freeswitch/trunk/src/include/private/switch_core_pvt.h	2009-07-22 18:44:16 UTC (rev 14318)
+++ freeswitch/trunk/src/include/private/switch_core_pvt.h	2009-07-22 19:14:47 UTC (rev 14319)
@@ -127,7 +127,7 @@
 	void *streams[SWITCH_MAX_STREAMS];
 	int stream_count;
 
-	char uuid_str[128];
+	char uuid_str[SWITCH_UUID_FORMATTED_LENGTH+1];
 	void *private_info;
 	switch_queue_t *event_queue;
 	switch_queue_t *message_queue;

Modified: freeswitch/trunk/src/include/switch_apr.h (14318 => 14319)


--- freeswitch/trunk/src/include/switch_apr.h	2009-07-22 18:44:16 UTC (rev 14318)
+++ freeswitch/trunk/src/include/switch_apr.h	2009-07-22 19:14:47 UTC (rev 14319)
@@ -521,7 +521,7 @@
 	 } switch_uuid_t;
 
 /** UUIDs are formatted as: 00112233-4455-6677-8899-AABBCCDDEEFF */
-#define SWITCH_UUID_FORMATTED_LENGTH 36
+#define SWITCH_UUID_FORMATTED_LENGTH 256
 
 #define SWITCH_MD5_DIGESTSIZE 16
 #define SWITCH_MD5_DIGEST_STRING_SIZE 33

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (14318 => 14319)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-22 18:44:16 UTC (rev 14318)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-22 19:14:47 UTC (rev 14319)
@@ -416,25 +416,22 @@
 					tech_pvt->call_id = switch_core_session_strdup(session, sip->sip_call_id->i_id);
 					switch_channel_set_variable(channel, "sip_call_id", tech_pvt->call_id);
 				}
+
 				if (tech_pvt->gateway_name) {
 					gateway = sofia_reg_find_gateway(tech_pvt->gateway_name);
 				}
+
+				if (channel && switch_channel_down(channel)) {
+					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already hungup.\n");
+					goto done;
+				}
 			} else {
-				/* too late */
+				/* we can't find the session it must be hanging up or something else, its too late to do anything with it. */
 				return;
 			}
 		}
 	}
 
-	if (session) {
-		if (channel && switch_channel_down(channel)) {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already hungup.\n");
-			goto done;
-		}
-	} else if (sofia_private && sofia_private->is_call) {
-		sofia_private->destroy_me = 22;
-	}
-
 	if (sofia_test_pflag(profile, PFLAG_AUTH_ALL) && tech_pvt && tech_pvt->key && sip) {
 		sip_authorization_t const *authorization = NULL;
 

Modified: freeswitch/trunk/src/switch_core_state_machine.c (14318 => 14319)


--- freeswitch/trunk/src/switch_core_state_machine.c	2009-07-22 18:44:16 UTC (rev 14318)
+++ freeswitch/trunk/src/switch_core_state_machine.c	2009-07-22 19:14:47 UTC (rev 14319)
@@ -332,7 +332,7 @@
 	switch_thread_id_t thread_id;
 	jmp_buf env;
 	int sig, silly = 0;
-	uint32_t new_loops = 60000000;
+	uint32_t new_loops = 60000;
 
 	if (switch_test_flag((&runtime), SCF_CRASH_PROT)) {
 		thread_id = switch_thread_self();