This commit is contained in:
parent
b219eabe99
commit
cb2752889f
2 changed files with 0 additions and 43 deletions
|
@ -108,17 +108,6 @@ void Configfile::validateConfig()
|
||||||
throw Exception("Directory "+chroot+" doesn't exist, can't chroot to it.",__FILE__,__LINE__);
|
throw Exception("Directory "+chroot+" doesn't exist, can't chroot to it.",__FILE__,__LINE__);
|
||||||
#endif //WIN32
|
#endif //WIN32
|
||||||
|
|
||||||
//check if we have submit_stats on but no user and password
|
|
||||||
if(getSubmitStats()&&(""==getSubmitStatsUsername()||""==getSubmitStatsPassword()))
|
|
||||||
throw Exception("You have configured hermes to send stats, but have not configured a username or password.\n"
|
|
||||||
"If you don't have one, go to http://www.hermes-project.com and register there",__FILE__,__LINE__);
|
|
||||||
|
|
||||||
#ifndef HAVE_SSL
|
|
||||||
//check if we have activated submit_stats_ssl not having ssl activated
|
|
||||||
if(getSubmitStatsSsl())
|
|
||||||
throw Exception("You have configured stats submission through SSL, but hermes was compiled without SSL support",__FILE__,__LINE__);
|
|
||||||
#endif //HAVE_SSL
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string Configfile::parseAsString(string str)
|
string Configfile::parseAsString(string str)
|
||||||
|
|
|
@ -332,38 +332,6 @@ void *cleaner_thread_run(void *)
|
||||||
{
|
{
|
||||||
LERR("Error cleaning the database: " + string(e));
|
LERR("Error cleaning the database: " + string(e));
|
||||||
}
|
}
|
||||||
if(spamcount>0&&cfg.getSubmitStats())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Socket s;
|
|
||||||
string server_response;
|
|
||||||
|
|
||||||
s.init();
|
|
||||||
s.connect("stats.hermes-project.com",11125);
|
|
||||||
#ifdef HAVE_SSL
|
|
||||||
if(cfg.getSubmitStatsSsl())
|
|
||||||
{
|
|
||||||
s.writeLine("ssl");
|
|
||||||
s.prepareSSL(false);
|
|
||||||
s.startSSL(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif //HAVE_SSL
|
|
||||||
s.writeLine("non-ssl");
|
|
||||||
s.writeLine(cfg.getSubmitStatsUsername());
|
|
||||||
s.writeLine(cfg.getSubmitStatsPassword());
|
|
||||||
s.writeLine(Utils::inttostr(spamcount));
|
|
||||||
server_response=s.readLine();
|
|
||||||
s.close();
|
|
||||||
if("OK"!=server_response)
|
|
||||||
throw Exception(server_response,__FILE__,__LINE__);
|
|
||||||
}
|
|
||||||
catch(Exception &e)
|
|
||||||
{
|
|
||||||
LDEB("Exception sending stats: "+string(e));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if(false==cfg.getBackground())
|
if(false==cfg.getBackground())
|
||||||
|
|
Loading…
Add table
Reference in a new issue