diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-21 09:41:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-21 09:41:52 +0000 |
commit | 6cbf6ce16c45c4855ebddd3516465885e3c476d5 (patch) | |
tree | 299ce4fc08cb26cc0c0712c6b54de9c76893e7ca /wiretap/daintree-sna.c | |
parent | 0315e063e4267b97fc7716301350af07dd0f2bea (diff) | |
download | wireshark-6cbf6ce16c45c4855ebddd3516465885e3c476d5.tar.gz |
Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discovered
by the gunzipping code. Have it also supply a err_info string, and
report it. Have file_error() supply an err_info string.
Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to
suggest a decompression error - into the rawshark and tshark errors,
along the lines of what other programs print.
Fix a case in the Netscaler code where we weren't fetching the error
code on a read failure.
svn path=/trunk/; revision=36748
Diffstat (limited to 'wiretap/daintree-sna.c')
-rw-r--r-- | wiretap/daintree-sna.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/daintree-sna.c b/wiretap/daintree-sna.c index 74238f2568..4c39b1524c 100644 --- a/wiretap/daintree-sna.c +++ b/wiretap/daintree-sna.c @@ -89,13 +89,13 @@ static char seekLine[DAINTREE_MAX_LINE_SIZE]; static char readData[READDATA_BUF_SIZE]; static char seekData[SEEKDATA_BUF_SIZE]; -static gboolean daintree_sna_read(wtap *wth, int *err, gchar **err_info _U_, +static gboolean daintree_sna_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); static gboolean daintree_sna_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header _U_, guchar *pd, int len, int *err, - gchar **err_info _U_); + gchar **err_info); static guint daintree_sna_hex_char(guchar *str, int *err); @@ -136,7 +136,7 @@ int daintree_sna_open(wtap *wth, int *err _U_, gchar **err_info _U_) /* Read the capture file sequentially * Wireshark scans the file with sequential reads during preview and initial display. */ static gboolean -daintree_sna_read(wtap *wth, int *err, gchar **err_info _U_, gint64 *data_offset) +daintree_sna_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { guint64 seconds; @@ -146,7 +146,7 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info _U_, gint64 *data_offset * if others appear in the file, they are tossed */ do { if (file_gets(readLine, DAINTREE_MAX_LINE_SIZE, wth->fh) == NULL) { - *err = file_error(wth->fh); + *err = file_error(wth->fh, err_info); return FALSE; /* all done */ } wth->data_offset += strlen(readLine); @@ -200,7 +200,7 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info _U_, gint64 *data_offset static gboolean daintree_sna_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header _U_, guchar *pd, int len, int *err, - gchar **err_info _U_) + gchar **err_info) { guint pkt_len; @@ -211,7 +211,7 @@ daintree_sna_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header * if we find any others, we toss them */ do { if (file_gets(seekLine, DAINTREE_MAX_LINE_SIZE, wth->random_fh) == NULL) { - *err = file_error(wth->random_fh); + *err = file_error(wth->random_fh, err_info); return FALSE; /* all done */ } } while (seekLine[0] == COMMENT_LINE); |