diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-07-28 14:09:50 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-10-05 19:13:13 +0000 |
commit | 7b3a3df263c7a5bf549f350553cbd9bce7ee40b3 (patch) | |
tree | 6c42695ee8e90c93bbe49c3cded4f35262322bc6 /src/vnet/session/application_namespace.c | |
parent | 5546e43f7943d6edff6c6587ed4e7233e8002e28 (diff) |
session: Add session_sapi_enable_disable
Type: feature
This adds an API message to do the switch
at runtime.
Change-Id: Ice6b69c57f0bfbf5668182e25593362ff4133615
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/session/application_namespace.c')
-rw-r--r-- | src/vnet/session/application_namespace.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c index bece746a757..cd2636cff32 100644 --- a/src/vnet/session/application_namespace.c +++ b/src/vnet/session/application_namespace.c @@ -222,10 +222,15 @@ app_namespace_get_local_table (app_namespace_t * app_ns) return session_table_get (app_ns->local_table_index); } -void -appns_sapi_enable (void) +int +appns_sapi_enable_disable (int is_enable) { - app_sapi_enabled = 1; + /* This cannot be called with active sockets */ + if (pool_elts (app_namespace_pool)) + return -1; + + app_sapi_enabled = is_enable; + return 0; } u8 |