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 /rawshark.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 'rawshark.c')
-rw-r--r-- | rawshark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rawshark.c b/rawshark.c index e694fa2ef3..e900257d13 100644 --- a/rawshark.c +++ b/rawshark.c @@ -939,7 +939,7 @@ raw_pipe_read(struct wtap_pkthdr *phdr, guchar * pd, int *err, const gchar **err printf("len: %d (%04x)\n", hdr.len, hdr.len); #endif if (bytes_needed > WTAP_MAX_PACKET_SIZE) { - *err = WTAP_ERR_BAD_RECORD; + *err = WTAP_ERR_BAD_FILE; g_snprintf(err_str, 100, "Bad packet length: %d (%04x)", bytes_needed, bytes_needed); *err_info = err_str; return FALSE; @@ -996,7 +996,7 @@ load_cap_file(capture_file *cf) cf->filename); break; - case WTAP_ERR_BAD_RECORD: + case WTAP_ERR_BAD_FILE: cmdarg_err("The file \"%s\" appears to be damaged or corrupt.\n(%s)", cf->filename, err_info); break; |