aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-json.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-04-21 21:14:28 +0200
committerAnders Broman <a.broman58@gmail.com>2018-04-21 22:42:11 +0000
commit81263704b99fba82af883a82a22cf99c2a4e2ef9 (patch)
treefb6467d2cc523b55e6e2e61c5797e2b2c103edf4 /epan/dissectors/packet-json.c
parentd55499ed74ca52e8a79ae1d20e4aa668d0cd9f27 (diff)
wsutil: convert one leftover function in wsjson.
Change-Id: I8d65389dfd6bf373e751e3373d9f22d733d9b5e9 Reviewed-on: https://code.wireshark.org/review/27069 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-json.c')
-rw-r--r--epan/dissectors/packet-json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index 5d309a74b6..c3f413ad7e 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -747,7 +747,7 @@ static void init_json_parser(void) {
/* XXX, heur? */
}
-/* This function leverages the libjsmn to undestand if the payload is json or not
+/* This function tries to undestand if the payload is json or not
*/
static gboolean
dissect_json_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
@@ -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 (jsmn_is_json(buf, len) == FALSE)
+ if (wsjson_is_valid_json(buf, len) == FALSE)
return FALSE;
return (dissect_json(tvb, pinfo, tree, data) != 0);