diff options
author | Guy Harris <gharris@sonic.net> | 2021-03-14 06:51:36 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-03-14 06:51:36 -0700 |
commit | 01151ec332f6232cd7b86d1b9026e54decb88203 (patch) | |
tree | 302dd732190b8740bc4c6c057e1440f62b89cb2c /ui/qt | |
parent | 006f0ab571b8848ead23068ff91f52fe6a3680cc (diff) |
Clean up "Export PDUs to File" code.
Combine exp_pdu_file_open() is called only by do_export_pdu(); just
combine them into one routine.
Get rid of the exp_pdu_t * argument to do_export_pdu(); instead, have
the exp_pdu_t structure be a local variable in that routine. There's no
need to initialize exp_pdu_data.pkt_encap in
ExportPDUDialog::on_buttonBox_accepted() - do_export_pdu() already does
so.
The return value of do_export_pdu() isn't used; don't return anything.
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/export_pdu_dialog.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/ui/qt/export_pdu_dialog.cpp b/ui/qt/export_pdu_dialog.cpp index 227a3a6147..8595e9c33c 100644 --- a/ui/qt/export_pdu_dialog.cpp +++ b/ui/qt/export_pdu_dialog.cpp @@ -13,12 +13,9 @@ #include "export_pdu_dialog.h" #include <ui_export_pdu_dialog.h> -#include <wiretap/pcap-encap.h> - #include <epan/tap.h> #include <epan/exported_pdu.h> -#include "ui/tap_export_pdu.h" #include "ui/export_pdu_ui_utils.h" ExportPDUDialog::ExportPDUDialog(QWidget *parent) : @@ -35,14 +32,10 @@ ExportPDUDialog::ExportPDUDialog(QWidget *parent) : } void ExportPDUDialog::on_buttonBox_accepted() { - exp_pdu_t exp_pdu_data; - - exp_pdu_data.pkt_encap = wtap_wtap_encap_to_pcap_encap(WTAP_ENCAP_WIRESHARK_UPPER_PDU); - const QByteArray& filter = ui->displayFilterLineEdit->text().toUtf8(); const QByteArray& tap_name = ui->comboBox->currentText().toUtf8(); - do_export_pdu(filter.constData(), tap_name.constData(), &exp_pdu_data); + do_export_pdu(filter.constData(), tap_name.constData()); } ExportPDUDialog::~ExportPDUDialog() { |