|
@@ -704,7 +704,7 @@ static int mod_init(void)
|
|
|
rule_pt = (struct rule_info ***)shm_malloc(
|
|
|
sizeof(struct rule_info **) * (lcr_count_param + 1));
|
|
|
if(rule_pt == 0) {
|
|
|
- LM_ERR("no memory for rule hash table pointer table\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for rule hash table pointer table\n");
|
|
|
goto err;
|
|
|
}
|
|
|
memset(rule_pt, 0, sizeof(struct rule_info **) * (lcr_count_param + 1));
|
|
@@ -715,7 +715,7 @@ static int mod_init(void)
|
|
|
rule_pt[i] = (struct rule_info **)shm_malloc(
|
|
|
sizeof(struct rule_info *) * (lcr_rule_hash_size_param + 1));
|
|
|
if(rule_pt[i] == 0) {
|
|
|
- LM_ERR("no memory for rules hash table\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for rules hash table\n");
|
|
|
goto err;
|
|
|
}
|
|
|
memset(rule_pt[i], 0,
|
|
@@ -728,7 +728,7 @@ static int mod_init(void)
|
|
|
gw_pt = (struct gw_info **)shm_malloc(
|
|
|
sizeof(struct gw_info *) * (lcr_count_param + 1));
|
|
|
if(gw_pt == 0) {
|
|
|
- LM_ERR("no memory for gw table pointer table\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for gw table pointer table\n");
|
|
|
goto err;
|
|
|
}
|
|
|
memset(gw_pt, 0, sizeof(struct gw_info *) * (lcr_count_param + 1));
|
|
@@ -742,7 +742,7 @@ static int mod_init(void)
|
|
|
gw_pt[i] = (struct gw_info *)shm_malloc(
|
|
|
sizeof(struct gw_info) * (lcr_gw_count_param + 1));
|
|
|
if(gw_pt[i] == 0) {
|
|
|
- LM_ERR("no memory for gw table\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for gw table\n");
|
|
|
goto err;
|
|
|
}
|
|
|
memset(gw_pt[i], 0, sizeof(struct gw_info) * (lcr_gw_count_param + 1));
|
|
@@ -892,7 +892,7 @@ static pcre *reg_ex_comp(const char *pattern)
|
|
|
result = (pcre *)shm_malloc(size);
|
|
|
if(result == NULL) {
|
|
|
pcre_free(re);
|
|
|
- LM_ERR("not enough shared memory for compiled PCRE pattern\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for compiled PCRE pattern\n");
|
|
|
return (pcre *)0;
|
|
|
}
|
|
|
memcpy(result, re, size);
|
|
@@ -1032,7 +1032,7 @@ static int prefix_len_insert(
|
|
|
if(this->prefix_len < prefix_len) {
|
|
|
lcr_rec = shm_malloc(sizeof(struct rule_info));
|
|
|
if(lcr_rec == NULL) {
|
|
|
- LM_ERR("no shared memory for rule_info\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for rule_info\n");
|
|
|
return 0;
|
|
|
}
|
|
|
memset(lcr_rec, 0, sizeof(struct rule_info));
|
|
@@ -1047,7 +1047,7 @@ static int prefix_len_insert(
|
|
|
|
|
|
lcr_rec = shm_malloc(sizeof(struct rule_info));
|
|
|
if(lcr_rec == NULL) {
|
|
|
- LM_ERR("no shared memory for rule_info\n");
|
|
|
+ SHM_MEM_ERROR_FMT("for rule_info\n");
|
|
|
return 0;
|
|
|
}
|
|
|
memset(lcr_rec, 0, sizeof(struct rule_info));
|
|
@@ -1451,7 +1451,7 @@ int reload_tables()
|
|
|
rule_id_hash_table = pkg_malloc(
|
|
|
sizeof(struct rule_id_info *) * lcr_rule_hash_size_param);
|
|
|
if(!rule_id_hash_table) {
|
|
|
- LM_ERR("no pkg memory for rule_id hash table\n");
|
|
|
+ PKG_MEM_ERROR_FMT("for rule_id hash table\n");
|
|
|
goto err;
|
|
|
}
|
|
|
memset(rule_id_hash_table, 0,
|