changeset 2787:ce98a0248ea1 HEAD

Fixes.
author Timo Sirainen <tss@iki.fi>
date Wed, 20 Oct 2004 17:02:12 +0300
parents 9aaa737f8215
children f322b24da429
files src/imap-login/client.c src/imap-login/client.h src/imap-login/imap-proxy.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap-login/client.c	Wed Oct 20 16:59:32 2004 +0300
+++ b/src/imap-login/client.c	Wed Oct 20 17:02:12 2004 +0300
@@ -73,7 +73,7 @@
 
 /* Skip incoming data until newline is found,
    returns TRUE if newline was found. */
-static int client_skip_line(struct imap_client *client)
+int client_skip_line(struct imap_client *client)
 {
 	const unsigned char *data;
 	size_t i, data_size;
--- a/src/imap-login/client.h	Wed Oct 20 16:59:32 2004 +0300
+++ b/src/imap-login/client.h	Wed Oct 20 17:02:12 2004 +0300
@@ -37,6 +37,7 @@
 void client_send_tagline(struct imap_client *client, const char *line);
 
 int client_read(struct imap_client *client);
+int client_skip_line(struct imap_client *client);
 void client_input(void *context);
 
 void client_ref(struct imap_client *client);
--- a/src/imap-login/imap-proxy.c	Wed Oct 20 16:59:32 2004 +0300
+++ b/src/imap-login/imap-proxy.c	Wed Oct 20 17:02:12 2004 +0300
@@ -44,9 +44,10 @@
 	} else if (strncmp(line, "P OK ", 5) == 0) {
 		/* Login successful. Send this line to client. */
 		(void)o_stream_send_str(client->output, client->cmd_tag);
-		(void)o_stream_send_str(client->output, line + 2);
+		(void)o_stream_send_str(client->output, line + 1);
 		(void)o_stream_send(client->output, "\r\n", 2);
 
+		(void)client_skip_line(client);
 		login_proxy_detach(client->proxy, client->input,
 				   client->output);