[dovecot-cvs] dovecot/src/pop3 commands.c,1.48,1.49
cras at dovecot.org
cras at dovecot.org
Sun Oct 16 19:22:17 EEST 2005
Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv10460
Modified Files:
commands.c
Log Message:
Don't send duplicate lines in LIST command when buffer is full.
Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- commands.c 11 Sep 2005 10:52:02 -0000 1.48
+++ commands.c 16 Oct 2005 16:22:15 -0000 1.49
@@ -119,9 +119,14 @@
static void cmd_list_callback(struct client *client)
{
struct cmd_list_context *ctx = client->cmd_context;
- int ret;
+ int ret = 1;
for (; ctx->msgnum != client->messages_count; ctx->msgnum++) {
+ if (ret == 0) {
+ /* buffer full */
+ return;
+ }
+
if (client->deleted) {
if (client->deleted_bitmask[ctx->msgnum / CHAR_BIT] &
(1 << (ctx->msgnum % CHAR_BIT)))
@@ -132,8 +137,6 @@
client->message_sizes[ctx->msgnum]);
if (ret < 0)
break;
- if (ret == 0)
- return;
}
client_send_line(client, ".");
More information about the dovecot-cvs
mailing list