[dovecot-cvs] dovecot/src/imap mail-storage-callbacks.c,1.9,1.10
cras at procontrol.fi
cras at procontrol.fi
Tue May 25 20:50:38 EEST 2004
Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv15205/imap
Modified Files:
mail-storage-callbacks.c
Log Message:
Send recent counter changes when it actually changes.
Index: mail-storage-callbacks.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/mail-storage-callbacks.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/mail-storage-callbacks.c 2 May 2004 20:32:15 -0000 1.9
+++ b/mail-storage-callbacks.c 25 May 2004 17:50:36 -0000 1.10
@@ -61,8 +61,8 @@
t_pop();
}
-static void new_messages(struct mailbox *mailbox, unsigned int messages_count,
- unsigned int recent_count, void *context)
+static void message_count_changed(struct mailbox *mailbox, unsigned int count,
+ void *context)
{
struct client *client = context;
char str[MAX_INT_STRLEN+20];
@@ -70,10 +70,20 @@
if (client->mailbox != mailbox)
return;
- i_snprintf(str, sizeof(str), "* %u EXISTS", messages_count);
+ i_snprintf(str, sizeof(str), "* %u EXISTS", count);
client_send_line(client, str);
+}
- i_snprintf(str, sizeof(str), "* %u RECENT", recent_count);
+static void recent_count_changed(struct mailbox *mailbox, unsigned int count,
+ void *context)
+{
+ struct client *client = context;
+ char str[MAX_INT_STRLEN+20];
+
+ if (client->mailbox != mailbox)
+ return;
+
+ i_snprintf(str, sizeof(str), "* %u RECENT", count);
client_send_line(client, str);
}
@@ -95,6 +105,7 @@
notify_no,
expunge,
update_flags,
- new_messages,
+ message_count_changed,
+ recent_count_changed,
new_keywords
};
More information about the dovecot-cvs
mailing list