Skip to content

Commit d2a9cbd

Browse files
committed
++ cache
1 parent b59ddf7 commit d2a9cbd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

storage/cache.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,19 @@ void NHTFlowCache::finish()
180180
#ifdef WITH_CTT
181181
if (m_flow_table[i]->is_in_ctt) {
182182
send_export_request_to_ctt(m_flow_table[i]->m_flow.flow_hash_ctt);
183+
m_ctt_controller[m_flow_table[i]->m_flow.flow_hash_ctt]--;
184+
if (m_ctt_controller[m_flow_table[i]->m_flow.flow_hash_ctt] == 0) {
185+
m_ctt_controller.erase(m_flow_table[i]->m_flow.flow_hash_ctt);
186+
}
183187
}
184188
#endif /* WITH_CTT */
185189
plugins_pre_export(m_flow_table[i]->m_flow);
186190
export_flow(i, FLOW_END_FORCED);
187191
}
188192
}
193+
if (m_ctt_controller.size() > 0){
194+
throw "bad CTT size";
195+
}
189196
}
190197

191198
void NHTFlowCache::flush(Packet &pkt, size_t flow_index, int return_flags)

0 commit comments

Comments
 (0)