summaryrefslogtreecommitdiff
path: root/maximus/sci/src/SciServer.cpp
diff options
context:
space:
mode:
authorburet2007-06-07 13:13:48 +0000
committerburet2007-06-07 13:13:48 +0000
commit0b1ba5751bc591d46f94b66f8a773f8e391d5276 (patch)
tree8e44c07a29549b15dea85bac11b3dfd052c0591b /maximus/sci/src/SciServer.cpp
parent312bec70765a35f01b376d971ebb8250fd3caa59 (diff)
Test server thread and station process
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@250 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'maximus/sci/src/SciServer.cpp')
-rw-r--r--maximus/sci/src/SciServer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/maximus/sci/src/SciServer.cpp b/maximus/sci/src/SciServer.cpp
index 0e21f47379..25a9d877d6 100644
--- a/maximus/sci/src/SciServer.cpp
+++ b/maximus/sci/src/SciServer.cpp
@@ -80,14 +80,13 @@ void SciServer::initAttributes ( )
{
throw Error(__FUNCTION__, "Initialized specialized SCI msg array pointer is NULL");
}
- /*
+
pthread_mutex_init(&mServerMutex, NULL);
// start the server thread
mStatus = (Sci_Server_Status)pthread_create(&mServerThread, NULL, SciServer::serverThread, this);
if(mStatus != 0)
throw new Error(__FUNCTION__, "pthread_create", errno);
- */
}
@@ -119,11 +118,13 @@ SciServer::~SciServer ( )
delete [] mpSpecializedSciMsgArray;
mpSpecializedSciMsgArray = NULL;
}
- /*
- setStatus(MAXIMUS_SCI_SERVER_STATUS_STOP);
- while (MAXIMUS_SCI_SERVER_STATUS_STOPPED != getStatus());
+
+ if (MAXIMUS_SCI_SERVER_STATUS_STOPPED != getStatus())
+ {
+ setStatus(MAXIMUS_SCI_SERVER_STATUS_STOP);
+ while (MAXIMUS_SCI_SERVER_STATUS_STOPPED != getStatus());
+ }
pthread_mutex_destroy(&mServerMutex);
- */
}