kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
December 2024
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
17 participants
312 discussions
Start a n
N
ew thread
git:master:a47ebb63: memcached: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: a47ebb6349c40af7bbbc6dd90a3e8b05207c935c URL:
https://github.com/kamailio/kamailio/commit/a47ebb6349c40af7bbbc6dd90a3e8b0…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T17:04:34+01:00 memcached: reformat exported structures --- Modified: src/modules/memcached/memcached.c --- Diff:
https://github.com/kamailio/kamailio/commit/a47ebb6349c40af7bbbc6dd90a3e8b0…
Patch:
https://github.com/kamailio/kamailio/commit/a47ebb6349c40af7bbbc6dd90a3e8b0…
--- diff --git a/src/modules/memcached/memcached.c b/src/modules/memcached/memcached.c index 779b6ecceaf..bbb40a057b6 100644 --- a/src/modules/memcached/memcached.c +++ b/src/modules/memcached/memcached.c @@ -64,34 +64,48 @@ static void mod_destroy(void); /*! * Exported pseudo-variables */ +/* clang-format off */ static pv_export_t mod_pvs[] = { - {{"mct", sizeof("mct") - 1}, PVT_OTHER, pv_get_mcd_value, - pv_set_mcd_value, pv_parse_mcd_name, 0, 0, 0}, - {{"mcinc", sizeof("mcinc") - 1}, PVT_OTHER, pv_get_mcd_value, - pv_inc_mcd_value, pv_parse_mcd_name, 0, 0, 0}, - {{"mcdec", sizeof("mcdec") - 1}, PVT_OTHER, pv_get_mcd_value, - pv_dec_mcd_value, pv_parse_mcd_name, 0, 0, 0}, - {{"mctex", sizeof("mctex") - 1}, PVT_OTHER, pv_get_null, - pv_set_mcd_expire, pv_parse_mcd_name, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; - + {{"mct", sizeof("mct") - 1}, PVT_OTHER, pv_get_mcd_value, + pv_set_mcd_value, pv_parse_mcd_name, 0, 0, 0}, + {{"mcinc", sizeof("mcinc") - 1}, PVT_OTHER, pv_get_mcd_value, + pv_inc_mcd_value, pv_parse_mcd_name, 0, 0, 0}, + {{"mcdec", sizeof("mcdec") - 1}, PVT_OTHER, pv_get_mcd_value, + pv_dec_mcd_value, pv_parse_mcd_name, 0, 0, 0}, + {{"mctex", sizeof("mctex") - 1}, PVT_OTHER, pv_get_null, + pv_set_mcd_expire, pv_parse_mcd_name, 0, 0, 0}, + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +}; /*! * Exported parameters */ -static param_export_t params[] = {{"servers", PARAM_STRING, &mcd_srv_str}, - {"expire", PARAM_INT, &mcd_expire}, - {"timeout", PARAM_INT, &mcd_timeout}, {"mode", PARAM_INT, &mcd_mode}, - {"memory", PARAM_INT, &mcd_memory}, - {"stringify", PARAM_INT, &mcd_stringify}, {0, 0, 0}}; - +static param_export_t params[] = { + {"servers", PARAM_STRING, &mcd_srv_str}, + {"expire", PARAM_INT, &mcd_expire}, + {"timeout", PARAM_INT, &mcd_timeout}, + {"mode", PARAM_INT, &mcd_mode}, + {"memory", PARAM_INT, &mcd_memory}, + {"stringify", PARAM_INT, &mcd_stringify}, + {0, 0, 0} +}; /*! * Module interface */ -struct module_exports exports = {"memcached", DEFAULT_DLFLAGS, 0, params, 0, - mod_pvs, 0, mod_init, 0, mod_destroy}; - +struct module_exports exports = { + "memcached", + DEFAULT_DLFLAGS, /* dlopen flags */ + 0, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + mod_pvs, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + 0, /* per-child init function */ + mod_destroy /* module destroy function */ +}; +/* clang-format on */ /*! * \brief Wrapper functions around our internal memory management for libmemcached (version >= 0.38) callback
1 week, 3 days
1
0
0
0
git:master:552b8397: microhttpd: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 552b8397ecd110be3faf181f840803f6d8bf03dd URL:
https://github.com/kamailio/kamailio/commit/552b8397ecd110be3faf181f840803f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T17:01:04+01:00 microhttpd: add fixup_free* to exported functions --- Modified: src/modules/microhttpd/microhttpd_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/552b8397ecd110be3faf181f840803f…
Patch:
https://github.com/kamailio/kamailio/commit/552b8397ecd110be3faf181f840803f…
--- diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index f1ee8334b8b..0ef4b36284e 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -52,7 +52,7 @@ static int w_mhttpd_send_reply( sip_msg_t *msg, char *pcode, char *preason, char *pctype, char *pbody); static int fixup_mhttpd_send_reply(void **param, int param_no); - +static int fixup_free_mhttpd_send_reply(void **param, int param_no); static int mod_init(void); static int child_init(int); @@ -70,8 +70,9 @@ static pv_export_t mod_pvs[] = { }; static cmd_export_t cmds[] = { - {"mhttpd_reply", (cmd_function)w_mhttpd_send_reply, - 4, fixup_mhttpd_send_reply, 0, REQUEST_ROUTE|EVENT_ROUTE}, + {"mhttpd_reply", (cmd_function)w_mhttpd_send_reply, 4, + fixup_mhttpd_send_reply, fixup_free_mhttpd_send_reply, + REQUEST_ROUTE|EVENT_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -432,6 +433,19 @@ static int fixup_mhttpd_send_reply(void **param, int param_no) return 0; } +static int fixup_free_mhttpd_send_reply(void **param, int param_no) +{ + if(param_no == 1) { + return fixup_free_igp_null(param, 1); + } else if(param_no == 2) { + return fixup_free_spve_null(param, 1); + } else if(param_no == 3) { + return fixup_free_spve_null(param, 1); + } else if(param_no == 4) { + return fixup_free_spve_null(param, 1); + } + return 0; +} static enum MHD_Result ksr_microhttpd_request(void *cls, struct MHD_Connection *connection, const char *url, const char *method,
1 week, 3 days
1
0
0
0
git:master:4ba15a7d: misc_radius: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 4ba15a7db033b699008885473a3f8c72811975ce URL:
https://github.com/kamailio/kamailio/commit/4ba15a7db033b699008885473a3f8c7…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:51:26+01:00 misc_radius: add fixup_free* to exported functions --- Modified: src/modules/misc_radius/misc_radius.c --- Diff:
https://github.com/kamailio/kamailio/commit/4ba15a7db033b699008885473a3f8c7…
Patch:
https://github.com/kamailio/kamailio/commit/4ba15a7db033b699008885473a3f8c7…
--- diff --git a/src/modules/misc_radius/misc_radius.c b/src/modules/misc_radius/misc_radius.c index 9de465a2122..b0928bd62d8 100644 --- a/src/modules/misc_radius/misc_radius.c +++ b/src/modules/misc_radius/misc_radius.c @@ -79,26 +79,23 @@ struct val uri_vals[UV_STATIC_MAX]; /* clang-format off */ static cmd_export_t cmds[] = { {"radius_load_caller_avps", (cmd_function)radius_load_caller_avps, 1, - fixup_spve_null, 0, REQUEST_ROUTE | FAILURE_ROUTE}, + fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE | FAILURE_ROUTE}, {"radius_load_callee_avps", (cmd_function)radius_load_callee_avps, 1, - fixup_spve_null, 0, REQUEST_ROUTE | FAILURE_ROUTE}, + fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE | FAILURE_ROUTE}, {"radius_is_user_in", (cmd_function)radius_is_user_in, 2, - fixup_spve_spve, 0, + fixup_spve_spve, fixup_free_spve_spve, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE}, - {"radius_does_uri_exist", (cmd_function)radius_does_uri_exist_0, - 0, 0, 0, REQUEST_ROUTE|LOCAL_ROUTE}, - {"radius_does_uri_exist", (cmd_function)radius_does_uri_exist_1, - 1, fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE|LOCAL_ROUTE}, - {"radius_does_uri_user_exist", - (cmd_function)radius_does_uri_user_exist_0, - 0, 0, 0, REQUEST_ROUTE|LOCAL_ROUTE}, - {"radius_does_uri_user_exist", - (cmd_function)radius_does_uri_user_exist_1, - 1, fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE|LOCAL_ROUTE}, + {"radius_does_uri_exist", (cmd_function)radius_does_uri_exist_0, 0, + 0, 0, REQUEST_ROUTE|LOCAL_ROUTE}, + {"radius_does_uri_exist", (cmd_function)radius_does_uri_exist_1, 1, + fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE|LOCAL_ROUTE}, + {"radius_does_uri_user_exist", (cmd_function)radius_does_uri_user_exist_0, 0, + 0, 0, REQUEST_ROUTE|LOCAL_ROUTE}, + {"radius_does_uri_user_exist", (cmd_function)radius_does_uri_user_exist_1, 1, + fixup_spve_null, fixup_free_spve_null, REQUEST_ROUTE|LOCAL_ROUTE}, {0, 0, 0, 0, 0, 0} }; - /* * Exported parameters */ @@ -117,7 +114,6 @@ static param_export_t params[] = { {0, 0, 0} }; - struct module_exports exports = { "misc_radius", /* module name */ DEFAULT_DLFLAGS, /* dlopen flags */
1 week, 3 days
1
0
0
0
git:master:2b73d787: mohqueue: add fixup_free* to exported functions
by Victor Seva
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 *
1 week, 3 days
1
0
0
0
git:master:155d6005: mohqueue: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 155d6005c52c85199deffd1357dc361af21e3862 URL:
https://github.com/kamailio/kamailio/commit/155d6005c52c85199deffd1357dc361…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:43:01+01:00 mohqueue: reformat exported structures --- Modified: src/modules/mohqueue/mohqueue_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/155d6005c52c85199deffd1357dc361…
Patch:
https://github.com/kamailio/kamailio/commit/155d6005c52c85199deffd1357dc361…
--- diff --git a/src/modules/mohqueue/mohqueue_mod.c b/src/modules/mohqueue/mohqueue_mod.c index 09c74c0c475..1151b575786 100644 --- a/src/modules/mohqueue/mohqueue_mod.c +++ b/src/modules/mohqueue/mohqueue_mod.c @@ -47,19 +47,6 @@ pv_spec_t *prtp_pv; /********** * module exports **********/ - -/* COMMANDS */ -static cmd_export_t mod_cmds[] = { - {"mohq_count", (cmd_function)mohq_count, 2, fixup_count, 0, - REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, - {"mohq_process", (cmd_function)mohq_process, 0, NULL, 0, REQUEST_ROUTE}, - {"mohq_retrieve", (cmd_function)mohq_retrieve, 2, fixup_spve_spve, 0, - REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, - {"mohq_send", (cmd_function)mohq_send, 1, fixup_spve_spve, 0, - REQUEST_ROUTE}, - {NULL, NULL, -1, 0, 0}, -}; - /* PARAMETERS */ str db_url = str_init(DEFAULT_DB_URL); str db_ctable = str_init("mohqcalls"); @@ -67,43 +54,63 @@ str db_qtable = str_init("mohqueues"); char *mohdir = ""; int moh_maxcalls = 50; +/* clang-format off */ +/* COMMANDS */ +static cmd_export_t mod_cmds[] = { + {"mohq_count", (cmd_function)mohq_count, 2, + fixup_count, 0, + REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, + {"mohq_process", (cmd_function)mohq_process, 0, + 0, 0, REQUEST_ROUTE}, + {"mohq_retrieve", (cmd_function)mohq_retrieve, 2, + fixup_spve_spve, 0, + REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, + {"mohq_send", (cmd_function)mohq_send, 1, + fixup_spve_spve, 0, REQUEST_ROUTE}, + {NULL, NULL, -1, 0, 0}, +}; + static param_export_t mod_parms[] = { - {"db_url", PARAM_STR, &db_url}, - {"db_ctable", PARAM_STR, &db_ctable}, - {"db_qtable", PARAM_STR, &db_qtable}, - {"mohdir", PARAM_STRING, &mohdir}, - {"moh_maxcalls", PARAM_INT, &moh_maxcalls}, - {NULL, 0, NULL}, + {"db_url", PARAM_STR, &db_url}, + {"db_ctable", PARAM_STR, &db_ctable}, + {"db_qtable", PARAM_STR, &db_qtable}, + {"mohdir", PARAM_STRING, &mohdir}, + {"moh_maxcalls", PARAM_INT, &moh_maxcalls}, + {NULL, 0, NULL}, }; static const char *mohqueue_rpc_debug_doc[] = { - "Toggle mohqueue debug mode. Parameters: queue name, state (0=off, " - "<>0=on)", - 0}; + "Toggle mohqueue debug mode. Parameters: queue name, state (0=off, <>0=on)", + 0 +}; static const char *mohqueue_rpc_drop_call_doc[] = { - "Drop a mohqueue call. Parameters: queue name, callID (*=all)", 0}; + "Drop a mohqueue call. Parameters: queue name, callID (*=all)", + 0 +}; /* RPC COMMANDS */ rpc_export_t mohqueue_rpc[] = { - {"mohqueue.debug", mohqueue_rpc_debug, mohqueue_rpc_debug_doc, 0}, - {"mohqueue.drop_call", mohqueue_rpc_drop_call, - mohqueue_rpc_drop_call_doc, 0}, - {0, 0, 0, 0}}; + {"mohqueue.debug", mohqueue_rpc_debug, mohqueue_rpc_debug_doc, 0}, + {"mohqueue.drop_call", mohqueue_rpc_drop_call, + mohqueue_rpc_drop_call_doc, 0}, + {0, 0, 0, 0} +}; /* MODULE EXPORTS */ struct module_exports exports = { - "mohqueue", /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - mod_cmds, /* exported functions */ - mod_parms, /* exported parameters */ - 0, /* RPC methods */ - 0, /* exported pseudo-variables */ - 0, /* response handling function */ - mod_init, /* module initialization function */ - mod_child_init, /* per-child initialization function */ - mod_destroy /* destructor function */ + "mohqueue", /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + mod_cmds, /* exported functions */ + mod_parms, /* exported parameters */ + 0, /* RPC methods */ + 0, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + mod_child_init, /* per-child initialization function */ + mod_destroy /* destructor function */ }; +/* clang-format on */ /********** * local constants
1 week, 3 days
1
0
0
0
git:master:039a79a0: mqtt: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 039a79a00e2eb34b9e61e30848f4d1bb07d68f4c URL:
https://github.com/kamailio/kamailio/commit/039a79a00e2eb34b9e61e30848f4d1b…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:40:27+01:00 mqtt: add fixup_free* to exported functions --- Modified: src/modules/mqtt/mqtt_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/039a79a00e2eb34b9e61e30848f4d1b…
Patch:
https://github.com/kamailio/kamailio/commit/039a79a00e2eb34b9e61e30848f4d1b…
--- diff --git a/src/modules/mqtt/mqtt_mod.c b/src/modules/mqtt/mqtt_mod.c index f332263983f..2ce4c4772bb 100644 --- a/src/modules/mqtt/mqtt_mod.c +++ b/src/modules/mqtt/mqtt_mod.c @@ -57,10 +57,12 @@ static int child_init(int); static int cmd_mqtt_publish( sip_msg_t *msg, char *topic, char *payload, char *qos); static int fixup_mqtt_publish(void **param, int param_no); +static int fixup_free_mqtt_publish(void **param, int param_no); static int ki_mqtt_publish(sip_msg_t *msg, str *topic, str *payload, int qos); static int cmd_mqtt_subscribe(sip_msg_t *msg, char *topic, char *qos); static int fixup_mqtt_subscribe(void **param, int param_no); +static int fixup_free_mqtt_subscribe(void **param, int param_no); static int ki_mqtt_subscribe(sip_msg_t *msg, str *topic, int qos); static int cmd_mqtt_unsubscribe(sip_msg_t *msg, char *topic); @@ -69,11 +71,11 @@ static int ki_mqtt_unsubscribe(sip_msg_t *msg, str *topic); /* clang-format off */ static cmd_export_t cmds[] = { {"mqtt_publish", (cmd_function)cmd_mqtt_publish, 3, - fixup_mqtt_publish, 0, ANY_ROUTE}, + fixup_mqtt_publish, fixup_free_mqtt_publish, ANY_ROUTE}, {"mqtt_subscribe", (cmd_function)cmd_mqtt_subscribe, 2, - fixup_mqtt_subscribe, 0, ANY_ROUTE}, + fixup_mqtt_subscribe, fixup_free_mqtt_subscribe, ANY_ROUTE}, {"mqtt_unsubscribe", (cmd_function)cmd_mqtt_unsubscribe, 1, - fixup_spve_all, 0, ANY_ROUTE}, + fixup_spve_all, fixup_free_spve_all, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -289,6 +291,20 @@ static int fixup_mqtt_publish(void **param, int param_no) } } +static int fixup_free_mqtt_publish(void **param, int param_no) +{ + switch(param_no) { + case 1: + return fixup_free_spve_spve(param, param_no); + case 2: + return fixup_free_spve_spve(param, param_no); + case 3: + return 0; + default: + return -1; + } +} + /** * Subscribe to the given topic. * Mqtt qos levels 0, 1 and 2 can be used. @@ -353,6 +369,18 @@ static int fixup_mqtt_subscribe(void **param, int param_no) } } +static int fixup_free_mqtt_subscribe(void **param, int param_no) +{ + switch(param_no) { + case 1: + return fixup_free_spve_spve(param, param_no); + case 2: + return 0; + default: + return -1; + } +} + /** * Unsubscribe to a previously subscribed topic. * Used in cfg script.
1 week, 3 days
1
0
0
0
git:master:89af5be1: mqtt: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 89af5be1124faade9aa33e58b7bf199ef2af3865 URL:
https://github.com/kamailio/kamailio/commit/89af5be1124faade9aa33e58b7bf199…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:36:20+01:00 mqtt: reformat exported structures --- Modified: src/modules/mqtt/mqtt_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/89af5be1124faade9aa33e58b7bf199…
Patch:
https://github.com/kamailio/kamailio/commit/89af5be1124faade9aa33e58b7bf199…
--- diff --git a/src/modules/mqtt/mqtt_mod.c b/src/modules/mqtt/mqtt_mod.c index ca7d2009d90..f332263983f 100644 --- a/src/modules/mqtt/mqtt_mod.c +++ b/src/modules/mqtt/mqtt_mod.c @@ -66,49 +66,58 @@ static int ki_mqtt_subscribe(sip_msg_t *msg, str *topic, int qos); static int cmd_mqtt_unsubscribe(sip_msg_t *msg, char *topic); static int ki_mqtt_unsubscribe(sip_msg_t *msg, str *topic); -static cmd_export_t cmds[] = {{"mqtt_publish", (cmd_function)cmd_mqtt_publish, - 3, fixup_mqtt_publish, 0, ANY_ROUTE}, - {"mqtt_subscribe", (cmd_function)cmd_mqtt_subscribe, 2, - fixup_mqtt_subscribe, 0, ANY_ROUTE}, - {"mqtt_unsubscribe", (cmd_function)cmd_mqtt_unsubscribe, 1, - fixup_spve_all, 0, ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; - -static param_export_t params[] = {{"host", PARAM_STRING, &_mqtt_host}, - {"port", PARAM_INT, &_mqtt_port}, {"id", PARAM_STRING, &_mqtt_id}, - {"username", PARAM_STRING, &_mqtt_username}, - {"password", PARAM_STRING, &_mqtt_password}, - {"will_topic", PARAM_STRING, &_mqtt_willtopic}, - {"will", PARAM_STRING, &_mqtt_will}, - {"keepalive", PARAM_INT, &_mqtt_keepalive}, - {"event_callback", PARAM_STR, &_mqtt_event_callback}, - {"tls_method", PARAM_STRING, &_mqtt_tls_method}, - {"tls_alpn", PARAM_STRING, &_mqtt_tls_alpn}, - {"ca_file", PARAM_STRING, &_mqtt_ca_file}, - {"ca_path", PARAM_STRING, &_mqtt_ca_path}, - {"certificate", PARAM_STRING, &_mqtt_certificate}, - {"private_key", PARAM_STRING, &_mqtt_private_key}, - {"verify_certificate", PARAM_INT, &_mqtt_verify_certificate}, - {"cipher_list", PARAM_STRING, &_mqtt_cipher_list}, {0, 0, 0}}; +/* clang-format off */ +static cmd_export_t cmds[] = { + {"mqtt_publish", (cmd_function)cmd_mqtt_publish, 3, + fixup_mqtt_publish, 0, ANY_ROUTE}, + {"mqtt_subscribe", (cmd_function)cmd_mqtt_subscribe, 2, + fixup_mqtt_subscribe, 0, ANY_ROUTE}, + {"mqtt_unsubscribe", (cmd_function)cmd_mqtt_unsubscribe, 1, + fixup_spve_all, 0, ANY_ROUTE}, + {0, 0, 0, 0, 0, 0} +}; + +static param_export_t params[] = { + {"host", PARAM_STRING, &_mqtt_host}, + {"port", PARAM_INT, &_mqtt_port}, + {"id", PARAM_STRING, &_mqtt_id}, + {"username", PARAM_STRING, &_mqtt_username}, + {"password", PARAM_STRING, &_mqtt_password}, + {"will_topic", PARAM_STRING, &_mqtt_willtopic}, + {"will", PARAM_STRING, &_mqtt_will}, + {"keepalive", PARAM_INT, &_mqtt_keepalive}, + {"event_callback", PARAM_STR, &_mqtt_event_callback}, + {"tls_method", PARAM_STRING, &_mqtt_tls_method}, + {"tls_alpn", PARAM_STRING, &_mqtt_tls_alpn}, + {"ca_file", PARAM_STRING, &_mqtt_ca_file}, + {"ca_path", PARAM_STRING, &_mqtt_ca_path}, + {"certificate", PARAM_STRING, &_mqtt_certificate}, + {"private_key", PARAM_STRING, &_mqtt_private_key}, + {"verify_certificate", PARAM_INT, &_mqtt_verify_certificate}, + {"cipher_list", PARAM_STRING, &_mqtt_cipher_list}, + {0, 0, 0} +}; static pv_export_t mod_pvs[] = { - {{"mqtt", (sizeof("mqtt") - 1)}, PVT_OTHER, pv_get_mqtt, pv_set_mqtt, - pv_parse_mqtt_name, 0, 0, 0}, + {{"mqtt", (sizeof("mqtt") - 1)}, PVT_OTHER, pv_get_mqtt, pv_set_mqtt, + pv_parse_mqtt_name, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +}; struct module_exports exports = { - "mqtt", /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, /* exported functions */ - params, /* exported parameters */ - 0, /* RPC method exports */ - mod_pvs, /* exported pseudo-variables */ - 0, /* response handling function */ - mod_init, /* module initialization function */ - child_init, /* per-child init function */ - 0 /* module destroy function */ + "mqtt", /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + mod_pvs, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + child_init, /* per-child init function */ + 0 /* module destroy function */ }; +/* clang-format on */ /*! * \brief Module initialization function
1 week, 3 days
1
0
0
0
git:master:0fd77b10: mqueue: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 0fd77b10b758d685b3ae27d0435e6b9d4bba82f5 URL:
https://github.com/kamailio/kamailio/commit/0fd77b10b758d685b3ae27d0435e6b9…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:05:51+01:00 mqueue: add fixup_free* to exported functions --- Modified: src/modules/mqueue/mqueue_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/0fd77b10b758d685b3ae27d0435e6b9…
Patch:
https://github.com/kamailio/kamailio/commit/0fd77b10b758d685b3ae27d0435e6b9…
--- diff --git a/src/modules/mqueue/mqueue_mod.c b/src/modules/mqueue/mqueue_mod.c index 035b66015ff..f100091844e 100644 --- a/src/modules/mqueue/mqueue_mod.c +++ b/src/modules/mqueue/mqueue_mod.c @@ -52,6 +52,7 @@ static int w_mq_pv_free(struct sip_msg *msg, char *mq, char *str2); int mq_param(modparam_t type, void *val); int mq_param_name(modparam_t type, void *val); static int fixup_mq_add(void **param, int param_no); +static int fixup_free_mq_add(void **param, int param_no); static int bind_mq(mq_api_t *api); static int mqueue_rpc_init(void); @@ -72,13 +73,13 @@ static pv_export_t mod_pvs[] = { static cmd_export_t cmds[] = { {"mq_fetch", (cmd_function)w_mq_fetch, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"mq_add", (cmd_function)w_mq_add, 3, - fixup_mq_add, 0, ANY_ROUTE}, + fixup_mq_add, fixup_free_mq_add, ANY_ROUTE}, {"mq_pv_free", (cmd_function)w_mq_pv_free, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"mq_size", (cmd_function)w_mq_size, 1, - fixup_spve_null, 0, ANY_ROUTE}, + fixup_spve_null, fixup_free_spve_null, ANY_ROUTE}, {"bind_mq", (cmd_function)bind_mq, 1, 0, 0, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -312,6 +313,16 @@ static int fixup_mq_add(void **param, int param_no) return E_UNSPEC; } +static int fixup_free_mq_add(void **param, int param_no) +{ + if(param_no == 1 || param_no == 2 || param_no == 3) { + return fixup_free_spve_null(param, 1); + } + + LM_ERR("invalid parameter number %d\n", param_no); + return E_UNSPEC; +} + static int bind_mq(mq_api_t *api) { if(!api)
1 week, 3 days
1
0
0
0
git:master:704ca582: mqueue: reformat exported structures
by Victor Seva
Module: kamailio Branch: master Commit: 704ca58226e63d90f8cd7ddc7b4f06efe8f18756 URL:
https://github.com/kamailio/kamailio/commit/704ca58226e63d90f8cd7ddc7b4f06e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T16:04:34+01:00 mqueue: reformat exported structures --- Modified: src/modules/mqueue/mqueue_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/704ca58226e63d90f8cd7ddc7b4f06e…
Patch:
https://github.com/kamailio/kamailio/commit/704ca58226e63d90f8cd7ddc7b4f06e…
--- diff --git a/src/modules/mqueue/mqueue_mod.c b/src/modules/mqueue/mqueue_mod.c index 20a7b0b14b2..035b66015ff 100644 --- a/src/modules/mqueue/mqueue_mod.c +++ b/src/modules/mqueue/mqueue_mod.c @@ -59,42 +59,49 @@ static int mqueue_rpc_init(void); static int mqueue_size = 0; int mqueue_addmode = 0; - +/* clang-format off */ static pv_export_t mod_pvs[] = { - {{"mqk", sizeof("mqk") - 1}, PVT_OTHER, pv_get_mqk, 0, pv_parse_mq_name, - 0, 0, 0}, - {{"mqv", sizeof("mqv") - 1}, PVT_OTHER, pv_get_mqv, 0, pv_parse_mq_name, - 0, 0, 0}, - {{"mq_size", sizeof("mq_size") - 1}, PVT_OTHER, pv_get_mq_size, 0, - pv_parse_mq_name, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; - - -static cmd_export_t cmds[] = {{"mq_fetch", (cmd_function)w_mq_fetch, 1, - fixup_spve_null, 0, ANY_ROUTE}, - {"mq_add", (cmd_function)w_mq_add, 3, fixup_mq_add, 0, ANY_ROUTE}, - {"mq_pv_free", (cmd_function)w_mq_pv_free, 1, fixup_spve_null, 0, - ANY_ROUTE}, - {"mq_size", (cmd_function)w_mq_size, 1, fixup_spve_null, 0, ANY_ROUTE}, - {"bind_mq", (cmd_function)bind_mq, 1, 0, 0, ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; - -static param_export_t params[] = {{"db_url", PARAM_STR, &mqueue_db_url}, - {"mqueue", PARAM_STRING | PARAM_USE_FUNC, (void *)mq_param}, - {"mqueue_name", PARAM_STRING | PARAM_USE_FUNC, (void *)mq_param_name}, - {"mqueue_size", PARAM_INT, &mqueue_size}, - {"mqueue_addmode", PARAM_INT, &mqueue_addmode}, {0, 0, 0}}; + {{"mqk", sizeof("mqk") - 1}, PVT_OTHER, pv_get_mqk, 0, pv_parse_mq_name, + 0, 0, 0}, + {{"mqv", sizeof("mqv") - 1}, PVT_OTHER, pv_get_mqv, 0, pv_parse_mq_name, + 0, 0, 0}, + {{"mq_size", sizeof("mq_size") - 1}, PVT_OTHER, pv_get_mq_size, 0, + pv_parse_mq_name, 0, 0, 0}, + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +}; -struct module_exports exports = { - "mqueue", DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, params, 0, /* exported RPC methods */ - mod_pvs, /* exported pseudo-variables */ - 0, /* response function */ - mod_init, /* module initialization function */ - 0, /* per child init function */ - mod_destroy /* destroy function */ +static cmd_export_t cmds[] = { + {"mq_fetch", (cmd_function)w_mq_fetch, 1, + fixup_spve_null, 0, ANY_ROUTE}, + {"mq_add", (cmd_function)w_mq_add, 3, + fixup_mq_add, 0, ANY_ROUTE}, + {"mq_pv_free", (cmd_function)w_mq_pv_free, 1, + fixup_spve_null, 0, ANY_ROUTE}, + {"mq_size", (cmd_function)w_mq_size, 1, + fixup_spve_null, 0, ANY_ROUTE}, + {"bind_mq", (cmd_function)bind_mq, 1, 0, 0, ANY_ROUTE}, + {0, 0, 0, 0, 0, 0} }; +static param_export_t params[] = { + {"db_url", PARAM_STR, &mqueue_db_url}, + {"mqueue", PARAM_STRING | PARAM_USE_FUNC, (void *)mq_param}, + {"mqueue_name", PARAM_STRING | PARAM_USE_FUNC, (void *)mq_param_name}, + {"mqueue_size", PARAM_INT, &mqueue_size}, + {"mqueue_addmode", PARAM_INT, &mqueue_addmode}, + {0, 0, 0} +}; + +struct module_exports exports = { + "mqueue", DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, params, 0, /* exported RPC methods */ + mod_pvs, /* exported pseudo-variables */ + 0, /* response function */ + mod_init, /* module initialization function */ + 0, /* per child init function */ + mod_destroy /* destroy function */ +}; +/* clang-format on */ /** * init module function
1 week, 3 days
1
0
0
0
git:master:1a88127e: msrp: add fixup_free* to exported functions
by Victor Seva
Module: kamailio Branch: master Commit: 1a88127ede8245a96f469d7719a92ddd917a530e URL:
https://github.com/kamailio/kamailio/commit/1a88127ede8245a96f469d7719a92dd…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org> Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org> Date: 2024-12-12T15:56:09+01:00 msrp: add fixup_free* to exported functions --- Modified: src/modules/msrp/msrp_mod.c --- Diff:
https://github.com/kamailio/kamailio/commit/1a88127ede8245a96f469d7719a92dd…
Patch:
https://github.com/kamailio/kamailio/commit/1a88127ede8245a96f469d7719a92dd…
--- diff --git a/src/modules/msrp/msrp_mod.c b/src/modules/msrp/msrp_mod.c index e468c7411ae..314d502a28f 100644 --- a/src/modules/msrp/msrp_mod.c +++ b/src/modules/msrp/msrp_mod.c @@ -96,25 +96,25 @@ static cmd_export_t cmds[] = { {"msrp_forward", (cmd_function)w_msrp_forward, 0, 0, 0, ANY_ROUTE}, {"msrp_forward", (cmd_function)w_msrp_forward1, 1, - fixup_spve_all, 0, ANY_ROUTE}, + fixup_spve_all, fixup_free_spve_all, ANY_ROUTE}, {"msrp_forward", (cmd_function)w_msrp_forward2, 2, - fixup_spve_all, 0, ANY_ROUTE}, + fixup_spve_all, fixup_free_spve_all, ANY_ROUTE}, {"msrp_relay", (cmd_function)w_msrp_relay, 0, 0, 0, ANY_ROUTE}, {"msrp_reply", (cmd_function)w_msrp_reply2, 2, fixup_spve_spve, 0, ANY_ROUTE}, {"msrp_reply", (cmd_function)w_msrp_reply3, 3, - fixup_spve_all, 0, ANY_ROUTE}, + fixup_spve_all, fixup_free_spve_all, ANY_ROUTE}, {"msrp_is_request", (cmd_function)w_msrp_is_request, 0, 0, 0, ANY_ROUTE}, {"msrp_is_reply", (cmd_function)w_msrp_is_reply, 0, 0, 0, ANY_ROUTE}, {"msrp_set_dst", (cmd_function)w_msrp_set_dst, 2, - fixup_spve_all, 0, ANY_ROUTE}, + fixup_spve_all, fixup_free_spve_all, ANY_ROUTE}, {"msrp_relay_flags", (cmd_function)w_msrp_relay_flags, 1, - fixup_igp_null, 0, ANY_ROUTE}, + fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, {"msrp_reply_flags", (cmd_function)w_msrp_reply_flags, 1, - fixup_igp_null, 0, ANY_ROUTE}, + fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, {"msrp_cmap_save", (cmd_function)w_msrp_cmap_save, 0, 0, 0, ANY_ROUTE}, {"msrp_cmap_lookup", (cmd_function)w_msrp_cmap_lookup, 0,
1 week, 3 days
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
32
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Results per page:
10
25
50
100
200