List Info

Thread: r2590 - openpbx/trunk/apps




r2590 - openpbx/trunk/apps
user name
2007-04-08 01:14:58
Author: ctrix
Date: 2007-04-08 02:14:58 -0400 (Sun, 08 Apr 2007)
New Revision: 2590

Modified:
   openpbx/trunk/apps/app_rxfax.c
   openpbx/trunk/apps/app_txfax.c
Log:
Fixes. Thanks to rani (closes #288)

Modified: openpbx/trunk/apps/app_rxfax.c
============================================================
=======
--- openpbx/trunk/apps/app_rxfax.c	2007-04-05 09:51:36 UTC
(rev 2589)
+++ openpbx/trunk/apps/app_rxfax.c	2007-04-08 06:14:58 UTC
(rev 2590)
 -437,6
+437,9 
             break;
 	}
 
+        if ((fax->current_rx_type == T30_MODEM_DONE)  ||
 (fax->current_tx_type == T30_MODEM_DONE))
+            break;
+
         inf = opbx_read(chan);
         if (inf == NULL) {
 	    ready = 0;
 -509,8
+512,13 
 	    }
 	}
         opbx_fr_free(inf);
+	inf = NULL;
     }
 
+    if (inf) {
+        opbx_fr_free(inf);
+	inf = NULL;
+    }
     // This is activated when we don't receive any frame
for
     // X seconds (see above)... we are probably on ZAP or
talking without UDPTL to
     // another openpbx box
 -531,6
+539,9 
         	break;
 	    }
 
+    	    if ((fax->current_rx_type == T30_MODEM_DONE) 
||  (fax->current_tx_type == T30_MODEM_DONE))
+        	break;
+
     	    inf = opbx_read(chan);
     	    if (inf == NULL) {
 		ready = 0;
 -563,8
+574,15 
 		}
 	    }
 
+    	    opbx_fr_free(inf);
+	    inf = NULL;
 	}
 
+	if (inf) {
+    	    opbx_fr_free(inf);
+	    inf = NULL;
+	}
+
 	opbx_generator_deactivate(chan);
 
     }

Modified: openpbx/trunk/apps/app_txfax.c
============================================================
=======
--- openpbx/trunk/apps/app_txfax.c	2007-04-05 09:51:36 UTC
(rev 2589)
+++ openpbx/trunk/apps/app_txfax.c	2007-04-08 06:14:58 UTC
(rev 2590)
 -395,6
+395,9 
             break;
 	}
 
+        if ((fax->current_rx_type == T30_MODEM_DONE)  ||
 (fax->current_tx_type == T30_MODEM_DONE))
+            break;
+
         inf = opbx_read(chan);
         if (inf == NULL) {
 	    ready = 0;
 -450,8
+453,14 
 	    }
 	}
         opbx_fr_free(inf);
+        inf = NULL;
     }
 
+    if (inf) {
+        opbx_fr_free(inf);
+        inf = NULL;
+    }
+
     if (generator_mode) {
 	// This is activated when we don't receive any frame for
 	// X seconds (see above)... we are probably on ZAP or
talking without UDPTL to
 -468,6
+477,9 
         	break;
 	    }
 
+    	    if ((fax->current_rx_type == T30_MODEM_DONE) 
||  (fax->current_tx_type == T30_MODEM_DONE))
+        	break;
+
     	    inf = opbx_read(chan);
     	    if (inf == NULL) {
 		ready = 0;
 -482,8
+494,14 
 		}
 	    }
 
+    	    opbx_fr_free(inf);
+	    inf = NULL;
 	}
 
+	if (inf) {
+    	    opbx_fr_free(inf);
+	    inf = NULL;
+	}
 	opbx_generator_deactivate(chan);
 
     }

_______________________________________________
Openpbx-svn mailing list
Openpbx-svnopenpbx.org
http://lists.openpbx.org/mailman/listinfo/openpbx-svn

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )