From 3556e4c2d46e8f8d8480c08f9aae049a53f3a493 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 4 Feb 2011 16:55:39 +0000 Subject: Replace ast_log(LOG_DEBUG, ...) with ast_debug() (closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_fax.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'apps/app_fax.c') diff --git a/apps/app_fax.c b/apps/app_fax.c index ce8541910..39c6ad1b6 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -17,7 +17,7 @@ spandsp res_fax ***/ - + #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") @@ -172,7 +172,7 @@ static void span_message(int level, const char *msg) } else if (level == SPAN_LOG_WARNING) { ast_log(LOG_WARNING, "%s", msg); } else { - ast_log(LOG_DEBUG, "%s", msg); + ast_debug(1, "%s", msg); } } @@ -224,13 +224,13 @@ static void phase_e_handler(t30_state_t *f, void *user_data, int result) return; } - - s->finished = 1; - + + s->finished = 1; + local_ident = S_OR(t30_get_tx_ident(f), ""); far_ident = S_OR(t30_get_rx_ident(f), ""); - pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "SUCCESS"); - pbx_builtin_setvar_helper(s->chan, "FAXERROR", NULL); + pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "SUCCESS"); + pbx_builtin_setvar_helper(s->chan, "FAXERROR", NULL); pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", far_ident); #if SPANDSP_RELEASE_DATE >= 20090220 pages_transferred = (s->direction) ? stat.pages_tx : stat.pages_rx; @@ -242,14 +242,14 @@ static void phase_e_handler(t30_state_t *f, void *user_data, int result) snprintf(buf, sizeof(buf), "%d", stat.y_resolution); pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", buf); snprintf(buf, sizeof(buf), "%d", stat.bit_rate); - pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", buf); - + pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", buf); + ast_debug(1, "Fax transmitted successfully.\n"); ast_debug(1, " Remote station ID: %s\n", far_ident); ast_debug(1, " Pages transferred: %d\n", pages_transferred); ast_debug(1, " Image resolution: %d x %d\n", stat.x_resolution, stat.y_resolution); ast_debug(1, " Transfer Rate: %d\n", stat.bit_rate); - + ast_manager_event(s->chan, EVENT_FLAG_CALL, s->direction ? "FaxSent" : "FaxReceived", "Channel: %s\r\n" @@ -400,7 +400,7 @@ static int transmit_audio(fax_session *s) /* wait up to five seconds for negotiation to complete */ unsigned int timeout = 5000; int ms; - + ast_debug(1, "Negotiating T.38 for receive on %s\n", s->chan->name); while (timeout > 0) { ms = ast_waitfor(s->chan, 1000); @@ -425,7 +425,7 @@ static int transmit_audio(fax_session *s) (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) && (inf->datalen == sizeof(t38_parameters))) { struct ast_control_t38_parameters *parameters = inf->data.ptr; - + switch (parameters->request_response) { case AST_T38_NEGOTIATED: ast_debug(1, "Negotiated T.38 for receive on %s\n", s->chan->name); @@ -670,7 +670,7 @@ static int transmit_t38(fax_session *s) res = -1; break; } - + t38_terminal_send_timeout(&t38, ast_tvdiff_us(now, last_frame) / (1000000 / 8000)); if (!res) { @@ -727,7 +727,7 @@ disable_t38: /* wait up to five seconds for negotiation to complete */ unsigned int timeout = 5000; int ms; - + ast_debug(1, "Shutting down T.38 on %s\n", s->chan->name); while (timeout > 0) { ms = ast_waitfor(s->chan, 1000); @@ -752,7 +752,7 @@ disable_t38: (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) && (inf->datalen == sizeof(t38_parameters))) { struct ast_control_t38_parameters *parameters = inf->data.ptr; - + switch (parameters->request_response) { case AST_T38_TERMINATED: ast_debug(1, "Shut down T.38 on %s\n", s->chan->name); -- cgit v1.2.3