[Pkg-voip-commits] r5963 - /asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Fri Jul 18 09:35:49 UTC 2008


Author: tzafrir-guest
Date: Fri Jul 18 09:35:49 2008
New Revision: 5963

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5963
Log:
A less aggressiv T38-removing patch.

Modified:
    asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14

Modified: asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14?rev=5963&op=diff
==============================================================================
--- asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14 (original)
+++ asterisk-spandsp-plugins/trunk/debian/patches/app_fax_14 Fri Jul 18 09:35:49 2008
@@ -1,5 +1,5 @@
---- a/app_fax.c	2008-07-08 17:18:05.000000000 +0300
-+++ b/app_fax.c_new	2008-07-12 13:54:56.000000000 +0300
+--- trunk.orig/app_fax.c
++++ trunk/app_fax.c
 @@ -13,7 +13,6 @@
   */
  
@@ -8,7 +8,7 @@
  ***/
   
  #include "asterisk.h"
-@@ -39,8 +38,36 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
+@@ -39,8 +38,37 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
  #include "asterisk/dsp.h"
  #include "asterisk/module.h"
  #include "asterisk/manager.h"
@@ -38,6 +38,7 @@
 +	return (end.tv_sec - start.tv_sec) * (int64_t) 1000000 +
 +		end.tv_usec - start.tv_usec;
 +}
++
 +/* End of backports */
  
  static char *app_sndfax_name = "SendFAX";
@@ -45,7 +46,7 @@
  static char *app_sndfax_synopsis = "Send a FAX";
  static char *app_sndfax_desc = 
  "  SendFAX(filename[|options]):\n"
-@@ -66,6 +93,7 @@ static char *app_sndfax_desc = 
+@@ -66,6 +94,7 @@ static char *app_sndfax_desc = 
  "Returns 0 on success.\n";
  
  static char *app_rcvfax_name = "ReceiveFAX";
@@ -53,11 +54,11 @@
  static char *app_rcvfax_synopsis = "Receive a FAX";
  static char *app_rcvfax_desc = 
  "  ReceiveFAX(filename[|options]):\n"
-@@ -102,9 +130,13 @@ static char *app_rcvfax_desc = 
+@@ -102,9 +131,13 @@ static char *app_rcvfax_desc = 
  #define WATCHDOG_TOTAL_TIMEOUT	30 * 60
  #define WATCHDOG_STATE_TIMEOUT	5 * 60
  
-+#undef AST_HAS_T38_SUPPORT 
++#undef AST_HAS_T38_SUPPORT
 +
  typedef struct {
  	struct ast_channel *chan;
@@ -67,11 +68,10 @@
  	int direction;			/* Fax direction: 0 - receiving, 1 - sending */
  	int caller_mode;
  	char *file_name;
-@@ -312,7 +344,10 @@ static int transmit_audio(fax_session *s
+@@ -312,7 +345,9 @@ static int transmit_audio(fax_session *s
  	struct ast_frame *fr;
  	int last_state = 0;
  	struct timeval now, start, state_change;
-+#undef AST_HAS_T38_SUPPORT 
 +#ifdef AST_HAS_T38_SUPPORT
  	enum ast_control_t38 t38control;
 +#endif
@@ -153,15 +153,28 @@
  		}
  
  		ast_frfree(inf);
-@@ -590,6 +636,7 @@ static int transmit(fax_session *s)
+@@ -590,22 +636,28 @@ static int transmit(fax_session *s)
  		}
  	}
  
 +#ifdef AST_HAS_T38_SUPPORT
  	s->t38state = ast_channel_get_t38_state(s->chan);
  	if (s->t38state != T38_STATE_NEGOTIATED) {
++#endif
  		/* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */	
-@@ -606,6 +653,7 @@ static int transmit(fax_session *s)
+ 		res = transmit_audio(s);
+ 		if (res > 0) {
+ 			/* transmit_audio reports switchover to T38. Update t38state */
++#ifdef AST_HAS_T38_SUPPORT
+ 			s->t38state = ast_channel_get_t38_state(s->chan);
+ 			if (s->t38state != T38_STATE_NEGOTIATED) {
+ 				ast_log(LOG_ERROR, "Audio loop reports T38 switchover but t38state != T38_STATE_NEGOTIATED\n");
+ 			}
++#endif
+ 		}
++#ifdef AST_HAS_T38_SUPPORT
+ 	}
+ 
  	if (s->t38state == T38_STATE_NEGOTIATED) {
  		res = transmit_t38(s);
  	}
@@ -169,17 +182,17 @@
  
  	if (res) {
  		ast_log(LOG_WARNING, "Transmission error\n");
-@@ -714,7 +762,9 @@ static int unload_module(void)
+@@ -714,7 +766,9 @@ static int unload_module(void)
  	int res;
  
  	res = ast_unregister_application(app_sndfax_name);	
-+	res |= ast_unregister_application(app_txfax_name);	
++	res |= ast_unregister_application(app_txfax_name);
  	res |= ast_unregister_application(app_rcvfax_name);	
-+	res |= ast_unregister_application(app_rxfax_name);	
++	res |= ast_unregister_application(app_rxfax_name);
  
  	return res;
  }
-@@ -724,7 +774,9 @@ static int load_module(void)
+@@ -724,7 +778,9 @@ static int load_module(void)
  	int res ;
  
  	res = ast_register_application(app_sndfax_name, sndfax_exec, app_sndfax_synopsis, app_sndfax_desc);




More information about the Pkg-voip-commits mailing list