This is an automated email from the ASF dual-hosted git repository. sorber pushed a commit to branch 6.2.x in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 556a0f9717eb10cdd20d8659bc605bdb10c27ad0 Author: shinrich <shinr...@yahoo-inc.com> AuthorDate: Mon Apr 18 10:15:16 2016 -0500 TS-3429: Fix reference counting for TSContScheduleEvery. This closes #576. (cherry picked from commit 3286600d90be4b6291b35867720adbd864f580ea) --- proxy/InkAPI.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc index 693aa62..1b40c28 100644 --- a/proxy/InkAPI.cc +++ b/proxy/InkAPI.cc @@ -991,7 +991,16 @@ INKContInternal::handle_event(int event, void *edata) Warning("INKCont Deletable but not deleted %d", m_event_count); } } else { - return m_event_func((TSCont)this, (TSEvent)event, edata); + int retval = m_event_func((TSCont)this, (TSEvent)event, edata); + if (edata && event == EVENT_INTERVAL) { + Event *e = reinterpret_cast<Event *>(edata); + if (e->period != 0) { + // In the interval case, we must re-increment the m_event_count for + // the next go around. Otherwise, our event count will go negative. + ink_release_assert(ink_atomic_increment((int *)&this->m_event_count, 1) >= 0); + } + } + return retval; } return EVENT_DONE; } -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.