diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-16 21:14:33 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-16 21:14:33 +0000 |
commit | 5cd75ecd95c257e61c15fef5692918c5642e2aea (patch) | |
tree | 76433fa0e32f228d737b651a81ded6da34fbf1aa /src/common/socket.c | |
parent | 77912311a7ad7151e4a2476cac73f3ec181d27bd (diff) | |
download | hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.gz hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.bz2 hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.xz hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.zip |
Introducing rAthena's anonymous data collector. This aims at improving rAthena's overall features by letting we know which options are most and least used.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16785 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 9 |
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; } |