summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2022-10-25 13:09:11 -0700
committerFlorin Coras <florin.coras@gmail.com>2022-10-26 18:03:30 +0000
commitd810a6e218e9af3c3bccd58c9a2d925a7f12242e (patch)
tree66ee520bbe6c31be2c893a9dc1d0717204dfbe79 /src/vnet/session/application_local.c
parent5efc0cdf48e45ff457c5ddead157165b725e78f3 (diff)
session: add session event log for session state
To aid sesipon debug, add session event log in SM debug to track the session state. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6909cf969cd5b6a3ea5a06d08ae32c2f1d48f686
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r--src/vnet/session/application_local.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 8590d041600..d2a69dc282b 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -363,7 +363,7 @@ ct_session_connect_notify (session_t *ss, session_error_t err)
ss = session_get (ss_index, thread_index);
cs->session_type = ss->session_type;
cs->listener_handle = SESSION_INVALID_HANDLE;
- cs->session_state = SESSION_STATE_CONNECTING;
+ session_set_state (cs, SESSION_STATE_CONNECTING);
cs->app_wrk_index = client_wrk->wrk_index;
cs->connection_index = cct->c_c_index;
cct->c_s_index = cs->session_index;
@@ -379,7 +379,7 @@ ct_session_connect_notify (session_t *ss, session_error_t err)
goto connect_error;
}
- cs->session_state = SESSION_STATE_CONNECTING;
+ session_set_state (cs, SESSION_STATE_CONNECTING);
if (app_worker_connect_notify (client_wrk, cs, 0, opaque))
{
@@ -390,7 +390,7 @@ ct_session_connect_notify (session_t *ss, session_error_t err)
}
cs = session_get (cct->c_s_index, cct->c_thread_index);
- cs->session_state = SESSION_STATE_READY;
+ session_set_state (cs, SESSION_STATE_READY);
return 0;
@@ -701,7 +701,7 @@ ct_accept_one (u32 thread_index, u32 ho_index)
sct->c_is_ip4);
ss->connection_index = sct->c_c_index;
ss->listener_handle = listen_session_get_handle (ll);
- ss->session_state = SESSION_STATE_CREATED;
+ session_set_state (ss, SESSION_STATE_CREATED);
server_wrk = application_listener_select_worker (ll);
ss->app_wrk_index = server_wrk->wrk_index;
@@ -726,7 +726,7 @@ ct_accept_one (u32 thread_index, u32 ho_index)
cct->client_tx_fifo->refcnt++;
cct->segment_handle = sct->segment_handle;
- ss->session_state = SESSION_STATE_ACCEPTING;
+ session_set_state (ss, SESSION_STATE_ACCEPTING);
if (app_worker_accept_notify (server_wrk, ss))
{
ct_session_connect_notify (ss, SESSION_E_REFUSED);