Skip to content

Commit

Permalink
Set the current transaction to NULL when adding FD to reactor for asy…
Browse files Browse the repository at this point in the history
…nc jump

(cherry picked from commit eeff37f)
  • Loading branch information
vladpaiu committed Apr 15, 2015
1 parent fe9281d commit 15ab1dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/tm/async.c
Expand Up @@ -212,6 +212,9 @@ int t_handle_async(struct sip_msg *msg, struct action* a , int resume_route)
ctx->t = t;
ctx->kr = get_kr();

current_processing_ctx = NULL;
set_t(NULL);

/* place the FD + resume function (as param) into reactor */
if (reactor_add_reader( fd, F_SCRIPT_ASYNC, RCT_PRIO_ASYNC, (void*)ctx)<0 ) {
LM_ERR("failed to add async FD to reactor -> act in sync mode\n");
Expand All @@ -220,7 +223,6 @@ int t_handle_async(struct sip_msg *msg, struct action* a , int resume_route)
}

/* done, break the script */
current_processing_ctx = NULL;
return 0;

sync:
Expand Down

0 comments on commit 15ab1dd

Please sign in to comment.