8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00
This commit is contained in:
robocop 2012-04-10 01:46:14 +00:00
parent 9955049a0c
commit b7d62c2d26
5 changed files with 20 additions and 21 deletions

View File

@ -1119,11 +1119,9 @@ void LockManager::acquire_shmem(SRQ_PTR owner_offset)
locked = true;
break;
}
else
{
m_blockage = true;
}
}
// If the spin wait didn't succeed then wait forever
@ -1170,7 +1168,8 @@ void LockManager::acquire_shmem(SRQ_PTR owner_offset)
fb_assert(!m_sharedFileCreated);
++sh_mem_header->lhb_acquires;
if (m_blockage) {
if (m_blockage)
{
++sh_mem_header->lhb_acquire_blocks;
m_blockage = false;
}

View File

@ -5491,13 +5491,14 @@ static void authFillParametersBlock(ClntAuthBlock& cBlock, ClumpletWriter& dpb,
}
}
static CSTRING* REMOTE_dup_string(CSTRING* from)
static CSTRING* REMOTE_dup_string(const CSTRING* from)
{
if (from && from->cstr_length)
{
CSTRING* rc = FB_NEW(*getDefaultMemoryPool()) CSTRING;
memset(rc, 0, sizeof(CSTRING));
rc->cstr_length = from->cstr_length;
rc->cstr_allocated = rc->cstr_length;
rc->cstr_address = FB_NEW(*getDefaultMemoryPool()) UCHAR[rc->cstr_length];
memcpy(rc->cstr_address, from->cstr_address, rc->cstr_length);
return rc;
@ -5512,6 +5513,7 @@ static void REMOTE_free_string(CSTRING* tmp)
{
if (tmp->cstr_address)
{
fb_assert(tmp->cstr_allocated >= tmp->cstr_length);
delete[] tmp->cstr_address;
}
delete tmp;

View File

@ -700,7 +700,7 @@ public:
AuthServerPlugins* plugins;
Auth::WriterImplementation authBlockWriter;
SrvAuthBlock(rem_port* p_port)
explicit SrvAuthBlock(rem_port* p_port)
: port(p_port),
userName(getPool()), pluginName(getPool()), pluginList(getPool()),
dataForPlugin(getPool()), dataFromPlugin(getPool()),
@ -754,7 +754,7 @@ public:
: Firebird::AutoStorage(), type(getPool()), plugins(getPool())
{ }
KnownServerKey(Firebird::MemoryPool& p)
explicit KnownServerKey(Firebird::MemoryPool& p)
: Firebird::AutoStorage(p), type(getPool()), plugins(getPool())
{ }

View File

@ -235,7 +235,7 @@ public:
authPort(port),
dbName(getPool())
{
if (!port->port_srv_auth_block)
if (!authPort->port_srv_auth_block)
{
authPort->port_srv_auth_block = new SrvAuthBlock(authPort);
}
@ -639,7 +639,7 @@ class CryptKeyTypeManager : public PermanentStorage
class CryptKeyType : public PermanentStorage
{
public:
CryptKeyType(MemoryPool& p)
explicit CryptKeyType(MemoryPool& p)
: PermanentStorage(p), keyType(getPool()), plugins(getPool())
{ }
@ -671,7 +671,7 @@ class CryptKeyTypeManager : public PermanentStorage
};
public:
CryptKeyTypeManager(MemoryPool& p)
explicit CryptKeyTypeManager(MemoryPool& p)
: PermanentStorage(p), knownTypes(getPool())
{
LocalStatus st;

View File

@ -5045,13 +5045,12 @@ void Dispatcher::shutdown(IStatus* userStatus, unsigned int timeout, const int r
{
YService* service = accessor.current()->second;
if (service->enterCount)
{
hasThreads = true;
continue;
}
else
{
service->addRef();
svcStack.push(service);
}
} while (accessor.getNext());
}
}
@ -5077,13 +5076,12 @@ void Dispatcher::shutdown(IStatus* userStatus, unsigned int timeout, const int r
{
YAttachment* attachment = accessor.current()->second;
if (attachment->enterCount)
{
hasThreads = true;
continue;
}
else
{
attachment->addRef();
attStack.push(attachment);
}
} while (accessor.getNext());
}
}