From 2c1dcfed4f68fb5b37659fc8f85180504ae2f152 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 6 Apr 2019 18:35:00 -0700 Subject: The wtap from which we're reading to get statistics isn't a statistic itself. Move it to the capture_session structure from the info_data_t structure, and pass it as an argument to capture_info_new_packets(). Change-Id: I822392bbf48eeb27ba9e17b73775d2fc4349bc17 Reviewed-on: https://code.wireshark.org/review/32765 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- capture_info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'capture_info.c') diff --git a/capture_info.c b/capture_info.c index 887375daae..f4967a746d 100644 --- a/capture_info.c +++ b/capture_info.c @@ -35,7 +35,7 @@ capture_info_packet(info_data_t* cap_info, gint wtap_linktype, const guchar *pd, } /* new packets arrived */ -void capture_info_new_packets(int to_read, info_data_t* cap_info) +void capture_info_new_packets(int to_read, wtap *wth, info_data_t* cap_info) { int err; gchar *err_info; @@ -52,8 +52,8 @@ void capture_info_new_packets(int to_read, info_data_t* cap_info) wtap_rec_init(&rec); ws_buffer_init(&buf, 1514); while (to_read > 0) { - wtap_cleareof(cap_info->wtap); - if (wtap_read(cap_info->wtap, &rec, &buf, &err, &err_info, &data_offset)) { + wtap_cleareof(wth); + if (wtap_read(wth, &rec, &buf, &err, &err_info, &data_offset)) { if (rec.rec_type == REC_TYPE_PACKET) { pseudo_header = &rec.rec_header.packet_header.pseudo_header; wtap_linktype = rec.rec_header.packet_header.pkt_encap; -- cgit v1.2.3