carry over 05 specific stuff to 06
authorAndy Green <andy@warmcat.com>
Sat, 26 Feb 2011 11:13:56 +0000 (11:13 +0000)
committerAndy Green <andy@warmcat.com>
Sat, 26 Feb 2011 11:13:56 +0000 (11:13 +0000)
Signed-off-by: Andy Green <andy@warmcat.com>
lib/client-handshake.c
lib/handshake.c
lib/parsers.c

index 49a31bc..183277e 100644 (file)
@@ -103,6 +103,7 @@ libwebsocket_client_connect(struct libwebsocket_context *this,
                wsi->xor_mask = xor_mask_04;
                break;
        case 5:
+       case 6:
                wsi->xor_mask = xor_mask_05;
                break;
        default:
index b4779f4..38a1811 100644 (file)
@@ -569,7 +569,8 @@ libwebsocket_read(struct libwebsocket_context *this, struct libwebsocket *wsi,
                        if (handshake_0405(wsi))
                                goto bail;
                        break;
-               case 5: /* 05 */
+               case 5:
+               case 6:
                        wsi->xor_mask = xor_mask_05;
                        debug("libwebsocket_parse calling handshake_04\n");
                        if (handshake_0405(wsi))
index 481caf1..8a0f564 100644 (file)
@@ -279,6 +279,7 @@ static int libwebsocket_rx_sm(struct libwebsocket *wsi, unsigned char c)
                        break;
                case 4:
                case 5:
+               case 6:
                        wsi->all_zero_nonce = 1;
                        wsi->frame_masking_nonce_04[0] = c;
                        if (c)
@@ -678,6 +679,7 @@ int libwebsocket_client_rx_sm(struct libwebsocket *wsi, unsigned char c)
                        break;
                case 4:
                case 5:
+               case 6:
        /*
         *  04 logical framing from the spec (all this is masked when
         *  incoming and has to be unmasked)
@@ -1124,6 +1126,7 @@ int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf,
 
        case 4:
        case 5:
+       case 6:
                switch (protocol & 0xf) {
                case LWS_WRITE_TEXT:
                        n = LWS_WS_OPCODE_04__TEXT_FRAME;