diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-07-16 18:20:32 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-07-16 18:20:32 +0000 |
commit | cfa9982492fe1f7b1e0dc2c0ec7ab36d4b02ee3a (patch) | |
tree | c4f0557d5b5875e0b9637d857a9cdf3421c04da4 /file.c | |
parent | b3f57106d4b367450342808521a56e653c91371f (diff) |
Make sure we call wtap_cleareof() before each read.
svn path=/trunk/; revision=33555
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -800,8 +800,11 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err) /*g_log(NULL, G_LOG_LEVEL_MESSAGE, "cf_continue_tail: %u new: %u", cf->count, to_read);*/ - wtap_cleareof(cf->wth); - while (to_read != 0 && (wtap_read(cf->wth, err, &err_info, &data_offset))) { + while (to_read != 0) { + wtap_cleareof(cf->wth); + if (!wtap_read(cf->wth, err, &err_info, &data_offset)) { + break; + } if (cf->state == FILE_READ_ABORTED) { /* Well, the user decided to exit Wireshark. Break out of the loop, and let the code below (which is called even if there |