mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
try to use clock_gettime to make sure we don't care if the system time changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7165 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -899,7 +899,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
|
||||
}
|
||||
|
||||
time(&start);
|
||||
switch_timestamp(&start);
|
||||
|
||||
for (;;) {
|
||||
uint32_t valid_channels = 0;
|
||||
@@ -922,7 +922,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
goto notready;
|
||||
}
|
||||
|
||||
if ((time(NULL) - start) > (time_t) timelimit_sec) {
|
||||
if ((switch_timestamp(NULL) - start) > (time_t) timelimit_sec) {
|
||||
to++;
|
||||
idx = IDX_CANCEL;
|
||||
goto notready;
|
||||
@@ -1036,7 +1036,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
}
|
||||
|
||||
// When the AND operator is being used, and fail_on_single_reject is set, a hangup indicates that the call should fail.
|
||||
if ((to = (uint8_t) ((time(NULL) - start) >= (time_t) timelimit_sec))
|
||||
if ((to = (uint8_t) ((switch_timestamp(NULL) - start) >= (time_t) timelimit_sec))
|
||||
|| (fail_on_single_reject && hups)) {
|
||||
idx = IDX_CANCEL;
|
||||
goto notready;
|
||||
|
Reference in New Issue
Block a user