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/wtap-int.h | |
parent | 0315e063e4267b97fc7716301350af07dd0f2bea (diff) |
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/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index aff5fde02f..9691ce8eff 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -305,25 +305,25 @@ extern gint wtap_num_file_types; } #endif -#define wtap_file_read_unknown_bytes(target, num_bytes, fh, err) \ +#define wtap_file_read_unknown_bytes(target, num_bytes, fh, err, err_info) \ G_STMT_START \ { \ int _bytes_read; \ _bytes_read = file_read((target), (num_bytes), (fh)); \ if (_bytes_read != (int) (num_bytes)) { \ - *(err) = file_error((fh)); \ + *(err) = file_error((fh), (err_info)); \ return FALSE; \ } \ } \ G_STMT_END -#define wtap_file_read_expected_bytes(target, num_bytes, fh, err) \ +#define wtap_file_read_expected_bytes(target, num_bytes, fh, err, err_info) \ G_STMT_START \ { \ int _bytes_read; \ _bytes_read = file_read((target), (num_bytes), (fh)); \ if (_bytes_read != (int) (num_bytes)) { \ - *(err) = file_error((fh)); \ + *(err) = file_error((fh), (err_info)); \ if (*(err) == 0 && _bytes_read > 0) { \ *(err) = WTAP_ERR_SHORT_READ; \ } \ |