Skip to content

Commit

Permalink
async: safety check for async ms list
Browse files Browse the repository at this point in the history
(cherry picked from commit 5b0e74c)
  • Loading branch information
miconda committed Jun 1, 2021
1 parent 4531083 commit 93dc038
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/async/async_sleep.c
Expand Up @@ -370,6 +370,10 @@ int async_ms_sleep(sip_msg_t *msg, int milliseconds, cfg_action_t *act, str *cbn
async_task_param_t *atp;
async_task_t *at;

if (_async_ms_list==NULL) {
LM_ERR("async timer list not initialized - check modparams\n");
return -1;
}
if(milliseconds <= 0) {
LM_ERR("negative or zero sleep time (%d)\n", milliseconds);
return -1;
Expand Down

0 comments on commit 93dc038

Please sign in to comment.