Module: kamailio Branch: master Commit: 8a61b4607d6d079131bdbfff86c3e28167a12605 URL: https://github.com/kamailio/kamailio/commit/8a61b4607d6d079131bdbfff86c3e281...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-07-19T11:06:11+02:00
geoip: reformat static export structures
---
Modified: src/modules/geoip/geoip_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/8a61b4607d6d079131bdbfff86c3e281... Patch: https://github.com/kamailio/kamailio/commit/8a61b4607d6d079131bdbfff86c3e281...
---
diff --git a/src/modules/geoip/geoip_mod.c b/src/modules/geoip/geoip_mod.c index f95ee001d33..9c953d06d74 100644 --- a/src/modules/geoip/geoip_mod.c +++ b/src/modules/geoip/geoip_mod.c @@ -45,31 +45,38 @@ static void mod_destroy(void); static int w_geoip_match(struct sip_msg *msg, char *str1, char *str2); static int geoip_match(sip_msg_t *msg, str *tomatch, str *pvclass);
+/* clang-format off */ static pv_export_t mod_pvs[] = { - {{"gip", sizeof("gip") - 1}, PVT_OTHER, pv_get_geoip, 0, + {{"gip", sizeof("gip") - 1}, PVT_OTHER, pv_get_geoip, 0, pv_parse_geoip_name, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +};
-static cmd_export_t cmds[] = {{"geoip_match", (cmd_function)w_geoip_match, 2, - fixup_spve_spve, 0, ANY_ROUTE}, - {0, 0, 0, 0, 0, 0}}; +static cmd_export_t cmds[] = { + {"geoip_match", (cmd_function)w_geoip_match, 2, + fixup_spve_spve, 0, ANY_ROUTE}, + {0, 0, 0, 0, 0, 0} +};
static param_export_t params[] = { - {"path", PARAM_STRING, &geoip_path}, {0, 0, 0}}; + {"path", PARAM_STRING, &geoip_path}, + {0, 0, 0} +};
struct module_exports exports = { - "geoip", /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, /* exported functions */ - params, /* exported parameters */ - 0, /* RPC method exports */ - mod_pvs, /* exported pseudo-variables */ - 0, /* response handling function */ - mod_init, /* module initialization function */ - 0, /* per-child init function */ - mod_destroy /* module destroy function */ + "geoip", /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + mod_pvs, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init, /* module initialization function */ + 0, /* per-child init function */ + mod_destroy /* module destroy function */ }; +/* clang-format on */
/**