From 9a597aaebd5d8b99261f1d7482461d709d272eb6 Mon Sep 17 00:00:00 2001 From: Oliver Ruiz Dorantes Date: Wed, 22 Apr 2009 21:00:58 +0000 Subject: [PATCH] Fix JamFile / style git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30337 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../bluetooth/ResetLocalDevice/Jamfile | 2 +- .../ResetLocalDevice/ResetLocalDevice.cpp | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/add-ons/bluetooth/ResetLocalDevice/Jamfile b/src/add-ons/bluetooth/ResetLocalDevice/Jamfile index 22e3e95707..c999518e4d 100644 --- a/src/add-ons/bluetooth/ResetLocalDevice/Jamfile +++ b/src/add-ons/bluetooth/ResetLocalDevice/Jamfile @@ -4,5 +4,5 @@ UsePrivateHeaders bluetooth ; Addon ResetLocalDevice : ResetLocalDevice.cpp - : be + : be libbluetooth.so ; diff --git a/src/add-ons/bluetooth/ResetLocalDevice/ResetLocalDevice.cpp b/src/add-ons/bluetooth/ResetLocalDevice/ResetLocalDevice.cpp index 43c8e7f567..783b44da46 100644 --- a/src/add-ons/bluetooth/ResetLocalDevice/ResetLocalDevice.cpp +++ b/src/add-ons/bluetooth/ResetLocalDevice/ResetLocalDevice.cpp @@ -10,7 +10,6 @@ #include - ResetLocalDeviceAddOn::ResetLocalDeviceAddOn() { @@ -43,27 +42,27 @@ ResetLocalDeviceAddOn::GetActionDescription() status_t ResetLocalDeviceAddOn::TakeAction(LocalDevice* lDevice) { - int8 bt_status = BT_ERROR; - + int8 btStatus = BT_ERROR; + BMessenger* fMessenger = new BMessenger(BLUETOOTH_SIGNATURE); - if (fMessenger == NULL || !fMessenger->IsValid()) - return B_ERROR; + if (fMessenger == NULL || !fMessenger->IsValid()) + return B_ERROR; BluetoothCommand<> Reset(OGF_CONTROL_BASEBAND, OCF_RESET); BMessage request(BT_MSG_HANDLE_SIMPLE_REQUEST); BMessage reply; - request.AddInt32("hci_id", lDevice->GetID()); + request.AddInt32("hci_id", lDevice->ID()); request.AddData("raw command", B_ANY_TYPE, Reset.Data(), Reset.Size()); request.AddInt16("eventExpected", HCI_EVENT_CMD_COMPLETE); request.AddInt16("opcodeExpected", PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_RESET)); - - if (fMessenger->SendMessage(&request, &reply) == B_OK) - reply.FindInt8("status", &bt_status); - return bt_status; + if (fMessenger->SendMessage(&request, &reply) == B_OK) + reply.FindInt8("status", &btStatus); + + return btStatus; }