Skip to content

Commit

Permalink
[cachedb_local] multiple fixes
Browse files Browse the repository at this point in the history
	* leave the must-have first 3 parameteres in lcache_con
structure definition as they are in cachedb api implementation;
	* avoid not freeing last url in mod init;
  • Loading branch information
ionutrazvanionita committed Jan 23, 2017
1 parent 26a5453 commit db06788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions modules/cachedb_local/cachedb_local.c
Expand Up @@ -387,9 +387,6 @@ static int mod_init(void)

if ( it ) {
while (it) {
if (foo)
pkg_free(foo);

con = lcache_init(&it->url);
if (con == NULL) {
LM_ERR("failed to init connection for collection <%.*s>!\n",0,"");
Expand All @@ -403,6 +400,7 @@ static int mod_init(void)

foo = it;
it = it->next;
pkg_free(foo);
}
} else {
/* no url defined; keep old functionality */
Expand Down
5 changes: 3 additions & 2 deletions modules/cachedb_local/cachedb_local.h
Expand Up @@ -39,10 +39,11 @@ extern int local_exec_threshold;

typedef struct {
struct cachedb_id *id;
/* local cache hash structure */
struct lcache_col* col;
unsigned int ref;
struct cachedb_pool_con_t *next;

/* local cache hash structure */
struct lcache_col* col;
} lcache_con;

typedef struct lcache_col {
Expand Down

0 comments on commit db06788

Please sign in to comment.