aboutsummaryrefslogtreecommitdiffstats
path: root/ui/capture.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-01-14 13:07:17 -0800
committerGuy Harris <guy@alum.mit.edu>2018-01-14 21:08:18 +0000
commit9cc00c562369fe0b9149eb2aeee090cf52167285 (patch)
tree00f52bc3c14ae31681d6e6b931b3f942f9bcebfa /ui/capture.c
parentc3190d9d70febdd1dbc15269e970f32aeda33f76 (diff)
Check for gzipped files even if we don't have libz.
If we aren't built with libz, report a new "decompression not supported" error if the file is gzipped; the problem isn't that it's a new capture file format we don't support, it's that a *compressed* capture file, in some format, but we don't support the *compression* format used. This can be extended if we add support for other compression formats. Change-Id: I19239525d4e02357e3ca7189996556839af8fce2 Reviewed-on: https://code.wireshark.org/review/25315 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/capture.c')
-rw-r--r--ui/capture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/capture.c b/ui/capture.c
index 90cc169d9b..cc4b09127e 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -377,6 +377,14 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
errmsg = errmsg_errno;
break;
+ case WTAP_ERR_DECOMPRESSION_NOT_SUPPORTED:
+ g_snprintf(errmsg_errno, sizeof(errmsg_errno),
+ "We don't support the form of compression used by the compressed file \"%%s\".\n"
+ "(%s)", err_info != NULL ? err_info : "no information supplied");
+ g_free(err_info);
+ errmsg = errmsg_errno;
+ break;
+
default:
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" could not be %s: %s.",