aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-05-26 19:11:23 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-05-26 19:11:23 +0000
commit65ee4e797adad6f26d5672bc0b4fbd00d7e41301 (patch)
treeb72e1350067ce80a8a61c6b82bf6157a2223f7a0 /gtk
parenta59da6ffd8d21d01eda12e61ebf1387fed0ae4dd (diff)
From Jakub Zawadzki:
New functions: cf_read_frame_r, cf_read_frame It's much easier to write: cf_read_frame (cf, fdata, &err, &err_info) Than: wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header, cf->pd, fdata->cap_len, &err, &err_info) svn path=/trunk/; revision=32980
Diffstat (limited to 'gtk')
-rw-r--r--gtk/iax2_analysis.c3
-rw-r--r--gtk/main.c3
-rw-r--r--gtk/packet_list_store.c3
-rw-r--r--gtk/packet_win.c3
-rw-r--r--gtk/rtp_analysis.c3
-rw-r--r--gtk/sctp_assoc_analyse.c3
-rw-r--r--gtk/tcp_graph.c3
7 files changed, 7 insertions, 14 deletions
diff --git a/gtk/iax2_analysis.c b/gtk/iax2_analysis.c
index 4bd35c3356..2061e14d0a 100644
--- a/gtk/iax2_analysis.c
+++ b/gtk/iax2_analysis.c
@@ -3413,8 +3413,7 @@ static void iax2_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
return; /* if we exit here it's an error */
/* dissect the current frame */
- if (!wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
- cf->pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(cf, fdata, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cf->filename);
return;
diff --git a/gtk/main.c b/gtk/main.c
index 8cab7ee277..5548c52ae4 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -590,8 +590,7 @@ get_filter_from_packet_list_row_and_column(gpointer data)
if (fdata != NULL) {
epan_dissect_t edt;
- if (!wtap_seek_read(cfile.wth, fdata->file_off, &cfile.pseudo_header,
- cfile.pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(&cfile, fdata, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return NULL;
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index fae8f8bec9..269dae14d3 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -1097,8 +1097,7 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
else
cinfo = NULL;
- if (!wtap_seek_read(cfile.wth, fdata->file_off, &pseudo_header,
- pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame_r(&cfile, fdata, &pseudo_header, pd, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return;
diff --git a/gtk/packet_win.c b/gtk/packet_win.c
index 2c5b7edfb8..a296f0a816 100644
--- a/gtk/packet_win.c
+++ b/gtk/packet_win.c
@@ -144,8 +144,7 @@ void new_window_cb(GtkWidget *w _U_)
#ifdef NEW_PACKET_LIST
/* With the new packetlists "lazy columns" it's neccesary to reread the frame */
- if (!wtap_seek_read(cfile.wth, cfile.current_frame->file_off, &cfile.pseudo_header,
- cfile.pd, cfile.current_frame->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(&cfile, cfile.current_frame, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return;
diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c
index 1d0d4b8ab4..79d8288754 100644
--- a/gtk/rtp_analysis.c
+++ b/gtk/rtp_analysis.c
@@ -3636,8 +3636,7 @@ static void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
return; /* if we exit here it's an error */
/* dissect the current frame */
- if (!wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
- cf->pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(cf, fdata, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cf->filename);
return;
diff --git a/gtk/sctp_assoc_analyse.c b/gtk/sctp_assoc_analyse.c
index 29e105a566..a74c49ddca 100644
--- a/gtk/sctp_assoc_analyse.c
+++ b/gtk/sctp_assoc_analyse.c
@@ -899,8 +899,7 @@ static void sctp_analyse_cb(struct sctp_analyse* u_data, gboolean ext)
return; /* if we exit here it's an error */
/* dissect the current frame */
- if (!wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
- cf->pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(cf, fdata, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cf->filename);
return;
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c
index 5eb3db7ef6..45f09cbde9 100644
--- a/gtk/tcp_graph.c
+++ b/gtk/tcp_graph.c
@@ -1798,8 +1798,7 @@ static struct tcpheader *select_tcpip_session (capture_file *cf, struct segment
}
/* dissect the current frame */
- if (!wtap_seek_read(cf->wth, fdata->file_off, &cf->pseudo_header,
- cf->pd, fdata->cap_len, &err, &err_info)) {
+ if (!cf_read_frame(cf, fdata, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cf->filename);
return NULL;