backport change to not initialize db in logger which fixes small memleak.
This commit is contained in:
parent
790cdf879a
commit
4fb73505b9
|
@ -43,6 +43,8 @@ class zmDbRow {
|
|||
extern MYSQL dbconn;
|
||||
extern RecursiveMutex db_mutex;
|
||||
|
||||
extern bool zmDbConnected;
|
||||
|
||||
bool zmDbConnect();
|
||||
void zmDbClose();
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ Logger::Level Logger::databaseLevel(Logger::Level databaseLevel) {
|
|||
databaseLevel = limit(databaseLevel);
|
||||
if ( mDatabaseLevel != databaseLevel ) {
|
||||
if ( (databaseLevel > NOLOG) && (mDatabaseLevel <= NOLOG) ) { // <= NOLOG would be NOOPT
|
||||
if ( !zmDbConnect() ) {
|
||||
if ( !zmDbConnected ) {
|
||||
databaseLevel = NOLOG;
|
||||
}
|
||||
} // end if ( databaseLevel > NOLOG && mDatabaseLevel <= NOLOG )
|
||||
|
|
Loading…
Reference in New Issue