summaryrefslogtreecommitdiff
path: root/capture_info.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2011-05-19 04:56:04 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2011-05-19 04:56:04 +0000
commit89599bbb9b4be824e362dbc3f63823561a864eff (patch)
tree6cd2078aa1d9b4d2884a761d67f38062acc2322f /capture_info.c
parent1ac8e97ff8c4f913b4285180ea9f1d38b724afe6 (diff)
downloadwireshark-89599bbb9b4be824e362dbc3f63823561a864eff.tar.gz
Fix the capture info dialog. Reset the EOF state such that the
number get actually updated. svn path=/trunk/; revision=37279
Diffstat (limited to 'capture_info.c')
-rw-r--r--capture_info.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/capture_info.c b/capture_info.c
index 7fe86bbf8d..0856cee2f6 100644
--- a/capture_info.c
+++ b/capture_info.c
@@ -246,16 +246,19 @@ void capture_info_new_packets(int to_read)
/*g_warning("new packets: %u", to_read);*/
- while (to_read != 0 && (wtap_read(info_data.wtap, &err, &err_info, &data_offset))) {
- phdr = wtap_phdr(info_data.wtap);
- pseudo_header = wtap_pseudoheader(info_data.wtap);
- wtap_linktype = phdr->pkt_encap;
- buf = wtap_buf_ptr(info_data.wtap);
-
- capture_info_packet(&info_data.counts, wtap_linktype, buf, phdr->caplen, pseudo_header);
-
- /*g_warning("new packet");*/
- to_read--;
+ while (to_read > 0) {
+ wtap_cleareof(info_data.wtap);
+ if (wtap_read(info_data.wtap, &err, &err_info, &data_offset)) {
+ phdr = wtap_phdr(info_data.wtap);
+ pseudo_header = wtap_pseudoheader(info_data.wtap);
+ wtap_linktype = phdr->pkt_encap;
+ buf = wtap_buf_ptr(info_data.wtap);
+
+ capture_info_packet(&info_data.counts, wtap_linktype, buf, phdr->caplen, pseudo_header);
+
+ /*g_warning("new packet");*/
+ to_read--;
+ }
}
capture_info_ui_update(&info_data.ui);