Module: kamailio Branch: master Commit: 2a8df7f1e7f77bcfac49a85d0d8c7b283de13be8 URL: https://github.com/kamailio/kamailio/commit/2a8df7f1e7f77bcfac49a85d0d8c7b283de13be8
Author: Victor Seva <linuxman...@torreviejawireless.org> Committer: Victor Seva <linuxman...@torreviejawireless.org> Date: 2024-12-12T15:51:15+01:00 mtree: add fixup_free* to exported functions --- Modified: src/modules/mtree/mtree_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/2a8df7f1e7f77bcfac49a85d0d8c7b283de13be8.diff Patch: https://github.com/kamailio/kamailio/commit/2a8df7f1e7f77bcfac49a85d0d8c7b283de13be8.patch --- diff --git a/src/modules/mtree/mtree_mod.c b/src/modules/mtree/mtree_mod.c index 2b8d2adc750..cc3f68d4a7e 100644 --- a/src/modules/mtree/mtree_mod.c +++ b/src/modules/mtree/mtree_mod.c @@ -108,6 +108,7 @@ static volatile int mt_reload_flag = 0; int mt_param(modparam_t type, void *val); static int fixup_mt_match(void **param, int param_no); +static int fixup_free_mt_match(void **param, int param_no); static int w_mt_match(struct sip_msg *msg, char *str1, char *str2, char *str3); static int mod_init(void); @@ -124,7 +125,7 @@ static int mt_load_db_trees(); /* clang-format off */ static cmd_export_t cmds[] = { {"mt_match", (cmd_function)w_mt_match, 3, - fixup_mt_match, 0, + fixup_mt_match, fixup_free_mt_match, REQUEST_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE | ONREPLY_ROUTE}, {"bind_mtree", (cmd_function)bind_mtree, 0, 0, 0}, {0, 0, 0, 0, 0, 0} @@ -336,6 +337,17 @@ static int fixup_mt_match(void **param, int param_no) return fixup_igp_null(param, 1); } +static int fixup_free_mt_match(void **param, int param_no) +{ + if(param_no == 1 || param_no == 2) { + return fixup_free_spve_null(param, 1); + } + if(param_no != 3) { + LM_ERR("invalid parameter number %d\n", param_no); + return E_UNSPEC; + } + return fixup_free_igp_null(param, 1); +} /* use tree tn, match var, by mode, output in avp params */ static int mt_match(sip_msg_t *msg, str *tname, str *tomatch, int mval) _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!