Revision
16538
Author
gmaruzz
Date
2010-01-29 09:51:41 -0600 (Fri, 29 Jan 2010)

Log Message

skypiax: timing on closing audio, mutexing TFLAG_BREAK

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c (16537 => 16538)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	2010-01-28 22:30:34 UTC (rev 16537)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/mod_skypiax.c	2010-01-29 15:51:41 UTC (rev 16538)
@@ -599,7 +599,7 @@
 	switch (sig) {
 	case SWITCH_SIG_KILL:
 		DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
-		//switch_mutex_lock(tech_pvt->flag_mutex);
+		switch_mutex_lock(tech_pvt->flag_mutex);
 		switch_clear_flag(tech_pvt, TFLAG_IO);
 		switch_clear_flag(tech_pvt, TFLAG_VOICE);
 		switch_set_flag(tech_pvt, TFLAG_HANGUP);
@@ -615,14 +615,14 @@
 			ERRORA("FYI %s CHANNEL in %d state got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel), switch_channel_get_state(channel));
 			channel_on_hangup(session);
 		}
-		//switch_mutex_unlock(tech_pvt->flag_mutex);
+		switch_mutex_unlock(tech_pvt->flag_mutex);
 		break;
 	case SWITCH_SIG_BREAK:
 		DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_BREAK\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
 		//switch_set_flag(tech_pvt, TFLAG_BREAK);
-		//switch_mutex_lock(tech_pvt->flag_mutex);
+		switch_mutex_lock(tech_pvt->flag_mutex);
 		switch_set_flag(tech_pvt, TFLAG_BREAK);
-		//switch_mutex_unlock(tech_pvt->flag_mutex);
+		switch_mutex_unlock(tech_pvt->flag_mutex);
 		break;
 	default:
 		break;

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (16537 => 16538)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2010-01-28 22:30:34 UTC (rev 16537)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2010-01-29 15:51:41 UTC (rev 16538)
@@ -909,14 +909,14 @@
 				len = skypiax_pipe_write(tech_pvt->audiopipe_cli[1], kill_cli_buff, kill_cli_size);
 
 				tech_pvt->flag_audio_cli = 1;	//let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
-				skypiax_sleep(200);
+				skypiax_sleep(2000);
 				tech_pvt->flag_audio_srv = 1;	//let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
-				skypiax_sleep(200);
+				skypiax_sleep(2000);
 				tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
 				tech_pvt->flag_audio_cli = 1;	//let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
-				skypiax_sleep(200);
+				skypiax_sleep(2000);
 				tech_pvt->flag_audio_srv = 1;	//let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
-				skypiax_sleep(200);
+				skypiax_sleep(2000);
 				DEBUGA_SKYPE("Skype incoming audio GONE\n", SKYPIAX_P_LOG);
 				skypiax_close_socket(fd);
 			}