[dovecot-cvs] dovecot/src/pop3-login client.c, 1.50.2.2, 1.50.2.3 pop3-proxy.c, 1.10, 1.10.2.1
cras at dovecot.org
cras at dovecot.org
Fri Aug 11 00:14:56 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/imap-login client.c, 1.51.2.2, 1.51.2.3 imap-proxy.c, 1.7, 1.7.2.1
- Next message: [dovecot-cvs] dovecot/src/login-common client-common.h, 1.9, 1.10 common.h, 1.11, 1.12 main.c, 1.36, 1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv1511/pop3-login
Modified Files:
Tag: branch_1_0
client.c pop3-proxy.c
Log Message:
Fixes for handling near-full connection queues.
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client.c,v
retrieving revision 1.50.2.2
retrieving revision 1.50.2.3
diff -u -d -r1.50.2.2 -r1.50.2.3
--- client.c 6 Aug 2006 20:05:25 -0000 1.50.2.2
+++ client.c 10 Aug 2006 21:14:53 -0000 1.50.2.3
@@ -73,6 +73,11 @@
{
int fd_ssl;
+ client_ref(client);
+ connection_queue_add(1);
+ if (!client_unref(client))
+ return;
+
fd_ssl = ssl_proxy_new(client->common.fd, &client->common.ip,
&client->common.proxy);
if (fd_ssl == -1) {
@@ -227,7 +232,7 @@
o_stream_uncork(client->output);
}
-static void client_destroy_oldest(void)
+void client_destroy_oldest(void)
{
struct hash_iterate_context *iter;
void *key, *value;
@@ -307,23 +312,8 @@
const struct ip_addr *ip)
{
struct pop3_client *client;
- unsigned int current_count;
- if (!process_per_connection) {
- current_count = hash_size(clients) +
- ssl_proxy_get_count() + login_proxy_get_count();
- if (current_count >= max_connections) {
- /* already reached max. users count, kill few of the
- oldest connections. this happens when we've maxed
- out the login process count also. */
- client_destroy_oldest();
- }
- if (current_count + 1 >= max_connections) {
- /* after this client we've reached max users count,
- so stop listening for more */
- main_listen_stop();
- }
- }
+ connection_queue_add(1);
/* always use nonblocking I/O */
net_set_nonblock(fd, TRUE);
Index: pop3-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/pop3-proxy.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- pop3-proxy.c 14 Jan 2006 18:48:17 -0000 1.10
+++ pop3-proxy.c 10 Aug 2006 21:14:53 -0000 1.10.2.1
@@ -143,6 +143,9 @@
return -1;
}
+ i_assert(client->refcount > 1);
+ connection_queue_add(1);
+
client->proxy = login_proxy_new(&client->common, host, port,
proxy_input, client);
if (client->proxy == NULL)
- Previous message: [dovecot-cvs] dovecot/src/imap-login client.c, 1.51.2.2, 1.51.2.3 imap-proxy.c, 1.7, 1.7.2.1
- Next message: [dovecot-cvs] dovecot/src/login-common client-common.h, 1.9, 1.10 common.h, 1.11, 1.12 main.c, 1.36, 1.37
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list