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>
diff --git a/src/vnet/tcp/builtin_http_server.c b/src/vnet/tcp/builtin_http_server.c
index 143eef6..70daf18 100644
--- a/src/vnet/tcp/builtin_http_server.c
+++ b/src/vnet/tcp/builtin_http_server.c
@@ -355,8 +355,11 @@
{
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_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)