[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.9, 1.10 dbox-sync-expunge.c, 1.8, 1.9 dbox-uidlist.c, 1.17, 1.18

cras at dovecot.org cras at dovecot.org
Sun Feb 26 12:05:20 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv5842/lib-storage/index/dbox

Modified Files:
	dbox-file.c dbox-sync-expunge.c dbox-uidlist.c 
Log Message:
Added i_stream_destroy() and o_stream_destroy() and used them instead of
*_stream_unref() where possible. Fixes at least one problem with io_remove()
being called after socket was closed, which caused problems with epoll.



Index: dbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-file.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dbox-file.c	24 Feb 2006 17:33:48 -0000	1.9
+++ dbox-file.c	26 Feb 2006 10:05:17 -0000	1.10
@@ -46,7 +46,7 @@
 	}
 
 	if (file->input != NULL)
-		i_stream_unref(&file->input);
+		i_stream_destroy(&file->input);
 	if (file->fd != -1) {
 		if (close(file->fd) < 0)
 			i_error("close(dbox) failed: %m");

Index: dbox-sync-expunge.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-expunge.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dbox-sync-expunge.c	24 Feb 2006 17:33:48 -0000	1.8
+++ dbox-sync-expunge.c	26 Feb 2006 10:05:18 -0000	1.9
@@ -182,7 +182,7 @@
 					      mbox->file->seeked_offset,
 					      full_size);
 		bytes = o_stream_send_istream(output, input);
-		i_stream_unref(&input);
+		i_stream_destroy(&input);
 
 		if (bytes < 0) {
 			mail_storage_set_critical(STORAGE(mbox->storage),
@@ -223,7 +223,7 @@
 				break;
 		}
 	}
-	o_stream_unref(&output);
+	o_stream_destroy(&output);
 
 	if (ret < 0) {
 		file_dotlock_delete(&dotlock);

Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- dbox-uidlist.c	24 Feb 2006 16:06:51 -0000	1.17
+++ dbox-uidlist.c	26 Feb 2006 10:05:18 -0000	1.18
@@ -413,7 +413,7 @@
 		uidlist->mtime = -1;
 	}
 
-	i_stream_unref(&input);
+	i_stream_destroy(&input);
 	return ret;
 }
 
@@ -537,7 +537,7 @@
 			"write(%s) failed: %m", uidlist->path);
 		ret = -1;
 	}
-	o_stream_unref(&output);
+	o_stream_destroy(&output);
 
 	if (ret < 0)
 		return -1;
@@ -681,7 +681,7 @@
 			"write(%s) failed: %m", ctx->uidlist->path);
 		ret = -1;
 	}
-	o_stream_unref(&output);
+	o_stream_destroy(&output);
 
 	if (ret < 0)
 		return -1;



More information about the dovecot-cvs mailing list