diff options
author | JingLiuZTE <liu.jing5@zte.com.cn> | 2017-11-08 15:01:27 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-11-08 08:19:46 +0000 |
commit | 7cafe7670ed508b872e05c951da9721e6009ce81 (patch) | |
tree | ad716c93d4d7a2b67399be74f031a46847a61a7e /src/vnet/tcp/builtin_http_server.c | |
parent | 9e7c13f8793e95bd0aad5c2799ff10731312c92c (diff) |
http_server_rx_callback
http_server_rx_callback must return -1,
if session_rx_request fails.
Change-Id: I08e48ea7560dee301958e0babe023bb739b9342c
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
Diffstat (limited to 'src/vnet/tcp/builtin_http_server.c')
-rw-r--r-- | src/vnet/tcp/builtin_http_server.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/tcp/builtin_http_server.c b/src/vnet/tcp/builtin_http_server.c index 143eef66148..70daf18849a 100644 --- a/src/vnet/tcp/builtin_http_server.c +++ b/src/vnet/tcp/builtin_http_server.c @@ -355,8 +355,11 @@ http_server_rx_callback (stream_session_t * s) { http_server_main_t *hsm = &http_server_main; builtin_http_server_args *args; + int rv; - session_rx_request (s); + rv = session_rx_request (s); + if (rv) + return rv; /* send the command to a new/recycled vlib process */ args = clib_mem_alloc (sizeof (*args)); @@ -385,8 +388,11 @@ http_server_rx_callback_static (stream_session_t * s) http_server_main_t *hsm = &http_server_main; u8 *request = 0; int i; + int rv; - session_rx_request (s); + rv = session_rx_request (s); + if (rv) + return rv; request = hsm->rx_buf[s->thread_index]; if (vec_len (request) < 7) |