aboutsummaryrefslogtreecommitdiffstats
path: root/capture_info.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-04-06 18:35:00 -0700
committerGuy Harris <guy@alum.mit.edu>2019-04-07 02:23:58 +0000
commit2c1dcfed4f68fb5b37659fc8f85180504ae2f152 (patch)
tree93826d8b00b057e71089175f751a388aee292f8e /capture_info.c
parent4c8a226c075732f83e77757ccaff31f32d92f9e8 (diff)
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 <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capture_info.c')
-rw-r--r--capture_info.c6
1 files changed, 3 insertions, 3 deletions
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;