Module: kamailio
Branch: master
Commit: 7f3207ccd2757fbdbed53bab5841808c4fc5c1cf
URL:
https://github.com/kamailio/kamailio/commit/7f3207ccd2757fbdbed53bab5841808…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-11-22T15:09:35+01:00
rls: add fixup_free* to exported functions
---
Modified: src/modules/rls/rls.c
Modified: src/modules/rls/subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7f3207ccd2757fbdbed53bab5841808…
Patch:
https://github.com/kamailio/kamailio/commit/7f3207ccd2757fbdbed53bab5841808…
---
diff --git a/src/modules/rls/rls.c b/src/modules/rls/rls.c
index c11d3da3476..4a4457dfc7e 100644
--- a/src/modules/rls/rls.c
+++ b/src/modules/rls/rls.c
@@ -209,15 +209,16 @@ void rlsubs_table_update(unsigned int ticks, void *param);
int add_rls_event(modparam_t type, void *val);
int rls_update_subs(struct sip_msg *msg, char *puri, char *pevent);
int fixup_update_subs(void **param, int param_no);
+int fixup_free_update_subs(void **param, int param_no);
/* clang-format off */
static cmd_export_t cmds[] = {
{"rls_handle_subscribe", (cmd_function)w_rls_handle_subscribe0, 0, 0, 0,
REQUEST_ROUTE},
{"rls_handle_subscribe", (cmd_function)w_rls_handle_subscribe1, 1,
- fixup_spve_null, 0, REQUEST_ROUTE},
+ fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE},
{"rls_handle_notify", (cmd_function)w_rls_handle_notify, 0, 0, 0,
REQUEST_ROUTE},
{"rls_update_subs", (cmd_function)w_rls_update_subs, 2,
- fixup_update_subs, 0, ANY_ROUTE},
+ fixup_update_subs, fixup_free_update_subs, ANY_ROUTE},
{"bind_rls", (cmd_function)bind_rls, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0}
};
diff --git a/src/modules/rls/subscribe.c b/src/modules/rls/subscribe.c
index b1d2b9a6582..f96238dbc1c 100644
--- a/src/modules/rls/subscribe.c
+++ b/src/modules/rls/subscribe.c
@@ -1051,6 +1051,16 @@ int fixup_update_subs(void **param, int param_no)
return 0;
}
+int fixup_free_update_subs(void **param, int param_no)
+{
+ if(param_no == 1) {
+ return fixup_free_spve_null(param, 1);
+ } else if(param_no == 2) {
+ return fixup_free_spve_null(param, 1);
+ }
+ return 0;
+}
+
void update_a_sub(subs_t *subs_copy)
{
xmlDocPtr doc = NULL;