From 2a3b755cbe01f77d1a7904ccaf068baafbcaa181 Mon Sep 17 00:00:00 2001 From: Oliver Ruiz Dorantes Date: Fri, 10 Jul 2009 13:43:35 +0000 Subject: [PATCH] Add handling for write device class event git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31501 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/bluetooth/LocalDeviceImpl.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/servers/bluetooth/LocalDeviceImpl.cpp b/src/servers/bluetooth/LocalDeviceImpl.cpp index e0b5318284..f32aed7ef3 100644 --- a/src/servers/bluetooth/LocalDeviceImpl.cpp +++ b/src/servers/bluetooth/LocalDeviceImpl.cpp @@ -348,10 +348,12 @@ LocalDeviceImpl::CommandComplete(struct hci_ev_cmd_complete* event, BMessage* re if (!IsPropertyAvailable("sco_max_pkt")) fProperties->AddInt16("sco_max_pkt", buffer->sco_max_pkt); - Output::Instance()->Postf(BLACKBOARD_KIT, - "Reply for Read Buffer Size %x\n", buffer->status); } + Output::Instance()->Postf(BLACKBOARD_KIT, "Reply for Read Buffer Size %x\n", + buffer->status); + + reply.AddInt8("status", buffer->status); printf("Sending reply ... %ld\n", request->SendReply(&reply)); reply.PrintToStream(); @@ -388,12 +390,13 @@ LocalDeviceImpl::CommandComplete(struct hci_ev_cmd_complete* event, BMessage* re if (classDev->status == BT_OK) { reply.AddData("devclass", B_ANY_TYPE, &classDev->dev_class, sizeof(classDev->dev_class)); - Output::Instance()->Post("Positive reply for getDeviceClass\n", BLACKBOARD_KIT); - - } else { - Output::Instance()->Post("Negative reply for getDeviceClass\n", BLACKBOARD_KIT); } + Output::Instance()->Postf(BLACKBOARD_KIT, + "Read DeviceClass status = %x DeviceClass = [%x][%x][%x]\n", classDev->status, + classDev->dev_class[0], classDev->dev_class[1], classDev->dev_class[2]); + + reply.AddInt8("status", classDev->status); printf("Sending reply ... %ld\n", request->SendReply(&reply)); reply.PrintToStream(); @@ -468,8 +471,9 @@ LocalDeviceImpl::CommandComplete(struct hci_ev_cmd_complete* event, BMessage* re // place here all CC that just replies a uint8 status case PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_RESET): - case PACK_OPCODE(OGF_VENDOR_CMD, OCF_WRITE_BCM2035_BDADDR): case PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_SCAN_ENABLE): + case PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_CLASS_OF_DEV): + case PACK_OPCODE(OGF_VENDOR_CMD, OCF_WRITE_BCM2035_BDADDR): { reply.AddInt8("status", *(uint8*)(event+1));