Module: kamailio
Branch: master
Commit: ecb99f2ff1babe3871af5fba7d7f94e8b0df68cd
URL:
https://github.com/kamailio/kamailio/commit/ecb99f2ff1babe3871af5fba7d7f94e…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2024-11-22T12:37:09+01:00
jwt: add fixup_free* to exported functions
---
Modified: src/modules/jwt/jwt_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ecb99f2ff1babe3871af5fba7d7f94e…
Patch:
https://github.com/kamailio/kamailio/commit/ecb99f2ff1babe3871af5fba7d7f94e…
---
diff --git a/src/modules/jwt/jwt_mod.c b/src/modules/jwt/jwt_mod.c
index 90d8fa5bd03..64c78e63555 100644
--- a/src/modules/jwt/jwt_mod.c
+++ b/src/modules/jwt/jwt_mod.c
@@ -65,39 +65,45 @@ typedef struct jwt_fcache
static jwt_fcache_t *_jwt_fcache_list = NULL;
-static cmd_export_t cmds[] = {{"jwt_generate", (cmd_function)w_jwt_generate_4,
- 4, fixup_spve_all, 0, ANY_ROUTE},
- {"jwt_generate", (cmd_function)w_jwt_generate_3, 3, fixup_spve_all, 0,
- ANY_ROUTE},
- {"jwt_verify", (cmd_function)w_jwt_verify, 4, fixup_spve_all, 0,
- ANY_ROUTE},
- {"jwt_verify_key", (cmd_function)w_jwt_verify_key, 4, fixup_spve_all, 0,
- ANY_ROUTE},
- {0, 0, 0, 0, 0, 0}};
-
-static param_export_t params[] = {{"key_mode", PARAM_INT, &_jwt_key_mode},
+/* clang-format off */
+static cmd_export_t cmds[] = {
+ {"jwt_generate", (cmd_function)w_jwt_generate_4, 4, fixup_spve_all,
fixup_free_spve_all,
+ ANY_ROUTE},
+ {"jwt_generate", (cmd_function)w_jwt_generate_3, 3, fixup_spve_all,
fixup_free_spve_all,
+ ANY_ROUTE},
+ {"jwt_verify", (cmd_function)w_jwt_verify, 4, fixup_spve_all,
fixup_free_spve_all,
+ ANY_ROUTE},
+ {"jwt_verify_key", (cmd_function)w_jwt_verify_key, 4, fixup_spve_all,
fixup_free_spve_all,
+ ANY_ROUTE},
+ {0, 0, 0, 0, 0, 0}
+};
- {0, 0, 0}};
+static param_export_t params[] = {
+ {"key_mode", PARAM_INT, &_jwt_key_mode},
+ {0, 0, 0}
+};
static int jwt_pv_get(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
static int jwt_pv_parse_name(pv_spec_t *sp, str *in);
static pv_export_t mod_pvs[] = {
- {{"jwt", sizeof("jwt") - 1}, PVT_OTHER, jwt_pv_get, 0,
- jwt_pv_parse_name, 0, 0, 0},
- {{0, 0}, 0, 0, 0, 0, 0, 0, 0}};
+ {{"jwt", sizeof("jwt") - 1}, PVT_OTHER, jwt_pv_get, 0,
+ jwt_pv_parse_name, 0, 0, 0},
+ {{0, 0}, 0, 0, 0, 0, 0, 0, 0}
+};
struct module_exports exports = {
- "jwt", /* module name */
- DEFAULT_DLFLAGS, /* dlopen flags */
- cmds, /* cmd (cfg function) exports */
- params, /* param exports */
- 0, /* RPC method exports */
- mod_pvs, /* pseudo-variables exports */
- 0, /* response handling function */
- mod_init, /* module init function */
- child_init, /* per-child init function */
- mod_destroy /* module destroy function */
+ "jwt", /* module name */
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds, /* cmd (cfg function) exports */
+ params, /* param exports */
+ 0, /* RPC method exports */
+ mod_pvs, /* pseudo-variables exports */
+ 0, /* response handling function */
+ mod_init, /* module init function */
+ child_init, /* per-child init function */
+ mod_destroy /* module destroy function */
};
+/* clang-format on */
/**