mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 20:03:02 +01:00
Fixed windows build - thanks to Paul Reeves
This commit is contained in:
parent
8629bea0ec
commit
dfa92fba23
@ -225,6 +225,7 @@ namespace {
|
|||||||
|
|
||||||
void SecurityDatabase::fini()
|
void SecurityDatabase::fini()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
MutexLockGuard guard(mutex);
|
MutexLockGuard guard(mutex);
|
||||||
|
|
||||||
if (server_shutdown)
|
if (server_shutdown)
|
||||||
@ -238,10 +239,12 @@ void SecurityDatabase::fini()
|
|||||||
{
|
{
|
||||||
closeDatabase();
|
closeDatabase();
|
||||||
}
|
}
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
void SecurityDatabase::init()
|
void SecurityDatabase::init()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
MutexLockGuard guard(mutex);
|
MutexLockGuard guard(mutex);
|
||||||
|
|
||||||
if (server_shutdown)
|
if (server_shutdown)
|
||||||
@ -256,10 +259,12 @@ void SecurityDatabase::init()
|
|||||||
status_exception::raise(status);
|
status_exception::raise(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
void SecurityDatabase::closeDatabase()
|
void SecurityDatabase::closeDatabase()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
// assumes mutex is locked
|
// assumes mutex is locked
|
||||||
|
|
||||||
if (lookup_req)
|
if (lookup_req)
|
||||||
@ -273,10 +278,12 @@ void SecurityDatabase::closeDatabase()
|
|||||||
isc_detach_database(status, &lookup_db);
|
isc_detach_database(status, &lookup_db);
|
||||||
checkStatus("isc_detach_database");
|
checkStatus("isc_detach_database");
|
||||||
}
|
}
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
void SecurityDatabase::onShutdown()
|
void SecurityDatabase::onShutdown()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
MutexLockGuard guard(mutex);
|
MutexLockGuard guard(mutex);
|
||||||
|
|
||||||
if (server_shutdown)
|
if (server_shutdown)
|
||||||
@ -286,6 +293,7 @@ void SecurityDatabase::onShutdown()
|
|||||||
|
|
||||||
server_shutdown = true;
|
server_shutdown = true;
|
||||||
closeDatabase();
|
closeDatabase();
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SecurityDatabase::lookupUser(const TEXT* user_name, int* uid, int* gid, TEXT* pwd)
|
bool SecurityDatabase::lookupUser(const TEXT* user_name, int* uid, int* gid, TEXT* pwd)
|
||||||
@ -397,17 +405,23 @@ void SecurityDatabase::prepare()
|
|||||||
|
|
||||||
void SecurityDatabase::initialize()
|
void SecurityDatabase::initialize()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
instance->init();
|
instance->init();
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
void SecurityDatabase::shutdown()
|
void SecurityDatabase::shutdown()
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
instance->fini();
|
instance->fini();
|
||||||
|
#endif //EMBEDDED
|
||||||
}
|
}
|
||||||
|
|
||||||
int SecurityDatabase::onShutdown(const int, const int, void* me)
|
int SecurityDatabase::onShutdown(const int, const int, void* me)
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED
|
||||||
((SecurityDatabase*) me)->onShutdown();
|
((SecurityDatabase*) me)->onShutdown();
|
||||||
|
#endif //EMBEDDED
|
||||||
return FB_SUCCESS;
|
return FB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user