Module: kamailio
Branch: master
Commit: 0ccc6d380d6a939f1b33d77b853ee80b6332e23b
URL:
https://github.com/kamailio/kamailio/commit/0ccc6d380d6a939f1b33d77b853ee80…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2019-01-02T02:09:53+01:00
secfilter: fix a few errors from previous refactoring in commit #2ebd6a5b8570d6
---
Modified: src/modules/secfilter/secfilter.c
Modified: src/modules/secfilter/secfilter_rpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0ccc6d380d6a939f1b33d77b853ee80…
Patch:
https://github.com/kamailio/kamailio/commit/0ccc6d380d6a939f1b33d77b853ee80…
---
diff --git a/src/modules/secfilter/secfilter.c b/src/modules/secfilter/secfilter.c
index 7ae1153a62..ef1a7f1fb4 100644
--- a/src/modules/secfilter/secfilter.c
+++ b/src/modules/secfilter/secfilter.c
@@ -38,12 +38,12 @@ secf_data_p secf_data = NULL;
/* Static and shared functions */
static int mod_init(void);
-int init_data(void);
+int secf_init_data(void);
static int child_init(int rank);
static int rpc_init(void);
static void free_str_list(struct str_list *l);
static void free_sec_info(secf_info_p info);
-void free_data(void);
+void secf_free_data(void);
static void mod_destroy(void);
static int w_check_sqli(str val);
static int check_user(struct sip_msg *msg, int type);
@@ -621,7 +621,7 @@ static int mod_init(void)
{
LM_DBG("SECFILTER module init\n");
/* Init data to store database values */
- if(init_data() == -1)
+ if(secf_init_data() == -1)
return -1;
/* Init RPC */
if(rpc_init() < 0)
@@ -661,7 +661,7 @@ static void mod_destroy(void)
if(!secf_data)
return;
/* Free shared data */
- free_data();
+ secf_free_data();
/* Destroy lock */
lock_destroy(&secf_data->lock);
shm_free(secf_data);
diff --git a/src/modules/secfilter/secfilter_rpc.c
b/src/modules/secfilter/secfilter_rpc.c
index 002ff9e875..97adf5e633 100644
--- a/src/modules/secfilter/secfilter_rpc.c
+++ b/src/modules/secfilter/secfilter_rpc.c
@@ -54,7 +54,7 @@ static int get_type(char *ctype)
/* Add blacklist destination value */
-void rpc_add_dst(rpc_t *rpc, void *ctx)
+void secf_rpc_add_dst(rpc_t *rpc, void *ctx)
{
int number;
str data = STR_NULL;
@@ -88,7 +88,7 @@ void rpc_add_dst(rpc_t *rpc, void *ctx)
}
/* Add blacklist value */
-void rpc_add_bl(rpc_t *rpc, void *ctx)
+void secf_rpc_add_bl(rpc_t *rpc, void *ctx)
{
char *ctype = NULL;
str data = STR_NULL;
@@ -116,7 +116,7 @@ void rpc_add_bl(rpc_t *rpc, void *ctx)
/* Add whitelist value */
-void rpc_add_wl(rpc_t *rpc, void *ctx)
+void secf_rpc_add_wl(rpc_t *rpc, void *ctx)
{
char *ctype = NULL;
str data = STR_NULL;
@@ -148,7 +148,7 @@ void secf_rpc_reload(rpc_t *rpc, void *ctx)
{
secf_free_data();
- if(load_db() == -1) {
+ if(secf_load_db() == -1) {
LM_ERR("Error loading data from database\n");
rpc->rpl_printf(ctx, "Error loading data from database");
} else {
@@ -171,7 +171,7 @@ static void rpc_print_data(rpc_t *rpc, void *ctx, struct str_list
*list)
/* Print values */
-void rpc_print(rpc_t *rpc, void *ctx)
+void secf_rpc_print(rpc_t *rpc, void *ctx)
{
char *param = NULL;
int showall = 0;