From 2cd8459ddb9a42c8c93bd7db688a913a0ac038b2 Mon Sep 17 00:00:00 2001 From: Chris Maynard Date: Fri, 31 Dec 2010 18:03:23 +0000 Subject: From Jakub Zawadzki via bug 4753: New dissector: JSON, w/minor changes by me: 1) Add links to RFC 4627 and the json.org web site. 2) Comment out hf_json_member_key to keep tools/checkhf.pl happy. 3) Avoid duplicate (application/json) from being displayed in Info column. svn path=/trunk/; revision=35317 --- epan/tvbparse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/tvbparse.c') diff --git a/epan/tvbparse.c b/epan/tvbparse.c index 01d7936af4..8564b52da2 100644 --- a/epan/tvbparse.c +++ b/epan/tvbparse.c @@ -451,7 +451,7 @@ static int cond_one_of(tvbparse_t* tt, const int offset, const tvbparse_wanted_t int curr_len; if ( offset + w->len > tt->end_offset ) - return -1; + continue; curr_len = w->condition(tt, offset, w, &new); @@ -503,12 +503,12 @@ static int cond_hash(tvbparse_t* tt, const int offset, const tvbparse_wanted_t* int value_len; tvbparse_elem_t* value_elem = NULL; int tot_len; + tvbparse_elem_t* ret_tok; #ifdef TVBPARSE_DEBUG if (TVBPARSE_DEBUG & TVBPARSE_DEBUG_HASH) g_warning("cond_hash: START"); #endif - tvbparse_elem_t* ret_tok; if ( offset > tt->end_offset ) return -1; @@ -682,7 +682,7 @@ static int cond_some(tvbparse_t* tt, int offset, const tvbparse_wanted_t * wante return -1; if ( wanted->min == 0 ) { - ret_tok = new_tok(tt,wanted->id,tt->offset,0,wanted); + ret_tok = new_tok(tt,wanted->id,offset,0,wanted); } while (got_so_far < wanted->max) { -- cgit v1.2.3