[dovecot-cvs] dovecot/src/lib istream-file.c, 1.26, 1.27 istream-mmap.c, 1.19, 1.20 ostream-file.c, 1.61, 1.62
tss at dovecot.org
tss at dovecot.org
Tue Nov 7 13:58:59 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv17027
Modified Files:
istream-file.c istream-mmap.c ostream-file.c
Log Message:
When i/ostream is closed, change the fd to be -1 so it won't be accidentally
used.
Index: istream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-file.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- istream-file.c 13 Jan 2006 20:26:01 -0000 1.26
+++ istream-file.c 7 Nov 2006 13:58:56 -0000 1.27
@@ -33,8 +33,8 @@
if (fstream->autoclose_fd && _stream->fd != -1) {
if (close(_stream->fd) < 0)
i_error("file_istream.close() failed: %m");
- _stream->fd = -1;
}
+ _stream->fd = -1;
}
static void _destroy(struct _iostream *stream)
Index: istream-mmap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-mmap.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- istream-mmap.c 13 Jan 2006 20:26:01 -0000 1.19
+++ istream-mmap.c 7 Nov 2006 13:58:56 -0000 1.20
@@ -30,8 +30,8 @@
if (mstream->autoclose_fd && mstream->istream.fd != -1) {
if (close(mstream->istream.fd) < 0)
i_error("mmap_istream.close() failed: %m");
- mstream->istream.fd = -1;
}
+ mstream->istream.fd = -1;
}
static void i_stream_munmap(struct mmap_istream *mstream)
Index: ostream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- ostream-file.c 2 Apr 2006 10:12:07 -0000 1.61
+++ ostream-file.c 7 Nov 2006 13:58:56 -0000 1.62
@@ -57,8 +57,8 @@
if (fstream->autoclose_fd && fstream->fd != -1) {
if (close(fstream->fd) < 0)
i_error("file_ostream.close() failed: %m");
- fstream->fd = -1;
}
+ fstream->fd = -1;
fstream->ostream.ostream.closed = TRUE;
}
More information about the dovecot-cvs
mailing list