From d94bd07f99438278cb11f24b00571ab2907b6bdb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 13 Dec 2011 09:53:50 +0000 Subject: Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports any form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175 --- capture_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'capture_info.c') diff --git a/capture_info.c b/capture_info.c index 0856cee2f6..48102d9474 100644 --- a/capture_info.c +++ b/capture_info.c @@ -160,7 +160,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing, errmsg = "The file \"%s\" is a capture for a network type that TShark doesn't support."; break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: /* Seen only when opening a capture file for reading. */ g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The file \"%%s\" appears to be damaged or corrupt.\n" -- cgit v1.2.1