mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1017835: use array delete for SCTP/DTLS SendPacket data r=jib DONTBUILD
This commit is contained in:
parent
d1f11de061
commit
7825a71046
@ -680,12 +680,12 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow,
|
||||
}
|
||||
|
||||
int
|
||||
DataChannelConnection::SendPacket(const unsigned char *data, size_t len, bool release)
|
||||
DataChannelConnection::SendPacket(unsigned char data[], size_t len, bool release)
|
||||
{
|
||||
//LOG(("%p: SCTP/DTLS sent %ld bytes", this, len));
|
||||
int res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0;
|
||||
if (release)
|
||||
delete data;
|
||||
delete [] data;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ private:
|
||||
|
||||
#ifdef SCTP_DTLS_SUPPORTED
|
||||
static void DTLSConnectThread(void *data);
|
||||
int SendPacket(const unsigned char* data, size_t len, bool release);
|
||||
int SendPacket(unsigned char data[], size_t len, bool release);
|
||||
void SctpDtlsInput(TransportFlow *flow, const unsigned char *data, size_t len);
|
||||
static int SctpDtlsOutput(void *addr, void *buffer, size_t length, uint8_t tos, uint8_t set_df);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user