From 94a6df005d9e94f3b836ad3c93d1464b4a840499 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 6 May 2021 15:32:14 -0700 Subject: session: connects seg manager is always first By convention, connects segment manager will be first. Therefore it will be the one with the first segment wherein lies the app's message queue. Saves us the trouble of allocating it on first connect, if app started by listening, and we no longer need to track if it's assignable to a listener or if it can be removed. Type: improvement Signed-off-by: Florin Coras Change-Id: Iba9a8ffaab618eeb41ec2144dcfee62d006dc7a2 --- src/plugins/hs_apps/http_server.c | 4 ++-- src/plugins/hs_apps/proxy.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/hs_apps') diff --git a/src/plugins/hs_apps/http_server.c b/src/plugins/hs_apps/http_server.c index 34892b6bd4d..a46e0a4ae13 100644 --- a/src/plugins/hs_apps/http_server.c +++ b/src/plugins/hs_apps/http_server.c @@ -671,8 +671,7 @@ http_server_session_connected_callback (u32 app_index, u32 api_context, static int http_server_add_segment_callback (u32 client_index, u64 segment_handle) { - clib_warning ("called..."); - return -1; + return 0; } static void @@ -732,6 +731,7 @@ http_server_attach () a->session_cb_vft = &http_server_session_cb_vft; a->options = options; a->options[APP_OPTIONS_SEGMENT_SIZE] = segment_size; + a->options[APP_OPTIONS_ADD_SEGMENT_SIZE] = segment_size; a->options[APP_OPTIONS_RX_FIFO_SIZE] = hsm->fifo_size ? hsm->fifo_size : 8 << 10; a->options[APP_OPTIONS_TX_FIFO_SIZE] = diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index 1a49a0f1f3a..18d6edd6be2 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -282,8 +282,7 @@ proxy_connected_callback (u32 app_index, u32 api_context, static int proxy_add_segment_callback (u32 client_index, u64 segment_handle) { - clib_warning ("called..."); - return -1; + return 0; } static int -- cgit 1.2.3-korg