aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_fax.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_fax.c')
-rw-r--r--apps/app_fax.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/app_fax.c b/apps/app_fax.c
index 6999da1b3..7e1e55810 100644
--- a/apps/app_fax.c
+++ b/apps/app_fax.c
@@ -349,7 +349,7 @@ static int transmit_audio(fax_session *s)
unsigned int timeout = 5000;
int ms;
- ast_log(LOG_NOTICE, "Negotiating T.38 for receive on %s\n", s->chan->name);
+ ast_debug(1, "Negotiating T.38 for receive on %s\n", s->chan->name);
while (timeout > 0) {
ms = ast_waitfor(s->chan, 1000);
if (ms < 0) {
@@ -376,9 +376,9 @@ static int transmit_audio(fax_session *s)
switch (parameters->request_response) {
case AST_T38_NEGOTIATED:
- ast_log(LOG_NOTICE, "Negotiated T.38 for receive on %s\n", s->chan->name);
- ast_free(inf);
- return 1;
+ ast_debug(1, "Negotiated T.38 for receive on %s\n", s->chan->name);
+ res = 1;
+ break;
case AST_T38_REFUSED:
ast_log(LOG_WARNING, "channel '%s' refused to negotiate T.38\n", s->chan->name);
break;
@@ -387,7 +387,11 @@ static int transmit_audio(fax_session *s)
break;
}
ast_frfree(inf);
- break;
+ if (res == 1) {
+ return 1;
+ } else {
+ break;
+ }
}
ast_frfree(inf);
}