let piler child process give 421 error if it cannot connect to database

This commit is contained in:
SJ 2013-01-27 21:57:15 +01:00
parent 37ffe22419
commit b690a4bb5c

View File

@ -79,6 +79,11 @@ int handle_smtp_session(int new_sd, struct __data *data, struct __config *cfg){
syslog(LOG_PRIORITY, "%s", ERR_MYSQL_CONNECT); syslog(LOG_PRIORITY, "%s", ERR_MYSQL_CONNECT);
#endif #endif
if(db_conn == 0){
send(new_sd, SMTP_RESP_421_ERR_TMP, strlen(SMTP_RESP_421_ERR_TMP), 0);
return 0;
}
gettimeofday(&tv1, &tz); gettimeofday(&tv1, &tz);