aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-11-19 15:52:30 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-20 05:03:26 +0000
commitfb9c6905eff10f6f49a433ead8bd78e232fa068d (patch)
tree31154d39f805ba9527ad93a58f7dc7212799eef7 /epan
parente2a5ad1febd5352563407ad13057ef82f7756d43 (diff)
wsutil: rename some wsjson functions
Rename wsjson_unescape_json_string to json_decode_string_inplace (inspired by the g_base64_decode_inplace name). Rename wsjson_is_valid_json to json_validate (inspired by g_unichar_validate). Ideally json_parse is inlined with its user (sharkd_session.c), but that requires exporting the jsmn_init and jsmn_parse functions... Hence the dependency on jsmn.h remains in wsjson.h. Change-Id: I7ecfe3565f15516e9115cbd7e025362df2da5416 Reviewed-on: https://code.wireshark.org/review/30731 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index c9c88eac0d..9ab2dbddc4 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -755,7 +755,7 @@ dissect_json_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
guint len = tvb_captured_length(tvb);
const guint8* buf = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, len, ENC_ASCII);
- if (wsjson_is_valid_json(buf, len) == FALSE)
+ if (json_validate(buf, len) == FALSE)
return FALSE;
return (dissect_json(tvb, pinfo, tree, data) != 0);