refactor: use session_manager_discard_session() instead of session_set_discard()

This commit is contained in:
luwenpeng
2024-11-26 11:53:30 +08:00
parent 9ba56055b3
commit 1e072950d7
6 changed files with 31 additions and 21 deletions

View File

@@ -463,6 +463,16 @@ struct session *session_manager_lookup_session_by_id(struct session_manager *ses
return session_manager_rte_lookup_session_by_id(rte, sess_id);
}
void session_manager_discard_session(struct session_manager *sess_mgr, uint16_t thread_id, struct session *sess)
{
struct session_manager_rte *rte = session_manager_get_rte(sess_mgr, thread_id);
if (rte == NULL)
{
return;
}
session_manager_rte_discard_session(rte, sess);
}
struct session *packet_exdata_to_session(const struct session_manager *sess_mgr, const struct packet *pkt)
{
return (struct session *)packet_get_exdata(pkt, sess_mgr->pkt_ex_to_get_sess);