[9488] Fixed semaphore locking on non-posix systems

This commit is contained in:
arrai 2010-02-28 23:39:19 +01:00
parent 9811c0d0e3
commit 5df9eaff8b
3 changed files with 10 additions and 8 deletions

View file

@ -129,7 +129,11 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// wait for callback to complete command
connection.pendingCommands.acquire();
int acc = connection.pendingCommands.acquire();
if(acc)
{
sLog.outError("MaNGOSsoap: Error while acquiring lock, acc = %i, errno = %u", acc, errno);
}
// alright, command finished

View file

@ -27,7 +27,7 @@
#include "soapH.h"
#include "soapStub.h"
#include <ace/SV_Semaphore_Simple.h>
#include <ace/Semaphore.h>
#include <ace/Task.h>
@ -78,11 +78,9 @@ class SOAPWorkingThread : public ACE_Task<ACE_MT_SYNCH>
class SOAPCommand
{
public:
SOAPCommand()
SOAPCommand():
pendingCommands(0, USYNC_THREAD, "pendingCommands")
{
ACE_ASSERT (pendingCommands.open("pendingCommands",
ACE_SV_Semaphore_Simple::ACE_CREATE,
0) != -1);
}
~SOAPCommand()
@ -94,7 +92,7 @@ class SOAPCommand
m_printBuffer += msg;
}
ACE_SV_Semaphore_Simple pendingCommands;
ACE_Semaphore pendingCommands;
void setCommandSuccess(bool val)
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9487"
#define REVISION_NR "9488"
#endif // __REVISION_NR_H__