fix bug
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 31 Mar 2016 08:26:51 +0000 (10:26 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 31 Mar 2016 08:26:51 +0000 (10:26 +0200)
Change-Id: I5d905a3f74a18ae2bad8b907b1f4e61c2104117f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-hreq.c
src/websock.c

index bc42bf1..60ff6b0 100644 (file)
@@ -36,7 +36,6 @@ struct hreq_data {
        char *value;
 };
 
-
 static struct hreq_data *get_data(struct afb_hreq *hreq, const char *key, int create)
 {
        struct hreq_data *data = hreq->data;
index dc0b5f4..41e47a0 100644 (file)
@@ -377,7 +377,7 @@ ssize_t websock_read(struct websock * ws, void *buffer, size_t size)
                        }
                        b32 = (uint32_t *) b8;
                        while (size >= sizeof(uint32_t)) {
-                               *b32++ ^= m;
+                               *b32++ ^= mask;
                                size -= sizeof(uint32_t);
                        }
                        b8 = (uint8_t *) b32;