[dovecot-cvs] dovecot/src/login auth-connection.c,1.19,1.20 client.c,1.27,1.28

cras at procontrol.fi cras at procontrol.fi
Sat Jan 11 17:29:49 EET 2003


Update of /home/cvs/dovecot/src/login
In directory danu:/tmp/cvs-serv7725/src/login

Modified Files:
	auth-connection.c client.c 
Log Message:
Rewrote hash table code, works with less memory now. Also some memory
allocation fixes to thread extension code.



Index: auth-connection.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/auth-connection.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- auth-connection.c	9 Jan 2003 12:19:07 -0000	1.19
+++ auth-connection.c	11 Jan 2003 15:29:47 -0000	1.20
@@ -80,7 +80,8 @@
 					   FALSE);
 	conn->output = o_stream_create_file(fd, default_pool, MAX_OUTBUF_SIZE,
 					    IO_PRIORITY_DEFAULT, FALSE);
-	conn->requests = hash_create(default_pool, 100, NULL, NULL);
+	conn->requests = hash_create(default_pool, default_pool, 100,
+				     NULL, NULL);
 
 	conn->next = auth_connections;
 	auth_connections = conn;
@@ -300,6 +301,10 @@
 	request->mech = mech;
 	request->conn = conn;
 	request->id = ++request_id_counter;
+	if (request->id == 0) {
+		/* wrapped - ID 0 not allowed */
+		request->id = ++request_id_counter;
+	}
 	request->callback = callback;
 	request->context = context;
 

Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/client.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- client.c	9 Jan 2003 12:19:07 -0000	1.27
+++ client.c	11 Jan 2003 15:29:47 -0000	1.28
@@ -436,7 +436,7 @@
 
 void clients_init(void)
 {
-	clients = hash_create(default_pool, 128, NULL, NULL);
+	clients = hash_create(default_pool, default_pool, 128, NULL, NULL);
 	to_idle = timeout_add(1000, idle_timeout, NULL);
 }
 




More information about the dovecot-cvs mailing list