From 8f4301b504a52104bf00e2b8faa901196fdc8b95 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Mon, 26 Jul 2004 20:25:04 +0000 Subject: [PATCH] Fix uidl-file parsing when not in new format --- ChangeLog.claws | 6 ++++++ PATCHSETS | 1 + configure.ac | 2 +- src/pop.c | 16 +++++++++++----- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 00f350c85..178288c01 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2004-07-26 [colin] 0.9.12cvs35 + + * src/pop.c + Fix uidl-file parsing when not in new + format + 2004-07-19 [colin] 0.9.12cvs34 * src/compose.c diff --git a/PATCHSETS b/PATCHSETS index 5ec01a7b3..daf2f39ae 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -21,3 +21,4 @@ ( cvs diff -u -r 1.64 -r 1.65 src/pop.c; ) > 0.9.12cvs32.patchset ( cvs diff -u -r 1.106 -r 1.107 src/folder.h; cvs diff -u -r 1.244 -r 1.245 src/folderview.c; cvs diff -u -r 1.440 -r 1.441 src/summaryview.c; ) > 0.9.12cvs33.patchset ( cvs diff -u -r 1.430 -r 1.431 src/compose.c; ) > 0.9.12cvs34.patchset +( cvs diff -u -r 1.65 -r 1.66 src/pop.c; ) > 0.9.12cvs35.patchset diff --git a/configure.ac b/configure.ac index 4558f645f..611a58875 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=12 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=34 +EXTRA_VERSION=35 EXTRA_RELEASE= if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then diff --git a/src/pop.c b/src/pop.c index 89905c49c..92975549c 100644 --- a/src/pop.c +++ b/src/pop.c @@ -583,13 +583,19 @@ void pop3_get_uidl_table(PrefsAccount *ac_prefs, Pop3Session *session) recv_time = RECV_TIME_NONE; partial_recv = POP3_TOTALLY_RECEIVED; - if (sscanf(buf, "%s\t%ld\t%s", uidl, &recv_time, &tmp) < 2) { - if (sscanf(buf, "%s", uidl) != 1) - continue; - else { - recv_time = now; + if (sscanf(buf, "%s\t%ld\t%s", uidl, &recv_time, &tmp) < 3) { + if (sscanf(buf, "%s\t%ld", uidl, &recv_time) != 2) { + if (sscanf(buf, "%s", uidl) != 1) + continue; + else { + recv_time = now; + strcpy(tmp, "0"); + } + } else { + strcpy(tmp, "0"); } } + if (recv_time == RECV_TIME_NONE) recv_time = RECV_TIME_RECEIVED; g_hash_table_insert(table, g_strdup(uidl), -- 2.25.1