Skip to content

Commit

Permalink
Fix init of the cachedb related module params
Browse files Browse the repository at this point in the history
Init val_prefix, noval_prefix and size_prefix before general cachedb init.
Credits go to @Tinet-AaronAn
Closes #1203

(cherry picked from commit ec8d6a9)
  • Loading branch information
bogdan-iancu committed Oct 19, 2017
1 parent 862ec4f commit 77683dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/dialog/dialog.c
Expand Up @@ -813,15 +813,15 @@ static int mod_init(void)

/* we are only interested in these parameters if the cachedb url was defined */
if (cdb_url.s) {
cdb_val_prefix.len = strlen(cdb_val_prefix.s);
cdb_noval_prefix.len = strlen(cdb_noval_prefix.s);
cdb_size_prefix.len = strlen(cdb_size_prefix.s);
cdb_url.len = strlen(cdb_url.s);

if (init_cachedb_utils() <0) {
LM_ERR("cannot init cachedb utils\n");
return -1;
}

cdb_val_prefix.len = strlen(cdb_val_prefix.s);
cdb_noval_prefix.len = strlen(cdb_noval_prefix.s);
cdb_size_prefix.len = strlen(cdb_size_prefix.s);
}

/* allocate a slot in the processing context */
Expand Down

0 comments on commit 77683dd

Please sign in to comment.