Module: kamailio
Branch: master
Commit: 525dc4523ac411e1154c3ae8af1ec6f8678d1dbc
URL:
https://github.com/kamailio/kamailio/commit/525dc4523ac411e1154c3ae8af1ec6f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-28T10:20:40+01:00
jansson: reformat exported structures
---
Modified: src/modules/jansson/jansson_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/525dc4523ac411e1154c3ae8af1ec6f…
Patch:
https://github.com/kamailio/kamailio/commit/525dc4523ac411e1154c3ae8af1ec6f…
---
diff --git a/src/modules/jansson/jansson_mod.c b/src/modules/jansson/jansson_mod.c
index 820a5492574..816cb130fa9 100644
--- a/src/modules/jansson/jansson_mod.c
+++ b/src/modules/jansson/jansson_mod.c
@@ -61,42 +61,44 @@ int janssonmod_get_field(
return janssonmod_get(msg, path_in, jansson_in, result);
}
+/* clang-format off */
/* Exported functions */
static cmd_export_t cmds[] = {
- {"jansson_get", (cmd_function)janssonmod_get, 3, fixup_get_params,
- fixup_get_params_free, ANY_ROUTE},
- {"jansson_pv_get", (cmd_function)janssonmod_pv_get, 3,
- fixup_pv_get_params, fixup_pv_get_params_free, ANY_ROUTE},
- {"jansson_array_size", (cmd_function)janssonmod_array_size, 3,
- fixup_get_params, fixup_get_params_free, ANY_ROUTE},
- {"jansson_set", (cmd_function)janssonmod_set_replace, 4,
- fixup_set_params, fixup_set_params_free, ANY_ROUTE},
- {"jansson_append", (cmd_function)janssonmod_set_append, 4,
- fixup_set_params, fixup_set_params_free, ANY_ROUTE},
- {"jansson_xdecode", (cmd_function)jansson_xdecode, 2, fixup_spve_spve,
- fixup_free_spve_spve, ANY_ROUTE},
- {"jansson_xencode", (cmd_function)jansson_xencode, 2, fixup_xencode,
- fixup_xencode_free, ANY_ROUTE},
- /* for backwards compatibility */
- {"jansson_get_field", (cmd_function)janssonmod_get_field, 3,
- fixup_get_params, fixup_get_params_free, ANY_ROUTE},
- /* non-script functions */
- {"jansson_to_val", (cmd_function)jansson_to_val, 0, 0, 0, 0},
-
- {0, 0, 0, 0, 0, 0}};
+ {"jansson_get", (cmd_function)janssonmod_get, 3, fixup_get_params,
+ fixup_get_params_free, ANY_ROUTE},
+ {"jansson_pv_get", (cmd_function)janssonmod_pv_get, 3,
+ fixup_pv_get_params, fixup_pv_get_params_free, ANY_ROUTE},
+ {"jansson_array_size", (cmd_function)janssonmod_array_size, 3,
+ fixup_get_params, fixup_get_params_free, ANY_ROUTE},
+ {"jansson_set", (cmd_function)janssonmod_set_replace, 4,
+ fixup_set_params, fixup_set_params_free, ANY_ROUTE},
+ {"jansson_append", (cmd_function)janssonmod_set_append, 4,
+ fixup_set_params, fixup_set_params_free, ANY_ROUTE},
+ {"jansson_xdecode", (cmd_function)jansson_xdecode, 2, fixup_spve_spve,
+ fixup_free_spve_spve, ANY_ROUTE},
+ {"jansson_xencode", (cmd_function)jansson_xencode, 2, fixup_xencode,
+ fixup_xencode_free, ANY_ROUTE},
+ {"jansson_get_field", (cmd_function)janssonmod_get_field, 3,
+ fixup_get_params, fixup_get_params_free, ANY_ROUTE},
+ /* non-script functions */
+ {"jansson_to_val", (cmd_function)jansson_to_val, 0, 0, 0, 0},
+
+ {0, 0, 0, 0, 0, 0}
+};
struct module_exports exports = {
- "jansson", /* module name */
- DEFAULT_DLFLAGS, /* dlopen flags */
- cmds, /* cmd (cfg function) exports */
- 0, /* param exports */
- 0, /* RPC method exports */
- 0, /* pseudo-variables exports */
- 0, /* response handling function */
- mod_init, /* module init function */
- 0, /* per-child init function */
- 0 /* module destroy function */
+ "jansson", /* module name */
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds, /* cmd (cfg function) exports */
+ 0, /* param exports */
+ 0, /* RPC method exports */
+ 0, /* pseudo-variables exports */
+ 0, /* response handling function */
+ mod_init, /* module init function */
+ 0, /* per-child init function */
+ 0 /* module destroy function */
};
+/* clang-format off */
static int fixup_get_params(void **param, int param_no)