Github user oknet commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/752#discussion_r68778438
--- Diff: proxy/InkAPI.cc ---
@@ -1037,43 +1047,36 @@ INKVConnInternal::INKVConnInternal(TSEventFunc
funcp, TSMutex mutexp)
: INKContInternal(funcp, mutexp), m_read_vio(), m_write_vio(),
m_output_vc(NULL)
{
m_closed = 0;
- SET_HANDLER(&INKVConnInternal::handle_event);
}
void
-INKVConnInternal::init(TSEventFunc funcp, TSMutex mutexp)
+INKVConnInternal::clear()
{
- INKContInternal::init(funcp, mutexp);
- SET_HANDLER(&INKVConnInternal::handle_event);
+ m_read_vio.set_continuation(NULL);
+ m_write_vio.set_continuation(NULL);
+ INKContInternal::clear();
}
void
-INKVConnInternal::destroy()
+INKVConnInternal::free()
{
- m_deleted = 1;
- if (m_deletable) {
- this->mutex = NULL;
- m_read_vio.set_continuation(NULL);
- m_write_vio.set_continuation(NULL);
- INKVConnAllocator.free(this);
- }
+ clear();
+ this->mutex.clear();
+ m_free_magic = INKCONT_INTERN_MAGIC_DEAD;
+ INKVConnAllocator.free(this);
}
-int
-INKVConnInternal::handle_event(int event, void *edata)
--- End diff --
INKContInternal and INKVConnInternal share the one handle_event() and it is
set in INKContInternal(funcp, mutexp).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---