Skip to content

Commit

Permalink
dialog: fix profile_get_values to get the proper counter
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jun 15, 2015
1 parent cfb7415 commit 1a89f57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/dialog/dlg_profile.c
Expand Up @@ -1050,13 +1050,15 @@ static inline int add_val_to_rpl(void * param, str key, void * val)
struct mi_attr* attr;
int len;
char *p;
int counter;

node = add_mi_node_child(rpl, MI_DUP_VALUE, "value", 5, key.s , key.len );

if( node == NULL )
return -1;

p= int2str((unsigned long)val, &len);
counter = repl_prof_get_all(&val);
p= int2str((unsigned long)counter, &len);
attr = add_mi_attr(node, MI_DUP_VALUE, "count", 5, p, len );

if( attr == NULL )
Expand Down

0 comments on commit 1a89f57

Please sign in to comment.