aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/packet_list_store.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-08-13 07:39:46 +0000
committerGuy Harris <guy@alum.mit.edu>2010-08-13 07:39:46 +0000
commit2a328da4ef66f37388b841803b2df149b4f68840 (patch)
tree7e0a10dd76d94da164a22f52bcec418f4cd13667 /gtk/packet_list_store.c
parent432cfde19c7e1b93ccd4457eb27a501e55525b2b (diff)
Instead of using a Boolean for the search direction, use an enum, so
that you can tell from examination whether the search is forward or backward. Make the cf_find_packet routines take the direction as an explicit argument, rather than, in the cases where you don't want to permanently set the direction, saving the direction in the capture_file structure, changing it, doing the search, and restoring the saved direction. Give more information in the Doxygen comments for those routines. Add a cf_find_packet_dfilter_string() routine, which takes a filter string rather than a compiled filter as an argument. Replace find_previous_next_frame_with_filter() with it. Have cf_read_frame_r() and cf_read_frame() pop up the error dialog if the read fails, rather than leaving that up to its caller. That lets us eliminate cf_read_error_message(), by swallowing its code into cf_read_frame_r(). Add Doxygen comments for cf_read_frame_r() and cf_read_frame(). Don't have find_packet() read the packet before calling the callback routine; leave that up to the callback routine. Add cf_find_packet_marked(), to find the next or previous marked packet, and cf_find_packet_time_reference(), to find the next or previous time reference packet. Those routines do *not* need to read the packet data to see if it matches; that lets them run much faster. Clean up indentation. svn path=/trunk/; revision=33791
Diffstat (limited to 'gtk/packet_list_store.c')
-rw-r--r--gtk/packet_list_store.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index f284b6f9de..f4eacca2ad 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -1088,8 +1088,6 @@ static void
packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *record, gboolean dissect_columns, gboolean dissect_color)
{
epan_dissect_t edt;
- int err;
- gchar *err_info;
frame_data *fdata;
column_info *cinfo;
gint col;
@@ -1104,11 +1102,8 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
else
cinfo = NULL;
- 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;
- }
+ if (!cf_read_frame_r(&cfile, fdata, &pseudo_header, pd))
+ return; /* error reading the frame */
create_proto_tree = (color_filters_used() && dissect_color) ||
(have_custom_cols(cinfo) && dissect_columns);