[dovecot-cvs] dovecot/src/lib-auth auth-client.c, 1.10, 1.10.2.1 auth-server-connection.h, 1.10, 1.10.2.1
tss at dovecot.org
tss at dovecot.org
Thu Dec 28 15:21:54 UTC 2006
- Previous message: [dovecot-cvs] dovecot/src/master main.c, 1.95, 1.96 master-settings.c, 1.149, 1.150 master-settings.h, 1.91, 1.92
- Next message: [dovecot-cvs] dovecot/src/lib-auth auth-client.c, 1.16, 1.17 auth-server-connection.h, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-auth
In directory talvi:/tmp/cvs-serv30360
Modified Files:
Tag: branch_1_0
auth-client.c auth-server-connection.h
Log Message:
If no auth sockets are found in 10 seconds, kill ourself.
Index: auth-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-client.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- auth-client.c 22 Jan 2006 15:50:07 -0000 1.10
+++ auth-client.c 28 Dec 2006 15:21:52 -0000 1.10.2.1
@@ -10,6 +10,8 @@
#include <dirent.h>
#include <sys/stat.h>
+#define AUTH_CLIENT_SOCKET_MAX_WAIT_TIME 10
+
struct auth_client *auth_client_new(unsigned int client_pid)
{
return auth_client_new_external(client_pid, NULL, NULL, NULL);
@@ -186,6 +188,17 @@
}
}
+ if (client->connections == NULL && !client->reconnect) {
+ if (client->missing_sockets_start_time == 0) {
+ client->missing_sockets_start_time =
+ ioloop_time;
+ } else if (ioloop_time -
+ client->missing_sockets_start_time >
+ AUTH_CLIENT_SOCKET_MAX_WAIT_TIME) {
+ i_fatal("No authentication sockets found");
+ }
+ }
+
if (closedir(dirp) < 0)
i_error("closedir() failed: %m");
}
Index: auth-server-connection.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-server-connection.h,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- auth-server-connection.h 14 Jan 2006 18:47:23 -0000 1.10
+++ auth-server-connection.h 28 Dec 2006 15:21:52 -0000 1.10.2.1
@@ -11,6 +11,7 @@
struct auth_server_connection *connections;
struct timeout *to_reconnect;
+ time_t missing_sockets_start_time;
unsigned int conn_waiting_handshake_count;
buffer_t *available_auth_mechs;
- Previous message: [dovecot-cvs] dovecot/src/master main.c, 1.95, 1.96 master-settings.c, 1.149, 1.150 master-settings.h, 1.91, 1.92
- Next message: [dovecot-cvs] dovecot/src/lib-auth auth-client.c, 1.16, 1.17 auth-server-connection.h, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list