Implement handling of the scan mode event reply
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -279,6 +279,29 @@ LocalDeviceImpl::CommandComplete(struct hci_ev_cmd_complete* event, BMessage* re
|
|||||||
|
|
||||||
ClearWantedEvent(request, PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_READ_LOCAL_NAME));
|
ClearWantedEvent(request, PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_READ_LOCAL_NAME));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_SCAN_ENABLE):
|
||||||
|
{
|
||||||
|
uint8* statusReply = (uint8*)(event+1);
|
||||||
|
|
||||||
|
reply.AddInt8("status", *statusReply);
|
||||||
|
|
||||||
|
if (*statusReply == BT_OK) {
|
||||||
|
|
||||||
|
Output::Instance()->Post("Positive reply for scanmode\n", BLACKBOARD_KIT);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Output::Instance()->Post("Negative reply for scanmode\n", BLACKBOARD_KIT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Sending reply ... %ld\n",request->SendReply(&reply));
|
||||||
|
reply.PrintToStream();
|
||||||
|
|
||||||
|
ClearWantedEvent(request, PACK_OPCODE(OGF_CONTROL_BASEBAND, OCF_WRITE_SCAN_ENABLE));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -369,7 +392,7 @@ LocalDeviceImpl::ProcessSimpleRequest(BMessage* request)
|
|||||||
ssize_t size;
|
ssize_t size;
|
||||||
void* command = NULL;
|
void* command = NULL;
|
||||||
|
|
||||||
if (request->FindData("raw command", B_ANY_TYPE, 0, (const void **)command, &size) == B_OK)
|
if (request->FindData("raw command", B_ANY_TYPE, 0, (const void **)&command, &size) == B_OK)
|
||||||
if (((HCITransportAccessor*)fHCIDelegate)->IssueCommand(command, size) == B_ERROR)
|
if (((HCITransportAccessor*)fHCIDelegate)->IssueCommand(command, size) == B_ERROR)
|
||||||
(Output::Instance()->Post("Command issue error\n", BLACKBOARD_EVENTS));
|
(Output::Instance()->Post("Command issue error\n", BLACKBOARD_EVENTS));
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user