diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-03-02 22:55:11 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-03-03 06:55:44 +0000 |
commit | 07cb624e48a8606ba4b603f94caa0e92853a1559 (patch) | |
tree | 5e04c8c21a6bdd246f8eade54f6874dab0f08d2a | |
parent | c7872232e5661af50368d5d6154db13047320673 (diff) |
Move what capture_info_close() does into its only caller.
Change-Id: If9539142100fb2079cbbe247d8975778b183ece8
Reviewed-on: https://code.wireshark.org/review/26235
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | capture_info.c | 9 | ||||
-rw-r--r-- | capture_info.h | 3 | ||||
-rw-r--r-- | ui/capture.c | 7 |
3 files changed, 5 insertions, 14 deletions
diff --git a/capture_info.c b/capture_info.c index 1088eb39aa..f51f3a3fe7 100644 --- a/capture_info.c +++ b/capture_info.c @@ -70,15 +70,6 @@ void capture_info_new_packets(int to_read, info_data_t* cap_info) capture_info_ui_update(&cap_info->ui); } - -/* close the info */ -void capture_info_close(info_data_t* cap_info) -{ - capture_info_ui_destroy(&cap_info->ui); - if(cap_info->wtap) - wtap_close(cap_info->wtap); -} - #endif /* HAVE_LIBPCAP */ /* diff --git a/capture_info.h b/capture_info.h index 9f2bb4978d..cfb498fafa 100644 --- a/capture_info.h +++ b/capture_info.h @@ -52,9 +52,6 @@ typedef struct _info_data { /* new packets arrived - read from wtap, count */ extern void capture_info_new_packets(int to_read, info_data_t* cap_info); -/* close the info - close wtap, destroy dialog */ -extern void capture_info_close(info_data_t* cap_info); - /** Create the capture info dialog */ extern void capture_info_ui_create(capture_info *cinfo, capture_session *cap_session); diff --git a/ui/capture.c b/ui/capture.c index 393f2a875a..c510e176e1 100644 --- a/ui/capture.c +++ b/ui/capture.c @@ -710,8 +710,11 @@ capture_input_closed(capture_session *cap_session, gchar *msg) } } - if(capture_opts->show_info) - capture_info_close(cap_session->cap_data_info); + if(capture_opts->show_info) { + capture_info_ui_destroy(&cap_session->cap_data_info->ui); + if(cap_session->cap_data_info->wtap) + wtap_close(cap_session->cap_data_info->wtap); + } cap_session->state = CAPTURE_STOPPED; |