[dovecot-cvs] dovecot/src/imap cmd-append.c, 1.83, 1.84 imap-fetch.c, 1.47, 1.48 imap-fetch.h, 1.19, 1.20 imap-thread.c, 1.30, 1.31 main.c, 1.83, 1.84

tss at dovecot.org tss at dovecot.org
Fri Dec 15 16:55:34 UTC 2006


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv346/imap

Modified Files:
	cmd-append.c imap-fetch.c imap-fetch.h imap-thread.c main.c 
Log Message:
Added context parameter type safety checks for most callback APIs.



Index: cmd-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- cmd-append.c	30 May 2006 08:41:10 -0000	1.83
+++ cmd-append.c	15 Dec 2006 16:55:31 -0000	1.84
@@ -422,7 +422,7 @@
 	/* append is special because we're only waiting on client input, not
 	   client output, so disable the standard output handler until we're
 	   finished */
-	o_stream_set_flush_callback(client->output, NULL, NULL);
+	o_stream_unset_flush_callback(client->output);
 
 	ctx->save_parser = imap_parser_create(client->input, client->output,
 					      imap_max_line_length);

Index: imap-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- imap-fetch.c	10 Sep 2006 12:48:13 -0000	1.47
+++ imap-fetch.c	15 Dec 2006 16:55:31 -0000	1.48
@@ -100,6 +100,7 @@
 	return ctx;
 }
 
+#undef imap_fetch_add_handler
 void imap_fetch_add_handler(struct imap_fetch_context *ctx,
 			    bool buffered, bool want_deinit,
 			    imap_fetch_handler_t *handler, void *context)

Index: imap-fetch.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- imap-fetch.h	28 Jun 2006 13:10:32 -0000	1.19
+++ imap-fetch.h	15 Dec 2006 16:55:31 -0000	1.20
@@ -68,6 +68,9 @@
 void imap_fetch_add_handler(struct imap_fetch_context *ctx,
 			    bool buffered, bool want_deinit,
 			    imap_fetch_handler_t *handler, void *context);
+#define imap_fetch_add_handler(ctx, buffered, want_deinit, handler, context) \
+	CONTEXT_CALLBACK3(imap_fetch_add_handler, imap_fetch_handler_t, \
+			  handler, context, ctx, buffered, want_deinit)
 
 struct imap_fetch_context *imap_fetch_init(struct client_command_context *cmd);
 int imap_fetch_deinit(struct imap_fetch_context *ctx);

Index: imap-thread.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- imap-thread.c	26 Nov 2006 15:20:12 -0000	1.30
+++ imap-thread.c	15 Dec 2006 16:55:31 -0000	1.31
@@ -2044,9 +2044,8 @@
 		return;
 
 	ext_id = mail_index_ext_register(ibox->index, "thread", 0, 0, 0);
-	mail_index_register_expunge_handler(ibox->index, ext_id,
-					    imap_thread_expunge_handler,
-					    tbox, TRUE);
+	mail_index_register_expunge_handler(ibox->index, ext_id, TRUE,
+					    imap_thread_expunge_handler, tbox);
 }
 
 static struct mailbox_sync_context *

Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- main.c	25 Nov 2006 22:17:40 -0000	1.83
+++ main.c	15 Dec 2006 16:55:31 -0000	1.84
@@ -153,8 +153,8 @@
 	lib_signals_init();
         lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);
         lib_signals_set_handler(SIGTERM, TRUE, sig_die, NULL);
-        lib_signals_ignore(SIGPIPE);
-        lib_signals_set_handler(SIGALRM, FALSE, NULL, NULL);
+        lib_signals_ignore(SIGPIPE, TRUE);
+        lib_signals_ignore(SIGALRM, FALSE);
 
 	user = getenv("USER");
 	if (user == NULL) {



More information about the dovecot-cvs mailing list