diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-21 09:41:52 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-21 09:41:52 +0000 |
commit | bf5d8d18e36e02f7f197738afc830e2c4341dd69 (patch) | |
tree | 299ce4fc08cb26cc0c0712c6b54de9c76893e7ca /capture_info.c | |
parent | bf80a1d2d0395923cfd70fe3ce9a5e20b6f94466 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36748 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_info.c')
-rw-r--r-- | capture_info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/capture_info.c b/capture_info.c index 54f01a4a3e..7fe86bbf8d 100644 --- a/capture_info.c +++ b/capture_info.c @@ -185,6 +185,14 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing, errmsg = "A full header couldn't be written to the file \"%s\"."; break; + case WTAP_ERR_DECOMPRESS: + g_snprintf(errmsg_errno, sizeof(errmsg_errno), + "The compressed file \"%%s\" appears to be damaged or corrupt.\n" + "(%s)", err_info); + g_free(err_info); + errmsg = errmsg_errno; + break; + default: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The file \"%%s\" could not be %s: %s.", |