Skip to content

Commit

Permalink
tm: Assume ASYNC_DONE also when forcibly resuming async operations
Browse files Browse the repository at this point in the history
Fixes #1074

(cherry picked from commit 8ea9082)
  • Loading branch information
liviuchircu committed Apr 24, 2017
1 parent 645f71b commit b2edc77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/tm/async.c
Expand Up @@ -153,6 +153,7 @@ int t_resume_async(int *fd, void *param)
if(reactor_add_reader(return_code,F_SCRIPT_ASYNC,RCT_PRIO_ASYNC,(void*)ctx)<0){
LM_ERR("failed to add async FD to reactor -> act in sync mode\n");
do {
async_status = ASYNC_DONE;
return_code = ((async_resume_module*)(ctx->async.resume_f))
( return_code, &faked_req, ctx->async.resume_param );
if (async_status == ASYNC_CHANGE_FD && fd)
Expand Down Expand Up @@ -338,6 +339,7 @@ int t_handle_async(struct sip_msg *msg, struct action* a , int resume_route)
sync:
/* run the resume function */
do {
async_status = ASYNC_DONE;
return_code = ((async_resume_module*)(ctx->async.resume_f))
( fd, msg, ctx->async.resume_param );
if (async_status == ASYNC_CHANGE_FD)
Expand Down

0 comments on commit b2edc77

Please sign in to comment.