- Follow directions from mmlr regarding ticket 2353. Do not resubmit if the transfers are already cancelled.

- As more cleaning still needs to be done regarding this subject the ticket is not yet closed 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25944 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes 2008-06-12 19:42:21 +00:00
parent c15ecd98ca
commit 43f36da804

View File

@ -175,7 +175,9 @@ event_complete(void* cookie, status_t status, void* data, size_t actual_len)
bt_usb_dev* bdev = cookie;
status_t err;
/* TODO: check are we running? */
/* TODO: or not running anymore */
if (status == B_CANCELED)
return;
if (status != B_OK || actual_len == 0)
goto resubmit;
@ -214,7 +216,9 @@ acl_rx_complete(void* cookie, status_t status, void* data, size_t actual_len)
bt_usb_dev* bdev = cookie;
status_t err;
/* TODO: check are we running? */
/* TODO: or not running anymore? */
if (status == B_CANCELED)
return;
if (status != B_OK || actual_len == 0)
goto resubmit;
@ -390,6 +394,10 @@ submit_tx_command(bt_usb_dev* bdev, snet_buffer* snbuf)
uint16 value = 0;
uint16 wLength = B_HOST_TO_LENDIAN_INT16(snb_size(snbuf));
if (!GET_BIT(bdev->state, RUNNING) ) {
return B_DEV_NOT_READY;
}
/* set cookie */
snb_set_cookie(snbuf, bdev);
@ -415,6 +423,11 @@ submit_tx_acl(bt_usb_dev* bdev, net_buffer* nbuf)
/* set cookie */
SET_DEVICE(nbuf,bdev->hdev);
if (!GET_BIT(bdev->state, RUNNING) ) {
return B_DEV_NOT_READY;
}
err = usb->queue_bulk(bdev->bulk_out_ep->handle,
nb_get_whole_buffer(nbuf), nbuf->size,
@ -435,6 +448,10 @@ status_t
submit_tx_sco(bt_usb_dev* bdev)
{
if (!GET_BIT(bdev->state, RUNNING) ) {
return B_DEV_NOT_READY;
}
/* not yet implemented */
return B_ERROR;
}