hopefully this fixes some more...

This commit is contained in:
DarthArgus
2014-10-26 22:20:06 -07:00
parent 9db3229116
commit eb2e7c78d8
23 changed files with 105 additions and 156 deletions
@@ -350,11 +350,8 @@ void Logger::logSimple(unsigned logenum, int level, const char *message)
if(m_rollDate && info->ts.tm_mday != m_lastDateTime.tm_mday)
{
if(info->ts.tm_mday != m_lastDateTime.tm_mday)
{
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
if(iter != m_logTable.end())
{
@@ -426,11 +423,8 @@ void Logger::logSimpleWithSys(unsigned logenum, unsigned priority, int level, co
if(m_rollDate && info->ts.tm_mday != m_lastDateTime.tm_mday)
{
if(info->ts.tm_mday != m_lastDateTime.tm_mday)
{
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
if(iter != m_logTable.end())
{
@@ -507,11 +501,8 @@ void Logger::logWithSys(unsigned logenum, unsigned priority, int level, const ch
}
if(m_rollDate && info->ts.tm_mday != m_lastDateTime.tm_mday)
{
if(info->ts.tm_mday != m_lastDateTime.tm_mday)
{
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
if(iter != m_logTable.end())
@@ -590,11 +581,8 @@ void Logger::vlogWithSys(unsigned logenum, unsigned priority, int level, const c
}
if(m_rollDate && info->ts.tm_mday != m_lastDateTime.tm_mday)
{
if(info->ts.tm_mday != m_lastDateTime.tm_mday)
{
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
memcpy(&m_lastDateTime, &info->ts, sizeof(tm));
rollDate(t);
}
if(iter != m_logTable.end())
@@ -520,10 +520,7 @@ stringMessage::stringMessage(const unsigned short command,const unsigned short s
monMessage(command, sequence, size)
{
data = new char [strlen(newData) + 1];
if (data)
strncpy(data, newData, strlen(newData + 1));
else
data = NULL;
strncpy(data, newData, strlen(newData + 1));
}
//----------------------------------------------------------------
@@ -559,13 +556,8 @@ monMessage(source)
{
data = new unsigned char[getSize()+1];
if (data)
{
memcpy(data, source + 6, getSize());
data[getSize()] = 0;
}
else
data = NULL;
memcpy(data, source + 6, getSize());
data[getSize()] = 0;
}
//----------------------------------------------------------------
@@ -586,11 +578,8 @@ monMessage(command, sequence, size)
//----------------------------------------------------------------
dataReplyMessage::~dataReplyMessage()
{
if (data)
{
delete [] data;
data = 0;
}
delete [] data;
data = 0;
}
//----------------------------------------------------------------