Module: kamailio
Branch: master
Commit: bb85dd83c0ecd9877dd8dd8ad61fb38aa308c0ee
URL:
https://github.com/kamailio/kamailio/commit/bb85dd83c0ecd9877dd8dd8ad61fb38…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-12-12T17:11:11+01:00
maxfwd: reformat exported structures
---
Modified: src/modules/maxfwd/maxfwd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bb85dd83c0ecd9877dd8dd8ad61fb38…
Patch:
https://github.com/kamailio/kamailio/commit/bb85dd83c0ecd9877dd8dd8ad61fb38…
---
diff --git a/src/modules/maxfwd/maxfwd.c b/src/modules/maxfwd/maxfwd.c
index 25e1d184a8c..1ddd162d20d 100644
--- a/src/modules/maxfwd/maxfwd.c
+++ b/src/modules/maxfwd/maxfwd.c
@@ -40,6 +40,12 @@
MODULE_VERSION
+static int w_process_maxfwd_header(struct sip_msg *msg, char *str, char *str2);
+static int is_maxfwd_lt(struct sip_msg *msg, char *slimit, char *foo);
+static int mod_init(void);
+
+int bind_maxfwd(maxfwd_api_t *api);
+
/* clang-format off */
struct cfg_group_maxfwd {
int max_limit;
@@ -52,16 +58,10 @@ static struct cfg_group_maxfwd default_maxfwd_cfg = {
static void *maxfwd_cfg = &default_maxfwd_cfg;
static cfg_def_t maxfwd_cfg_def[] = {
- {"max_limit", CFG_VAR_INT, 0, 255, 0, 0, "Max. maxfwd
limit"},
- {0, 0, 0, 0, 0, 0}
+ {"max_limit", CFG_VAR_INT, 0, 255, 0, 0, "Max. maxfwd limit"},
+ {0, 0, 0, 0, 0, 0}
};
-static int w_process_maxfwd_header(struct sip_msg* msg,char* str,char* str2);
-static int is_maxfwd_lt(struct sip_msg *msg, char *slimit, char *foo);
-static int mod_init(void);
-
-int bind_maxfwd(maxfwd_api_t *api);
-
static cmd_export_t cmds[]={
{"maxfwd_process", (cmd_function)w_process_maxfwd_header, 1,
fixup_var_int_1, 0, REQUEST_ROUTE},
@@ -69,7 +69,6 @@ static cmd_export_t cmds[]={
fixup_var_int_1, 0, REQUEST_ROUTE},
{"process_maxfwd", (cmd_function)w_process_maxfwd_header, 1,
fixup_var_int_1, 0, REQUEST_ROUTE},
-
{"is_maxfwd_lt", (cmd_function)is_maxfwd_lt, 1,
fixup_var_int_1, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
{"maxfwd_at_least", (cmd_function)is_maxfwd_lt, 1,
@@ -77,18 +76,15 @@ static cmd_export_t cmds[]={
{"mf_lowlimit", (cmd_function)is_maxfwd_lt, 1,
fixup_var_int_1, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
- {"bind_maxfwd", (cmd_function)bind_maxfwd, 0,
- 0, 0, 0},
+ {"bind_maxfwd", (cmd_function)bind_maxfwd, 0, 0, 0, 0},
{0,0,0,0,0,0}
};
static param_export_t params[]={
- {"max_limit", PARAM_INT, &default_maxfwd_cfg.max_limit},
+ {"max_limit", PARAM_INT, &default_maxfwd_cfg.max_limit},
{0,0,0}
};
-
-
struct module_exports exports= {
"maxfwd",
DEFAULT_DLFLAGS, /* dlopen flags */