diff options
author | Anders Broman <anders.broman@ericsson.com> | 2010-11-05 15:01:05 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2010-11-05 15:01:05 +0000 |
commit | f5cf823e1a1f93a5ea189032075afdfcad13ab2d (patch) | |
tree | 55aebc825315ef11115b5839bfd41fa225732a44 /tshark.c | |
parent | 332954fd879918b8476f35b1478f0013260edf07 (diff) | |
download | wireshark-f5cf823e1a1f93a5ea189032075afdfcad13ab2d.tar.gz wireshark-f5cf823e1a1f93a5ea189032075afdfcad13ab2d.tar.bz2 wireshark-f5cf823e1a1f93a5ea189032075afdfcad13ab2d.zip |
Bug fix: Running tshark with the following command will leave a temp file on the file system.
\tshark -f "port 53" -a duration:1 -z proto,col info,dns.qry.type,dns.qry.type
svn path=/trunk/; revision=34791
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -65,6 +65,7 @@ #include <epan/epan.h> #include <epan/filesystem.h> #include <wsutil/privileges.h> +#include <wsutil/file_util.h> #include "globals.h" #include <epan/timestamp.h> @@ -2081,7 +2082,6 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file) gboolean is_tempfile; int err; - if(capture_opts->state == CAPTURE_PREPARING) { g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture started!"); } @@ -2271,6 +2271,9 @@ capture_input_closed(capture_options *capture_opts, gchar *msg) if(capture_opts->cf != NULL && ((capture_file *) capture_opts->cf)->wth != NULL) { wtap_close(((capture_file *) capture_opts->cf)->wth); + if(((capture_file *) capture_opts->cf)->user_saved == FALSE){ + ws_unlink(((capture_file *) capture_opts->cf)->filename); + } } #ifdef USE_BROKEN_G_MAIN_LOOP /*g_main_loop_quit(loop);*/ |