[dovecot-cvs] dovecot/src/lib istream-file.c, 1.26, 1.26.2.1 istream-mmap.c, 1.19, 1.19.2.1 ostream-file.c, 1.61, 1.61.2.1
tss at dovecot.org
tss at dovecot.org
Tue Nov 7 13:58:55 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv17022
Modified Files:
Tag: branch_1_0
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.26.2.1
diff -u -d -r1.26 -r1.26.2.1
--- istream-file.c 13 Jan 2006 20:26:01 -0000 1.26
+++ istream-file.c 7 Nov 2006 13:58:52 -0000 1.26.2.1
@@ -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.19.2.1
diff -u -d -r1.19 -r1.19.2.1
--- istream-mmap.c 13 Jan 2006 20:26:01 -0000 1.19
+++ istream-mmap.c 7 Nov 2006 13:58:52 -0000 1.19.2.1
@@ -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.61.2.1
diff -u -d -r1.61 -r1.61.2.1
--- ostream-file.c 2 Apr 2006 10:12:07 -0000 1.61
+++ ostream-file.c 7 Nov 2006 13:58:52 -0000 1.61.2.1
@@ -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