FS-7966: fix more warnings in msvc 2015 build

This commit is contained in:
Mike Jerris
2015-08-28 17:40:47 -04:00
parent 4d16691a22
commit 288c62576f
12 changed files with 51 additions and 26 deletions
+2 -2
View File
@@ -632,9 +632,9 @@ abyss_bool websocket_hook(TSession *r)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "continue\n");
continue;
case WSOC_TEXT:
p = data;
p = (char *)data;
if (!p) continue;
if (!strncasecmp(data, "event ", 6)) {
if (!strncasecmp((char *)data, "event ", 6)) {
switch_event_types_t type;
char *subclass;
+3 -1
View File
@@ -406,10 +406,12 @@ issize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data)
if ((wsh->datalen = ws_raw_read(wsh, wsh->buffer, 14)) < need) {
while (!wsh->down && (wsh->datalen += ws_raw_read(wsh, wsh->buffer + wsh->datalen, 14 - wsh->datalen)) < need) ;
#if 0
if (0 && (wsh->datalen += ws_raw_read(wsh, wsh->buffer + wsh->datalen, 14 - wsh->datalen)) < need) {
/* too small - protocol err */
return ws_close(wsh, WS_PROTO_ERR);
}
#endif
}
*oc = *wsh->buffer & 0xf;
@@ -600,7 +602,7 @@ issize_t ws_write_frame(wsh_t *wsh, ws_opcode_t oc, void *data, size_t bytes)
hlen += 8;
u64 = (uint64_t *) &hdr[2];
*u64 = htonl(bytes);
*u64 = htonl((unsigned long)bytes);
}
if (ws_raw_write(wsh, (void *) &hdr[0], hlen) != (issize_t)hlen) {