summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index f8e957788..3d7bb66b4 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -502,8 +502,7 @@ int make_listen_bind(uint32 ip, uint16 port)
return fd;
}
-int make_connection(uint32 ip, uint16 port)
-{
+int make_connection(uint32 ip, uint16 port, bool silent) {
struct sockaddr_in remote_address;
int fd;
int result;
@@ -533,11 +532,13 @@ int make_connection(uint32 ip, uint16 port)
remote_address.sin_addr.s_addr = htonl(ip);
remote_address.sin_port = htons(port);
- ShowStatus("Connecting to %d.%d.%d.%d:%i\n", CONVIP(ip), port);
+ if( !silent )
+ ShowStatus("Connecting to %d.%d.%d.%d:%i\n", CONVIP(ip), port);
result = sConnect(fd, (struct sockaddr *)(&remote_address), sizeof(struct sockaddr_in));
if( result == SOCKET_ERROR ) {
- ShowError("make_connection: connect failed (socket #%d, %s)!\n", fd, error_msg());
+ if( !silent )
+ ShowError("make_connection: connect failed (socket #%d, %s)!\n", fd, error_msg());
do_close(fd);
return -1;
}