diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-17 00:47:31 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-17 08:47:59 +0000 |
commit | d2eddde5bd84ceb39bea77052848930c024d356b (patch) | |
tree | c64a110c6924a6fefd9f7d43c186bfc2a8499de4 | |
parent | ddcc2aee3d28510ee4f5c4b8dac1e2fc68f1e8e7 (diff) |
Report WTAP_ERR_UNSUPPORTED correctly.
WTAP_ERR_FILE_UNKNOWN_FORMAT is reported if the file is in a format that
libwiretap doesn't know about (either because it's not a capture file at
all or because it's a capture file in a format it doesn't support).
WTAP_ERR_UNSUPPORTED is for files in a *known* format that are using
features or file format elements (record type, link-layer header type,
etc.) that libwireshark doesn't support. Fix some copy-and-pasteos
causing WTAP_ERR_UNSUPPORTED to be reported with a message appropriate
for WTAP_ERR_FILE_UNKNOWN_FORMAT.
Change-Id: Ic675ffd501c52838d8944a6c61e1b01041b73098
Reviewed-on: https://code.wireshark.org/review/5799
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | capture_info.c | 2 | ||||
-rw-r--r-- | tshark.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/capture_info.c b/capture_info.c index 805b49f71e..516f616f0e 100644 --- a/capture_info.c +++ b/capture_info.c @@ -124,7 +124,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing, case WTAP_ERR_UNSUPPORTED: /* Seen only when opening a capture file for reading. */ g_snprintf(errmsg_errno, sizeof(errmsg_errno), - "The file \"%%s\" isn't a capture file in a format TShark understands.\n" + "The file \"%%s\" contains record data that TShark doesn't support.\n" "(%s)", err_info); g_free(err_info); errmsg = errmsg_errno; @@ -4146,8 +4146,8 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing, case WTAP_ERR_UNSUPPORTED: /* Seen only when opening a capture file for reading. */ g_snprintf(errmsg_errno, sizeof(errmsg_errno), - "The file \"%%s\" isn't a capture file in a format TShark understands.\n" - "(%s)", err_info); + "The file \"%%s\" contains record data that TShark doesn't support.\n" + "(%s)", err_info); g_free(err_info); errmsg = errmsg_errno; break; |