aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/lanalyzer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-09 11:54:18 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-09 19:55:13 +0000
commit09f5ff4fc6895f375b3ea07f6151d8e09377fd52 (patch)
tree5829d926242a6297803d52417c41ea5512536c23 /wiretap/lanalyzer.c
parentfe12759b8e0370dd3e4e8434b4140c098ade7a38 (diff)
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/lanalyzer.c')
-rw-r--r--wiretap/lanalyzer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c
index af8f7514aa..50ce3339e0 100644
--- a/wiretap/lanalyzer.c
+++ b/wiretap/lanalyzer.c
@@ -273,7 +273,7 @@ static gboolean lanalyzer_read(wtap *wth, int *err, gchar **err_info,
gint64 *data_offset);
static gboolean lanalyzer_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info);
-static gboolean lanalyzer_dump_close(wtap_dumper *wdh, int *err);
+static gboolean lanalyzer_dump_finish(wtap_dumper *wdh, int *err);
wtap_open_return_val lanalyzer_open(wtap *wth, int *err, gchar **err_info)
{
@@ -740,9 +740,9 @@ gboolean lanalyzer_dump_open(wtap_dumper *wdh, int *err)
}
((LA_TmpInfo*)tmp)->init = FALSE;
- wdh->priv = tmp;
- wdh->subtype_write = lanalyzer_dump;
- wdh->subtype_close = lanalyzer_dump_close;
+ wdh->priv = tmp;
+ wdh->subtype_write = lanalyzer_dump;
+ wdh->subtype_finish = lanalyzer_dump_finish;
/* Some of the fields in the file header aren't known yet so
just skip over it for now. It will be created after all
@@ -894,7 +894,7 @@ static gboolean lanalyzer_dump_header(wtap_dumper *wdh, int *err)
* Finish writing to a dump file.
* Returns TRUE on success, FALSE on failure.
*---------------------------------------------------*/
-static gboolean lanalyzer_dump_close(wtap_dumper *wdh, int *err)
+static gboolean lanalyzer_dump_finish(wtap_dumper *wdh, int *err)
{
lanalyzer_dump_header(wdh,err);
return *err ? FALSE : TRUE;