Changes due to continue development of the IpcLibs. Not done yet.
This commit is contained in:
		@@ -134,10 +134,10 @@ ServiceRequest(
 | 
			
		||||
//
 | 
			
		||||
//  Notes:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int                              retStatus = -1;
 | 
			
		||||
   int   retStatus = -1;
 | 
			
		||||
   
 | 
			
		||||
   DbgTrace(1, "ServiceRequest- Start\n", 0);
 | 
			
		||||
 | 
			
		||||
@@ -197,7 +197,7 @@ AbortPendingRequests(void)
 | 
			
		||||
//
 | 
			
		||||
//  Notes:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "AbortPendingRequests- Start\n", 0);
 | 
			
		||||
@@ -237,7 +237,7 @@ AwakenSuspendedServerThreads(void)
 | 
			
		||||
//
 | 
			
		||||
//  Notes:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "AwakenSuspendedServerThreads- Start\n", 0);
 | 
			
		||||
@@ -662,7 +662,7 @@ void* ServiceConnectionsThread(void)
 | 
			
		||||
//
 | 
			
		||||
//  Notes:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "ServiceConnectionsThread- Start\n", 0);
 | 
			
		||||
@@ -707,7 +707,7 @@ IpcServerGetRequest(void)
 | 
			
		||||
//                An application can execute this method from multiple
 | 
			
		||||
//                threads to allow requests to be process concurrently.
 | 
			
		||||
// 
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int32_t  requestId = 0;
 | 
			
		||||
@@ -724,7 +724,7 @@ IpcServerGetRequest(void)
 | 
			
		||||
   try {
 | 
			
		||||
 | 
			
		||||
      // Instantiate ServerThread object
 | 
			
		||||
      ServerThread *pServerThread = new ServerThread();
 | 
			
		||||
      ServerThread serverThread;
 | 
			
		||||
 | 
			
		||||
      // Obtain server mutex
 | 
			
		||||
      pthread_mutex_lock(&serverMutex);
 | 
			
		||||
@@ -759,7 +759,7 @@ IpcServerGetRequest(void)
 | 
			
		||||
               nextReqId = 2;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Place the request in the pending request map
 | 
			
		||||
            // Place the request in the active request map
 | 
			
		||||
            RSIterBoolPair insertResult = rsMap.insert(make_pair(requestId, pServerReq));
 | 
			
		||||
            if (!insertResult.second)
 | 
			
		||||
            {
 | 
			
		||||
@@ -786,17 +786,14 @@ IpcServerGetRequest(void)
 | 
			
		||||
         {
 | 
			
		||||
            // There is not a request for us to process, place us on the waiting
 | 
			
		||||
            // server thread list and wait to be awaken.
 | 
			
		||||
            waitingServerThreadList.push_back(pServerThread);
 | 
			
		||||
            waitingServerThreadList.push_back(&serverThread);
 | 
			
		||||
            waitingServerThreads ++;
 | 
			
		||||
            pServerThread->suspend(&serverMutex);
 | 
			
		||||
            serverThread.suspend(&serverMutex);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // Release server mutex
 | 
			
		||||
      pthread_mutex_unlock(&serverMutex);
 | 
			
		||||
 | 
			
		||||
      // Free ServerThread object
 | 
			
		||||
      delete pServerThread;
 | 
			
		||||
   }
 | 
			
		||||
   catch (...) {
 | 
			
		||||
 | 
			
		||||
@@ -833,7 +830,7 @@ IpcServerGetRequestData(
 | 
			
		||||
// Notes:         The returned buffer SHOULD NOT be released by the calling
 | 
			
		||||
//                application.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int32_t  reqDataLen = 0;
 | 
			
		||||
@@ -899,7 +896,7 @@ IpcServerCompleteRequest(
 | 
			
		||||
//
 | 
			
		||||
// Notes:         The returned buffer will not NOT be released by the method.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "IpcServerCompleteRequest- Start, requestId = %08X\n", requestId);
 | 
			
		||||
@@ -961,7 +958,7 @@ IpcServerAbortRequest(
 | 
			
		||||
//
 | 
			
		||||
// Notes:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "IpcServerAbortRequest- Start, requestId = %08X\n", requestId);
 | 
			
		||||
@@ -1024,7 +1021,7 @@ IpcServerStart(void)
 | 
			
		||||
// Note:          The service needs to be initialized and the listen address
 | 
			
		||||
//                needs to be set before calling this procedure.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int         retStatus = -1;
 | 
			
		||||
@@ -1088,7 +1085,7 @@ IpcServerSetUnAddress(
 | 
			
		||||
//
 | 
			
		||||
// Note:          The service needs to be initialized before calling this procedure.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L1
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int   retStatus = -1;
 | 
			
		||||
@@ -1097,7 +1094,7 @@ IpcServerSetUnAddress(
 | 
			
		||||
 | 
			
		||||
   // Verify the input parameters
 | 
			
		||||
   if (pSocketFileName == NULL
 | 
			
		||||
       || strlen(pSocketFileName) >= sizeof(pSocketFileName))
 | 
			
		||||
       || strlen(pSocketFileName) >= sizeof(listenSocketFile))
 | 
			
		||||
   {
 | 
			
		||||
      DbgTrace(0, "IpcServerSetUnAddress- Invalid input parameter\n", 0);
 | 
			
		||||
      goto exit;
 | 
			
		||||
@@ -1157,7 +1154,7 @@ IpcServerSetInAddress(
 | 
			
		||||
//
 | 
			
		||||
// Note:          The service needs to be initialized before calling this procedure.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int   retStatus = -1;
 | 
			
		||||
@@ -1237,7 +1234,7 @@ IpcServerInit(
 | 
			
		||||
// Note:          It is necessary to call the start procedure to start
 | 
			
		||||
//                servicing requests.
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   int   retStatus = -1;
 | 
			
		||||
@@ -1299,7 +1296,7 @@ IpcServerShutdown(void)
 | 
			
		||||
//
 | 
			
		||||
// Note:
 | 
			
		||||
//
 | 
			
		||||
// L0
 | 
			
		||||
// L2
 | 
			
		||||
//=======================================================================--
 | 
			
		||||
{
 | 
			
		||||
   DbgTrace(1, "IpcServerShutdown- Start\n", 0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user