From fb9c6905eff10f6f49a433ead8bd78e232fa068d Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 19 Nov 2018 15:52:30 +0100 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- wiretap/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wiretap/json.c') diff --git a/wiretap/json.c b/wiretap/json.c index 8bb7fe4d20..5c1b1bf796 100644 --- a/wiretap/json.c +++ b/wiretap/json.c @@ -42,7 +42,7 @@ wtap_open_return_val json_open(wtap *wth, int *err, gchar **err_info) return WTAP_OPEN_NOT_MINE; } - if (wsjson_is_valid_json(filebuf, bytes_read) == FALSE) { + if (json_validate(filebuf, bytes_read) == FALSE) { g_free(filebuf); return WTAP_OPEN_NOT_MINE; } -- cgit v1.2.3