mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 17:10:12 +00:00
Reviving netplay_log_connection, i.e. connection messages on the host
This commit is contained in:
parent
cda0324627
commit
49b4143687
@ -898,6 +898,7 @@ void netplay_log_connection(const struct sockaddr_storage *their_addr,
|
||||
const char *str = NULL;
|
||||
char buf_v4[INET_ADDRSTRLEN] = {0};
|
||||
char buf_v6[INET6_ADDRSTRLEN] = {0};
|
||||
char msg[512] = {0};
|
||||
|
||||
u.storage = their_addr;
|
||||
|
||||
@ -937,14 +938,34 @@ void netplay_log_connection(const struct sockaddr_storage *their_addr,
|
||||
|
||||
if (str)
|
||||
{
|
||||
char msg[512] = {0};
|
||||
|
||||
snprintf(msg, sizeof(msg), "Got connection from: \"%s (%s)\" (#%u)",
|
||||
nick, str, slot);
|
||||
snprintf(msg, sizeof(msg), "Got connection from: \"%s (%s)\"",
|
||||
nick, str);
|
||||
runloop_msg_queue_push(msg, 1, 180, false);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(msg, sizeof(msg), "Got connection from: \"%s\"",
|
||||
nick);
|
||||
runloop_msg_queue_push(msg, 1, 180, false);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
RARCH_LOG("Connection slot %u\n", slot);
|
||||
}
|
||||
|
||||
#else
|
||||
void netplay_log_connection(const struct sockaddr_storage *their_addr,
|
||||
unsigned slot, const char *nick)
|
||||
{
|
||||
char msg[512] = {0};
|
||||
|
||||
snprintf(msg, sizeof(msg), "Got connection from: \"%s\"",
|
||||
nick);
|
||||
runloop_msg_queue_push(msg, 1, 180, false);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
RARCH_LOG("Connection slot %u\n", slot);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -339,9 +339,7 @@ bool netplay_get_info(netplay_t *netplay)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef HAVE_SOCKET_LEGACY
|
||||
netplay_log_connection(&netplay->other_addr, 0, netplay->other_nick);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user