rename: update session pool and packet pool API names for clarity

This commit is contained in:
luwenpeng
2024-11-08 19:16:06 +08:00
parent d0a8685914
commit 8349a631e1
10 changed files with 42 additions and 42 deletions

View File

@@ -581,7 +581,7 @@ static struct session *session_manager_rte_new_tcp_session(struct session_manage
}
enum flow_type type = (flags & TH_ACK) ? FLOW_TYPE_S2C : FLOW_TYPE_C2S;
struct session *sess = session_pool_pop(sess_mgr_rte->sess_pool);
struct session *sess = session_pool_acquire_sessoin(sess_mgr_rte->sess_pool);
if (sess == NULL)
{
assert(0);
@@ -598,7 +598,7 @@ static struct session *session_manager_rte_new_tcp_session(struct session_manage
if (tcp_init(sess_mgr_rte, sess) == -1)
{
assert(0);
session_pool_push(sess_mgr_rte->sess_pool, sess);
session_pool_release_sessoin(sess_mgr_rte->sess_pool, sess);
return NULL;
}
tcp_update(sess_mgr_rte, sess, type, tcp_layer);
@@ -628,7 +628,7 @@ static struct session *session_manager_rte_new_udp_session(struct session_manage
session_manager_rte_evicte_session(sess_mgr_rte, evic_sess, LRU_EVICT);
}
struct session *sess = session_pool_pop(sess_mgr_rte->sess_pool);
struct session *sess = session_pool_acquire_sessoin(sess_mgr_rte->sess_pool);
if (sess == NULL)
{
assert(sess);
@@ -933,7 +933,7 @@ void session_manager_rte_free_session(struct session_manager_rte *sess_mgr_rte,
session_set_current_packet(sess, NULL);
session_set_flow_type(sess, FLOW_TYPE_NONE);
session_init(sess);
session_pool_push(sess_mgr_rte->sess_pool, sess);
session_pool_release_sessoin(sess_mgr_rte->sess_pool, sess);
sess = NULL;
}
}