aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-09-22 10:30:42 +0200
committerAnders Broman <a.broman58@gmail.com>2015-10-15 03:45:45 +0000
commitcd5706cb56b30b3c38f2a986732b0bd0f9d47ce8 (patch)
tree2e1b2eb3abff88fe60d974e0150b8c91c27f9297
parent1479d6d48ca393d8ae6cf33ea97f830572ac26e4 (diff)
Qt/Bluetooth: Disable go to packet for closed files
Go to packet on close files is not valid (for currently open one). Disable it. Change-Id: Ib7b65c9ea7e94857692c8ac5ddd3971c52ac717f Reviewed-on: https://code.wireshark.org/review/11023 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--ui/qt/bluetooth_att_server_attributes_dialog.cpp5
-rw-r--r--ui/qt/bluetooth_devices_dialog.cpp5
-rw-r--r--ui/qt/bluetooth_hci_summary_dialog.cpp5
3 files changed, 12 insertions, 3 deletions
diff --git a/ui/qt/bluetooth_att_server_attributes_dialog.cpp b/ui/qt/bluetooth_att_server_attributes_dialog.cpp
index 4ce9b8cc49..78312b5ef2 100644
--- a/ui/qt/bluetooth_att_server_attributes_dialog.cpp
+++ b/ui/qt/bluetooth_att_server_attributes_dialog.cpp
@@ -222,6 +222,9 @@ gboolean BluetoothAttServerAttributesDialog::tapPacket(void *tapinfo_ptr, packet
QString uuid_name;
gchar *addr = NULL;
+ if (dialog->file_closed_)
+ return FALSE;
+
if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) {
gchar *interface;
const char *interface_name;
@@ -302,7 +305,7 @@ void BluetoothAttServerAttributesDialog::removeDuplicatesStateChanged(int)
void BluetoothAttServerAttributesDialog::on_tableTreeWidget_itemActivated(QTreeWidgetItem *item, int)
{
- if (!cap_file_.isValid())
+ if (file_closed_)
return;
guint32 frame_number = item->data(0, Qt::UserRole).value<guint32>();
diff --git a/ui/qt/bluetooth_devices_dialog.cpp b/ui/qt/bluetooth_devices_dialog.cpp
index cb8271802f..aade4c8a53 100644
--- a/ui/qt/bluetooth_devices_dialog.cpp
+++ b/ui/qt/bluetooth_devices_dialog.cpp
@@ -202,6 +202,9 @@ gboolean BluetoothDevicesDialog::tapPacket(void *tapinfo_ptr, packet_info *pinfo
const gchar *manuf;
QTreeWidgetItem *item = NULL;
+ if (dialog->file_closed_)
+ return FALSE;
+
if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) {
gchar *interface;
const char *interface_name;
@@ -315,7 +318,7 @@ void BluetoothDevicesDialog::showInformationStepsChanged(int)
void BluetoothDevicesDialog::on_tableTreeWidget_itemActivated(QTreeWidgetItem *item, int)
{
- if (!cap_file_.isValid())
+ if (file_closed_)
return;
item_data_t *item_data = item->data(0, Qt::UserRole).value<item_data_t *>();
diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp
index 23d68e6e00..02bb8803ec 100644
--- a/ui/qt/bluetooth_hci_summary_dialog.cpp
+++ b/ui/qt/bluetooth_hci_summary_dialog.cpp
@@ -299,6 +299,9 @@ gboolean BluetoothHciSummaryDialog::tapPacket(void *tapinfo_ptr, packet_info *pi
QString adapter;
QString name;
+ if (dialog->file_closed_)
+ return FALSE;
+
name = tr("Unknown");
if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) {
@@ -625,7 +628,7 @@ void BluetoothHciSummaryDialog::adapterCurrentIndexChanged(int)
void BluetoothHciSummaryDialog::on_tableTreeWidget_itemActivated(QTreeWidgetItem *item, int)
{
- if (!cap_file_.isValid())
+ if (file_closed_)
return;
item_data_t *item_data = item->data(0, Qt::UserRole).value<item_data_t *>();