Module: kamailio
Branch: master
Commit: 2b73d78789683388e5c93b4516e97b467178a25b
URL:
https://github.com/kamailio/kamailio/commit/2b73d78789683388e5c93b4516e97b4…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-12-12T16:45:46+01:00
mohqueue: add fixup_free* to exported functions
---
Modified: src/modules/mohqueue/mohqueue_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2b73d78789683388e5c93b4516e97b4…
Patch:
https://github.com/kamailio/kamailio/commit/2b73d78789683388e5c93b4516e97b4…
---
diff --git a/src/modules/mohqueue/mohqueue_mod.c b/src/modules/mohqueue/mohqueue_mod.c
index 1151b575786..b68e9a97794 100644
--- a/src/modules/mohqueue/mohqueue_mod.c
+++ b/src/modules/mohqueue/mohqueue_mod.c
@@ -32,7 +32,8 @@ MODULE_VERSION
* local function declarations
**********/
-int fixup_count(void **, int);
+static int fixup_count(void **, int);
+static int fixup_free_count(void **param, int param_no);
static int mod_child_init(int);
static void mod_destroy(void);
static int mod_init(void);
@@ -63,10 +64,10 @@ static cmd_export_t mod_cmds[] = {
{"mohq_process", (cmd_function)mohq_process, 0,
0, 0, REQUEST_ROUTE},
{"mohq_retrieve", (cmd_function)mohq_retrieve, 2,
- fixup_spve_spve, 0,
+ fixup_spve_spve, fixup_free_spve_spve,
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
{"mohq_send", (cmd_function)mohq_send, 1,
- fixup_spve_spve, 0, REQUEST_ROUTE},
+ fixup_spve_spve, fixup_free_spve_spve, REQUEST_ROUTE},
{NULL, NULL, -1, 0, 0},
};
@@ -131,7 +132,7 @@ str prtpstat[1] = {STR_STATIC_INIT("$rtpstat")};
* OUTPUT: -1 if failed; 0 if saved as pv_elem_t
**********/
-int fixup_count(void **param, int param_no)
+static int fixup_count(void **param, int param_no)
{
if(param_no == 1) {
@@ -143,6 +144,18 @@ int fixup_count(void **param, int param_no)
return 0;
}
+static int fixup_free_count(void **param, int param_no)
+
+{
+ if(param_no == 1) {
+ return fixup_free_spve_spve(param, 1);
+ }
+ if(param_no == 2) {
+ return fixup_free_pvar_null(param, 1);
+ }
+ return 0;
+}
+
/**********
* Configuration Initialization
*