[dovecot-cvs] dovecot/src/imap cmd-idle.c,1.14,1.15
cras at dovecot.org
cras at dovecot.org
Mon Aug 23 10:14:09 EEST 2004
Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv6010
Modified Files:
cmd-idle.c
Log Message:
Crashfix
Index: cmd-idle.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-idle.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cmd-idle.c 22 Aug 2004 09:15:26 -0000 1.14
+++ cmd-idle.c 23 Aug 2004 07:14:06 -0000 1.15
@@ -134,17 +134,19 @@
{
struct cmd_idle_context *ctx = client->cmd_context;
- if (imap_sync_more(ctx->sync_ctx) == 0) {
- /* unfinished */
- return FALSE;
- }
+ if (ctx->sync_ctx != NULL) {
+ if (imap_sync_more(ctx->sync_ctx) == 0) {
+ /* unfinished */
+ return FALSE;
+ }
- if (imap_sync_deinit(ctx->sync_ctx) < 0) {
- client_send_untagged_storage_error(client,
- mailbox_get_storage(client->mailbox));
- mailbox_notify_changes(client->mailbox, 0, NULL, NULL);
+ if (imap_sync_deinit(ctx->sync_ctx) < 0) {
+ client_send_untagged_storage_error(client,
+ mailbox_get_storage(client->mailbox));
+ mailbox_notify_changes(client->mailbox, 0, NULL, NULL);
+ }
+ ctx->sync_ctx = NULL;
}
- ctx->sync_ctx = NULL;
if (ctx->idle_timeout) {
/* outlook workaround */
More information about the dovecot-cvs
mailing list