From 4cfaa026b1b1613fc87a0723a83910ef35da8fb4 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 20:45:44 +0100 Subject: [PATCH 01/13] dialog: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/dialog/dialog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index 3fc51f9b9f8..e6ff0e9bc39 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -1826,7 +1826,7 @@ static sr_kemi_t sr_kemi_dialog_exports[] = { }, { str_init("dialog"), str_init("set_dlg_profile_static"), SR_KEMIP_INT, ki_set_dlg_profile_static, - { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("dialog"), str_init("set_dlg_profile"), @@ -1836,7 +1836,7 @@ static sr_kemi_t sr_kemi_dialog_exports[] = { }, { str_init("dialog"), str_init("unset_dlg_profile_static"), SR_KEMIP_INT, ki_unset_dlg_profile_static, - { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("dialog"), str_init("unset_dlg_profile"), @@ -1846,7 +1846,7 @@ static sr_kemi_t sr_kemi_dialog_exports[] = { }, { str_init("dialog"), str_init("is_in_profile_static"), SR_KEMIP_INT, ki_is_in_profile_static, - { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("dialog"), str_init("is_in_profile"), From 27a627a057414c1a6a8cf935f8039df4ccb24876 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 20:55:19 +0100 Subject: [PATCH 02/13] path: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/path/path_mod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/path/path_mod.c b/src/modules/path/path_mod.c index 013e34003a9..42c20239641 100644 --- a/src/modules/path/path_mod.c +++ b/src/modules/path/path_mod.c @@ -164,7 +164,7 @@ static int mod_init(void) static sr_kemi_t sr_kemi_path_exports[] = { { str_init("path"), str_init("add_path"), SR_KEMIP_INT, ki_add_path, - { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("path"), str_init("add_path_user"), @@ -179,7 +179,7 @@ static sr_kemi_t sr_kemi_path_exports[] = { }, { str_init("path"), str_init("add_path_received"), SR_KEMIP_INT, ki_add_path_received, - { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("path"), str_init("add_path_received_user"), From 4c84adfaa76b7988c54c819d7995327501071f0b Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:08:39 +0100 Subject: [PATCH 03/13] permissions: correcting KEMI allow_address - Updating which function KEMI function allow_address actually calls upon --- src/modules/permissions/permissions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/permissions/permissions.c b/src/modules/permissions/permissions.c index f6715556a35..810874e12bb 100644 --- a/src/modules/permissions/permissions.c +++ b/src/modules/permissions/permissions.c @@ -1030,7 +1030,7 @@ static sr_kemi_t sr_kemi_permissions_exports[] = { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("permissions"), str_init("allow_address"), - SR_KEMIP_INT, allow_source_address, + SR_KEMIP_INT, allow_address, { SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, From fae54e777e7110f7688405ed7526b16eeefd8f58 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:10:23 +0100 Subject: [PATCH 04/13] rtpengine: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/rtpengine/rtpengine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index 9704693eee8..387d7211ed3 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -3674,7 +3674,7 @@ static sr_kemi_t sr_kemi_rtpengine_exports[] = { }, { str_init("rtpengine"), str_init("set_rtpengine_set2"), SR_KEMIP_INT, ki_set_rtpengine_set2, - { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, From 363046c69362272e5904b9ed8ecc3f6bf0ee462d Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:11:41 +0100 Subject: [PATCH 05/13] sipcapture: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/sipcapture/sipcapture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sipcapture/sipcapture.c b/src/modules/sipcapture/sipcapture.c index fbb697d18b0..171e1d035c1 100644 --- a/src/modules/sipcapture/sipcapture.c +++ b/src/modules/sipcapture/sipcapture.c @@ -3114,7 +3114,7 @@ static sr_kemi_t sr_kemi_sipcapture_exports[] = { }, { str_init("sipcapture"), str_init("sip_capture_mode"), SR_KEMIP_INT, ki_sip_capture_mode, - { SR_KEMIP_NONE, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("sipcapture"), str_init("report_capture"), From ac631d2eab98381d4ae9567519004754c74a2c59 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:13:53 +0100 Subject: [PATCH 06/13] textops: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/textops/textops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 7d2f71cf21f..cafb4520be5 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -3832,12 +3832,12 @@ static sr_kemi_t sr_kemi_textops_exports[] = { }, { str_init("textops"), str_init("search_append"), SR_KEMIP_INT, ki_search_append, - { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("textops"), str_init("search_append_body"), SR_KEMIP_INT, ki_search_append_body, - { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("textops"), str_init("is_present_hf"), From 50602afdc829cc737fd0244afd22bb77b47796e4 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:14:09 +0100 Subject: [PATCH 07/13] textopsx: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/textopsx/textopsx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/textopsx/textopsx.c b/src/modules/textopsx/textopsx.c index d0133084737..a6d7abc65e1 100644 --- a/src/modules/textopsx/textopsx.c +++ b/src/modules/textopsx/textopsx.c @@ -2321,7 +2321,7 @@ static sr_kemi_t sr_kemi_textopsx_exports[] = { }, { str_init("textopsx"), str_init("remove_hf_value2"), SR_KEMIP_INT, ki_remove_hf_value2, - { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("textopsx"), str_init("include_hf_value"), From 2b714eb9e0ea652b106b91caff4ea1dc5094be91 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:33:19 +0100 Subject: [PATCH 08/13] xhttp: updating name of function and parameter type - Updating the name to reflect the original name. Mismatch between export and function declaration with regards to the type of parameters. --- src/modules/xhttp/xhttp_mod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/xhttp/xhttp_mod.c b/src/modules/xhttp/xhttp_mod.c index 8a542bfc8b1..f62013cd905 100644 --- a/src/modules/xhttp/xhttp_mod.c +++ b/src/modules/xhttp/xhttp_mod.c @@ -551,9 +551,9 @@ int bind_xhttp(xhttp_api_t* api) */ /* clang-format off */ static sr_kemi_t sr_kemi_xhttp_exports[] = { - { str_init("xhttp"), str_init("reply"), + { str_init("xhttp"), str_init("xhttp_reply"), SR_KEMIP_INT, xhttp_send_reply, - { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + { SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE } }, From a58dd4d2e5701a844bbbf677953fd8cefc4cbe5a Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:41:06 +0100 Subject: [PATCH 09/13] debugger: correcting function utilized by KEMI - Since constants are used as arguments on the called function I suppose the parameters are not necessary on the parent function --- src/modules/debugger/debugger_mod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/debugger/debugger_mod.c b/src/modules/debugger/debugger_mod.c index 5c973c57b5c..76da385c0dc 100644 --- a/src/modules/debugger/debugger_mod.c +++ b/src/modules/debugger/debugger_mod.c @@ -595,16 +595,16 @@ static int w_dbg_sip_msg(struct sip_msg* msg, char *level, char *facility) } /** - * dump pv_cache contents as json + * dump pv_cache contents as json with default parameters */ -static int ki_dbg_pv_dump(sip_msg_t* msg, char* mask, char* level) +static int ki_dbg_pv_dump(sip_msg_t* msg) { - dbg_dump_json(msg, DBG_DP_ALL, DBG_DP_ALL); + dbg_dump_json(msg, DBG_DP_ALL, L_DBG); return 1; } /** - * dump pv_cache contents as json + * dump pv_cache contents as json with explicit parameters */ static int ki_dbg_pv_dump_ex(sip_msg_t* msg, int mask, int level) { From 015ea781a7463b0c6b0b309484f5383e2cb0f4c2 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:43:13 +0100 Subject: [PATCH 10/13] kex: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/kex/kex_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/kex/kex_mod.c b/src/modules/kex/kex_mod.c index f58cf189b64..1f738c11a61 100644 --- a/src/modules/kex/kex_mod.c +++ b/src/modules/kex/kex_mod.c @@ -264,7 +264,7 @@ static sr_kemi_t sr_kemi_kex_exports[] = { }, { str_init("kex"), str_init("resetdebug"), SR_KEMIP_INT, ki_kex_resetdebug, - { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, From 9a0d3da1208072747780d4439dd867d558309dd6 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:45:14 +0100 Subject: [PATCH 11/13] lcr: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/lcr/lcr_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c index 2689e10b84a..eecab748f69 100644 --- a/src/modules/lcr/lcr_mod.c +++ b/src/modules/lcr/lcr_mod.c @@ -3374,7 +3374,7 @@ static sr_kemi_t sr_kemi_lcr_exports[] = { }, { str_init("lcr"), str_init("load_gws_furi"), SR_KEMIP_INT, ki_load_gws_furi, - { SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_NONE, + { SR_KEMIP_INT, SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("lcr"), str_init("next_gw"), From 43b4691a4496404a71830bb598a031a8fcc5331b Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:48:02 +0100 Subject: [PATCH 12/13] maxfwd: Updating code formatting - Utilize same formatting as all other KEMI exports --- src/modules/maxfwd/maxfwd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/maxfwd/maxfwd.c b/src/modules/maxfwd/maxfwd.c index c9679c1cadf..39344af9195 100644 --- a/src/modules/maxfwd/maxfwd.c +++ b/src/modules/maxfwd/maxfwd.c @@ -223,10 +223,11 @@ int bind_maxfwd(maxfwd_api_t *api) * */ static sr_kemi_t sr_kemi_maxfwd_exports[] = { - {str_init("maxfwd"), str_init("process_maxfwd"), SR_KEMIP_INT, - process_maxfwd_header, - {SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, - SR_KEMIP_NONE, SR_KEMIP_NONE}}, + { str_init("maxfwd"), str_init("process_maxfwd"), + SR_KEMIP_INT, process_maxfwd_header, + { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, {{0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0}}}; From a5a4db368696ea1acabb3059b464ac7d8125ba15 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sun, 26 Nov 2017 21:49:49 +0100 Subject: [PATCH 13/13] nathelper: updating the exported expected parameters to match the functions - Mismatch between export and function declaration with regards to the quantity of parameters --- src/modules/nathelper/nathelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 5e7b82b6171..440033db1a1 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -2394,7 +2394,7 @@ static sr_kemi_t sr_kemi_nathelper_exports[] = { }, { str_init("nathelper"), str_init("is_rfc1918"), SR_KEMIP_INT, is_rfc1918, - { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("nathelper"), str_init("add_contact_alias"),