initialize spamcount in case cleandb fails
This commit is contained in:
parent
c3d00e50f6
commit
7439486bc6
|
@ -288,7 +288,7 @@ void *cleaner_thread_run(void *)
|
||||||
sched_yield();
|
sched_yield();
|
||||||
if(now>next_run)
|
if(now>next_run)
|
||||||
{
|
{
|
||||||
unsigned long spamcount;
|
unsigned long spamcount=0;
|
||||||
|
|
||||||
next_run=now+3600; //if we just add 3600 like before, then if
|
next_run=now+3600; //if we just add 3600 like before, then if
|
||||||
//time changes during execution of hermes this will run
|
//time changes during execution of hermes this will run
|
||||||
|
@ -298,12 +298,12 @@ void *cleaner_thread_run(void *)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
spamcount=db.cleanDB();
|
spamcount=db.cleanDB();
|
||||||
|
LDEB("Cleaning database, cleaning "+Utils::inttostr(spamcount)+" blocked spams.");
|
||||||
}
|
}
|
||||||
catch(Exception &e)
|
catch(Exception &e)
|
||||||
{
|
{
|
||||||
LERR("Error cleaning the database: " + string(e));
|
LERR("Error cleaning the database: " + string(e));
|
||||||
}
|
}
|
||||||
LDEB("Cleaning database, cleaning "+Utils::inttostr(spamcount)+" blocked spams.");
|
|
||||||
if(spamcount>0&&cfg.getSubmitStats())
|
if(spamcount>0&&cfg.getSubmitStats())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in a new issue