Skip to content

Commit

Permalink
dialplan: Fix broken MI 'dp_show_partition' cmd and output
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Nov 5, 2020
1 parent ab32e58 commit 5947bad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/dialplan/dialplan.c
Expand Up @@ -660,7 +660,7 @@ static mi_response_t *mi_show_partition(const mi_params_t *params,
return 0;

parts_arr = add_mi_array(resp_obj, MI_SSTR("Partitions"));
if (parts_arr)
if (!parts_arr)
goto error;

el = dp_get_connections();
Expand All @@ -673,14 +673,14 @@ static mi_response_t *mi_show_partition(const mi_params_t *params,
el->partition.s, el->partition.len) < 0)
goto error;

if (add_mi_string(resp_obj, MI_SSTR("Table"),
if (add_mi_string(part_item, MI_SSTR("table"),
el->table_name.s, el->table_name.len) < 0)
goto error;

db_get_url(&el->db_url);
if(database_url.len == 0) goto error;

if (add_mi_string(resp_obj, MI_SSTR("db_url"),
if (add_mi_string(part_item, MI_SSTR("db_url"),
database_url.s, database_url.len) < 0)
goto error;

Expand Down

0 comments on commit 5947bad

Please sign in to comment.