#ifdef NEW_PACKET_LIST
new_packet_list_check_end();
- /* Don't freeze/thaw the list when doing live capture */
+ /* Don't freeze/thaw the list when doing live capture */
/*new_packet_list_freeze();*/
#else
packet_list_check_end();
/* Sleep(100); */
};
#ifdef NEW_PACKET_LIST
- /* Don't freeze/thaw the list when doing live capture */
+ /* Don't freeze/thaw the list when doing live capture */
/*new_packet_list_thaw();*/
#else
packet_list_thaw();
#ifdef NEW_PACKET_LIST
new_packet_list_check_end();
- new_packet_list_freeze();
+ /* Don't freeze/thaw the list when doing live capture */
+ /*new_packet_list_freeze();*/
#else
packet_list_check_end();
packet_list_freeze();
}
#ifdef NEW_PACKET_LIST
- new_packet_list_thaw();
+ /* Don't freeze/thaw the list when doing live capture */
+ /*new_packet_list_thaw();*/
#else
packet_list_thaw();
#endif
} else {
/* The file we read is a temporary file from a live capture;
we don't mention its name. */
- displayname = "(Untitled)";
+ if (cf->source) {
+ displayname = cf->source;
+ } else {
+ displayname = "(Untitled)";
+ }
}
return displayname;
}
+void cf_set_tempfile_source(capture_file *cf, gchar *source) {
+ if (cf->source) {
+ g_free(cf->source);
+ }
+
+ if (source) {
+ cf->source = g_strdup(source);
+ } else {
+ cf->source = g_strdup("");
+ }
+}
+
+const gchar *cf_get_tempfile_source(capture_file *cf) {
+ if (!cf->source) {
+ return "";
+ }
+
+ return cf->source;
+}
+
/* XXX - use a macro instead? */
int
cf_get_packet_count(capture_file *cf)
const char *filter_new = dftext ? dftext : "";
const char *filter_old = cf->dfilter ? cf->dfilter : "";
dfilter_t *dfcode;
+ GTimeVal start_time;
/* if new filter equals old one, do nothing unless told to do so */
if (!force && strcmp(filter_new, filter_old) == 0) {
/* We have a valid filter. Replace the current filter. */
g_free(cf->dfilter);
cf->dfilter = dftext;
+ g_get_current_time(&start_time);
+
/* Now rescan the packet list, applying the new filter, but not
throwing away information constructed on a previous pass. */
cf->first_displayed = NULL;
cf->last_displayed = NULL;
- reset_elapsed();
-
/* We currently don't display any packets */
cf->displayed_count = 0;
if (!add_to_packet_list)
new_packet_list_recreate_visible_rows();
+ /* Compute the time it took to filter the file */
+ compute_elapsed(&start_time);
+
new_packet_list_thaw();
if (selected_frame_num == -1) {
/* Fill in the column information if we're printing the summary
information. */
if (args->print_args->print_summary) {
+ col_custom_prime_edt(&edt, &cf->cinfo);
epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
} else
if having custom columns. */
proto_tree_needed = have_custom_cols(&cf->cinfo);
epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
+ col_custom_prime_edt(&edt, &cf->cinfo);
epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
if having custom columns. */
proto_tree_needed = have_custom_cols(&cf->cinfo);
epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
+ col_custom_prime_edt(&edt, &cf->cinfo);
epan_dissect_run(&edt, pseudo_header, pd, fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
gchar status_str[100];
int progbar_nextstep;
int progbar_quantum;
- char *title;
+ const char *title;
start_fd = cf->current_frame;
if (start_fd != NULL) {
we should free up our copy. */
g_free(filename);
}
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 2
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=2 expandtab
+ * :indentSize=2:tabSize=2:noTabs=true:
+ */