Fixed wrong cancelling algorithm. This is what you get when you "rework" an existing function without thinking it through again... Thanks J Jerome for noticing\!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21058 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -916,19 +916,21 @@ EHCI::CancelQueuedTransfers(Pipe *pipe)
|
|||||||
current->transfer->Finished(B_CANCELED, 0);
|
current->transfer->Finished(B_CANCELED, 0);
|
||||||
delete current->transfer;
|
delete current->transfer;
|
||||||
|
|
||||||
|
transfer_data *next = current->link;
|
||||||
if (last)
|
if (last)
|
||||||
last->link = current->link;
|
last->link = next;
|
||||||
else
|
else
|
||||||
fFirstTransfer = current->link;
|
fFirstTransfer = next;
|
||||||
|
|
||||||
if (fLastTransfer == current)
|
if (fLastTransfer == current)
|
||||||
fLastTransfer = last;
|
fLastTransfer = last;
|
||||||
|
|
||||||
delete current;
|
delete current;
|
||||||
|
current = next;
|
||||||
|
} else {
|
||||||
|
last = current;
|
||||||
|
current = current->link;
|
||||||
}
|
}
|
||||||
|
|
||||||
last = current;
|
|
||||||
current = current->link;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Unlock();
|
Unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user