[dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.25, 1.26 auth-request.c, 1.96, 1.97 auth-request.h, 1.36, 1.37
tss at dovecot.org
tss at dovecot.org
Fri May 11 15:01:47 EEST 2007
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv31418
Modified Files:
auth-request-handler.c auth-request.c auth-request.h
Log Message:
Changed auth_request->created to last_access and update it a bit more often.
If there are slow authentications this could help avoid removing timeouted
auth requests too early.
Index: auth-request-handler.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request-handler.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- auth-request-handler.c 26 Jan 2007 13:58:48 -0000 1.25
+++ auth-request-handler.c 11 May 2007 12:01:42 -0000 1.26
@@ -102,7 +102,7 @@
while (hash_iterate(iter, &key, &value)) {
struct auth_request *request = value;
- if (request->created + AUTH_REQUEST_TIMEOUT < ioloop_time)
+ if (request->last_access + AUTH_REQUEST_TIMEOUT < ioloop_time)
auth_request_handler_remove(handler, request);
}
hash_iterate_deinit(iter);
Index: auth-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- auth-request.c 9 May 2007 16:45:47 -0000 1.96
+++ auth-request.c 11 May 2007 12:01:42 -0000 1.97
@@ -33,7 +33,7 @@
request->userdb = auth->userdbs;
request->refcount = 1;
- request->created = ioloop_time;
+ request->last_access = ioloop_time;
request->credentials = -1;
request->auth = auth;
@@ -53,7 +53,7 @@
auth_request->pool = pool;
auth_request->refcount = 1;
- auth_request->created = ioloop_time;
+ auth_request->last_access = ioloop_time;
auth_request->auth = auth;
auth_request->passdb = auth->passdbs;
auth_request->userdb = auth->userdbs;
@@ -75,6 +75,7 @@
request->state = AUTH_REQUEST_STATE_FINISHED;
request->successful = TRUE;
+ request->last_access = ioloop_time;
request->callback(request, AUTH_CLIENT_RESULT_SUCCESS,
data, data_size);
}
@@ -84,6 +85,7 @@
i_assert(request->state == AUTH_REQUEST_STATE_MECH_CONTINUE);
request->state = AUTH_REQUEST_STATE_FINISHED;
+ request->last_access = ioloop_time;
request->callback(request, AUTH_CLIENT_RESULT_FAILURE, NULL, 0);
}
@@ -179,6 +181,7 @@
{
i_assert(request->state == AUTH_REQUEST_STATE_MECH_CONTINUE);
+ request->last_access = ioloop_time;
request->mech->auth_continue(request, data, data_size);
}
Index: auth-request.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- auth-request.h 31 Mar 2007 04:41:55 -0000 1.36
+++ auth-request.h 11 May 2007 12:01:42 -0000 1.37
@@ -54,7 +54,7 @@
unsigned int connect_uid;
unsigned int client_pid;
unsigned int id;
- time_t created;
+ time_t last_access;
const char *service;
struct ip_addr local_ip, remote_ip;
More information about the dovecot-cvs
mailing list