summaryrefslogtreecommitdiff
path: root/res/res_fax.c
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-08-31 16:31:30 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-08-31 16:31:30 +0000
commitdadc749dacbb7b273a490985ebbba11d26160a50 (patch)
tree1f61d2c39953caca9b8cfb9dfd00841e9d95027a /res/res_fax.c
parent1961bb616045a1472e3c5f50c5f0f1f217671a76 (diff)
Merged revisions 334064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r334064 | mnicholson | 2011-08-31 11:31:00 -0500 (Wed, 31 Aug 2011) | 4 lines only alter the gateway_timeout when attching the gateway to a channel ASTERISK-18219 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_fax.c')
-rw-r--r--res/res_fax.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 4f2bcb0f9..e746650e5 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -3548,19 +3548,22 @@ static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *dat
const char *val = ast_skip_blanks(value);
char *timeout = strchr(val, ',');
- details->gateway_timeout = 0;
if (timeout) {
- unsigned int gwtimeout;
*timeout++ = '\0';
- if (sscanf(timeout, "%u", &gwtimeout) == 1) {
- details->gateway_timeout = gwtimeout * 1000;
- } else {
- ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
- }
}
if (ast_true(val)) {
if (details->gateway_id < 0) {
+ details->gateway_timeout = 0;
+ if (timeout) {
+ unsigned int gwtimeout;
+ if (sscanf(timeout, "%u", &gwtimeout) == 1) {
+ details->gateway_timeout = gwtimeout * 1000;
+ } else {
+ ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
+ }
+ }
+
details->gateway_id = fax_gateway_attach(chan, details);
if (details->gateway_id < 0) {
ast_log(LOG_ERROR, "Error attaching T.38 gateway to channel %s.\n", chan->name);