[PATCH] : small clean of mailbox_pop3.c
- From: Emmanuel <e allaud wanadoo fr>
- To: balsa-list gnome org
- Subject: [PATCH] : small clean of mailbox_pop3.c
- Date: Sun, 20 Jan 2002 10:01:57 +0100
Hi all,
hunting for a bug in libbalsa/mailbox_pop3.c I made the few cosmetic
changes that make this patch, but I don't see how this code can cause such
a weird bug :(
Bye
Manu
--- /home/manu/prog/balsa-cvs/balsa/libbalsa/mailbox_pop3.c Sun Jan 6 20:41:09 2002
+++ balsa/libbalsa/mailbox_pop3.c Sun Jan 20 09:57:07 2002
@@ -254,7 +254,7 @@
}
close(tmp_file);
- status = LIBBALSA_MAILBOX_POP3(mailbox)->filter
+ status = m->filter
? libbalsa_fetch_pop_mail_filter (m, progress_cb, uid)
: libbalsa_fetch_pop_mail_direct (m, tmp_path, progress_cb, uid);
@@ -264,14 +264,13 @@
mailbox->name,
pop_get_errstr(status));
- if (LIBBALSA_MAILBOX_POP3(mailbox)->last_popped_uid == NULL ||
- strcmp(LIBBALSA_MAILBOX_POP3(mailbox)->last_popped_uid,
- uid) != 0) {
-
- g_free(LIBBALSA_MAILBOX_POP3(mailbox)->last_popped_uid);
-
- LIBBALSA_MAILBOX_POP3(mailbox)->last_popped_uid =
- g_strdup(uid);
+ if (m->last_popped_uid == NULL)
+ m->last_popped_uid = g_strdup(uid);
+ else
+ if (strcmp(m->last_popped_uid,uid) != 0) {
+ g_free(m->last_popped_uid);
+ m->last_popped_uid = g_strdup(uid);
+ }
#ifdef BALSA_USE_THREADS
threadmsg = g_new(MailThreadMessage, 1);
@@ -300,7 +299,7 @@
#ifdef BALSA_SHOW_ALL
GSList * filters=
- libbalsa_mailbox_filters_when(LIBBALSA_MAILBOX(m)->filters,
+ libbalsa_mailbox_filters_when(mailbox->filters,
FILTER_WHEN_INCOMING);
/* We apply filter if needed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]