Cleanup
This commit is contained in:
parent
3dd9a9ff98
commit
2d348f68f9
|
@ -123,16 +123,19 @@ static const struct cmd_map map[] = {
|
||||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||||
static bool cmd_init_network(rarch_cmd_t *handle, uint16_t port)
|
static bool cmd_init_network(rarch_cmd_t *handle, uint16_t port)
|
||||||
{
|
{
|
||||||
|
int fd;
|
||||||
struct addrinfo *res = NULL;
|
struct addrinfo *res = NULL;
|
||||||
|
|
||||||
RARCH_LOG("Bringing up command interface on port %hu.\n",
|
RARCH_LOG("Bringing up command interface on port %hu.\n",
|
||||||
(unsigned short)port);
|
(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;
|
goto error;
|
||||||
|
|
||||||
|
handle->net_fd = fd;
|
||||||
|
|
||||||
if (!socket_nonblock(handle->net_fd))
|
if (!socket_nonblock(handle->net_fd))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue