This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 0e73f84340a65a8610f33c9f060d4a38effe173a Author: James Peach <[email protected]> AuthorDate: Thu May 5 22:18:18 2016 -0700 TS-4425: Use Ptr<ProxyMutex> in session acceptors. --- iocore/net/SSLNextProtocolAccept.cc | 6 ++---- proxy/ProtocolProbeSessionAccept.cc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc index 2d1e213..91f22ef 100644 --- a/iocore/net/SSLNextProtocolAccept.cc +++ b/iocore/net/SSLNextProtocolAccept.cc @@ -27,10 +27,8 @@ static void send_plugin_event(Continuation *plugin, int event, void *edata) { if (plugin->mutex) { - EThread *thread(this_ethread()); - MUTEX_TAKE_LOCK(plugin->mutex, thread); + SCOPED_MUTEX_LOCK(lock, plugin->mutex, this_ethread()); plugin->handleEvent(event, edata); - MUTEX_UNTAKE_LOCK(plugin->mutex, thread); } else { plugin->handleEvent(event, edata); } @@ -64,7 +62,7 @@ ssl_netvc_cast(int event, void *edata) // lock across the handshake, so we make a trampoline to bounce the event from the SSL acceptor to the ultimate session // acceptor. struct SSLNextProtocolTrampoline : public Continuation { - explicit SSLNextProtocolTrampoline(const SSLNextProtocolAccept *npn, ProxyMutex *mutex) : Continuation(mutex), npnParent(npn) + SSLNextProtocolTrampoline(const SSLNextProtocolAccept *npn, Ptr<ProxyMutex> &mutex) : Continuation(mutex), npnParent(npn) { SET_HANDLER(&SSLNextProtocolTrampoline::ioCompletionEvent); } diff --git a/proxy/ProtocolProbeSessionAccept.cc b/proxy/ProtocolProbeSessionAccept.cc index f73a051..8f64467 100644 --- a/proxy/ProtocolProbeSessionAccept.cc +++ b/proxy/ProtocolProbeSessionAccept.cc @@ -59,7 +59,7 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio static const unsigned buffer_size_index = CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX; IOBufferReader *reader; - explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept *probe, ProxyMutex *mutex, MIOBuffer *buffer, + explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept *probe, Ptr<ProxyMutex> &mutex, MIOBuffer *buffer, IOBufferReader *reader) : Continuation(mutex), probeParent(probe) { -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
