diff --git a/client/Makefile b/client/Makefile index e3efdc92..32ca31db 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.2.92 +VERSION = 0.2.93 TARGET = snapclient SHELL = /bin/bash @@ -53,7 +53,6 @@ uninstall: @if [[ `systemctl` =~ -\.mount ]]; then \ $(MAKE) uninstallsystemd; \ elif [[ `/sbin/init --version` =~ upstart ]]; then \ - echo upstart => sysv; \ $(MAKE) uninstallsysv; \ elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then \ $(MAKE) uninstallsysv; \ diff --git a/common/log.cpp b/common/log.cpp index 7019d5c2..580be49c 100644 --- a/common/log.cpp +++ b/common/log.cpp @@ -55,7 +55,7 @@ int Log::sync() else if (priority_ == kOut) std::cout << Timestamp() << " [out] " << buffer_.c_str() << std::flush; else if (priority_ == kErr) - std::cerr << Timestamp() << " [err] " << buffer_.c_str() << std::flush; + std::cout << Timestamp() << " [err] " << buffer_.c_str() << std::flush; else { std::cout << Timestamp() << " [" << std::to_string(priority_) << "] " << buffer_.c_str() << std::flush; diff --git a/server/Makefile b/server/Makefile index 47c04394..7ef15f26 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.2.92 +VERSION = 0.2.93 TARGET = snapserver SHELL = /bin/bash diff --git a/server/pipeReader.cpp b/server/pipeReader.cpp index e023f505..4a187463 100644 --- a/server/pipeReader.cpp +++ b/server/pipeReader.cpp @@ -139,7 +139,7 @@ void PipeReader::worker() } catch(const std::exception& e) { - std::cerr << "Exception: " << e.what() << std::endl; + logE << "Exception: " << e.what() << std::endl; } } } diff --git a/server/serverSession.cpp b/server/serverSession.cpp index c2bf58dd..899c92f7 100644 --- a/server/serverSession.cpp +++ b/server/serverSession.cpp @@ -49,6 +49,7 @@ void ServerSession::start() void ServerSession::stop() { + std::unique_lock mlock(mutex_); active_ = false; try { @@ -62,13 +63,13 @@ void ServerSession::stop() } if (readerThread_) { - logO << "joining readerThread\n"; + logD << "joining readerThread\n"; readerThread_->join(); delete readerThread_; } if (writerThread_) { - logO << "joining writerThread\n"; + logD << "joining writerThread\n"; writerThread_->join(); delete writerThread_; } @@ -79,7 +80,7 @@ void ServerSession::stop() readerThread_ = NULL; writerThread_ = NULL; socket_ = NULL; - logO << "ServerSession stopped\n"; + logD << "ServerSession stopped\n"; }