[dovecot-cvs] dovecot/src/util rawlog.c,1.8,1.9

tss at dovecot.org tss at dovecot.org
Fri Dec 15 18:38:33 UTC 2006


Update of /var/lib/cvs/dovecot/src/util
In directory talvi:/tmp/cvs-serv3614/util

Modified Files:
	rawlog.c 
Log Message:
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.



Index: rawlog.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/util/rawlog.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rawlog.c	26 Feb 2006 10:05:31 -0000	1.8
+++ rawlog.c	15 Dec 2006 18:38:31 -0000	1.9
@@ -111,9 +111,8 @@
 	proxy->last_out_lf = ((const unsigned char *)buf)[size-1] == '\n';
 }
 
-static void server_input(void *context)
+static void server_input(struct rawlog_proxy *proxy)
 {
-	struct rawlog_proxy *proxy = context;
 	unsigned char buf[OUTBUF_THRESHOLD];
 	ssize_t ret;
 
@@ -133,9 +132,8 @@
                 rawlog_proxy_destroy(proxy);
 }
 
-static void client_input(void *context)
+static void client_input(struct rawlog_proxy *proxy)
 {
-	struct rawlog_proxy *proxy = context;
 	unsigned char buf[OUTBUF_THRESHOLD];
 	ssize_t ret;
 
@@ -155,10 +153,8 @@
                 rawlog_proxy_destroy(proxy);
 }
 
-static int server_output(void *context)
+static int server_output(struct rawlog_proxy *proxy)
 {
-	struct rawlog_proxy *proxy = context;
-
 	if (o_stream_flush(proxy->server_output) < 0) {
                 rawlog_proxy_destroy(proxy);
 		return 1;
@@ -175,10 +171,8 @@
 	return 1;
 }
 
-static int client_output(void *context)
+static int client_output(struct rawlog_proxy *proxy)
 {
-	struct rawlog_proxy *proxy = context;
-
 	if (o_stream_flush(proxy->client_output) < 0) {
                 rawlog_proxy_destroy(proxy);
 		return 1;



More information about the dovecot-cvs mailing list