diff options
author | Guy Harris <gharris@sonic.net> | 2020-08-09 14:41:11 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-08-09 23:08:51 +0000 |
commit | 74e917fc6ce8f2577dd15637b29ced31a0d1ebbf (patch) | |
tree | f299822096193b72170b763b7eb8e541cdc5245a /randpkt_core | |
parent | fcd7492566f8cdb1bdce6c6bdc9f65a889e2de97 (diff) |
wiretap: have wtap_dump_flush(), and its callers, check for errors.
Change-Id: Ibcddf1a949f775afa49d36a2d165c3685556035d
Reviewed-on: https://code.wireshark.org/review/38104
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'randpkt_core')
-rw-r--r-- | randpkt_core/randpkt_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/randpkt_core/randpkt_core.c b/randpkt_core/randpkt_core.c index 3505f38c17..9fbe22d31e 100644 --- a/randpkt_core/randpkt_core.c +++ b/randpkt_core/randpkt_core.c @@ -626,7 +626,11 @@ void randpkt_loop(randpkt_example* example, guint64 produce_count, guint64 packe } if (packet_delay_ms) { g_usleep(1000 * (gulong)packet_delay_ms); - wtap_dump_flush(example->dump); + if (!wtap_dump_flush(example->dump, &err)) { + cfile_write_failure_message("randpkt", NULL, + example->filename, err, NULL, 0, + WTAP_FILE_TYPE_SUBTYPE_PCAP); + } } } |