diff options
author | Michael Mann <mmann78@netscape.net> | 2015-12-16 23:15:03 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-19 14:22:56 +0000 |
commit | 444dfda793784cecda0757cbe50e27a5ba855ba0 (patch) | |
tree | ec34e5780c2dbe29bc2f170c2fc406ee20aa0430 /tshark.c | |
parent | 7baac67149a68b66087c5d688dbeda2869485765 (diff) |
Allow "capture info data" to not be a singleton.
It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances.
Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120
Reviewed-on: https://code.wireshark.org/review/12691
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -113,6 +113,7 @@ #endif /* _WIN32 */ #include <capchild/capture_session.h> #include <capchild/capture_sync.h> +#include <capture_info.h> #endif /* HAVE_LIBPCAP */ #include "log.h" #include <epan/funnel.h> @@ -184,6 +185,7 @@ static gboolean print_packet_counts; static capture_options global_capture_opts; static capture_session global_capture_session; +static info_data_t global_info_data; #ifdef SIGINFO static gboolean infodelay; /* if TRUE, don't print capture info in SIGINFO handler */ @@ -2562,7 +2564,7 @@ capture(void) fflush(stderr); g_string_free(str, TRUE); - ret = sync_pipe_start(&global_capture_opts, &global_capture_session, NULL); + ret = sync_pipe_start(&global_capture_opts, &global_capture_session, &global_info_data, NULL); if (!ret) return FALSE; |