mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9488] Fixed semaphore locking on non-posix systems
This commit is contained in:
parent
9811c0d0e3
commit
5df9eaff8b
3 changed files with 10 additions and 8 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9487"
|
||||
#define REVISION_NR "9488"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue