diff options
Diffstat (limited to 'src/vnet/session/application_namespace.c')
-rw-r--r-- | src/vnet/session/application_namespace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c index 2507f37043c..f5b70a9c4cf 100644 --- a/src/vnet/session/application_namespace.c +++ b/src/vnet/session/application_namespace.c @@ -52,6 +52,14 @@ app_namespace_get (u32 index) } app_namespace_t * +app_namespace_get_if_valid (u32 index) +{ + if (pool_is_free_index (app_namespace_pool, index)) + return 0; + return pool_elt_at_index (app_namespace_pool, index); +} + +app_namespace_t * app_namespace_get_from_id (const u8 *ns_id) { u32 index = app_namespace_index_from_id (ns_id); |