diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-09-30 13:19:24 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-09-30 20:21:35 +0000 |
commit | ff307c72bca5318b8e64a7e992dee76232e6c326 (patch) | |
tree | 8c6752a49a0662511938063cdbc2e93efc9bd603 | |
parent | 00509025e8341dcb9a3bbf74129ad41335c93133 (diff) |
Add more HAVE_LIBPCAP checks.
Change-Id: I82e62f6be03a2ae1617cd5b8e430b73ca8fbe7f8
Reviewed-on: https://code.wireshark.org/review/4385
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | ui/qt/main_window.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main_window.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index b8c6ceea2d..3aa5a31ddc 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -162,7 +162,9 @@ MainWindow::MainWindow(QWidget *parent) : this, SLOT(openStatCommandDialog(QString,const char*,void*))); } gbl_cur_main_window_ = this; +#ifdef HAVE_LIBPCAP capture_session_init(&cap_session_, (void *)&cfile); +#endif main_ui_->setupUi(this); setTitlebarForCaptureFile(); setMenusForCaptureFile(); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 68c206e646..0c1fd26ff0 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -76,7 +76,9 @@ public: void setPipeInputHandler(gint source, gpointer user_data, int *child_process, pipe_input_cb_t input_cb); QString getFilter(); +#ifdef HAVE_LIBPCAP capture_session *captureSession() { return &cap_session_; } +#endif protected: bool eventFilter(QObject *obj, QEvent *event); @@ -107,7 +109,6 @@ private: MainWelcome *main_welcome_; DisplayFilterCombo *df_combo_box_; capture_file *cap_file_; - capture_session cap_session_; QFont mono_font_; // XXX - packet_list_, proto_tree_, and byte_view_tab_ should // probably be full-on values instead of pointers. @@ -122,6 +123,7 @@ private: bool capture_stopping_; bool capture_filter_valid_; #ifdef HAVE_LIBPCAP + capture_session cap_session_; CaptureInterfacesDialog capture_interfaces_dialog_; #endif |