[asterisk-addons-commits] qwell: branch 1.6.0 r589 - in /branches/1.6.0: ./ Makefile apps/app_fax.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Mon May 5 11:12:06 CDT 2008


Author: qwell
Date: Mon May  5 11:12:05 2008
New Revision: 589

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=589
Log:
Merged revisions 588 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-addons/trunk

........
r588 | qwell | 2008-05-05 11:11:10 -0500 (Mon, 05 May 2008) | 9 lines

Make --enable-dev-mode actually work.

Fix app_fax build to not give warnings (which are errors when dev-mode actually works).

(closes issue #12579)
Reported by: IgorG
Patches:
      addons_dev_mode.v2.diff uploaded by IgorG (license 20)

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/Makefile
    branches/1.6.0/apps/app_fax.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Mon May  5 11:12:05 2008
@@ -1,1 +1,1 @@
-/trunk:540-559,575,579,583,586
+/trunk:540-559,575,579,583,586,588

Modified: branches/1.6.0/Makefile
URL: http://svn.digium.com/view/asterisk-addons/branches/1.6.0/Makefile?view=diff&rev=589&r1=588&r2=589
==============================================================================
--- branches/1.6.0/Makefile (original)
+++ branches/1.6.0/Makefile Mon May  5 11:12:05 2008
@@ -28,10 +28,6 @@
 # Overwite config files on "make samples"
 OVERWRITE:=y
 
-ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security -Wformat=2
-endif
-
 # If the file .asteriskaddons.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
 # a new version of Asterisk-addons, you don't have to run menuselect to set them.
@@ -53,6 +49,10 @@
 
 ifneq ($(wildcard makeopts),)
   include makeopts
+endif
+
+ifeq ($(AST_DEVMODE),yes)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security -Wformat=2
 endif
 
 ifeq ($(OSARCH),SunOS)

Modified: branches/1.6.0/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.6.0/apps/app_fax.c?view=diff&rev=589&r1=588&r2=589
==============================================================================
--- branches/1.6.0/apps/app_fax.c (original)
+++ branches/1.6.0/apps/app_fax.c Mon May  5 11:12:05 2008
@@ -114,12 +114,13 @@
 
 static void span_message(int level, const char *msg)
 {
-	if (level == SPAN_LOG_ERROR)
-		ast_log(LOG_ERROR, msg);
-	else if (level == SPAN_LOG_WARNING)
-		ast_log(LOG_WARNING, msg);
-	else
-		ast_log(LOG_DEBUG, msg);
+	if (level == SPAN_LOG_ERROR) {
+		ast_log(LOG_ERROR, "%s", msg);
+	} else if (level == SPAN_LOG_WARNING) {
+		ast_log(LOG_WARNING, "%s", msg);
+	} else {
+		ast_log(LOG_DEBUG, "%s", msg);
+	}
 }
 
 static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
@@ -302,16 +303,11 @@
 	int res = -1;
 	int original_read_fmt = AST_FORMAT_SLINEAR;
 	int original_write_fmt = AST_FORMAT_SLINEAR;
-	int len;
-	int samples;
 	fax_state_t fax;
 	struct ast_dsp *dsp = NULL;
 	int detect_tone = 0;
 	struct ast_frame *inf = NULL;
-	struct ast_frame outf;
 	struct ast_frame *fr;
-	uint8_t buffer[AST_FRIENDLY_OFFSET + MAX_SAMPLES * sizeof(uint16_t)];
-	int16_t *buf = (int16_t *) (buffer + AST_FRIENDLY_OFFSET);
 	int last_state = 0;
 	struct timeval now, start, state_change;
 	enum ast_control_t38 t38control;
@@ -475,8 +471,6 @@
 static int transmit_t38(fax_session *s)
 {
 	int res = 0;
-	int len;
-	int samples;
 	t38_terminal_state_t t38;
 	struct ast_frame *inf = NULL;
 	int last_state = 0;




More information about the asterisk-addons-commits mailing list