From 130c4dade660d6c4f86504d3d2642884ff798606 Mon Sep 17 00:00:00 2001 From: Marek Blok <Marek.Blok@pg.edu.pl> Date: Wed, 7 Apr 2021 22:07:23 +0200 Subject: [PATCH] socket support fix --- .gitignore | 2 ++ CHANGELOG | 5 ++++- src/cpp/DSP_sockets.cpp | 4 ++-- src/include/DSP_lib.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 76caf3d..e871458 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ examples/socket_server_2.gif examples/socket_server_2.dot examples/morse_key.wav examples/log_file_client.log +examples/morse.wav +examples/socket_client_2.dot diff --git a/CHANGELOG b/CHANGELOG index fb5277e..7f56c09 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,12 +1,15 @@ TODO:: ? DSP::Clock_ptr => migrate to std::shared_ptr - update Linux makefile !!! Add TELEsound and PiAPS_sound projects to GitLab and start addaptation to new library version unsigned long SamplingRate // -1 => 0 LAST DONE: CHANGES: +- ver. 0.20.004 - <b>2021.04.06</b> Changed: + - Fixed makefiles for Linux - install and examples compilation works + - Initial work on sockets support for Linux + - ver. 0.20.003 - <b>2021.04.06</b> Changed: - DSP::E_LS_Mode => DSP::e::LogState - DSP::LogMode => DSP::e::LogMode diff --git a/src/cpp/DSP_sockets.cpp b/src/cpp/DSP_sockets.cpp index 85edb49..204ff9e 100644 --- a/src/cpp/DSP_sockets.cpp +++ b/src/cpp/DSP_sockets.cpp @@ -114,7 +114,7 @@ bool DSP::Socket::is_socket_error(const int &iResult) { int DSP::Socket::GetLastError() { #ifndef __NO_WINSOCK__ - return WSAGetLastError()); + return WSAGetLastError(); #else return errno; #endif @@ -264,7 +264,7 @@ bool DSP::Socket::TryAcceptConnection(void) return false; } //current_socket_state &= DSP::e::SocketStatus::timeout_mask; // no object - if (DSP::Socket::is_socket_valid(res) == true) + if (DSP::Socket::is_socket_error(res) == true) { DSP::log << "DSP::Socket::TryAcceptConnection" << DSP::e::LogMode::second << "SOCKET_ERROR" << endl; DSP::Socket::close_socket(); diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h index fa9cfd2..e6d13c6 100644 --- a/src/include/DSP_lib.h +++ b/src/include/DSP_lib.h @@ -11,7 +11,7 @@ #define DSP_VER_MAJOR 0 #define DSP_VER_MINOR 20 -#define DSP_VER_BUILD 3 // !!! without zeroes before, else this will be treated as octal number +#define DSP_VER_BUILD 4 // !!! without zeroes before, else this will be treated as octal number #define DSP_VER_YEAR 2021 #define DSP_VER DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD -- GitLab