From 72db664c76fe3e4fb23020b9a191017c4ea4cb69 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 15 Apr 2020 01:30:46 +0000 Subject: session: catch segment manager alloc failure Type: improvement Signed-off-by: Florin Coras Change-Id: I4ac923fda84feee8d2ad76d0c3e3a252f53008ed --- src/vnet/session/application_worker.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c index 8e3ba35013a..f9740a300c2 100644 --- a/src/vnet/session/application_worker.c +++ b/src/vnet/session/application_worker.c @@ -503,15 +503,16 @@ app_worker_own_session (app_worker_t * app_wrk, session_t * s) } int -app_worker_connect_session (app_worker_t * app, session_endpoint_t * sep, +app_worker_connect_session (app_worker_t * app_wrk, session_endpoint_t * sep, u32 api_context) { int rv; /* Make sure we have a segment manager for connects */ - app_worker_alloc_connects_segment_manager (app); + if (app_worker_alloc_connects_segment_manager (app_wrk)) + return SESSION_E_ALLOC; - if ((rv = session_open (app->wrk_index, sep, api_context))) + if ((rv = session_open (app_wrk->wrk_index, sep, api_context))) return rv; return 0; -- cgit 1.2.3-korg