mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:11:59 +01:00
Introduced check_for_client_timeout_interval config parameter
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
f9162bc085
commit
34e25f6c74
@ -66,6 +66,9 @@ listen_port=25
|
||||
|
||||
clamd_socket=/tmp/clamd
|
||||
|
||||
; check for client timeout interval. Default: 30 sec
|
||||
check_for_client_timeout_interval=30
|
||||
|
||||
; smtp timeout. Default: 60 sec
|
||||
smtp_timeout=60
|
||||
|
||||
|
@ -62,6 +62,7 @@ struct _parse_rule config_parse_rules[] =
|
||||
{ "archive_emails_not_having_message_id", "integer", (void*) int_parser, offsetof(struct config, archive_emails_not_having_message_id), "0", sizeof(int)},
|
||||
{ "archive_only_mydomains", "integer", (void*) int_parser, offsetof(struct config, archive_only_mydomains), "0", sizeof(int)},
|
||||
{ "backlog", "integer", (void*) int_parser, offsetof(struct config, backlog), "20", sizeof(int)},
|
||||
{ "check_for_client_timeout_interval", "integer", (void*) int_parser, offsetof(struct config, check_for_client_timeout_interval), "30", sizeof(int)},
|
||||
{ "cipher_list", "string", (void*) string_parser, offsetof(struct config, cipher_list), "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS", MAXVAL-1},
|
||||
{ "clamd_addr", "string", (void*) string_parser, offsetof(struct config, clamd_addr), "", MAXVAL-1},
|
||||
{ "clamd_port", "integer", (void*) int_parser, offsetof(struct config, clamd_port), "0", sizeof(int)},
|
||||
|
@ -49,6 +49,7 @@ struct config {
|
||||
int verbosity;
|
||||
char locale[MAXVAL];
|
||||
|
||||
int check_for_client_timeout_interval;
|
||||
int smtp_timeout;
|
||||
int helper_timeout;
|
||||
int extract_attachments;
|
||||
|
@ -31,7 +31,6 @@ extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
struct epoll_event event, *events=NULL;
|
||||
int timeout = 20; // checking for timeout this often [sec]
|
||||
int num_connections = 0;
|
||||
int listenerfd = -1;
|
||||
|
||||
@ -98,7 +97,7 @@ void check_for_client_timeout(){
|
||||
}
|
||||
}
|
||||
|
||||
alarm(timeout);
|
||||
alarm(cfg.check_for_client_timeout_interval);
|
||||
}
|
||||
|
||||
|
||||
@ -216,7 +215,7 @@ int main(int argc, char **argv){
|
||||
if(daemonise == 1 && daemon(1, 0) == -1) fatal(ERR_DAEMON);
|
||||
#endif
|
||||
|
||||
alarm(timeout);
|
||||
alarm(cfg.check_for_client_timeout_interval);
|
||||
|
||||
for(;;){
|
||||
n = epoll_wait(efd, events, cfg.max_connections, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user