--- src/pop3/client.c.orig 2005-05-12 13:54:41.000000000 +0200 +++ src/pop3/client.c 2005-05-13 13:28:03.095182720 +0200 @@ -254,6 +254,8 @@ if (client->io != NULL) { /* no more input until client has read our output */ + i_info("client_send_line: disabling input wi:%s", + client->waiting_input?"true":"false"); io_remove(client->io); client->io = NULL; @@ -292,10 +294,12 @@ { struct client *client = context; char *line, *args; + int cmdcount=0; if (client->cmd != NULL) { /* we're still processing a command. wait until it's finished. */ + i_info("client_input: still processing command, disabling input"); io_remove(client->io); client->io = NULL; client->waiting_input = TRUE; @@ -338,7 +342,9 @@ client_send_line(client, "-ERR Too many bad commands."); client_disconnect(client, "Too many bad commands."); } + cmdcount++; } + i_info("client_input: handled %d cmds", cmdcount); o_stream_uncork(client->output); if (client->output->closed) @@ -366,12 +372,20 @@ OUTBUF_THROTTLE_SIZE/2 && client->io == NULL && client->cmd == NULL) { /* enable input again */ + i_info("client_output: enabling input"); client->io = io_add(i_stream_get_fd(client->input), IO_READ, client_input, client); } if (client->cmd == NULL && client->io != NULL && client->waiting_input) client_input(client); + else + { + if (client->waiting_input) + { + i_info("client->waiting_input == TRUE"); + } + } return client->cmd == NULL; }