From d84f285b91581e21312e44d53cfd8ed5a18e7252 Mon Sep 17 00:00:00 2001 From: Will Storey Date: Tue, 15 Oct 2019 19:07:48 -0700 Subject: [PATCH] Keep unused parameter for API compatibility --- src/core/net-nonblock.c | 4 +++- src/core/net-nonblock.h | 2 +- src/core/servers.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c index 90e4bdab..1ad5f42f 100644 --- a/src/core/net-nonblock.c +++ b/src/core/net-nonblock.c @@ -27,12 +27,14 @@ /* nonblocking gethostbyname(), ip (IPADDR) + error (int, 0 = not error) is written to pipe when found PID of the resolver child is returned */ -int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe) +int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe, int reverse_lookup) { RESOLVED_IP_REC rec; const char *errorstr; int pid; + (void) reverse_lookup; /* Kept for API backward compatibility */ + g_return_val_if_fail(addr != NULL, FALSE); pid = fork(); diff --git a/src/core/net-nonblock.h b/src/core/net-nonblock.h index 3d2f7354..c93dd9e3 100644 --- a/src/core/net-nonblock.h +++ b/src/core/net-nonblock.h @@ -12,7 +12,7 @@ typedef struct { } RESOLVED_IP_REC; /* nonblocking gethostbyname(), PID of the resolver child is returned. */ -int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe); +int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe, int reverse_lookup); /* get the resolved IP address. returns -1 if some error occurred with read() */ int net_gethostbyname_return(GIOChannel *pipe, RESOLVED_IP_REC *rec); diff --git a/src/core/servers.c b/src/core/servers.c index 50316c7d..5b850a28 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -407,7 +407,7 @@ int server_start_connect(SERVER_REC *server) server->connrec->proxy : server->connrec->address; server->connect_pid = net_gethostbyname_nonblock(connect_address, - server->connect_pipe[1]); + server->connect_pipe[1], 0); server->connect_tag = g_input_add(server->connect_pipe[0], G_INPUT_READ, (GInputFunction)