X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwebsock.c;h=c578eba46a714e7667219663083ae3252df96045;hb=6ea1d50ab6571551e1d0379940349911956c97ee;hp=41e063f868e357e420ca2502f24704231a188c12;hpb=54b2652e94cfa7840dbebcba46edd5459e7c6e86;p=src%2Fapp-framework-binder.git diff --git a/src/websock.c b/src/websock.c index 41e063f8..c578eba4 100644 --- a/src/websock.c +++ b/src/websock.c @@ -199,10 +199,10 @@ static int check_control_header(struct websock *ws) return 0; if (FRAME_GET_RSV3(ws->header[0]) != 0) return 0; - if (FRAME_GET_MASK(ws->header[1])) - return 0; if (FRAME_GET_OPCODE(ws->header[0]) == OPCODE_CLOSE) return FRAME_GET_PAYLOAD_LEN(ws->header[1]) != 1; + if (FRAME_GET_MASK(ws->header[1])) + return 0; return FRAME_GET_PAYLOAD_LEN(ws->header[1]) == 0; }