Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor

This commit is contained in:
Erik Frojdh 2018-10-10 11:55:49 +02:00
commit 938dd5e06c
2 changed files with 5 additions and 3 deletions

View File

@ -227,8 +227,10 @@ void Listener::ShutDownUDPSocket() {
udpSocket->ShutDownSocket(); udpSocket->ShutDownSocket();
FILE_LOG(logINFO) << "Shut down of UDP port " << *udpPortNumber; FILE_LOG(logINFO) << "Shut down of UDP port " << *udpPortNumber;
fflush(stdout); fflush(stdout);
//delete socket at stoplistening // wait only if the threads have started as it is the threads that
sem_wait(&semaphore_socket); //give a post to semaphore(at stopListening)
if (runningFlag)
sem_wait(&semaphore_socket);
delete udpSocket; delete udpSocket;
udpSocket = 0; udpSocket = 0;
sem_destroy(&semaphore_socket); sem_destroy(&semaphore_socket);

View File

@ -1039,7 +1039,7 @@ int slsReceiverImplementation::startReceiver(char *c) {
//processor->writer //processor->writer
if (fileWriteEnable) { if (fileWriteEnable) {
if (SetupWriter() == FAIL) { if (SetupWriter() == FAIL) {
strcpy(c,"Could not create file."); strcpy(c,"Could not create file.\n");
FILE_LOG(logERROR) << c; FILE_LOG(logERROR) << c;
return FAIL; return FAIL;
} }