aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/packet_list_store.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-02-09 09:15:08 +0000
committerGuy Harris <guy@alum.mit.edu>2010-02-09 09:15:08 +0000
commitc8112bc620b066804f6873aa5ad4a18a2ba7e14c (patch)
treec0dd360d03b1aee4790733cf79a014790443dd64 /gtk/packet_list_store.c
parent3c702d064b42fdfc93bcef503fc068cd9921f53f (diff)
Read the packet into private areas (private pseudo-header and packet
data), rather than overwriting the information in the cinfo structure. This at least appears to fix bug 4056. svn path=/trunk/; revision=31844
Diffstat (limited to 'gtk/packet_list_store.c')
-rw-r--r--gtk/packet_list_store.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index ed0914fc21..acf7d0f9a5 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -1094,7 +1094,9 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
column_info *cinfo;
gint col;
gboolean create_proto_tree;
-
+ union wtap_pseudo_header pseudo_header; /* Packet pseudo_header */
+ guint8 pd[WTAP_MAX_PACKET_SIZE]; /* Packet data */
+
fdata = record->fdata;
if (dissect_columns)
@@ -1102,8 +1104,8 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
else
cinfo = NULL;
- if (!wtap_seek_read(cfile.wth, fdata->file_off, &cfile.pseudo_header,
- cfile.pd, fdata->cap_len, &err, &err_info)) {
+ if (!wtap_seek_read(cfile.wth, fdata->file_off, &pseudo_header,
+ pd, fdata->cap_len, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return;
@@ -1121,7 +1123,7 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
if (dissect_columns)
col_custom_prime_edt(&edt, cinfo);
- epan_dissect_run(&edt, &cfile.pseudo_header, cfile.pd, fdata, cinfo);
+ epan_dissect_run(&edt, &pseudo_header, pd, fdata, cinfo);
if (dissect_color)
fdata->color_filter = color_filters_colorize_packet(&edt);