From 25a56b0ac3448bc50556c07503d479812e81adcb Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 25 Sep 2011 08:47:57 +0100 Subject: [PATCH] v08 receiver ignore frame with unhandled ext opcode Signed-off-by: Andy Green --- lib/parsers.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/parsers.c b/lib/parsers.c index 1a2258f..32b9be5 100644 --- a/lib/parsers.c +++ b/lib/parsers.c @@ -777,12 +777,9 @@ spill: handled = 1; } - if (!handled) { - /* kill the connection */ + if (!handled) fprintf(stderr, "Unhandled extended opcode " - "0x%x\n", wsi->opcode); - return -1; - } + "0x%x - ignoring frame\n", wsi->opcode); wsi->rx_user_buffer_head = 0; return 0; @@ -1242,10 +1239,11 @@ spill: } if (!handled) { - /* kill the connection */ fprintf(stderr, "Unhandled extended opcode " - "0x%x\n", wsi->opcode); - return -1; + "0x%x - ignoring frame\n", wsi->opcode); + wsi->rx_user_buffer_head = 0; + + return 0; } break; -- 2.7.4