summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp/datachannel/DataChannel.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-17 14:30:28 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-17 14:30:28 +0100
commit0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5 (patch)
treedc475bdcc5c286fbbd363dc96a55cbc778b90038 /netwerk/sctp/datachannel/DataChannel.cpp
parent41bd3e2599696771485c9dc75a7e27b94c0597fb (diff)
downloadUXP-0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5.tar
UXP-0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5.tar.gz
UXP-0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5.tar.lz
UXP-0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5.tar.xz
UXP-0ae2ab78b9b00f177bdf0c1f64811ad416e6c7a5.zip
Be more explicit with a lock.
Diffstat (limited to 'netwerk/sctp/datachannel/DataChannel.cpp')
-rw-r--r--netwerk/sctp/datachannel/DataChannel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/netwerk/sctp/datachannel/DataChannel.cpp b/netwerk/sctp/datachannel/DataChannel.cpp
index bf7790f51..d47a9d5ea 100644
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -646,6 +646,7 @@ DataChannelConnection::SctpDtlsInput(TransportFlow *flow,
}
}
// Pass the data to SCTP
+ MutexAutoLock lock(mLock);
usrsctp_conninput(static_cast<void *>(this), data, len, 0);
}
@@ -1016,7 +1017,7 @@ DataChannelConnection::SendDeferredMessages()
bool still_blocked = false;
// This may block while something is modifying channels, but should not block for IO
- MutexAutoLock lock(mLock);
+ mLock.AssertCurrentThreadOwns();
// XXX For total fairness, on a still_blocked we'd start next time at the
// same index. Sorry, not going to bother for now.
@@ -1923,7 +1924,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 {