[Freeswitch-svn] [commit] r9949 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Fri Oct 10 19:09:15 EDT 2008


Author: anthm
Date: Fri Oct 10 19:09:15 2008
New Revision: 9949

Modified:
   freeswitch/trunk/src/switch_rtp.c

Log:
tweak

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Fri Oct 10 19:09:15 2008
@@ -975,14 +975,15 @@
 
 SWITCH_DECLARE(void) switch_rtp_break(switch_rtp_t *rtp_session)
 {
-	int o = 42;
-	switch_size_t len = sizeof(o);
-
 	switch_assert(rtp_session != NULL);
 	switch_mutex_lock(rtp_session->flag_mutex);
+	switch_set_flag(rtp_session, SWITCH_RTP_FLAG_BREAK);
+
 	if (rtp_session->sock_input) {
-		switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
-		switch_socket_sendto(rtp_session->sock_input, rtp_session->local_addr, 0, (void *) &o, &len);
+		char o[8] = "PING...";
+		switch_size_t len = sizeof(o);
+		
+		switch_socket_sendto(rtp_session->sock_input, rtp_session->local_addr, 0, (void *) o, &len);
 	}
 	switch_mutex_unlock(rtp_session->flag_mutex);
 }



More information about the Freeswitch-svn mailing list