summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-10-20 08:55:11 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-10-20 08:55:11 +0000
commitb60f09936298f7115d5387398d5eeb0156b08892 (patch)
tree8f72d04d0387cb316238890f6cd148054817247b
parenta11814589084bb8afbb150177159039f396508a8 (diff)
Make EVT_CMD_STATUS as rp->event work
-rw-r--r--src/hci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hci.c b/src/hci.c
index 05974432..c4bb3cd3 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -976,7 +976,13 @@ int hci_send_req(int dd, struct hci_request *r, int to)
errno = EIO;
goto failed;
}
- break;
+
+ if (r->event != EVT_CMD_STATUS)
+ break;
+
+ r->rlen = MIN(len, r->rlen);
+ memcpy(r->rparam, ptr, r->rlen);
+ goto done;
case EVT_CMD_COMPLETE:
cc = (void *) ptr;