[dovecot-cvs] dovecot/src/auth auth-master-listener.c, 1.7, 1.8 auth-master-listener.h, 1.4, 1.5 auth-request-handler.c, 1.13, 1.14 auth-worker-server.c, 1.9, 1.10 mech-gssapi.c, 1.6, 1.7 userdb-static.c, 1.18, 1.19

cras at dovecot.org cras at dovecot.org
Wed Jun 28 16:10:27 EEST 2006


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

Modified Files:
	auth-master-listener.c auth-master-listener.h 
	auth-request-handler.c auth-worker-server.c mech-gssapi.c 
	userdb-static.c 
Log Message:
Array API redesigned to work using unions. It now provides type safety
without having to enable DEBUG, as long as the compiler supports typeof().
Its API changed a bit. It now allows directly accessing the array contents,
although that's not necessarily recommended. Changed existing array usage to
be type safe in a bit more places. Removed array_t completely. Also did
s/modifyable/modifiable/.



Index: auth-master-listener.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-listener.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- auth-master-listener.c	14 Apr 2006 10:22:55 -0000	1.7
+++ auth-master-listener.c	28 Jun 2006 13:10:25 -0000	1.8
@@ -21,7 +21,7 @@
 	struct io *io;
 };
 
-static array_t ARRAY_DEFINE(master_listeners, struct auth_master_listener *);
+static ARRAY_DEFINE(master_listeners, struct auth_master_listener *);
 
 struct auth_master_listener *auth_master_listener_create(struct auth *auth)
 {
@@ -71,15 +71,15 @@
 		}
 	}
 
-	sockets = array_get_modifyable(&listener->sockets, &count);
+	sockets = array_get_modifiable(&listener->sockets, &count);
 	for (i = count; i > 0; i--)
 		auth_master_listener_socket_free(sockets[i-1]);
 
-	masters = array_get_modifyable(&listener->masters, &count);
+	masters = array_get_modifiable(&listener->masters, &count);
 	for (i = count; i > 0; i--)
 		auth_master_connection_destroy(&masters[i-1]);
 
-	clients = array_get_modifyable(&listener->clients, &count);
+	clients = array_get_modifiable(&listener->clients, &count);
 	for (i = count; i > 0; i--)
 		auth_client_connection_destroy(&clients[i-1]);
 
@@ -177,7 +177,7 @@
         struct auth_master_listener **listeners;
 	unsigned int i, count;
 
-	listeners = array_get_modifyable(&master_listeners, &count);
+	listeners = array_get_modifiable(&master_listeners, &count);
 	for (i = count; i > 0; i--)
 		auth_master_listener_destroy(listeners[i-1]);
 	array_free(&master_listeners);

Index: auth-master-listener.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-listener.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- auth-master-listener.h	14 Apr 2006 10:22:55 -0000	1.4
+++ auth-master-listener.h	28 Jun 2006 13:10:25 -0000	1.5
@@ -10,9 +10,9 @@
 	struct auth *auth;
 	unsigned int pid;
 
-	array_t ARRAY_DEFINE(sockets, struct auth_master_listener_socket *);
-	array_t ARRAY_DEFINE(masters, struct auth_master_connection *);
-	array_t ARRAY_DEFINE(clients, struct auth_client_connection *);
+	ARRAY_DEFINE(sockets, struct auth_master_listener_socket *);
+	ARRAY_DEFINE(masters, struct auth_master_connection *);
+	ARRAY_DEFINE(clients, struct auth_client_connection *);
 
 	struct timeout *to_clients;
 };

Index: auth-request-handler.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request-handler.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- auth-request-handler.c	17 Jun 2006 15:14:15 -0000	1.13
+++ auth-request-handler.c	28 Jun 2006 13:10:25 -0000	1.14
@@ -454,7 +454,7 @@
 	struct auth_request **auth_request;
 	size_t i, size;
 
-	auth_request = buffer_get_modifyable_data(auth_failures_buf, &size);
+	auth_request = buffer_get_modifiable_data(auth_failures_buf, &size);
 	size /= sizeof(*auth_request);
 
 	for (i = 0; i < size; i++) {

Index: auth-worker-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-server.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- auth-worker-server.c	26 Feb 2006 10:04:59 -0000	1.9
+++ auth-worker-server.c	28 Jun 2006 13:10:25 -0000	1.10
@@ -99,7 +99,7 @@
 	size_t i, size;
 	const char *reply;
 
-	connp = buffer_get_modifyable_data(connections, &size);
+	connp = buffer_get_modifiable_data(connections, &size);
 	size /= sizeof(*connp);
 
 	for (i = 0; i < size; i++) {
@@ -114,7 +114,7 @@
 		idle_count--;
 
 	/* abort all pending requests */
-	request = buffer_get_modifyable_data(conn->requests, &size);
+	request = buffer_get_modifiable_data(conn->requests, &size);
 	size /= sizeof(*request);
 
 	reply = t_strdup_printf("FAIL\t%d", PASSDB_RESULT_INTERNAL_FAILURE);
@@ -143,7 +143,7 @@
 	struct auth_worker_request *request;
 	size_t i, size;
 
-	request = buffer_get_modifyable_data(conn->requests, &size);
+	request = buffer_get_modifiable_data(conn->requests, &size);
 	size /= sizeof(*request);
 
 	for (i = 0; i < size; i++) {
@@ -159,7 +159,7 @@
 	struct auth_worker_connection **conn, *best;
 	size_t i, size, outbuf_size, best_size;
 
-	conn = buffer_get_modifyable_data(connections, &size);
+	conn = buffer_get_modifiable_data(connections, &size);
 	size /= sizeof(*conn);
 
 	if (idle_count > 0) {
@@ -245,7 +245,7 @@
         struct auth_worker_request *request;
 	size_t i, size;
 
-	request = buffer_get_modifyable_data(conn->requests, &size);
+	request = buffer_get_modifiable_data(conn->requests, &size);
 	size /= sizeof(*request);
 
 	for (i = 0; i < size; i++) {
@@ -320,7 +320,7 @@
 	struct auth_worker_connection **conn;
 	size_t i, size;
 
-	conn = buffer_get_modifyable_data(connections, &size);
+	conn = buffer_get_modifiable_data(connections, &size);
 	size /= sizeof(*conn);
 
 	if (idle_count <= 1)
@@ -373,7 +373,7 @@
 		return;
 
 	while (connections->used > 0) {
-		connp = buffer_get_modifyable_data(connections, NULL);
+		connp = buffer_get_modifiable_data(connections, NULL);
 		auth_worker_destroy(*connp);
 	}
 	buffer_free(connections);

Index: mech-gssapi.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-gssapi.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mech-gssapi.c	16 Jun 2006 10:38:56 -0000	1.6
+++ mech-gssapi.c	28 Jun 2006 13:10:25 -0000	1.7
@@ -106,7 +106,7 @@
 		"Obtaining credentials for %s", str_c(principal_name));
 
 	inbuf.length = str_len(principal_name);
-	inbuf.value = str_c_modifyable(principal_name);
+	inbuf.value = str_c_modifiable(principal_name);
 
 	major_status = gss_import_name(&minor_status, &inbuf, 
 				       GSS_C_NT_HOSTBASED_SERVICE,

Index: userdb-static.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-static.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- userdb-static.c	14 Feb 2006 17:43:04 -0000	1.18
+++ userdb-static.c	28 Jun 2006 13:10:25 -0000	1.19
@@ -14,7 +14,7 @@
 struct static_userdb_module {
 	struct userdb_module module;
 
-	array_t ARRAY_DEFINE(template, const char *);
+	ARRAY_DEFINE(template, const char *);
 };
 
 static void static_lookup(struct auth_request *auth_request,



More information about the dovecot-cvs mailing list