On request from Albert Chin:
[metze/wireshark/wip.git] / proto_hier_stats.c
index 24d019f211a67604a329e1e3fd2b804f9a86b458..4f95d9837cde954999d9f8a883ce905d0fb1f922 100644 (file)
@@ -31,7 +31,6 @@
 #include "globals.h"
 #include "proto_hier_stats.h"
 #include "progress_dlg.h"
-#include "simple_dialog.h"
 #include <epan/epan_dissect.h>
 #include <wtap.h>
 
@@ -144,17 +143,11 @@ process_frame(frame_data *frame, column_info *cinfo, ph_stats_t* ps)
        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);
@@ -315,7 +308,7 @@ ph_stats_new(void)
 static gboolean
 stat_node_free(GNode *node, gpointer data _U_)
 {
-       ph_stats_node_t *stats = node->data;
+       ph_stats_node_t *stats = (ph_stats_node_t *)node->data;
 
        if (stats) {
                g_free(stats);