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 /wiretap/cosine.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 'wiretap/cosine.c')
-rw-r--r-- | wiretap/cosine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/cosine.c b/wiretap/cosine.c index c8f695241d..390070024b 100644 --- a/wiretap/cosine.c +++ b/wiretap/cosine.c @@ -392,7 +392,7 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, &code1, &code2); if (num_items_scanned != 17) { - *err = WTAP_ERR_BAD_RECORD; + *err = WTAP_ERR_BAD_FILE; *err_info = g_strdup("cosine: purported control blade line doesn't have code values"); return -1; } @@ -405,7 +405,7 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, &code1, &code2); if (num_items_scanned != 10) { - *err = WTAP_ERR_BAD_RECORD; + *err = WTAP_ERR_BAD_FILE; *err_info = g_strdup("cosine: header line is neither control blade nor PE output"); return -1; } @@ -486,7 +486,7 @@ parse_cosine_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err, break; } if ((n = parse_single_hex_dump_line(line, buf, i*16)) == -1) { - *err = WTAP_ERR_BAD_RECORD; + *err = WTAP_ERR_BAD_FILE; *err_info = g_strdup("cosine: hex dump line doesn't have 16 numbers"); return -1; } |