diff --git a/src/source/Sctp/Sctp.c b/src/source/Sctp/Sctp.c index 2af922e0cd..1d0b8194b0 100644 --- a/src/source/Sctp/Sctp.c +++ b/src/source/Sctp/Sctp.c @@ -309,7 +309,7 @@ STATUS handleDcepPacket(PSctpSession pSctpSession, UINT32 streamId, PBYTE data, // Assert that is DCEP of type DataChannelOpen CHK(length > SCTP_DCEP_HEADER_LENGTH && data[0] == DCEP_DATA_CHANNEL_OPEN, STATUS_SUCCESS); - + MEMCPY(&labelLength, data + 8, SIZEOF(UINT16)); MEMCPY(&protocolLength, data + 10, SIZEOF(UINT16)); putInt16((PINT16) &labelLength, labelLength); @@ -318,7 +318,6 @@ STATUS handleDcepPacket(PSctpSession pSctpSession, UINT32 streamId, PBYTE data, CHK((labelLength + protocolLength + SCTP_DCEP_HEADER_LENGTH) >= length, STATUS_SCTP_INVALID_DCEP_PACKET); CHK(SCTP_MAX_ALLOWABLE_PACKET_LENGTH >= length, STATUS_SCTP_INVALID_DCEP_PACKET); - pSctpSession->sctpSessionCallbacks.dataChannelOpenFunc(pSctpSession->sctpSessionCallbacks.customData, streamId, data + SCTP_DCEP_HEADER_LENGTH, labelLength);