Cleanup
This commit is contained in:
parent
72ec71a71c
commit
3dd9a9ff98
8
remote.c
8
remote.c
|
@ -67,6 +67,7 @@ static input_remote_state_t *input_remote_get_state_ptr(void)
|
||||||
static bool remote_init_network(rarch_remote_t *handle,
|
static bool remote_init_network(rarch_remote_t *handle,
|
||||||
uint16_t port, unsigned user)
|
uint16_t port, unsigned user)
|
||||||
{
|
{
|
||||||
|
int fd;
|
||||||
struct addrinfo *res = NULL;
|
struct addrinfo *res = NULL;
|
||||||
|
|
||||||
port = port + user;
|
port = port + user;
|
||||||
|
@ -77,12 +78,13 @@ static bool remote_init_network(rarch_remote_t *handle,
|
||||||
RARCH_LOG("Bringing up remote interface on port %hu.\n",
|
RARCH_LOG("Bringing up remote interface on port %hu.\n",
|
||||||
(unsigned short)port);
|
(unsigned short)port);
|
||||||
|
|
||||||
handle->net_fd[user] = socket_init((void*)&res,
|
fd = socket_init((void*)&res, port, NULL, SOCKET_TYPE_DATAGRAM);
|
||||||
port, NULL, SOCKET_TYPE_DATAGRAM);
|
|
||||||
|
|
||||||
if (handle->net_fd[user] < 0)
|
if (fd < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
handle->net_fd[user] = fd;
|
||||||
|
|
||||||
if (!socket_nonblock(handle->net_fd[user]))
|
if (!socket_nonblock(handle->net_fd[user]))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue