Skip to content

Commit

Permalink
mtree: revert a0e4a9c and let db_table name not set by default
Browse files Browse the repository at this point in the history
- it breaks some runtime rpc commands, reported by GH #1057
- reset it also if set by mistake when mtree param is used
  • Loading branch information
miconda committed Apr 5, 2017
1 parent 338e5df commit a4cdacd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/mtree/mtree_mod.c
Expand Up @@ -74,7 +74,9 @@ CREATE TABLE mtrees (

/** parameters */
static str db_url = str_init(DEFAULT_DB_URL);
static str db_table = str_init("mtrees");
/* default name created by sql scripts is 'mtrees'
* - don't set it here with default value, only via config param */
static str db_table = str_init("");
static str tname_column = str_init("tname");
static str tprefix_column = str_init("tprefix");
static str tvalue_column = str_init("tvalue");
Expand Down Expand Up @@ -269,6 +271,9 @@ static int mod_init(void)
}
pt = pt->next;
}
/* reset db_table value */
db_table.s = "";
db_table.len = 0;
} else {
if(db_table.len<=0)
{
Expand Down

0 comments on commit a4cdacd

Please sign in to comment.