dovecot-2.0: lib-master: Don't crash after timeouting an auth-ma...
dovecot at dovecot.org
dovecot at dovecot.org
Mon May 3 16:01:12 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/1fd45deee948
changeset: 11248:1fd45deee948
user: Timo Sirainen <tss at iki.fi>
date: Mon May 03 16:01:09 2010 +0300
description:
lib-master: Don't crash after timeouting an auth-master request.
diffstat:
src/lib-master/master-login-auth.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (29 lines):
diff -r f05909834219 -r 1fd45deee948 src/lib-master/master-login-auth.c
--- a/src/lib-master/master-login-auth.c Fri Apr 30 19:14:57 2010 +0300
+++ b/src/lib-master/master-login-auth.c Mon May 03 16:01:09 2010 +0300
@@ -20,7 +20,9 @@
struct master_login_auth_request {
struct master_login_auth_request *prev, *next;
+ unsigned int id;
time_t create_stamp;
+
master_login_auth_request_callback_t *callback;
void *context;
};
@@ -131,6 +133,7 @@
request = auth->request_head;
DLLIST2_REMOVE(&auth->request_head,
&auth->request_tail, request);
+ hash_table_remove(auth->requests, POINTER_CAST(request->id));
i_error("Auth server request timed out after %u secs",
(unsigned int)(ioloop_time - request->create_stamp));
@@ -360,6 +363,7 @@
login_req = i_new(struct master_login_auth_request, 1);
login_req->create_stamp = ioloop_time;
+ login_req->id = id;
login_req->callback = callback;
login_req->context = context;
hash_table_insert(auth->requests, POINTER_CAST(id), login_req);
More information about the dovecot-cvs
mailing list