[dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.12.2.11, 1.12.2.12 auth-request.c, 1.58.2.33, 1.58.2.34 auth-request.h, 1.27.2.6, 1.27.2.7

tss at dovecot.org tss at dovecot.org
Fri May 11 15:01:44 EEST 2007


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv31414

Modified Files:
      Tag: branch_1_0
	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.12.2.11
retrieving revision 1.12.2.12
diff -u -d -r1.12.2.11 -r1.12.2.12
--- auth-request-handler.c	26 Jan 2007 13:58:30 -0000	1.12.2.11
+++ auth-request-handler.c	11 May 2007 12:01:38 -0000	1.12.2.12
@@ -101,7 +101,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.58.2.33
retrieving revision 1.58.2.34
diff -u -d -r1.58.2.33 -r1.58.2.34
--- auth-request.c	9 May 2007 16:45:45 -0000	1.58.2.33
+++ auth-request.c	11 May 2007 12:01:39 -0000	1.58.2.34
@@ -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.27.2.6
retrieving revision 1.27.2.7
diff -u -d -r1.27.2.6 -r1.27.2.7
--- auth-request.h	10 Mar 2007 14:04:31 -0000	1.27.2.6
+++ auth-request.h	11 May 2007 12:01:39 -0000	1.27.2.7
@@ -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