Module: kamailio
Branch: master
Commit: 07134cb4c2cf66cf2e7e6ba738559c3c1209645a
URL:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-11-22T10:55:49+01:00
rtp_media_server: add fixup_free* to exported functions
---
Modified: src/modules/rtp_media_server/rtp_media_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
Patch:
https://github.com/kamailio/kamailio/commit/07134cb4c2cf66cf2e7e6ba738559c3…
---
diff --git a/src/modules/rtp_media_server/rtp_media_server.c
b/src/modules/rtp_media_server/rtp_media_server.c
index 3e5de0635a6..07a0ebd068b 100644
--- a/src/modules/rtp_media_server/rtp_media_server.c
+++ b/src/modules/rtp_media_server/rtp_media_server.c
@@ -43,8 +43,11 @@ static int child_init(int);
static rms_dialog_info_t *rms_dialog_create_leg(
rms_dialog_info_t *di, struct sip_msg *msg);
static int fixup_rms_action_play(void **param, int param_no);
+static int fixup_free_rms_action_play(void **param, int param_no);
static int fixup_rms_bridge(void **param, int param_no);
+static int fixup_free_rms_bridge(void **param, int param_no);
static int fixup_rms_answer(void **param, int param_no);
+static int fixup_free_rms_answer(void **param, int param_no);
static int rms_hangup_call(rms_dialog_info_t *di);
static int rms_bridging_call(rms_dialog_info_t *di, rms_action_t *a);
static int rms_bridged_call(rms_dialog_info_t *di, rms_action_t *a);
@@ -62,15 +65,15 @@ static int rms_update_media_sockets(
/* clang-format off */
static cmd_export_t cmds[] = {
{"rms_answer", (cmd_function)rms_answer_f, 1,
- fixup_rms_answer, 0, EVENT_ROUTE},
+ fixup_rms_answer, fixup_free_rms_answer, EVENT_ROUTE},
{"rms_sip_request", (cmd_function)rms_sip_request_f, 0, 0, 0, EVENT_ROUTE},
{"rms_play", (cmd_function)rms_action_play_f, 2,
- fixup_rms_action_play, 0, ANY_ROUTE},
+ fixup_rms_action_play, fixup_free_rms_action_play, ANY_ROUTE},
{"rms_dialog_check", (cmd_function)rms_dialog_check_f, 0,
0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
{"rms_hangup", (cmd_function)rms_hangup_f, 0, 0, 0, EVENT_ROUTE},
{"rms_bridge", (cmd_function)rms_bridge_f, 2,
- fixup_rms_bridge, 0, ANY_ROUTE},
+ fixup_rms_bridge, fixup_free_rms_bridge, ANY_ROUTE},
{"rms_dialogs_dump", (cmd_function)rms_dialogs_dump_f, 0, 0, 0, ANY_ROUTE},
{0, 0, 0, 0, 0, 0}
};
@@ -156,6 +159,13 @@ static int fixup_rms_bridge(void **param, int param_no)
return -1;
}
+static int fixup_free_rms_bridge(void **param, int param_no)
+{
+ if(param_no == 1 || param_no == 2)
+ return fixup_free_spve_null(param, 1);
+ return 0;
+}
+
static int fixup_rms_answer(void **param, int param_no)
{
if(param_no == 1 || param_no == 2)
@@ -164,6 +174,13 @@ static int fixup_rms_answer(void **param, int param_no)
return -1;
}
+static int fixup_free_rms_answer(void **param, int param_no)
+{
+ if(param_no == 1 || param_no == 2)
+ return fixup_free_spve_null(param, 1);
+ return 0;
+}
+
static int fixup_rms_action_play(void **param, int param_no)
{
if(param_no == 1 || param_no == 2 || param_no == 3)
@@ -172,6 +189,13 @@ static int fixup_rms_action_play(void **param, int param_no)
return -1;
}
+static int fixup_free_rms_action_play(void **param, int param_no)
+{
+ if(param_no == 1 || param_no == 2)
+ return fixup_free_spve_null(param, 1);
+ return 0;
+}
+
/**
* @return 0 to continue to load Kamailio, -1 to stop the loading
* and abort Kamailio.