diff --git a/src/modules/async/async_mod.c b/src/modules/async/async_mod.c index d039ea0bd16..88affb3bbd3 100644 --- a/src/modules/async/async_mod.c +++ b/src/modules/async/async_mod.c @@ -28,6 +28,7 @@ #include "../../core/sr_module.h" #include "../../core/dprint.h" #include "../../core/ut.h" +#include "../../core/fmsg.h" #include "../../core/pvar.h" #include "../../core/timer_proc.h" #include "../../core/route_struct.h" @@ -153,6 +154,11 @@ static int w_async_sleep(sip_msg_t *msg, char *sec, char *str2) if(msg == NULL) return -1; + if(faked_msg_match(msg)) { + LM_ERR("invalid usage for faked message\n"); + return -1; + } + if(async_workers <= 0) { LM_ERR("no async mod timer workers (modparam missing?)\n"); return -1; @@ -210,6 +216,11 @@ int ki_async_route(sip_msg_t *msg, str *rn, int s) int ri; sr_kemi_eng_t *keng = NULL; + if(faked_msg_match(msg)) { + LM_ERR("invalid usage for faked message\n"); + return -1; + } + keng = sr_kemi_eng_get(); if(keng == NULL) { ri = route_lookup(&main_rt, rn->s); @@ -285,6 +296,11 @@ int ki_async_task_route(sip_msg_t *msg, str *rn) int ri; sr_kemi_eng_t *keng = NULL; + if(faked_msg_match(msg)) { + LM_ERR("invalid usage for faked message\n"); + return -1; + } + keng = sr_kemi_eng_get(); if(keng == NULL) { ri = route_lookup(&main_rt, rn->s);