diff options
author | Joursoir <chat@joursoir.net> | 2021-01-17 16:48:27 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-01-17 16:48:27 +0000 |
commit | 34e82a785531fa7a041e4ce98483c75a745a8a9a (patch) | |
tree | fae180031cb94ce55eaca351a3aea056a7568698 | |
parent | 94c62c18342f10c3283b6f63bca8acb406f8720b (diff) | |
download | want-chat-34e82a785531fa7a041e4ce98483c75a745a8a9a.tar.gz want-chat-34e82a785531fa7a041e4ce98483c75a745a8a9a.tar.bz2 want-chat-34e82a785531fa7a041e4ce98483c75a745a8a9a.zip |
-rw-r--r-- | src/client/ClientBase.cpp | 11 | ||||
-rw-r--r-- | src/client/gui/WantChat.exe | bin | 1134821 -> 0 bytes |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/client/ClientBase.cpp b/src/client/ClientBase.cpp index b30b4e0..8646674 100644 --- a/src/client/ClientBase.cpp +++ b/src/client/ClientBase.cpp @@ -15,7 +15,6 @@ ClientBase::ClientBase(const char* ip, int port) : out_buf_used(0), exit_flag(false), connection(true) { if(InitSocket(ip, port) == -1) { - exit(5); #ifdef _WIN32 fd = INVALID_SOCKET; #else @@ -92,15 +91,15 @@ int ClientBase::InitSocket(const char* ip, int port) // remove "port sticking" aka socket in TIME_WAIT setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); - server_adress.sin_family = AF_INET; - server_adress.sin_port = htons(port); - if(!inet_aton(ip, &(server_adress.sin_addr))) { + server_address.sin_family = AF_INET; + server_address.sin_port = htons(port); + if(!inet_aton(ip, &(server_address.sin_addr))) { close(fd); return -1; } - result = connect(client, (struct sockaddr*) &server_adress, - sizeof(server_adress)); + result = connect(fd, (struct sockaddr*) &server_address, + sizeof(server_address)); if(result == -1) { close(fd); return -1; diff --git a/src/client/gui/WantChat.exe b/src/client/gui/WantChat.exe Binary files differdeleted file mode 100644 index ca27ced..0000000 --- a/src/client/gui/WantChat.exe +++ /dev/null |