[Freeswitch-svn] [commit] r3389 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Nov 16 16:20:00 EST 2006


Author: anthm
Date: Thu Nov 16 16:20:00 2006
New Revision: 3389

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/switch_log.c

Log:
update

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Nov 16 16:20:00 2006
@@ -167,7 +167,8 @@
 	TFLAG_XFER = (1 << 19),
 	TFLAG_NOMEDIA = (1 << 20),
 	TFLAG_BUGGY_2833 = (1 << 21),
-	TFLAG_SIP_HOLD = (1 << 22)
+	TFLAG_SIP_HOLD = (1 << 22),
+	TFLAG_RWLOCK = (1 << 23)
 } TFLAGS;
 
 static struct {
@@ -2754,7 +2755,12 @@
 		break;
 	case nua_callstate_terminated: 
 		if (session) {
+			if (switch_test_flag(tech_pvt, TFLAG_RWLOCK)) {
+				switch_core_session_rwunlock(session);
+				switch_clear_flag(tech_pvt, TFLAG_RWLOCK);
+			}
 			if (!switch_test_flag(tech_pvt, TFLAG_BYE)) {
+
 				switch_set_flag_locked(tech_pvt, TFLAG_BYE);
 				if (switch_test_flag(tech_pvt, TFLAG_NOHUP)) {
 					switch_clear_flag_locked(tech_pvt, TFLAG_NOHUP);
@@ -3977,7 +3983,8 @@
 			}
 
 			attach_private(session, profile, tech_pvt, username);
-
+			switch_core_session_read_lock(session);
+			switch_set_flag(tech_pvt, TFLAG_RWLOCK);
 			channel = switch_core_session_get_channel(session);
 			switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
 			set_chat_hash(tech_pvt, sip);

Modified: freeswitch/trunk/src/switch_log.c
==============================================================================
--- freeswitch/trunk/src/switch_log.c	(original)
+++ freeswitch/trunk/src/switch_log.c	Thu Nov 16 16:20:00 2006
@@ -238,6 +238,8 @@
 					node->content = content;
 					node->timestamp = now;
 					switch_queue_push(LOG_QUEUE, node);
+				} else {
+					free(data);
 				}
 			} 
 		}



More information about the Freeswitch-svn mailing list