Module: kamailio Branch: master Commit: 82593a09f8ef6d53e7e88238c057bbcdd9ab287b URL: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b
Author: Xenofon Karamanos <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2024-02-02T10:56:41+01:00 core: properly handle drop() action for kemi engines - GH #3718 --- Modified: src/core/onsend.c --- Diff: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b.diff Patch: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b.patch --- diff --git a/src/core/onsend.c b/src/core/onsend.c index a4d81781de7..84186cd67ed 100644 --- a/src/core/onsend.c +++ b/src/core/onsend.c @@ -87,7 +87,18 @@ int run_onsend(sip_msg_t *orig_msg, dest_info_t *dst, char *buf, int len) orig_msg->fwd_send_flags = fwd_snd_flags_bak; orig_msg->rpl_send_flags = rpl_snd_flags_bak; exec_post_script_cb(orig_msg, ONSEND_CB_TYPE); - if((ret == 0) && !(ra_ctx.run_flags & DROP_R_F)) { + /* - handle drop action with flag DROP_R_F + * KEMI case (python,lua,jsdt) + * ret = 1 always + * Native case: + * ret = 1 success + * ret = 0 drop the message + */ + if(ra_ctx.run_flags & DROP_R_F) { + ret = 0; + } else if(ret == 0) { + /* native case where run_actions return 0 + * but DROP_R_F is not set */ ret = 1; } } else { _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to [email protected]
