diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-09 11:54:18 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-09 19:55:13 +0000 |
commit | 09f5ff4fc6895f375b3ea07f6151d8e09377fd52 (patch) | |
tree | 5829d926242a6297803d52417c41ea5512536c23 /wiretap/pcapng.c | |
parent | fe12759b8e0370dd3e4e8434b4140c098ade7a38 (diff) | |
download | wireshark-09f5ff4fc6895f375b3ea07f6151d8e09377fd52.tar.gz |
Call the dumper routine to finish write a file the "finish" routine.
It doesn't actually *close* any handle, so it's best called a "finish"
routine rather than a "close" routine.
In libwiretap modules, don't bother setting the finish routine pointer
to null - it's already initialized to null (it's probably best not to
require modules to set it).
Change-Id: I19554f3fb826db495f17b36600ae36222cbc21b0
Reviewed-on: https://code.wireshark.org/review/11659
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/pcapng.c')
-rw-r--r-- | wiretap/pcapng.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index 5ccaed3fb5..a9cad5fc4f 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -3912,7 +3912,7 @@ static gboolean pcapng_dump(wtap_dumper *wdh, /* Finish writing to a dump file. Returns TRUE on success, FALSE on failure. */ -static gboolean pcapng_dump_close(wtap_dumper *wdh, int *err) +static gboolean pcapng_dump_finish(wtap_dumper *wdh, int *err) { guint i, j; @@ -3929,14 +3929,14 @@ static gboolean pcapng_dump_close(wtap_dumper *wdh, int *err) wtapng_if_stats_t if_stats; if_stats = g_array_index(int_data.interface_statistics, wtapng_if_stats_t, j); - pcapng_debug("pcapng_dump_close: write ISB for interface %u",if_stats.interface_id); + pcapng_debug("pcapng_dump_finish: write ISB for interface %u",if_stats.interface_id); if (!pcapng_write_interface_statistics_block(wdh, &if_stats, err)) { return FALSE; } } } - pcapng_debug("pcapng_dump_close"); + pcapng_debug("pcapng_dump_finish"); return TRUE; } @@ -3951,7 +3951,7 @@ pcapng_dump_open(wtap_dumper *wdh, int *err) pcapng_debug("pcapng_dump_open"); /* This is a pcapng file */ wdh->subtype_write = pcapng_dump; - wdh->subtype_close = pcapng_dump_close; + wdh->subtype_finish = pcapng_dump_finish; if (wdh->interface_data->len == 0) { pcapng_debug("There are no interfaces. Can't handle that..."); |