aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/json_dumper.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2019-03-22 22:00:53 +0100
committerDario Lombardo <lomato@gmail.com>2019-03-22 22:30:24 +0000
commited40d31801952b2d09c2b06523cd12811f7e208c (patch)
tree38dc3959ee4e56cae2160e4e915014b802135fb8 /wsutil/json_dumper.c
parent41e31a3e41146c5da7574e873541a46a26db6667 (diff)
json_dumper: flush dumper before printing an error.
This helps the developer in the debug phases. Change-Id: I85558334b5d618219a48a6c00129cd36a6ab0b10 Reviewed-on: https://code.wireshark.org/review/32531 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'wsutil/json_dumper.c')
-rw-r--r--wsutil/json_dumper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wsutil/json_dumper.c b/wsutil/json_dumper.c
index 93b03749f7..a45366aa6d 100644
--- a/wsutil/json_dumper.c
+++ b/wsutil/json_dumper.c
@@ -100,6 +100,7 @@ json_dumper_bad(json_dumper *dumper, enum json_dumper_change change,
/* Console output can be slow, disable log calls to speed up fuzzing. */
return;
}
+ fflush(dumper->output_file);
g_error("Bad json_dumper state: %s; change=%d type=%d depth=%d prev/curr/next state=%02x %02x %02x",
what, change, type, dumper->current_depth, states[0], states[1], states[2]);
}