summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-04 19:04:34 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-02-04 19:12:36 +0000
commit541406241231c863deb59f794890e16e5ba6ea5a (patch)
tree4e7e18e49968f15ff69fdb7f1a3f4e7a33966cc0 /src/vcl/vppcom.c
parent9fbacbc56b9f075e9f5fc3f5df1c18043145562c (diff)
vcl: switch to closed state after app close
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I851db474538de76d5f70dd6d6f83a6487a5a02bd
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 916ddf94f02..892d65c348c 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -60,8 +60,8 @@ vppcom_session_state_str (vcl_session_state_t state)
switch (state)
{
- case STATE_START:
- st = "STATE_START";
+ case STATE_CLOSED:
+ st = "STATE_CLOSED";
break;
case STATE_CONNECT:
@@ -1220,7 +1220,7 @@ vppcom_session_create (u8 proto, u8 is_nonblocking)
session = vcl_session_alloc (wrk);
session->session_type = proto;
- session->session_state = STATE_START;
+ session->session_state = STATE_CLOSED;
session->vpp_handle = ~0;
session->is_dgram = vcl_proto_is_dgram (proto);
@@ -1309,6 +1309,8 @@ vcl_session_cleanup (vcl_worker_t * wrk, vcl_session_t * session,
session->vpp_handle, 0);
}
+ session->session_state = STATE_CLOSED;
+
/* Session is removed only after vpp confirms the disconnect */
return rv;