]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix task delete issue in scheduled task in sep threads
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 8 Jan 2013 20:22:32 +0000 (14:22 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 8 Jan 2013 20:22:32 +0000 (14:22 -0600)
src/switch_scheduler.c

index dc68fe2f5ad36fd77578b59bd4829e98ac905df4..d6f501e45372a997176044883c68f57072a1354c 100644 (file)
@@ -106,7 +106,7 @@ static int task_thread_loop(int done)
        for (tp = globals.task_list; tp; tp = tp->next) {
                if (done) {
                        tp->destroyed = 1;
-               } else {
+               } else if (!tp->destroyed) {
                        int64_t now = switch_epoch_time_now(NULL);
                        if (now >= tp->task.runtime && !tp->in_thread) {
                                int32_t diff = (int32_t) (now - tp->task.runtime);