Skip to content

Commit

Permalink
Fixed json results for negative integers
Browse files Browse the repository at this point in the history
  • Loading branch information
vladpaiu committed May 4, 2015
1 parent 65d3c88 commit 3bf8b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/json/json.c
Expand Up @@ -411,9 +411,9 @@ int pv_get_json (struct sip_msg* msg, pv_param_t* pvp, pv_value_t* val)

if( json_object_is_type(obj, json_type_int) )
{
val->rs.s = int2str(json_object_get_int(obj), &val->rs.len);
val->rs.s = sint2str(json_object_get_int(obj), &val->rs.len);
val->ri = json_object_get_int(obj);;
val->flags |= PV_VAL_INT|PV_TYPE_INT;
val->flags |= PV_VAL_INT|PV_TYPE_INT|PV_VAL_STR;

}
else if( json_object_is_type(obj, json_type_string))
Expand Down

0 comments on commit 3bf8b49

Please sign in to comment.