#include "globals.h"
#include "proto_hier_stats.h"
-#include "progress_dlg.h"
-#include "simple_dialog.h"
+#include "ui/progress_dlg.h"
#include <epan/epan_dissect.h>
#include <wtap.h>
epan_dissect_t edt;
union wtap_pseudo_header phdr;
guint8 pd[WTAP_MAX_PACKET_SIZE];
- int err;
- gchar *err_info;
double cur_time;
/* Load the frame from the capture file */
- if (!wtap_seek_read(cfile.wth, frame->file_off, &phdr, pd,
- frame->cap_len, &err, &err_info)) {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- cf_read_error_message(err, err_info), cfile.filename);
+ if (!cf_read_frame_r(&cfile, frame, &phdr, pd))
return FALSE; /* failure */
- }
/* Dissect the frame tree not visible */
epan_dissect_init(&edt, TRUE, FALSE);
ph_stats_new(void)
{
ph_stats_t *ps;
+ guint32 framenum;
frame_data *frame;
guint tot_packets, tot_bytes;
progdlg_t *progbar = NULL;
tot_packets = 0;
tot_bytes = 0;
- for (frame = cfile.plist_start; frame != NULL; frame = frame->next) {
+ for (framenum = 1; framenum <= cfile.count; framenum++) {
+ frame = frame_data_sequence_find(cfile.frames, framenum);
+
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that
it takes no longer than the standard time to create