From 34e82a785531fa7a041e4ce98483c75a745a8a9a Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 17 Jan 2021 16:48:27 +0000 Subject: client: fix typos, gui: remove trash --- src/client/ClientBase.cpp | 11 +++++------ src/client/gui/WantChat.exe | Bin 1134821 -> 0 bytes 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 src/client/gui/WantChat.exe (limited to 'src') 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 deleted file mode 100644 index ca27ced..0000000 Binary files a/src/client/gui/WantChat.exe and /dev/null differ -- cgit v1.2.3-18-g5258