This commit is contained in:
twinaphex 2016-05-02 01:33:47 +02:00
parent 3dd9a9ff98
commit 2d348f68f9

View File

@ -123,16 +123,19 @@ static const struct cmd_map map[] = {
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
static bool cmd_init_network(rarch_cmd_t *handle, uint16_t port)
{
int fd;
struct addrinfo *res = NULL;
RARCH_LOG("Bringing up command interface on port %hu.\n",
(unsigned short)port);
handle->net_fd = socket_init((void**)&res, port, NULL, SOCKET_TYPE_DATAGRAM);
fd = socket_init((void**)&res, port, NULL, SOCKET_TYPE_DATAGRAM);
if (handle->net_fd < 0)
if (fd < 0)
goto error;
handle->net_fd = fd;
if (!socket_nonblock(handle->net_fd))
goto error;