[dovecot-cvs] dovecot/src/imap client.c, 1.41, 1.42 client.h, 1.22, 1.23 cmd-append.c, 1.43, 1.44

cras at dovecot.org cras at dovecot.org
Sun Aug 22 14:48:57 EEST 2004


Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv5938

Modified Files:
	client.c client.h cmd-append.c 
Log Message:
crashfixes



Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- client.c	22 Aug 2004 09:15:26 -0000	1.41
+++ client.c	22 Aug 2004 11:48:55 -0000	1.42
@@ -15,7 +15,6 @@
 static struct client *my_client; /* we don't need more than one currently */
 static struct timeout *to_idle;
 
-static void client_input(void *context);
 static void client_output(void *context);
 
 struct client *client_create(int hin, int hout, struct namespace *namespaces)
@@ -34,7 +33,7 @@
 
 	o_stream_set_flush_callback(client->output, client_output, client);
 
-	client->io = io_add(hin, IO_READ, client_input, client);
+	client->io = io_add(hin, IO_READ, _client_input, client);
 	client->parser = imap_parser_create(client->input, client->output,
 					    imap_max_line_length);
         client->last_input = ioloop_time;
@@ -223,7 +222,7 @@
 	client->command_pending = FALSE;
 	if (client->io == NULL) {
 		client->io = io_add(i_stream_get_fd(client->input),
-				    IO_READ, client_input, client);
+				    IO_READ, _client_input, client);
 	}
 
 	client->cmd_tag = NULL;
@@ -233,9 +232,6 @@
 
 	p_clear(client->cmd_pool);
 	imap_parser_reset(client->parser);
-
-	if (client->input_pending)
-                client_input(client);
 }
 
 /* Skip incoming data until newline is found,
@@ -324,7 +320,7 @@
 	return TRUE;
 }
 
-static void client_input(void *context)
+void _client_input(void *context)
 {
 	struct client *client = context;
 
@@ -385,6 +381,9 @@
 			_client_reset_command(client);
 		}
 		o_stream_uncork(client->output);
+
+		if (client->input_pending)
+			_client_input(client);
 	}
 }
 

Index: client.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/client.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- client.h	18 Aug 2004 23:53:39 -0000	1.22
+++ client.h	22 Aug 2004 11:48:55 -0000	1.23
@@ -75,5 +75,6 @@
 void clients_deinit(void);
 
 void _client_reset_command(struct client *client);
+void _client_input(void *context);
 
 #endif

Index: cmd-append.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- cmd-append.c	22 Aug 2004 11:03:38 -0000	1.43
+++ cmd-append.c	22 Aug 2004 11:48:55 -0000	1.44
@@ -59,6 +59,9 @@
 		/* command execution was finished */
 		client->bad_counter = 0;
 		_client_reset_command(client);
+
+		if (client->input_pending)
+			_client_input(client);
 	}
 }
 



More information about the dovecot-cvs mailing list