- Do not delete net_buffer in frame container, as it or its fragments have already been deleted in driver transport layer
- Style git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35012 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,7 +13,8 @@ SignalByIdent(HciConnection* conn, uint8 ident)
|
|||||||
L2capFrame* frame;
|
L2capFrame* frame;
|
||||||
|
|
||||||
mutex_lock(&conn->fLockExpected);
|
mutex_lock(&conn->fLockExpected);
|
||||||
DoublyLinkedList<L2capFrame>::Iterator iterator = conn->ExpectedResponses.GetIterator();
|
DoublyLinkedList<L2capFrame>::Iterator iterator
|
||||||
|
= conn->ExpectedResponses.GetIterator();
|
||||||
|
|
||||||
while (iterator.HasNext()) {
|
while (iterator.HasNext()) {
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ SignalByIdent(HciConnection* conn, uint8 ident)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
TimeoutSignal(L2capFrame* frame, uint32 timeo)
|
TimeoutSignal(L2capFrame* frame, uint32 timeo)
|
||||||
{
|
{
|
||||||
@@ -50,7 +52,8 @@ unTimeoutSignal(L2capFrame* frame)
|
|||||||
|
|
||||||
|
|
||||||
L2capFrame*
|
L2capFrame*
|
||||||
SpawmFrame(HciConnection* conn, L2capChannel* channel, net_buffer* buffer, frame_type type)
|
SpawmFrame(HciConnection* conn, L2capChannel* channel, net_buffer* buffer,
|
||||||
|
frame_type type)
|
||||||
{
|
{
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
panic("Null Buffer to outgoing queue");
|
panic("Null Buffer to outgoing queue");
|
||||||
@@ -74,7 +77,8 @@ SpawmFrame(HciConnection* conn, L2capChannel* channel, net_buffer* buffer, frame
|
|||||||
|
|
||||||
|
|
||||||
L2capFrame*
|
L2capFrame*
|
||||||
SpawmSignal(HciConnection* conn, L2capChannel* channel, net_buffer* buffer, uint8 ident, uint8 code)
|
SpawmSignal(HciConnection* conn, L2capChannel* channel, net_buffer* buffer,
|
||||||
|
uint8 ident, uint8 code)
|
||||||
{
|
{
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
panic("Null Buffer to outgoing queue");
|
panic("Null Buffer to outgoing queue");
|
||||||
@@ -106,13 +110,16 @@ AcknowledgeSignal(L2capFrame* frame)
|
|||||||
if (frame != NULL) {
|
if (frame != NULL) {
|
||||||
|
|
||||||
if (frame->type == L2CAP_C_FRAME) {
|
if (frame->type == L2CAP_C_FRAME) {
|
||||||
|
HciConnection* connection = frame->conn;
|
||||||
|
|
||||||
unTimeoutSignal(frame);
|
unTimeoutSignal(frame);
|
||||||
mutex_lock(&frame->conn->fLockExpected);
|
mutex_lock(&connection->fLockExpected);
|
||||||
// frame->conn->ExpectedResponses.Remove(frame);
|
connection->ExpectedResponses.Remove(frame);
|
||||||
mutex_unlock(&frame->conn->fLockExpected);
|
mutex_unlock(&connection->fLockExpected);
|
||||||
}
|
}
|
||||||
|
|
||||||
gBufferModule->free(frame->buffer);
|
// NO! This will be deleted by lower layers while being sent!
|
||||||
|
// gBufferModule->free(frame->buffer);
|
||||||
delete frame;
|
delete frame;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user