void
session_free (session_t * s)
{
- pool_put (session_main.wrk[s->thread_index].sessions, s);
if (CLIB_DEBUG)
- clib_memset (s, 0xFA, sizeof (*s));
+ {
+ u8 thread_index = s->thread_index;
+ clib_memset (s, 0xFA, sizeof (*s));
+ pool_put (session_main.wrk[thread_index].sessions, s);
+ return;
+ }
+ SESSION_EVT_DBG (SESSION_EVT_FREE, s);
+ pool_put (session_main.wrk[s->thread_index].sessions, s);
}
void
continue;
}
- if (svm_fifo_has_event (s->rx_fifo) || svm_fifo_is_empty (s->rx_fifo))
- continue;
-
if (PREDICT_FALSE (session_enqueue_notify_inline (s)))
errors++;
}
void
session_transport_reset_notify (transport_connection_t * tc)
{
- session_t *s;
app_worker_t *app_wrk;
- application_t *app;
+ session_t *s;
+
s = session_get (tc->s_index, tc->thread_index);
svm_fifo_dequeue_drop_all (s->tx_fifo);
if (s->session_state >= SESSION_STATE_TRANSPORT_CLOSING)
return;
s->session_state = SESSION_STATE_TRANSPORT_CLOSING;
app_wrk = app_worker_get (s->app_wrk_index);
- app = application_get (app_wrk->app_index);
- app->cb_fns.session_reset_callback (s);
+ app_worker_reset_notify (app_wrk, s);
}
int