Module: kamailio
Branch: 5.8
Commit: c9edb30ffa0c9544a10d0e72aabe84a1b3b2a103
URL:
https://github.com/kamailio/kamailio/commit/c9edb30ffa0c9544a10d0e72aabe84a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-01T08:07:25+02:00
keepalive: reformat module exports structures
(cherry picked from commit dd221a6e5162838b979fd38ffdfb750663aef869)
---
Modified: src/modules/keepalive/keepalive_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c9edb30ffa0c9544a10d0e72aabe84a…
Patch:
https://github.com/kamailio/kamailio/commit/c9edb30ffa0c9544a10d0e72aabe84a…
---
diff --git a/src/modules/keepalive/keepalive_mod.c
b/src/modules/keepalive/keepalive_mod.c
index 6b49603c303..4757b4346d5 100644
--- a/src/modules/keepalive/keepalive_mod.c
+++ b/src/modules/keepalive/keepalive_mod.c
@@ -70,39 +70,45 @@ str ka_ping_from = str_init("sip:keepalive@kamailio.org");
int ka_counter_del = 5;
-static cmd_export_t cmds[] = {{"ka_is_alive", (cmd_function)w_cmd_is_alive, 1,
- fixup_spve_null, 0, ANY_ROUTE},
- // internal API
- {"ka_add_destination", (cmd_function)w_add_destination, 2,
- fixup_add_destination, 0,
- REQUEST_ROUTE | BRANCH_ROUTE | ONREPLY_ROUTE},
- {"ka_del_destination", (cmd_function)w_del_destination, 2,
- fixup_add_destination, 0, ANY_ROUTE},
- {"bind_keepalive", (cmd_function)bind_keepalive, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0}};
+/* clang-format off */
+static cmd_export_t cmds[] = {
+ {"ka_is_alive", (cmd_function)w_cmd_is_alive, 1,
+ fixup_spve_null, 0, ANY_ROUTE},
+ // internal API
+ {"ka_add_destination", (cmd_function)w_add_destination, 2,
+ fixup_add_destination, 0, REQUEST_ROUTE | BRANCH_ROUTE | ONREPLY_ROUTE},
+ {"ka_del_destination", (cmd_function)w_del_destination, 2,
+ fixup_add_destination, 0, ANY_ROUTE},
+ {"bind_keepalive", (cmd_function)bind_keepalive, 0, 0, 0, 0},
+
+ {0, 0, 0, 0, 0, 0}
+};
static param_export_t params[] = {
- {"ping_interval", PARAM_INT, &ka_ping_interval},
- {"destination", PARAM_STRING | USE_FUNC_PARAM,
- (void *)ka_mod_add_destination},
- {"ping_from", PARAM_STR, &ka_ping_from},
- {"delete_counter", PARAM_INT, &ka_counter_del}, {0, 0, 0}};
+ {"ping_interval", PARAM_INT, &ka_ping_interval},
+ {"destination", PARAM_STRING | USE_FUNC_PARAM,
+ (void *)ka_mod_add_destination},
+ {"ping_from", PARAM_STR, &ka_ping_from},
+ {"delete_counter", PARAM_INT, &ka_counter_del},
+ {0, 0, 0}
+};
/** module exports */
struct module_exports exports = {
- "keepalive", /* module name */
- DEFAULT_DLFLAGS, /* dlopen flags */
- cmds, /* cmd (cfg function) exports */
- params, /* param exports */
- 0, /* RPC method exports */
- 0, /* pseudo-variables exports */
- 0, /* response handling function */
- mod_init, /* module init function */
- 0, /* per-child init function */
- mod_destroy /* module destroy function */
+ "keepalive", /* module name */
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds, /* cmd (cfg function) exports */
+ params, /* param exports */
+ 0, /* RPC method exports */
+ 0, /* pseudo-variables exports */
+ 0, /* response handling function */
+ mod_init, /* module init function */
+ 0, /* per-child init function */
+ mod_destroy /* module destroy function */
};
+/* clang-format on */
/**