aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog12
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c16
2 files changed, 19 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 219209bd82..2f331d6696 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,6 +1,18 @@
2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
* providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
+ Modify to take a headers_only argument which will then only fetch
+ message headers.
+ (pop3_generate_uids): Pass in TRUE for headers_only.
+ (pop3_get_message): Pass in FALSE for headers_only and move the
+ camel_operation() stuff out of get_message_stream and in to here
+ instead.
+ (pop3_generate_uids): We also need to be using i+ 1 as the id
+ since we are starting at 0.
+
+2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
New internal function to get a message stream by message sequence
id (so that we can share code between pop3_get_message and
pop3_generate_uids).
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 2648a48a5b..c8dc315ac3 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -52,7 +52,7 @@ static void pop3_sync (CamelFolder *folder, gboolean expunge,
static gint pop3_get_message_count (CamelFolder *folder);
static GPtrArray *pop3_get_uids (CamelFolder *folder);
static CamelStreamMem *pop3_get_message_stream (CamelFolder *folder, int id,
- CamelException *ex);
+ gboolean headers_only, CamelException *ex);
static CamelMimeMessage *pop3_get_message (CamelFolder *folder,
const char *uid,
CamelException *ex);
@@ -159,7 +159,7 @@ pop3_generate_uids (CamelFolder *folder, int count, CamelException *ex)
guchar digest[16];
char *uid;
- stream = pop3_get_message_stream (folder, i, ex);
+ stream = pop3_get_message_stream (folder, i + 1, TRUE, ex);
if (stream == NULL)
goto exception;
@@ -317,16 +317,14 @@ uid_to_number (CamelPop3Folder *pop3_folder, const char *uid)
}
static CamelStreamMem *
-pop3_get_message_stream (CamelFolder *folder, int id, CamelException *ex)
+pop3_get_message_stream (CamelFolder *folder, int id, gboolean headers_only, CamelException *ex)
{
CamelStream *stream;
char *result, *body;
int status, total;
- camel_operation_start_transient (NULL, _("Retrieving POP message %d"), id);
-
status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
- &result, ex, "RETR %d", id);
+ &result, ex, headers_only ? "TOP %d 0" : "RETR %d", id);
switch (status) {
case CAMEL_POP3_ERR:
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
@@ -356,8 +354,6 @@ pop3_get_message_stream (CamelFolder *folder, int id, CamelException *ex)
stream = camel_stream_mem_new_with_buffer (body, strlen (body));
g_free (body);
- camel_operation_end (NULL);
-
return CAMEL_STREAM_MEM (stream);
}
@@ -375,7 +371,9 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
return NULL;
}
- stream = pop3_get_message_stream (folder, id, ex);
+ camel_operation_start_transient (NULL, _("Retrieving POP message %d"), id);
+ stream = pop3_get_message_stream (folder, id, FALSE, ex);
+ camel_operation_end (NULL);
if (stream == NULL)
return NULL;
/a>araujo2012-05-282-3/+3 * - Update to 1.2.9sylvio2012-05-263-14/+3 * Fix brokenness caused by graphics/xpdf r1.102.cy2012-05-251-3/+5 * KDE/FreeBSD team presents long awaited KDE SC 4.8.3!makc2012-05-255-15/+9 * Chase PyQT updatemakc2012-05-252-1/+2 * - Mark BROKEN: xpdf port no longer installs anything under bin/pav2012-05-241-0/+2 * - Update to version 4miwi2012-05-224-52/+31 * - Update to 2.0.1jgh2012-05-225-134/+28 * - Update texinfo to latest version (16 May)johans2012-05-212-5/+6 * Remove the auto-check dependency and able to use OPTIONS now.mezz2012-05-211-8/+3 * Mark IGNORE with php 5.4 and set 5.3 as default.ale2012-05-201-1/+2 * This is a beginning-of-page hook for LaTeX.pawel2012-05-194-0/+54 * The examplep LaTeX package provides sophisticated featurespawel2012-05-194-0/+58 * Remove expired unmaintained ports:rene2012-05-189-149/+0 * - Update to 1.0.3miwi2012-05-172-5/+4 * Fix for PHP 5.4.ale2012-05-162-0/+45 * - Update to 1.4.1sylvio2012-05-163-325/+663 * Update autoconf to 2.69 and automake to 1.12ade2012-05-121-0/+3 * - Follow the upstream change for the download location [1]rene2012-05-091-3/+3 * - Update to 1.2.18nivit2012-05-032-4/+9 * Add missing run dependency on ghostscriptpawel2012-04-281-1/+2 * Update to 4.2.0 .nox2012-04-252-3/+3 * - Update to 4.31jgh2012-04-213-11/+18 * No more used in the ports tree, no more upstreambapt2012-04-191-0/+3 * - Remove MD5.araujo2012-04-181-1/+0 * - Update to 6.6.9.araujo2012-04-152-6/+6 * Mark as deprecated and set expiration to 2012-05-10 for ports that are mark a...bapt2012-04-101-0/+3 * Fix build. FT_BRIDGE=1 no longer needs FT_* variables, and the freetypehrs2012-04-071-13/+2 * Fix ghostscript 9 runtime. By adding 2 upstream commits.kwm2012-04-072-0/+102 * Update to latest texinfo.tex and texi2dvi versions (6 April)johans2012-04-072-6/+5 * Update to 2.4.9.kwm2012-04-072-3/+3 * - Reassign to the heaptabthorpe2012-04-031-1/+1 * Add a patch to allow specifying remote printer by IP-address, rathermi2012-04-034-7/+25 * Mark as broken: it overwrites files owned by one of its dependenciesbapt2012-04-021-0/+1 * - Update to 0.6.1wen2012-04-012-3/+3 * Stop installing empty ppd files due to a forgotten " ; \" in the upstreamcrees2012-03-222-14/+15 * Update to 2.0.3rakuco2012-03-215-184/+15 * - rename broken option DNSSD to AVAHIdinoex2012-03-202-5/+17 * - Update to 2.4.9miwi2012-03-182-4/+4 * Fix MASTERDIR.hrs2012-03-181-1/+1 * Add etc/papersize.{a4,letter}.hrs2012-03-172-0/+12 * Use libpaper for default paper size configuration. It is no longer hardcodedhrs2012-03-171-2/+7 * Add print/papersize-default-{a4,letter}, which install default paper sizehrs2012-03-175-0/+51 * - Set / Update Portscout flagsmiwi2012-03-171-1/+3 * Policy "at_console" work in Linux, but don't work in FreeBSD so changed itmezz2012-03-142-1/+11 * - Revert ports/165605 as requested by portmgr@pgollucci2012-03-142-2/+16 * - Update to 1.9.61sunpoet2012-03-122-3/+3 * - Remove ports that only work with < perl 5.12 (devel/p5-B-Size, devel/p5-Dev...pgollucci2012-03-092-16/+2 * Update MASTER_SITESak2012-03-041-1/+3 * Update maintainer email in my portsak2012-03-031-1/+1 * Disable libpaper by default because it can override the A4SIZE optionhrs2012-02-291-4/+10 * Take maintainership.hrs2012-02-291-1/+1 * - Remove .aux and .log files in PORTDOCS.hrs2012-02-292-11/+4 * Fix implicit dependency.hrs2012-02-291-0/+5 * Mark BROKEN: does not build with gifliberwin2012-02-281-0/+2 * Return maintainership back to poolmm2012-02-261-1/+1 * - Switch from libungif to giflib to avoid conflictswills2012-02-261-1/+1 * - Update to 0.5.6wen2012-02-252-3/+3 * - Chase Emacs updatesashish2012-02-221-1/+1 * - build with giflibdinoex2012-02-211-1/+2 * - Mark MAKE_JOBS_UNSAFE since this failed with MAKE_JOBS for meswills2012-02-211-0/+1 * - fix build for FreeBSD 7.xdinoex2012-02-201-0/+6 * - Switch to giflibswills2012-02-201-2/+2 * - Update to version 1.0b7miwi2012-02-206-74/+54 * - replace `YES' with `yes' in USE_PYTHON/USE_PYDISTUTILS (mostly)rm2012-02-191-5/+5 * Update to 3.12.2makc2012-02-193-3/+9 * - add USE_ICONV to cups-clientdinoex2012-02-171-0/+3 * - Bump PORTREVISION to chase the update of multimedia/libvpxashish2012-02-163-0/+3 * Update mime and desktop databases via @exec and @unexec at pkg-plist.bsam2012-02-162-0/+5 * Update to version 1.4.0. The new version uses QT4.bsam2012-02-157-750/+2220 * Fix build on systems which already have graphics/openjpeg in LOCALBASE.hrs2012-02-142-3/+5 * - update to 1.5.2dinoex2012-02-141-1/+1 * - update to 1.5.2dinoex2012-02-144-38/+161 * Fix a URL in MASTER_SITES.hrs2012-02-132-2/+2 * - Please welcome GHC 7.0.4pgj2012-02-132-2/+2 * Add missing patches. This should fix build on !amd64 platforms.hrs2012-02-135-2/+44 * - Update MASTER_SITES.hrs2012-02-133-7/+15 * Update to 9.05. Changes include:hrs2012-02-1311-144/+105 * - convert to using PYTHON_SITELIBDIR (non-functional change)rm2012-02-131-2/+2 * Update to 0.23.1makc2012-02-093-13/+20 * Remove whitespace after b.p.m to help reduce false postives when searching fo...eadler2012-02-081-1/+0 * The variable is USE_PERL5 not USE_PERLeadler2012-02-072-2/+2 * Upgrade to 1.7.thierry2012-02-063-111/+108 * - update maintainer addressjgh2012-02-051-1/+1 * Add the last two ports I added to buildeadler2012-02-041-0/+1 * pdfcolorsplit - a Python program that drives pdftk to split a PDF file intoeadler2012-02-043-0/+42 * Add a .desktop file for the port. An upstream version will show up in the 2.1.xrakuco2012-01-293-0/+31 * The KDE/FreeBSD team is pleased to announce KDE SC 4.7.4, whichavilla2012-01-252-1/+13 * Create a missing directory for the manual page in the German and French version.hrs2012-01-24