[Freeswitch-svn] [commit] r4482 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Mar 8 11:09:57 EST 2007


Author: anthm
Date: Thu Mar  8 11:09:57 2007
New Revision: 4482

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

Log:
test patch

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 Mar  8 11:09:57 2007
@@ -915,21 +915,13 @@
 		switch_channel_t *channel = switch_core_session_get_channel(*session);
 		switch_channel_state_t state = switch_channel_get_state(channel);
 		struct private_object *tech_pvt = NULL;
-
+		uint8_t running = switch_core_session_running(*session);
 		tech_pvt = switch_core_session_get_private(*session);
-
-		if (tech_pvt) {
-			if (state < CS_HANGUP) {
-				switch_channel_hangup(channel, cause);
-			}
-			
-			if (!switch_test_flag(tech_pvt, TFLAG_READY)) {
-				if (state > CS_INIT && state < CS_HANGUP) {
-					sofia_on_hangup(*session);
-				}
-				switch_core_session_destroy(session);
-			} 
+		
+		if (running) {
+			switch_channel_hangup(channel, cause);
 		} else {
+			sofia_on_hangup(*session);
 			switch_core_session_destroy(session);
 		}
 	}



More information about the Freeswitch-svn mailing list