[dovecot-cvs] dovecot/src/imap rawlog.c,1.6,1.7
cras at procontrol.fi
cras at procontrol.fi
Thu Dec 12 20:57:49 EET 2002
- Previous message: [dovecot-cvs] dovecot/src/master main.c,1.16,1.17 settings.c,1.28,1.29
- Next message: [dovecot-cvs] dovecot/src/lib istream-file.c,1.1,1.2 network.c,1.12,1.13 network.h,1.6,1.7 randgen.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv31337/src/imap
Modified Files:
rawlog.c
Log Message:
net_receive, net_transmit: Return -2 for regular disconnection errors. Don't
log those errors. Some other cleanups.
Index: rawlog.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/rawlog.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rawlog.c 8 Dec 2002 05:23:07 -0000 1.6
+++ rawlog.c 12 Dec 2002 18:57:47 -0000 1.7
@@ -42,10 +42,13 @@
}
net_set_nonblock(in, TRUE);
- r_ret = read(in, buf, sizeof(buf));
- if (r_ret <= 0) {
- if (r_ret < 0)
- i_error("imap_in: read() failed: %m");
+ do {
+ r_ret = net_receive(in, buf, sizeof(buf));
+ } while (r_ret == 0);
+
+ if (r_ret < 0) {
+ if (r_ret == -1)
+ i_error("imap_in: net_receive() failed: %m");
/* disconnected */
io_loop_stop(ioloop);
@@ -58,10 +61,10 @@
net_set_nonblock(out, FALSE);
do {
- s_ret = write(out, buf, r_ret);
- if (s_ret <= 0) {
- if (r_ret < 0)
- i_error("imap_in: write() failed: %m");
+ s_ret = net_transmit(out, buf, r_ret);
+ if (s_ret < 0) {
+ if (s_ret == -1)
+ i_error("imap_in: net_transmit() failed: %m");
/* disconnected */
io_loop_stop(ioloop);
- Previous message: [dovecot-cvs] dovecot/src/master main.c,1.16,1.17 settings.c,1.28,1.29
- Next message: [dovecot-cvs] dovecot/src/lib istream-file.c,1.1,1.2 network.c,1.12,1.13 network.h,1.6,1.7 randgen.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list