|
@@ -122,7 +122,7 @@ static void do_reconnect()
|
|
|
#include <ws2tcpip.h>
|
|
#include <ws2tcpip.h>
|
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
|
#include <string.h>
|
|
#include <string.h>
|
|
|
-#include "duktape.h"
|
|
|
|
|
|
|
+#include <ThirdParty/Duktape/duktape.h>
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
#if defined(_MSC_VER)
|
|
|
#pragma comment (lib, "Ws2_32.lib")
|
|
#pragma comment (lib, "Ws2_32.lib")
|
|
@@ -326,7 +326,7 @@ duk_size_t duk_trans_socket_read_cb(void *udata, char *buffer, duk_size_t length
|
|
|
* timeout here to recover from "black hole" disconnects.
|
|
* timeout here to recover from "black hole" disconnects.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- ret = recv(client_sock, (void *) buffer, (int) length, 0);
|
|
|
|
|
|
|
+ ret = recv(client_sock, buffer, (int) length, 0);
|
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
|
fprintf(stderr, "%s: debug read failed, error %d, closing connection\n",
|
|
fprintf(stderr, "%s: debug read failed, error %d, closing connection\n",
|
|
|
__FILE__, ret);
|
|
__FILE__, ret);
|
|
@@ -390,7 +390,7 @@ duk_size_t duk_trans_socket_write_cb(void *udata, const char *buffer, duk_size_t
|
|
|
* timeout here to recover from "black hole" disconnects.
|
|
* timeout here to recover from "black hole" disconnects.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- ret = send(client_sock, (const void *) buffer, (int) length, 0);
|
|
|
|
|
|
|
+ ret = send(client_sock, buffer, (int) length, 0);
|
|
|
if (ret <= 0 || ret > (int) length) {
|
|
if (ret <= 0 || ret > (int) length) {
|
|
|
fprintf(stderr, "%s: debug write failed, ret %d, closing connection\n",
|
|
fprintf(stderr, "%s: debug write failed, ret %d, closing connection\n",
|
|
|
__FILE__, ret);
|
|
__FILE__, ret);
|