static int w_async_task_route(struct sip_msg* msg, char* rt, char* sec) { cfg_action_t *act; str rn; int ri; if(msg==NULL) return -1; if(fixup_get_svalue(msg, (gparam_t*)rt, &rn)!=0) { LM_ERR("no async route block name\n"); return -1; } ri = route_get(&main_rt, rn.s); if(ri<0) { LM_ERR("unable to find route block [%.*s]\n", rn.len, rn.s); return -1; } act = main_rt.rlist[ri]; if(act==NULL) { LM_ERR("empty action lists in route block [%.*s]\n", rn.len, rn.s); return -1; } if(async_send_task(msg, act)<0) return -1; /* force exit in config */ return 0; }
int ki_async_task_route(sip_msg_t* msg, str* rn) { cfg_action_t *act; int ri; ri = route_get(&main_rt, rn->s); if(ri<0) { LM_ERR("unable to find route block [%.*s]\n", rn->len, rn->s); return -1; } act = main_rt.rlist[ri]; if(act==NULL) { LM_ERR("empty action lists in route block [%.*s]\n", rn->len, rn->s); return -1; } if(async_send_task(msg, act)<0) return -1; /* force exit in config */ return 0; }