summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-05-26 00:47:52 +0000
committerDave Barach <openvpp@barachs.net>2020-05-26 14:16:35 +0000
commit080aa503b23a90ed43d7c0b2bc68e2726190a990 (patch)
tree39b18c3fb199e6c2d2d0660ef5c1e4291c52a366 /src/vcl/vcl_private.h
parent0792bb451c68b9f039e88ab5fb4ce3f73988b781 (diff)
vcl: do not propagate epoll events if session closed
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1e9652b476bbc07852b4e701a948c36a0d8c67fa
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r--src/vcl/vcl_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 77f2be7bebe..593e63f3b09 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -548,6 +548,12 @@ vcl_session_is_closing (vcl_session_t * s)
|| s->session_state == STATE_DISCONNECT);
}
+static inline u8
+vcl_session_is_closed (vcl_session_t * s)
+{
+ return (!s || (s->session_state == STATE_CLOSED));
+}
+
static inline int
vcl_session_closing_error (vcl_session_t * s)
{