[dovecot-cvs] dovecot/src/login-common login-proxy.c,1.6,1.7
cras at dovecot.org
cras at dovecot.org
Mon Feb 20 19:14:44 EET 2006
- Previous message: [dovecot-cvs] dovecot/src/auth db-passwd-file.c, 1.20,
1.21 db-passwd-file.h, 1.11, 1.12 passdb-passwd-file.c, 1.27,
1.28 userdb-passwd-file.c, 1.21, 1.22
- Next message: [dovecot-cvs] dovecot/src/login-common login-proxy.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/login-common
In directory talvi:/tmp/cvs-serv26280/login-common
Modified Files:
login-proxy.c
Log Message:
Minor cleanups
Index: login-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/login-proxy.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- login-proxy.c 14 Jan 2006 18:48:01 -0000 1.6
+++ login-proxy.c 20 Feb 2006 17:14:42 -0000 1.7
@@ -39,14 +39,11 @@
/* client's output buffer is already quite full.
don't send more until we're below threshold. */
io_remove(&proxy->server_io);
- proxy->server_io = NULL;
return;
}
ret = net_receive(proxy->server_fd, buf, sizeof(buf));
- if (ret > 0)
- (void)o_stream_send(proxy->client_output, buf, ret);
- else if (ret < 0)
+ if (ret > 0 || o_stream_send(proxy->client_output, buf, ret) != ret)
login_proxy_free(proxy);
}
@@ -61,14 +58,11 @@
/* proxy's output buffer is already quite full.
don't send more until we're below threshold. */
io_remove(&proxy->client_io);
- proxy->client_io = NULL;
return;
}
ret = net_receive(proxy->client_fd, buf, sizeof(buf));
- if (ret > 0)
- (void)o_stream_send(proxy->server_output, buf, ret);
- else if (ret < 0)
+ if (ret > 0 || o_stream_send(proxy->server_output, buf, ret) != ret)
login_proxy_free(proxy);
}
@@ -247,13 +241,12 @@
/* from now on, just do dummy proxying */
io_remove(&proxy->server_io);
- proxy->server_io = io_add(proxy->server_fd, IO_READ, server_input, proxy);
- proxy->client_io = io_add(proxy->client_fd, IO_READ,
- proxy_client_input, proxy);
+ proxy->server_io =
+ io_add(proxy->server_fd, IO_READ, server_input, proxy);
+ proxy->client_io =
+ io_add(proxy->client_fd, IO_READ, proxy_client_input, proxy);
o_stream_set_flush_callback(proxy->server_output, server_output, proxy);
-
i_stream_unref(&proxy->server_input);
- proxy->server_input = NULL;
if (login_proxies == NULL) {
login_proxies = hash_create(default_pool, default_pool,
- Previous message: [dovecot-cvs] dovecot/src/auth db-passwd-file.c, 1.20,
1.21 db-passwd-file.h, 1.11, 1.12 passdb-passwd-file.c, 1.27,
1.28 userdb-passwd-file.c, 1.21, 1.22
- Next message: [dovecot-cvs] dovecot/src/login-common login-proxy.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list