From 5f184e36d63c2e9af0f96e7d98ad2fd14b0f3c68 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 12 Aug 2013 13:56:55 +0000 Subject: Moved webengine into separate file, added callbacks for websockets and made example for triggering ui on driver change, also added json for game driver (nw) --- src/lib/web/mongoose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/web/mongoose.c') diff --git a/src/lib/web/mongoose.c b/src/lib/web/mongoose.c index aad9c735bc5..7f5dee1a48c 100644 --- a/src/lib/web/mongoose.c +++ b/src/lib/web/mongoose.c @@ -19,6 +19,7 @@ // THE SOFTWARE. #define NO_SSL +#define USE_WEBSOCKET #if defined(_WIN32) #define SETSOCKOPT_CAST const char * @@ -4052,7 +4053,7 @@ static void read_websocket(struct mg_connection *conn) { if (header_len > 0) { // Allocate space to hold websocket payload data = mem; - if (data_len > sizeof(mem) && (data = malloc(data_len)) == NULL) { + if (data_len > sizeof(mem) && (data = (char*)malloc(data_len)) == NULL) { // Allocation failed, exit the loop and then close the connection // TODO: notify user about the failure break; -- cgit v1.2.3-70-g09d2