diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-12-13 09:53:50 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-12-13 09:53:50 +0000 |
commit | d94bd07f99438278cb11f24b00571ab2907b6bdb (patch) | |
tree | 5f96d0a35c97af466bcb2d5b8a9371327bb0190f /file.c | |
parent | 1df4ee91090e35c25835204d7175b9395be32606 (diff) |
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
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -709,7 +709,7 @@ cf_read(capture_file *cf, gboolean from_save) " in the middle of a packet."; break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The capture file appears to be damaged or corrupt.\n(%s)", err_info); @@ -1392,7 +1392,7 @@ cf_merge_files(char **out_filenamep, int in_file_count, " in the middle of a packet."; break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The capture file %%s appears to be damaged or corrupt.\n(%s)", err_info); @@ -1577,7 +1577,7 @@ cf_read_frame_r(capture_file *cf, frame_data *fdata, g_free(err_info); break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "An error occurred while reading from the file \"%%s\": %s.\n(%s)", wtap_strerror(err), err_info); @@ -3923,7 +3923,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info, } break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: /* Seen only when opening a capture file for reading. */ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "The file \"%s\" appears to be damaged or corrupt.\n" |