diff options
Diffstat (limited to 'wiretap/nettl.c')
-rw-r--r-- | wiretap/nettl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wiretap/nettl.c b/wiretap/nettl.c index 72cb1e22be..9fa6462fb7 100644 --- a/wiretap/nettl.c +++ b/wiretap/nettl.c @@ -235,6 +235,7 @@ int nettl_open(wtap *wth, int *err, gchar **err_info) /* read the first header to take a guess at the file encap */ bytes_read = file_read(dummy, 4, wth->fh); if (bytes_read != 4) { + *err = file_error(wth->fh, err_info); if (*err != 0) { return -1; } @@ -625,6 +626,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, bytes_to_read = datalen; bytes_read = file_read(pd, bytes_to_read, fh); if (bytes_read != bytes_to_read) { + *err = file_error(wth->fh, err_info); if (*err == 0) *err = WTAP_ERR_SHORT_READ; return FALSE; @@ -641,6 +643,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, bytes_to_read = datalen; bytes_read = file_read(dummy, bytes_to_read, fh); if (bytes_read != bytes_to_read) { + *err = file_error(wth->fh, err_info); if (*err == 0) *err = WTAP_ERR_SHORT_READ; return FALSE; |