mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
nxlink: only connect to host if a valid remote address has been set.
This commit is contained in:
parent
d90afaacde
commit
de9b357ff7
@ -7,8 +7,7 @@
|
||||
extern int __system_argc;
|
||||
extern char** __system_argv;
|
||||
|
||||
struct in_addr __nxlink_host;
|
||||
|
||||
struct in_addr __nxlink_host = { .s_addr = INADDR_NONE };
|
||||
|
||||
void nxlinkSetup(void)
|
||||
{
|
||||
|
@ -11,6 +11,10 @@ static int sock = -1;
|
||||
|
||||
int nxlinkConnectToHost(bool redirStdout, bool redirStderr)
|
||||
{
|
||||
if ((!redirStdout && !redirStderr) || __nxlink_host.s_addr == INADDR_NONE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ret = -1;
|
||||
struct sockaddr_in srv_addr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user