summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/socket.c9
-rw-r--r--src/common/socket.h2
2 files changed, 6 insertions, 5 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;
}
diff --git a/src/common/socket.h b/src/common/socket.h
index 3c6cebf0b..3265f6487 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -112,7 +112,7 @@ extern bool session_isActive(int fd);
// Function prototype declaration
int make_listen_bind(uint32 ip, uint16 port);
-int make_connection(uint32 ip, uint16 port);
+int make_connection(uint32 ip, uint16 port, bool silent);
int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size);
int realloc_writefifo(int fd, size_t addition);
int WFIFOSET(int fd, size_t len);