emulator: Add support for ACL data transfer for servers
diff --git a/emulator/server.c b/emulator/server.c
index 76998d9..c28b15e 100644
--- a/emulator/server.c
+++ b/emulator/server.c
@@ -130,6 +130,7 @@
while (count > 0) {
hci_command_hdr *cmd_hdr;
+ hci_acl_hdr *acl_hdr;
if (!client->pkt_data) {
client->pkt_type = ptr[0];
@@ -146,6 +147,12 @@
client->pkt_data = malloc(client->pkt_expect);
client->pkt_len = 0;
break;
+ case HCI_ACLDATA_PKT:
+ acl_hdr = (hci_acl_hdr*)(ptr + 1);
+ client->pkt_expect = HCI_ACL_HDR_SIZE + acl_hdr->dlen + 1;
+ client->pkt_data = malloc(client->pkt_expect);
+ client->pkt_len = 0;
+ break;
default:
printf("packet error\n");
return;