[Freeswitch-branches] [commit] r11349 - freeswitch/branches/ctrix/mod_airpe

FreeSWITCH SVN ctrix at freeswitch.org
Wed Jan 21 17:03:06 PST 2009


Author: ctrix
Date: Wed Jan 21 19:03:06 2009
New Revision: 11349

Log:
More fixes. Time to sleep.

Modified:
   freeswitch/branches/ctrix/mod_airpe/INSTALL
   freeswitch/branches/ctrix/mod_airpe/README
   freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c
   freeswitch/branches/ctrix/mod_airpe/mod_airpe.c

Modified: freeswitch/branches/ctrix/mod_airpe/INSTALL
==============================================================================
--- freeswitch/branches/ctrix/mod_airpe/INSTALL	(original)
+++ freeswitch/branches/ctrix/mod_airpe/INSTALL	Wed Jan 21 19:03:06 2009
@@ -1,2 +1,3 @@
 
-Nothing to read here as well.
+Nothing to read here.
+See README.

Modified: freeswitch/branches/ctrix/mod_airpe/README
==============================================================================
--- freeswitch/branches/ctrix/mod_airpe/README	(original)
+++ freeswitch/branches/ctrix/mod_airpe/README	Wed Jan 21 19:03:06 2009
@@ -1,2 +1,4 @@
 
-Nothing to read, sorry
+Nothing to read, sorry.
+
+

Modified: freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c
==============================================================================
--- freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c	(original)
+++ freeswitch/branches/ctrix/mod_airpe/airpe_if_common.c	Wed Jan 21 19:03:06 2009
@@ -189,8 +189,8 @@
     /*
     Those commands are outdated and shouldn't be used
     Documented so that no one adds them.
-    airpe_cmd_write(p, "SET AGC OFF");
-    airpe_cmd_write(p, "SET AEC OFF");
+    airpe_cmd_write(airpe, "SET AGC OFF");
+    airpe_cmd_write(airpe, "SET AEC OFF");
     */
     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "airpe client %s: Originating to client %s\n", airpe->name, dest);
 
@@ -267,9 +267,11 @@
         if ( rv == SWITCH_STATUS_SUCCESS ) {
 	    airpe->audio_in_active_socket = inbound_socket;
 	    switch_sleep(100000);
+	    return SWITCH_STATUS_SUCCESS;
 	}
 	else {
-	    return SWITCH_STATUS_FALSE;
+	    switch_sleep(100000);
+	    return SWITCH_STATUS_SUCCESS;
 	}
     }
 
@@ -278,6 +280,10 @@
 
     rv = switch_socket_send(airpe->audio_in_active_socket, mbuf, &mlen);
 
+    if ( mlen == 0 ) {
+	return SWITCH_STATUS_SUCCESS;
+    }
+
     return rv;
 }
 
@@ -305,8 +311,10 @@
         if ( rv == SWITCH_STATUS_SUCCESS ) {
 	    airpe->audio_out_active_socket = inbound_socket;
 	    switch_sleep(100000);
+	    return SWITCH_STATUS_SUCCESS;
 	}
 	else {
+	    switch_sleep(100000);
 	    return SWITCH_STATUS_SUCCESS;
 	}
     }
@@ -479,7 +487,8 @@
 		snprintf(buf, sizeof(buf), "ALTER CALL %d STOP_VIDEO_RECEIVE", callid );
 		airpe_cmd_write(airpe, buf);
 */
-	        switch_channel_mark_answered(channel);
+	        switch_channel_answer(channel);
+	        /*switch_channel_mark_answered(channel);*/
 	    }
 	}
 	else if ( !strncmp(status, "FINISHED", strlen("FINISHED")) ) {

Modified: freeswitch/branches/ctrix/mod_airpe/mod_airpe.c
==============================================================================
--- freeswitch/branches/ctrix/mod_airpe/mod_airpe.c	(original)
+++ freeswitch/branches/ctrix/mod_airpe/mod_airpe.c	Wed Jan 21 19:03:06 2009
@@ -445,13 +445,12 @@
     assert(tech_pvt);
 
     tech_pvt->read_frame.flags = SFF_NONE;
+    tech_pvt->read_frame.datalen = 0;
 
     *frame = NULL;
     if ( airpe_audio_read(tech_pvt) != SWITCH_STATUS_SUCCESS) {
-/*
 	if ( tech_pvt->airpe->debug )
 	    ADEBUG("airpe_audio_read ERROR\n");
-*/
 	return SWITCH_STATUS_FALSE;
     }
 
@@ -499,7 +498,6 @@
 
     if ( rv != SWITCH_STATUS_SUCCESS ) {
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "airpe_audio_write ERROR\n");
-	return SWITCH_STATUS_FALSE;
     }
 
     return rv;



More information about the Freeswitch-branches mailing list