Ver Fonte

secfilter: fix a few errors from previous refactoring in commit #2ebd6a5b8570d6

Henning Westerholt há 6 anos atrás
pai
commit
0ccc6d380d

+ 4 - 4
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);

+ 5 - 5
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;