[Mod-auth-commit] mod_authn_pop3/src mod_authn_pop3.c,1.3,1.4
Brought to you by:
firechipmunk,
honx
From: <fir...@us...> - 2003-11-11 06:16:51
|
Update of /cvsroot/mod-auth/mod_authn_pop3/src In directory sc8-pr-cvs1:/tmp/cvs-serv16544/mod_authn_pop3/src Modified Files: mod_authn_pop3.c Log Message: Add AuthnPOP3Timeout to authn_pop3 Index: mod_authn_pop3.c =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/src/mod_authn_pop3.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mod_authn_pop3.c 11 Nov 2003 04:02:04 -0000 1.3 --- mod_authn_pop3.c 11 Nov 2003 06:16:48 -0000 1.4 *************** *** 89,92 **** --- 89,93 ---- char *serverhostname; int port; + apr_interval_time_t timeout; } pop_auth_config_rec; *************** *** 97,100 **** --- 98,102 ---- conf->serverhostname = NULL; conf->port = 110; + conf->timeout = apr_time_from_sec(5); return conf; *************** *** 119,122 **** --- 121,133 ---- } + static const char *set_pop_timeout(cmd_parms * cmd, + void *dir_config, const char *arg) + { + pop_auth_config_rec *conf = dir_config; + + conf->timeout = apr_time_from_sec(atoi(arg)); + return NULL; + } + static const command_rec authn_pop3_cmds[] = { *************** *** 127,130 **** --- 138,144 ---- NULL, OR_AUTHCFG, "port for POP Server"), + AP_INIT_TAKE1("AuthnPOP3Timeout", set_pop_timeout, + NULL, + OR_AUTHCFG, "port for POP Server"), {NULL} }; *************** *** 269,276 **** &authn_pop3_module); - apr_interval_time_t timeout = apr_time_from_sec(2); - pop3_ret = pop_auth(r, ! user, password, conf->serverhostname, conf->port, timeout); if (pop3_ret != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, --- 283,288 ---- &authn_pop3_module); pop3_ret = pop_auth(r, ! user, password, conf->serverhostname, conf->port, conf->timeout); if (pop3_ret != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |