summaryrefslogtreecommitdiff
path: root/wiretap/ngsniffer.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/ngsniffer.c
parentfe12759b8e0370dd3e4e8434b4140c098ade7a38 (diff)
downloadwireshark-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/ngsniffer.c')
-rw-r--r--wiretap/ngsniffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index ed89e61233..79fd2971e2 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -527,7 +527,7 @@ static void ngsniffer_sequential_close(wtap *wth);
static void ngsniffer_close(wtap *wth);
static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
const guint8 *pd, int *err, gchar **err_info);
-static gboolean ngsniffer_dump_close(wtap_dumper *wdh, int *err);
+static gboolean ngsniffer_dump_finish(wtap_dumper *wdh, int *err);
static int SnifferDecompress( unsigned char * inbuf, size_t inlen,
unsigned char * outbuf, size_t outlen, int *err, gchar **err_info );
static gboolean ng_read_bytes_or_eof(wtap *wth, void *buffer,
@@ -1970,7 +1970,7 @@ ngsniffer_dump_open(wtap_dumper *wdh, int *err)
/* This is a sniffer file */
wdh->subtype_write = ngsniffer_dump;
- wdh->subtype_close = ngsniffer_dump_close;
+ wdh->subtype_finish = ngsniffer_dump_finish;
ngsniffer = (ngsniffer_dump_t *)g_malloc(sizeof(ngsniffer_dump_t));
wdh->priv = (void *)ngsniffer;
@@ -2128,7 +2128,7 @@ ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
/* Finish writing to a dump file.
Returns TRUE on success, FALSE on failure. */
static gboolean
-ngsniffer_dump_close(wtap_dumper *wdh, int *err)
+ngsniffer_dump_finish(wtap_dumper *wdh, int *err)
{
/* EOF record */
char buf[6] = {REC_EOF, 0x00, 0x00, 0x00, 0x00, 0x00};