Skip to content

Commit

Permalink
clusterer: Fix custom DB table / column names
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Apr 11, 2018
1 parent 9de4865 commit 0ff609d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion modules/clusterer/clusterer_mod.c
Expand Up @@ -130,7 +130,7 @@ static param_export_t params[] = {
{"url_col", STR_PARAM, &url_col.s },
{"state_col", STR_PARAM, &state_col.s },
{"no_ping_retries_col", STR_PARAM, &no_ping_retries_col.s },
{"priority_col", STR_PARAM, &priority_col },
{"priority_col", STR_PARAM, &priority_col.s },
{"sip_addr_col", STR_PARAM, &sip_addr_col.s },
{"flags_col", STR_PARAM, &flags_col.s },
{"description_col", STR_PARAM, &description_col.s },
Expand Down Expand Up @@ -263,6 +263,18 @@ static int mod_init(void)

LM_INFO("Clusterer module - initializing\n");

db_table.len = strlen(db_table.s);
id_col.len = strlen(id_col.s);
cluster_id_col.len = strlen(cluster_id_col.s);
node_id_col.len = strlen(node_id_col.s);
url_col.len = strlen(url_col.s);
state_col.len = strlen(state_col.s);
no_ping_retries_col.len = strlen(no_ping_retries_col.s);
priority_col.len = strlen(priority_col.s);
sip_addr_col.len = strlen(sip_addr_col.s);
flags_col.len = strlen(flags_col.s);
description_col.len = strlen(description_col.s);

/* only allow the DB URL to be skipped in "P2P discovery" mode */
init_db_url(clusterer_db_url, db_mode == 0);

Expand Down

0 comments on commit 0ff609d

Please sign in to comment.