|
From: Peter K. <pk...@us...> - 2002-11-15 12:13:38
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.204 1.205=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Made send_acl_packet() return an error on failure, and handle it
in send_acl_data_task(). It is probably not the correct solution,
but it should hopefully not oops any longer.
The diff of the modified file(s):
--- hci.c 15 Nov 2002 12:08:54 -0000 1.204
+++ hci.c 15 Nov 2002 12:13:29 -0000 1.205
@@ -3577,12 +3577,12 @@
while ((hci_ctrl.hc_buf.acl_num > 0) && bytes2send ) {
sti();
=20
- /* FIXME -- what if send_acl_packet fails ???
- Then acl_num will decrease anyway ... */
-
sent_bytes =3D send_acl_packet(tx_buf);
=20
- if (sent_bytes !=3D 0) {
+ if (sent_bytes < 0) {
+ /* FIXME: Is this correct? Probably not... */
+ bytes2send =3D 0;
+ } else if (sent_bytes > 0) {
bytes2send -=3D sent_bytes;
cli();
hci_ctrl.acl_buf_count[tx_buf->hci_hdl]++;
@@ -3635,7 +3635,8 @@
if ((cur_data < tx_buf->data) ||
(cur_data > (tx_buf->data+tx_buf->subscr_len)))
{
- D_ERR("send_acl_packet : Corrupting btmem buffers !!!\n");
+ D_ERR(__FUNCTION__ ": Buffer corrupted (deleted?)!\n");
+ return -EFAULT;
}
=20
/* Fills in the HCI header in the packet */
|