This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 040336e TS-3909: Further trampoline crash fixes. This closes #575.
040336e is described below
commit 040336e99add1cae3380fca0962b5d44aefb54cb
Author: Susan Hinrichs <[email protected]>
AuthorDate: Fri Apr 15 17:13:21 2016 +0000
TS-3909: Further trampoline crash fixes. This closes #575.
---
iocore/net/I_NetVConnection.h | 15 +++++++++++++++
iocore/net/P_UnixNetVConnection.h | 7 +++++++
iocore/net/SSLNextProtocolAccept.cc | 5 +++++
3 files changed, 27 insertions(+)
diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h
index 0dcda03..2bbed80 100644
--- a/iocore/net/I_NetVConnection.h
+++ b/iocore/net/I_NetVConnection.h
@@ -432,6 +432,21 @@ public:
*/
virtual void cancel_inactivity_timeout() = 0;
+ /** Set the action to use a continuation.
+ The action continuation will be called with an event if there is no
pending I/O operation
+ to receive the event.
+
+ Pass @c NULL to disable.
+
+ @internal Subclasses should implement this if they support actions. This
abstract class does
+ not. If the subclass doesn't have an action this method is silently
ignored.
+ */
+ virtual void
+ set_action(Continuation *)
+ {
+ return;
+ }
+
virtual void add_to_keep_alive_queue() = 0;
virtual void remove_from_keep_alive_queue() = 0;
diff --git a/iocore/net/P_UnixNetVConnection.h
b/iocore/net/P_UnixNetVConnection.h
index 5c20d13..722434d 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -149,6 +149,7 @@ public:
virtual void set_inactivity_timeout(ink_hrtime timeout_in);
virtual void cancel_active_timeout();
virtual void cancel_inactivity_timeout();
+ virtual void set_action(Continuation *c);
virtual void add_to_keep_alive_queue();
virtual void remove_from_keep_alive_queue();
virtual bool add_to_active_queue();
@@ -482,6 +483,12 @@ UnixNetVConnection::get_socket()
return con.fd;
}
+TS_INLINE void
+UnixNetVConnection::set_action(Continuation *c)
+{
+ action_ = c;
+}
+
// declarations for local use (within the net module)
void close_UnixNetVConnection(UnixNetVConnection *vc, EThread *t);
diff --git a/iocore/net/SSLNextProtocolAccept.cc
b/iocore/net/SSLNextProtocolAccept.cc
index df467f4..2d1e213 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -96,6 +96,11 @@ struct SSLNextProtocolTrampoline : public Continuation {
return EVENT_ERROR;
}
+ // Cancel the action, so later timeouts and errors don't try to
+ // send the event to the Accept object. After this point, the accept
+ // object does not care.
+ netvc->set_action(NULL);
+
// Cancel the read before we have a chance to delete the continuation
netvc->do_io_read(NULL, 0, NULL);
plugin = netvc->endpoint();
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].