mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 07:50:11 +01:00
let piler child process give 421 error if it cannot connect to database
This commit is contained in:
parent
37ffe22419
commit
b690a4bb5c
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user