Skip to content

Commit

Permalink
Fix async() statement - run it as sync if not in request route
Browse files Browse the repository at this point in the history
(cherry picked from commit fb1240c)
  • Loading branch information
bogdan-iancu committed Mar 30, 2017
1 parent a603e2a commit 4023a5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/tm/async.c
Expand Up @@ -279,6 +279,11 @@ int t_handle_async(struct sip_msg *msg, struct action* a , int resume_route)
goto sync;
}

if (route_type!=REQUEST_ROUTE) {
LM_DBG("async detected in non-request route, switching to sync\n");
goto sync;
}

if ( (ctx=shm_malloc(sizeof(async_ctx)))==NULL) {
LM_ERR("failed to allocate new ctx\n");
goto sync;
Expand Down

0 comments on commit 4023a5d

Please sign in to comment.