aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-02-11 16:07:10 -0800
committerGerald Combs <gerald@wireshark.org>2014-04-07 20:56:42 +0000
commita5cb72fe9eadfaf8cb0aefccb106a7eaad9266c9 (patch)
tree34a1965805b7373553d6057e9981de3ae6a01460 /file.c
parentcc3c05ed5f9e2d3eb8d72b3acc66bbacd50a26e7 (diff)
Add a Qt I/O Graph dialog.
For each graph you can set: - Its visibility - A name - A display filter - Color, from a fixed list - Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond - Basic Y Axes (packets/s, bytes/s, bits/s) - Computed Y Axes (SUM, MIN, AVG, MAX) - Smoothing You can pan and zoom using the mouse and keyboard. Clicking on a graph selects the last packet for that interval. If all graphs have the same Y axis a single label is shown, otherwise a legend is shown. The time scale (X axis) can be toggled between relative seconds and the time of day. Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky" via the io_graphs UAT. To do: - Minimize graph drawing delays. - Figure out why smoothing differs from GTK+ - Everything else at the top of io_graph_dialog.cpp - Fix empty resets. A fair amount of code was copied from TCPStreamDialog. We might want to subclass QCustomPlot and place the shared code there. Move common syntax checking to SyntaxLineEdit. Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and use it in both GTK+ and Qt. Make the io_graph_item_t array allocation in io_stat.c static. The behavior should be identical and this gives us additional compile-time checks. Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577 Reviewed-on: https://code.wireshark.org/review/435 Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file.c b/file.c
index 95d2bd23dc..ef21b930b1 100644
--- a/file.c
+++ b/file.c
@@ -2382,6 +2382,11 @@ cf_retap_packets(capture_file *cf)
guint tap_flags;
psp_return_t ret;
+ /* Presumably the user closed the capture file. */
+ if (cf == NULL) {
+ return CF_READ_ABORTED;
+ }
+
/* Do we have any tap listeners with filters? */
filtering_tap_listeners = have_filtering_tap_listeners();