mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 02:03:03 +01:00
Remove code already present in ISC_mutex_init, thanks to Adriano.
Remove some debugging code.
This commit is contained in:
parent
4d23fc4da1
commit
75e2751c50
@ -38,19 +38,8 @@ PluginLogWriter::PluginLogWriter(const char* fileName, size_t maxSize) :
|
|||||||
m_fileName = fileName;
|
m_fileName = fileName;
|
||||||
|
|
||||||
#ifdef WIN_NT
|
#ifdef WIN_NT
|
||||||
PathName mutexName(m_fileName);
|
PathName mutexName("fb_mutex_");
|
||||||
for (string::size_type i = 0; i < mutexName.length(); i++)
|
mutexName.append(m_fileName);
|
||||||
{
|
|
||||||
switch (mutexName[i])
|
|
||||||
{
|
|
||||||
case '\\':
|
|
||||||
case '/':
|
|
||||||
case ':':
|
|
||||||
mutexName[i] = '_';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mutexName.insert(0, "fb_mutex_");
|
|
||||||
|
|
||||||
checkMutex("init", ISC_mutex_init(&m_mutex, mutexName.c_str()));
|
checkMutex("init", ISC_mutex_init(&m_mutex, mutexName.c_str()));
|
||||||
#endif
|
#endif
|
||||||
@ -80,7 +69,6 @@ SINT64 PluginLogWriter::seekToEnd()
|
|||||||
return nFileLen;
|
return nFileLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
// must be called under Guard protection
|
|
||||||
void PluginLogWriter::reopen()
|
void PluginLogWriter::reopen()
|
||||||
{
|
{
|
||||||
if (m_fileHandle >= 0)
|
if (m_fileHandle >= 0)
|
||||||
@ -183,8 +171,6 @@ void PluginLogWriter::checkErrno(const char* operation)
|
|||||||
|
|
||||||
const char* strErr;
|
const char* strErr;
|
||||||
#ifdef WIN_NT
|
#ifdef WIN_NT
|
||||||
const int err = errno;
|
|
||||||
const DWORD winerr = GetLastError();
|
|
||||||
strErr = strerror(errno);
|
strErr = strerror(errno);
|
||||||
#else
|
#else
|
||||||
char buff[256];
|
char buff[256];
|
||||||
|
Loading…
Reference in New Issue
Block a user