From d25bdd7c4603e97acc5081f0798280bc44c0ab75 Mon Sep 17 00:00:00 2001 From: Michal Labedzki Date: Tue, 26 Jan 2016 09:02:15 +0100 Subject: Qt/Bluetooth: HCI Summary: Miscellaneous fixes 1. Count vendor commands once 2. Fill Event column in case of Command Status/Command Complete types while displaying command 3. Add missing Status from Connect Complete event 4. Add missing Command Complete events opcodes Change-Id: Ie5a0e373f92f62fcb890cef7ab54762df3bb8a35 Reviewed-on: https://code.wireshark.org/review/14315 Petri-Dish: Michal Labedzki Tested-by: Petri Dish Buildbot Reviewed-by: Michal Labedzki --- ui/qt/bluetooth_hci_summary_dialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/qt/bluetooth_hci_summary_dialog.cpp') diff --git a/ui/qt/bluetooth_hci_summary_dialog.cpp b/ui/qt/bluetooth_hci_summary_dialog.cpp index db479190c4..fffe12a449 100644 --- a/ui/qt/bluetooth_hci_summary_dialog.cpp +++ b/ui/qt/bluetooth_hci_summary_dialog.cpp @@ -371,8 +371,10 @@ gboolean BluetoothHciSummaryDialog::tapPacket(void *tapinfo_ptr, packet_info *pi for (int i_item = 0; i_item < main_item->childCount(); i_item +=1) { if (main_item->child(i_item)->text(column_number_opcode) == QString("").sprintf("0x%04X", tap_hci->ogf << 10 | tap_hci->ocf)) { item = main_item->child(i_item); - if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE && tap_hci->name) + if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE && tap_hci->name) { item->setText(column_number_name, tap_hci->name); + item->setText(column_number_occurrence, QString::number(item->text(column_number_occurrence).toInt() - 1)); + } break; } } @@ -410,6 +412,8 @@ gboolean BluetoothHciSummaryDialog::tapPacket(void *tapinfo_ptr, packet_info *pi frame_item->setText(column_number_ogf, QString("").sprintf("0x%02X", tap_hci->ogf)); frame_item->setText(column_number_ocf, QString("").sprintf("0x%04X", tap_hci->ocf)); frame_item->setText(column_number_opcode, QString("").sprintf("0x%04X", tap_hci->ogf << 10 | tap_hci->ocf)); + if (tap_hci->type == BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE) + frame_item->setText(column_number_event, QString("").sprintf("0x%02X", tap_hci->event)); item->addChild(frame_item); item_data = wmem_new(wmem_file_scope(), item_data_t); -- cgit v1.2.3