aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c2
-rw-r--r--camel/providers/pop3/camel-pop3-store.c14
3 files changed, 11 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index ec92beaee2..ce8fbb2673 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
+ Set the total bytes expected to 0 if the response is empty too.
+
* camel-mime-utils.c (header_raw_check_mailing_list): regfree the
pattern before continue'ing. This was showing up quite a bit under
purify.
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index c8dc315ac3..8258114585 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -336,7 +336,7 @@ pop3_get_message_stream (CamelFolder *folder, int id, gboolean headers_only, Cam
return NULL;
}
- if (result && sscanf (result, "%d", &total) != 1)
+ if (!result || (result && sscanf (result, "%d", &total) != 1))
total = 0;
g_free (result);
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 5c94c13fce..fecfd0ba77 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -528,11 +528,11 @@ camel_pop3_command (CamelPop3Store *store, char **ret, CamelException *ex, char
{
char *cmdbuf;
va_list ap;
-
+
va_start (ap, fmt);
cmdbuf = g_strdup_vprintf (fmt, ap);
va_end (ap);
-
+
/* Send the command */
if (camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex, "%s\r\n", cmdbuf) < 0) {
g_free (cmdbuf);
@@ -541,7 +541,7 @@ camel_pop3_command (CamelPop3Store *store, char **ret, CamelException *ex, char
return CAMEL_POP3_FAIL;
}
g_free (cmdbuf);
-
+
return pop3_get_response (store, ret, ex);
}
@@ -550,20 +550,20 @@ pop3_get_response (CamelPop3Store *store, char **ret, CamelException *ex)
{
char *respbuf;
int status;
-
+
if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &respbuf, ex) < 0) {
if (ret)
*ret = NULL;
return CAMEL_POP3_FAIL;
}
-
+
if (!strncmp (respbuf, "+OK", 3))
status = CAMEL_POP3_OK;
else if (!strncmp (respbuf, "-ERR", 4))
status = CAMEL_POP3_ERR;
else
status = CAMEL_POP3_FAIL;
-
+
if (ret) {
if (status != CAMEL_POP3_FAIL) {
*ret = strchr (respbuf, ' ');
@@ -573,7 +573,7 @@ pop3_get_response (CamelPop3Store *store, char **ret, CamelException *ex)
*ret = NULL;
}
g_free (respbuf);
-
+
return status;
}