diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-05 15:01:05 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-05 15:01:05 +0000 |
commit | f541f12635806736da3bd4b9d61048a622f0faba (patch) | |
tree | 55aebc825315ef11115b5839bfd41fa225732a44 /tshark.c | |
parent | 759c42296ee6668866d236a3c240fe2a280ff4f1 (diff) |
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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34791 f5534014-38df-0310-8fa8-9805f1628bb7
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);*/ |