From e2e9765c2c4e1b9791c66b9060e8879295cb7d80 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 27 May 2010 16:55:20 -0500 Subject: [PATCH] fix timeout feature --- src/mod/applications/mod_fax/mod_fax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_fax/mod_fax.c b/src/mod/applications/mod_fax/mod_fax.c index 4dd062a0dc..f1931c4756 100644 --- a/src/mod/applications/mod_fax/mod_fax.c +++ b/src/mod/applications/mod_fax/mod_fax.c @@ -1853,7 +1853,7 @@ static switch_bool_t t38_gateway_start(switch_core_session_t *session, const cha SWITCH_STANDARD_APP(t38_gateway_function) { switch_channel_t *channel = switch_core_session_get_channel(session); - time_t timeout = 20; + time_t timeout = switch_epoch_time_now(NULL) + 20; const char *var; if (zstr(data) || strcasecmp(data, "self")) { @@ -1865,7 +1865,7 @@ SWITCH_STANDARD_APP(t38_gateway_function) if ((var = switch_channel_get_variable(channel, "t38_gateway_detect_timeout"))) { long to = atol(var); if (to > -1) { - timeout = (time_t) to; + timeout = (time_t) (switch_epoch_time_now(NULL) + to); } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s invalid timeout value.\n", switch_channel_get_name(channel)); }