diff options
author | AndersBroman <anders.broman@ericsson.com> | 2017-12-11 13:10:30 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-11 13:00:25 +0000 |
commit | 84f905786ed2b2aabaec9a0c1045daeda66358ba (patch) | |
tree | 0231307847d9998ed7d35bbd7a7707f39b498c4e /ui/capture.c | |
parent | 397e2a2d74e9c6ea103d3b4c30794552041e39c2 (diff) |
[capture_info] Fold the code of capture_info_open() into ui/capture.c
Change-Id: Id302e88bed4da8b9b457049fb78b0bc7d7ffabe3
Reviewed-on: https://code.wireshark.org/review/24766
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/capture.c')
-rw-r--r-- | ui/capture.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/capture.c b/ui/capture.c index 68e667d8f8..4ec0da4c37 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -144,7 +144,19 @@ capture_start(capture_options *capture_opts, capture_session *cap_session, info_ capture_callback_invoke(capture_cb_capture_prepared, cap_session); if(capture_opts->show_info) - capture_info_open(cap_session, cap_data); + if (cap_data->counts.counts_hash != NULL) + { + /* Clean up any previous lists of packet counts */ + g_hash_table_destroy(cap_data->counts.counts_hash); + } + cap_data->counts.counts_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free); + cap_data->counts.other = 0; + cap_data->counts.total = 0; + + cap_data->wtap = NULL; + cap_data->ui.counts = &cap_data->counts; + + capture_info_ui_create(&cap_data->ui, cap_session); } return ret; |