From 51522b33723dec4dd0481dcabc261010be39937c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 17 Dec 2014 16:02:50 -0800 Subject: Handle "I can't map this for that file format" better. For cases where record (meta)data is something that can't be written out in a particular file format, return WTAP_ERR_UNWRITABLE_REC_DATA along with an err_info string. Report (and free) that err_info string in cases where WTAP_ERR_UNWRITABLE_REC_DATA is returned. Clean up some other error reporting cases, and flag with an XXX some cases where we aren't reporting errors at all, while we're at it. Change-Id: I91d02093af0d42c24ec4634c2c773b30f3d39ab3 Reviewed-on: https://code.wireshark.org/review/5823 Reviewed-by: Guy Harris --- wiretap/ngsniffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wiretap/ngsniffer.c') diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 06ba78468b..60ad2e113e 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -528,7 +528,7 @@ static int fix_pseudo_header(int encap, Buffer *buf, int len, 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); + const guint8 *pd, int *err, gchar **err_info); static gboolean ngsniffer_dump_close(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 ); @@ -1993,7 +1993,7 @@ ngsniffer_dump_open(wtap_dumper *wdh, int *err) Returns TRUE on success, FALSE on failure. */ static gboolean ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr, - const guint8 *pd, int *err) + const guint8 *pd, int *err, gchar **err_info _U_) { const union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; ngsniffer_dump_t *ngsniffer = (ngsniffer_dump_t *)wdh->priv; -- cgit v1.2.1