]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix timeout feature
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 27 May 2010 21:55:20 +0000 (16:55 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 27 May 2010 21:55:20 +0000 (16:55 -0500)
src/mod/applications/mod_fax/mod_fax.c

index 4dd062a0dc5c1d8b541b91fc985d69dd7b3186f6..f1931c47562bfea6bcae3f92ccd6b3b19341800f 100644 (file)
@@ -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));
         }