Skip to content

Commit

Permalink
Fixed JSON fetching of array string fields
Browse files Browse the repository at this point in the history
(cherry picked from commit 843fdde)
  • Loading branch information
vladpaiu committed Jul 1, 2014
1 parent 7a463f4 commit b4b0a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/json/json.c
Expand Up @@ -410,7 +410,7 @@ int pv_get_json (struct sip_msg* msg, pv_param_t* pvp, pv_value_t* val)
{
val->flags = PV_VAL_STR;
val->rs.s = (char*)json_object_get_string( obj );
val->rs.len = strlen(val->rs.s);
val->rs.len = json_object_get_string_len( obj );
}

return 0;
Expand Down

2 comments on commit b4b0a76

@digipigeon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has caused problems for me, it compiled, but when I tried to start opensips, I got problem relating to json_object_get_string_len.

When I reverted the change it worked successfully

@vladpaiu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

Please update your sources again - OpenSIPS should compile and link fine now.

Best Regards,
Vlad

Please sign in to comment.