mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1421963: lock around SCTP input processing, not just the receive callback r=drno
This commit is contained in:
parent
882ad2f961
commit
edbe55cb90
@ -817,6 +817,7 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow,
|
||||
}
|
||||
}
|
||||
// Pass the data to SCTP
|
||||
MutexAutoLock lock(mLock);
|
||||
usrsctp_conninput(static_cast<void *>(this), data, len, 0);
|
||||
}
|
||||
|
||||
@ -1224,7 +1225,7 @@ DataChannelConnection::SendDeferredMessages()
|
||||
RefPtr<DataChannel> channel; // we may null out the refs to this
|
||||
|
||||
// This may block while something is modifying channels, but should not block for IO
|
||||
MutexAutoLock lock(mLock);
|
||||
mLock.AssertCurrentThreadOwns();
|
||||
|
||||
LOG(("SendDeferredMessages called, pending type: %d", mPendingType));
|
||||
if (!mPendingType) {
|
||||
@ -2307,7 +2308,7 @@ DataChannelConnection::ReceiveCallback(struct socket* sock, void *data, size_t d
|
||||
if (!data) {
|
||||
usrsctp_close(sock); // SCTP has finished shutting down
|
||||
} else {
|
||||
MutexAutoLock lock(mLock);
|
||||
mLock.AssertCurrentThreadOwns();
|
||||
if (flags & MSG_NOTIFICATION) {
|
||||
HandleNotification(static_cast<union sctp_notification *>(data), datalen);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user