aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps/echo_server.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-06-19 14:47:41 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-06-20 14:43:19 +0000
commite4a1a328351482a900ba4da9d47ff8eaa0dd6ffd (patch)
treee67c59c9d557fe30de5eb06430d9ae0dc856c256 /src/vnet/session-apps/echo_server.c
parentff55c816c966bdd6928c22ee764358c0a61436dc (diff)
quic: remove session flags identifying Q/S sessions
Type: refactor Change-Id: Id68c5ae6d57df0fc556bbf583a66e538e641ffb1 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/session-apps/echo_server.c')
-rw-r--r--src/vnet/session-apps/echo_server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index 7459d03202f..b7a74818cca 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -55,6 +55,7 @@ typedef struct
u64 byte_index;
u32 **rx_retries;
u8 transport_proto;
+ u64 listener_handle; /**< Session handle of the root listener */
vlib_main_t *vlib_main;
} echo_server_main_t;
@@ -72,7 +73,7 @@ int
quic_echo_server_session_accept_callback (session_t * s)
{
echo_server_main_t *esm = &echo_server_main;
- if (!(s->flags & SESSION_F_QUIC_STREAM))
+ if (s->listener_handle == esm->listener_handle)
return quic_echo_server_qsession_accept_callback (s);
DBG ("SSESSION %u accept w/opaque %d", s->session_index, s->opaque);
@@ -398,12 +399,15 @@ echo_server_detach (void)
static int
echo_server_listen ()
{
+ int rv;
echo_server_main_t *esm = &echo_server_main;
vnet_listen_args_t _a, *a = &_a;
clib_memset (a, 0, sizeof (*a));
a->app_index = esm->app_index;
a->uri = esm->server_uri;
- return vnet_bind_uri (a);
+ rv = vnet_bind_uri (a);
+ esm->listener_handle = a->handle;
+ return rv;
}
static int