diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2009-07-27 21:43:36 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2009-07-27 21:43:36 +0000 |
commit | 7c5f20e46b049ac466e7afb516caca30fb28f064 (patch) | |
tree | 95326103faa3e92510c071956e9d79078d9d07b2 /apps/app_fax.c | |
parent | b6b3fed0c78f4c3b500adcccffe44f0d6243121a (diff) |
Cleanup T.38 negotiation changes.
Convert LOG_NOTICE messages about T.38 negotiation in debug level 1 messages,
clean up some looping logic, and correct an improper use of ast_free() for
freeing an ast_frame.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_fax.c')
-rw-r--r-- | apps/app_fax.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/app_fax.c b/apps/app_fax.c index c386b7dab..87ef18ed9 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -394,7 +394,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) { @@ -421,9 +421,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; @@ -432,7 +432,11 @@ static int transmit_audio(fax_session *s) break; } ast_frfree(inf); - break; + if (res == 1) { + return 1; + } else { + break; + } } ast_frfree(inf); } |