aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-09 09:40:51 -0700
committerFlorin Coras <florin.coras@gmail.com>2018-09-10 03:15:16 +0000
commit2179513b71963a0b42ca6f1f2b641e79ce89447b (patch)
tree049f4f13ad1aa81d59be4a153b501288be497e10 /src/vnet/session/application_interface.c
parent97f592f474ebaeba0c9a0f50db8f5627cc444aca (diff)
session: lock app worker mq for io events
Also fixes vcl client/server stats and closing procedure. Change-Id: I7d5a274ea0a3c8ea13062bf61bf402248dfe1a19 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_interface.c')
-rw-r--r--src/vnet/session/application_interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index 6c517e8f92b..6b012bb845d 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -612,9 +612,14 @@ vnet_disconnect_session (vnet_disconnect_args_t * a)
}
else
{
+ app_worker_t *app_wrk;
stream_session_t *s;
+
s = session_get_from_handle_if_valid (a->handle);
- if (!s || s->app_wrk_index != a->app_index)
+ if (!s)
+ return VNET_API_ERROR_INVALID_VALUE;
+ app_wrk = app_worker_get (s->app_wrk_index);
+ if (app_wrk->app_index != a->app_index)
return VNET_API_ERROR_INVALID_VALUE;
/* We're peeking into another's thread pool. Make sure */