8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 04:43:03 +01:00
This commit is contained in:
asfernandes 2008-10-09 00:59:56 +00:00
parent d9e1ba9da5
commit ac600b29d7
4 changed files with 11 additions and 9 deletions

View File

@ -269,7 +269,7 @@ static HANDLE forkEvent = INVALID_HANDLE_VALUE;
static bool forkThreadStarted = false; static bool forkThreadStarted = false;
typedef Firebird::Array<SOCKET> SocketsArray; typedef Firebird::Array<SOCKET> SocketsArray;
static SocketsArray *forkSockets; static SocketsArray* forkSockets;
#endif #endif
@ -1235,7 +1235,8 @@ static rem_port* alloc_port( rem_port* parent)
static WSADATA wsadata; static WSADATA wsadata;
const WORD version = MAKEWORD(2, 0); const WORD version = MAKEWORD(2, 0);
const int wsaError = WSAStartup(version, &wsadata); const int wsaError = WSAStartup(version, &wsadata);
if (wsaError) { if (wsaError)
{
if (parent) if (parent)
inet_error(parent, "WSAStartup", isc_net_init_error, wsaError); inet_error(parent, "WSAStartup", isc_net_init_error, wsaError);
else { else {
@ -1870,7 +1871,7 @@ THREAD_ENTRY_DECLARE forkThread(THREAD_ENTRY_PARAM arg)
while (!INET_shutting_down) while (!INET_shutting_down)
{ {
SOCKET s = 0; SOCKET s = 0;
{ { // scope
Firebird::MutexLockGuard forkGuard(forkMutex); Firebird::MutexLockGuard forkGuard(forkMutex);
if (!forkSockets || forkSockets->getCount() == 0) if (!forkSockets || forkSockets->getCount() == 0)

View File

@ -44,8 +44,8 @@ Firebird::AtomicCounter rem_port::portCounter = 0;
IMPLEMENT_TRACE_ROUTINE(remote_trace, "REMOTE") IMPLEMENT_TRACE_ROUTINE(remote_trace, "REMOTE")
#endif #endif
const SLONG DUMMY_INTERVAL = 60; /* seconds */ const SLONG DUMMY_INTERVAL = 60; // seconds
const int ATTACH_FAILURE_SPACE = 16 * 1024; /* bytes */ const int ATTACH_FAILURE_SPACE = 16 * 1024; // bytes
static Firebird::StringsBuffer* attachFailures = NULL; static Firebird::StringsBuffer* attachFailures = NULL;
static Firebird::GlobalPtr<Firebird::Mutex> attachFailuresMutex; static Firebird::GlobalPtr<Firebird::Mutex> attachFailuresMutex;

View File

@ -5448,7 +5448,7 @@ void Worker::shutdown()
{ {
THREAD_SLEEP(100); THREAD_SLEEP(100);
} }
catch(const Firebird::Exception&) catch (const Firebird::Exception&)
{ {
m_mutex->enter(); m_mutex->enter();
throw; throw;

View File

@ -2272,7 +2272,8 @@ static XPM get_free_slot(ULONG* map_num, ULONG* slot_num, ULONG* timestamp)
break; break;
} }
if (free_slot < global_slots_per_map) { if (free_slot < global_slots_per_map)
{
xpm->xpm_count++; xpm->xpm_count++;
xpm->xpm_ids[free_slot] = XPM_BUSY; xpm->xpm_ids[free_slot] = XPM_BUSY;
free_map = xpm->xpm_number; free_map = xpm->xpm_number;