[Freeswitch-svn] [commit] r11734 - freeswitch/trunk/src/mod/applications/mod_fax

FreeSWITCH SVN mrene at freeswitch.org
Tue Feb 10 14:00:39 PST 2009


Author: mrene
Date: Tue Feb 10 16:00:39 2009
New Revision: 11734

Log:
Dont hangup after sending/receiving faxes

Modified:
   freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c

Modified: freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c	Tue Feb 10 16:00:39 2009
@@ -88,6 +88,8 @@
 
 	int tx_page_start;
 	int tx_page_end;
+	
+	int done;
 
 	/* UNUSED AT THE MOMENT
 	   int          enable_t38_reinvite;
@@ -246,7 +248,9 @@
 		switch_safe_free(tmp);
 	}
 
-switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+	/* switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); */
+	
+	pvt->done = 1;
 
 	/*
 	TODO Fire events
@@ -628,7 +632,7 @@
 		/* read new audio frame from the channel */
 		status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
 
-		if (!SWITCH_READ_ACCEPTABLE(status)) {
+		if (!SWITCH_READ_ACCEPTABLE(status) || pvt->done) {
 			/* Our duty is over */
 			goto done;
 		}



More information about the Freeswitch-svn mailing list