aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
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 /wsutil
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 'wsutil')
-rw-r--r--wsutil/wsjson.c4
-rw-r--r--wsutil/wsjson.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/wsutil/wsjson.c b/wsutil/wsjson.c
index 675f2a6ec3..7c0dafd19c 100644
--- a/wsutil/wsjson.c
+++ b/wsutil/wsjson.c
@@ -1,5 +1,5 @@
/* wsjson.c
- * Utility to check if a payload is json using libjsmn
+ * Utility to check if a payload is json using other libraries.
*
* Copyright 2016, Dario Lombardo
*
@@ -18,7 +18,7 @@
#include <wsutil/unicode-utils.h>
#include "log.h"
-gboolean jsmn_is_json(const guint8* buf, const size_t len)
+gboolean wsjson_is_valid_json(const guint8* buf, const size_t len)
{
/* We expect no more than 1024 tokens */
guint max_tokens = 1024;
diff --git a/wsutil/wsjson.h b/wsutil/wsjson.h
index e55f6a991d..e94409a6f0 100644
--- a/wsutil/wsjson.h
+++ b/wsutil/wsjson.h
@@ -25,7 +25,7 @@ extern "C" {
/**
* Check if a buffer is json an returns true if it is.
*/
-WS_DLL_PUBLIC gboolean jsmn_is_json(const guint8* buf, const size_t len);
+WS_DLL_PUBLIC gboolean wsjson_is_valid_json(const guint8* buf, const size_t len);
WS_DLL_PUBLIC int wsjson_parse(const char *buf, jsmntok_t *tokens, unsigned int max_tokens);