Module: kamailio Branch: master Commit: 4534d71f0e3f53d3f13ecd760e07d6d402b666c4 URL: https://github.com/kamailio/kamailio/commit/4534d71f0e3f53d3f13ecd760e07d6d4...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-09-10T07:51:05+02:00
permissions: use core fixup function
- add a few fixup-free functions to exports
---
Modified: src/modules/permissions/permissions.c
---
Diff: https://github.com/kamailio/kamailio/commit/4534d71f0e3f53d3f13ecd760e07d6d4... Patch: https://github.com/kamailio/kamailio/commit/4534d71f0e3f53d3f13ecd760e07d6d4...
---
diff --git a/src/modules/permissions/permissions.c b/src/modules/permissions/permissions.c index f91f1a0f112..fadedc4fe53 100644 --- a/src/modules/permissions/permissions.c +++ b/src/modules/permissions/permissions.c @@ -114,8 +114,6 @@ static int single_fixup(void **param, int param_no); */ static int double_fixup(void **param, int param_no);
-static int fixup_allow_address(void **param, int param_no); - static int allow_routing_0(struct sip_msg *msg, char *str1, char *str2); static int allow_routing_1(struct sip_msg *msg, char *basename, char *str2); static int allow_routing_2( @@ -159,10 +157,10 @@ static cmd_export_t cmds[] = { fixup_free_spve_all, ANY_ROUTE}, {"allow_uri", (cmd_function)allow_uri, 2, double_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE}, - {"allow_address", (cmd_function)w_allow_address, 3, fixup_allow_address, - 0, ANY_ROUTE}, + {"allow_address", (cmd_function)w_allow_address, 3, fixup_isi, + fixup_free_isi, ANY_ROUTE}, {"allow_source_address", (cmd_function)w_allow_source_address, 1, - fixup_igp_null, 0, ANY_ROUTE}, + fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, {"allow_source_address", (cmd_function)w_allow_source_address, 0, 0, 0, ANY_ROUTE}, {"allow_source_address_group", (cmd_function)allow_source_address_group, @@ -1038,20 +1036,6 @@ int allow_test(char *file, char *uri, char *contact) return 1; }
-/** - * - */ -static int fixup_allow_address(void **param, int param_no) -{ - if(param_no == 1) - return fixup_igp_null(param, 1); - if(param_no == 2) - return fixup_spve_null(param, 1); - if(param_no == 3) - return fixup_igp_null(param, 1); - return 0; -} - static const char *rpc_trusted_reload_doc[2] = { "Reload permissions trusted table", 0};