let sched_cancel operate on both task id and group id

This commit is contained in:
Anthony Minessale 2013-07-25 14:53:11 -05:00
parent 3d9e9713b8
commit 64af870bef
1 changed files with 10 additions and 1 deletions

View File

@ -1343,8 +1343,17 @@ SWITCH_STANDARD_APP(sched_cancel_function)
if (zstr(group)) {
group = switch_core_session_get_uuid(session);
}
if (switch_is_digit_string(group)) {
int64_t tmp;
tmp = (uint32_t) atoi(group);
if (tmp > 0) {
switch_scheduler_del_task_id((uint32_t) tmp);
}
} else {
switch_scheduler_del_task_group(group);
}
}
static void base_set (switch_core_session_t *session, const char *data, switch_stack_t stack)
{