v08 receiver ignore frame with unhandled ext opcode
authorAndy Green <andy@warmcat.com>
Sun, 25 Sep 2011 07:47:57 +0000 (08:47 +0100)
committerAndy Green <andy@warmcat.com>
Sun, 25 Sep 2011 07:47:57 +0000 (08:47 +0100)
Signed-off-by: Andy Green <andy@warmcat.com>
lib/parsers.c

index 1a2258f..32b9be5 100644 (file)
@@ -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;