diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/server/h2o/streaming.c (renamed from web/server/h2o/streaming.c) | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web/server/h2o/streaming.c b/src/web/server/h2o/streaming.c index 063e487af..fbe3f8050 100644 --- a/web/server/h2o/streaming.c +++ b/src/web/server/h2o/streaming.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later +#include "daemon/common.h" #include "streaming.h" #include "connlist.h" #include "h2o_utils.h" @@ -138,9 +139,10 @@ static void stream_on_recv(h2o_socket_t *sock, const char *err) #define STREAM_METHOD "STREAM " #define USER_AGENT "User-Agent: " -#define NEED_MIN_BYTES(buf, bytes) \ -if (rbuf_bytes_available(buf) < bytes) \ - return GIMME_MORE_OF_DEM_SWEET_BYTEZ; +#define NEED_MIN_BYTES(buf, bytes) do { \ + if(rbuf_bytes_available(buf) < bytes) \ + return GIMME_MORE_OF_DEM_SWEET_BYTEZ;\ +} while(0) // TODO check in streaming code this is probably defined somewhere already #define MAX_LEN_STREAM_HELLO (1024*2) |