summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-client/gbuffy/files')
-rw-r--r--mail-client/gbuffy/files/digest-gbuffy-0.2.6-r13
-rw-r--r--mail-client/gbuffy/files/gbuffy-1.patch23
-rw-r--r--mail-client/gbuffy/files/gbuffy-search-3.patch111
3 files changed, 137 insertions, 0 deletions
diff --git a/mail-client/gbuffy/files/digest-gbuffy-0.2.6-r1 b/mail-client/gbuffy/files/digest-gbuffy-0.2.6-r1
new file mode 100644
index 000000000000..59bdeeb70dff
--- /dev/null
+++ b/mail-client/gbuffy/files/digest-gbuffy-0.2.6-r1
@@ -0,0 +1,3 @@
+MD5 e56ac9ac248bd6eee1b96543b8f921fc gbuffy-0.2.6.tar.gz 87486
+RMD160 939e5a94d2f25c12ce71217ee1f923d6c2270756 gbuffy-0.2.6.tar.gz 87486
+SHA256 56f0832cfdc93cbb6c91454a4c79774ae86b31dfdd2c182dfa88b32d1f0d3440 gbuffy-0.2.6.tar.gz 87486
diff --git a/mail-client/gbuffy/files/gbuffy-1.patch b/mail-client/gbuffy/files/gbuffy-1.patch
new file mode 100644
index 000000000000..4b8b8f2e0833
--- /dev/null
+++ b/mail-client/gbuffy/files/gbuffy-1.patch
@@ -0,0 +1,23 @@
+diff -ur gbuffy-0.2.6/imap.c gbuffy-tinker/imap.c
+--- gbuffy-0.2.6/imap.c 2003-10-10 11:06:53.000000000 +0200
++++ gbuffy-tinker/imap.c 2005-03-16 12:56:10.000000000 +0100
+@@ -437,7 +437,7 @@
+
+ /* Open mailbox (EXAMINE) and find the first UNSEEN message */
+ imap_make_sequence (seq, sizeof (seq));
+- snprintf (buf, sizeof (buf), "%s EXAMINE %s\r\n", seq, ibox->path);
++ snprintf (buf, sizeof (buf), "%s EXAMINE \"%s\"\r\n", seq, ibox->path);
+ msocket_write (conn, buf);
+
+ do
+@@ -529,7 +529,7 @@
+ * think we want that, so use UNSEEN instead */
+ /* Go back to using RECENT, as it shouldn't be updated on EXAMINE */
+ imap_make_sequence (seq, sizeof (seq));
+- snprintf (buf, sizeof (buf), "%s STATUS %s (MESSAGES RECENT)\r\n", seq,
++ snprintf (buf, sizeof (buf), "%s STATUS \"%s\" (MESSAGES RECENT)\r\n", seq,
+ ibox->path);
+
+ msocket_write (conn, buf);
+
+
diff --git a/mail-client/gbuffy/files/gbuffy-search-3.patch b/mail-client/gbuffy/files/gbuffy-search-3.patch
new file mode 100644
index 000000000000..124546871592
--- /dev/null
+++ b/mail-client/gbuffy/files/gbuffy-search-3.patch
@@ -0,0 +1,111 @@
+--- imap.c.old 2006-01-23 13:07:04.000000000 +0100
++++ imap.c 2006-01-23 13:45:14.000000000 +0100
+@@ -310,13 +310,8 @@
+ }
+ #endif
+
+-/* Ok, now fetch all the headers from the first UNSEEN through the
+- * end of the mailbox. This could be lower bandwidth (maybe) by first
+- * fetching all of the flags, and then only fetching the headers of
+- * the messages which are new, but there is a lot of protocol crap
+- * which would probably negate the lower bandwidth */
+-static int parse_fetch (BOX_INFO *ibox, CONNECTION *conn, GList *headers,
+- int unseen)
++/* Ok, now fetch all the headers from the supplied range */
++static int parse_fetch_range (CONNECTION *conn, GList *headers, char *range)
+ {
+ char from[LONG_STRING] = "";
+ char subject[LONG_STRING] = "";
+@@ -328,7 +323,7 @@
+
+
+ imap_make_sequence (seq, sizeof (seq));
+- snprintf (buf, sizeof (buf), "%s FETCH %d:%d (FLAGS BODY.PEEK[HEADER.FIELDS (FROM SUBJECT X-FACE)])\r\n", seq, unseen, ibox->num_messages);
++ snprintf (buf, sizeof (buf), "%s FETCH %s (FLAGS BODY.PEEK[HEADER.FIELDS (FROM SUBJECT X-FACE)])\r\n", seq, range);
+ msocket_write (conn, buf);
+
+ do
+@@ -428,6 +423,83 @@
+ return 0;
+ }
+
++/* Fetch only recent unseen information, since X-Face is unlikely to be cached
++ * and any mailbox with multiple threads may have people reading sub-ranges,
++ * leaving large gaps in the sequence range. */
++static int parse_fetch (BOX_INFO *ibox, CONNECTION *conn, GList *headers,
++ int unseen)
++{
++ char buf[LONG_STRING];
++ char seq[8];
++ char *s, *t, *commacopy, csave;
++ size_t len, slen, tlen;
++ int ret, line;
++
++ imap_make_sequence (seq, sizeof (seq));
++ snprintf (buf, sizeof (buf), "%s SEARCH RECENT UNSEEN\r\n", seq);
++ msocket_write (conn, buf);
++
++ commacopy = NULL;
++ do
++ {
++ if (msocket_read_line_d (buf, sizeof (buf), conn) < 0)
++ {
++ conn->uses = 0;
++ return (-1);
++ }
++ line = 1;
++
++ while (line--)
++ {
++ if (buf[0] != '*')
++ continue;
++
++ s = imap_next_word (buf);
++ if (strncasecmp ("SEARCH", s, 6) != 0)
++ continue;
++ s = imap_next_word (s);
++
++ t = s + strcspn (s, "\r\n");
++ csave = *t;
++ *t = '\0';
++
++ if (commacopy)
++ {
++ len = strlen (commacopy);
++ slen = strlen (s);
++ tlen = len + slen + 2;
++ safe_realloc ((void **) &commacopy, tlen);
++ commacopy[len] = ' ';
++ strfcpy (commacopy + len + 1, s, slen);
++ }
++ else
++ commacopy = safe_strdup (s);
++
++ *t = csave;
++ t += strspn (t, "\r\n");
++ if (*t != '\0')
++ ++line;
++ }
++ }
++ while ((strncmp (buf, seq, SEQLEN) != 0));
++
++ s = commacopy;
++ /* First character guaranteed not whitespace by imap_next_word */
++ while (*++s)
++ {
++ if (isspace(*s))
++ *s = ',';
++ }
++ while (*--s == ',')
++ *s = '\0';
++
++ ret = parse_fetch_range (conn, headers, commacopy);
++
++ safe_free ((void **) &commacopy);
++
++ return ret;
++}
++
+ static int imap_fetch_new_headers (BOX_INFO *ibox, CONNECTION *conn, GList *headers)
+ {
+ char buf[LONG_STRING];