diff options
author | Florin Coras <fcoras@cisco.com> | 2020-04-15 01:30:46 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-05-07 14:43:39 +0000 |
commit | 72db664c76fe3e4fb23020b9a191017c4ea4cb69 (patch) | |
tree | 5031aacd3efd5e15f2c911e160b7900869138ce9 /src/vnet | |
parent | 92e1b83a39458f98ff649883334b153f03af603b (diff) |
session: catch segment manager alloc failure
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4ac923fda84feee8d2ad76d0c3e3a252f53008ed
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/session/application_worker.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |