Support empty INFO packet for undifferentiated servers.

This commit is contained in:
Gregor Richards 2017-02-27 22:06:20 -05:00
parent 92bbeab6f6
commit 8fb1f6a647

View File

@ -771,7 +771,7 @@ bool netplay_handshake_pre_info(netplay_t *netplay,
uint32_t *content_crc_ptr;
const char *dmsg = NULL;
RECV(&info_buf, sizeof(info_buf)) {}
RECV(&info_buf, sizeof(info_buf.cmd)) {}
if (recvd < 0 ||
ntohl(info_buf.cmd[0]) != NETPLAY_CMD_INFO)
@ -800,6 +800,12 @@ bool netplay_handshake_pre_info(netplay_t *netplay,
return true;
}
RECV(&info_buf.core_name, cmd_size)
{
RARCH_ERR("Failed to receive netplay info payload.\n");
return false;
}
/* Check the core info */
core_info = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &core_info);