aboutsummaryrefslogtreecommitdiffstats
path: root/imapsync
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-09-06 21:41:50 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-09-06 21:41:50 +0200
commit0dbf7b6c4e4e6009ecc38d012997d1d209931f81 (patch)
treefe3845f5d032b070942ae78effbada57af3fc184 /imapsync
parent4caed3c9f817cd7ea80cd9050b4346cbc85c94b7 (diff)
parentc80864d8d544dd29c73c47c3911ac0e7993ed59b (diff)
Merge branch 'master' into debian
Diffstat (limited to 'imapsync')
-rwxr-xr-ximapsync12
1 files changed, 6 insertions, 6 deletions
diff --git a/imapsync b/imapsync
index ac63577..a454c5d 100755
--- a/imapsync
+++ b/imapsync
@@ -563,8 +563,8 @@ my $STH_GET_INTERRUPTED_BY_IDX = $DBH->prepare(q{
my $STH_COUNT_MESSAGES = $DBH->prepare(q{SELECT COUNT(*) FROM mapping WHERE idx = ?});
# List last 1024 messages UIDs
-my $STH_LASTUIDs_LOCAL = $DBH->prepare(q{SELECT rUID FROM mapping WHERE idx = ? ORDER BY rUID DESC LIMIT 1024});
-my $STH_LASTUIDs_REMOTE = $DBH->prepare(q{SELECT lUID FROM mapping WHERE idx = ? ORDER BY lUID DESC LIMIT 1024});
+my $STH_LASTUIDs_LOCAL = $DBH->prepare(q{SELECT lUID FROM mapping WHERE idx = ? ORDER BY lUID DESC LIMIT 1024});
+my $STH_LASTUIDs_REMOTE = $DBH->prepare(q{SELECT rUID FROM mapping WHERE idx = ? ORDER BY rUID DESC LIMIT 1024});
# Download some missing UIDs from $source; returns the thew allocated UIDs
@@ -619,10 +619,10 @@ sub delete_mapping($$) {
}
-# Create a sample (UIDs, sequence numbers) to use as 3rd and 4th
-# argument of the QRESYNC parameters to the SELECT command.
+# Create a sample (sequence numbers, UIDs) to use as Message Sequence
+# Match Data for the QRESYNC parameter to the SELECT command.
# QRESYNC [RFC7162] doesn't force the server to remember the MODSEQs of
-# EXPUNGEd messages. By passing a sample of known UIDs/sequence numbers
+# EXPUNGEd messages. By passing a sample of known sequence numbers/UIDs
# we let the server know that the messages have been EXPUNGEd [RFC7162,
# section 3.2.5.2].
# The UID set is the largest set of higest UIDs with at most 1024 UIDs,
@@ -660,7 +660,7 @@ sub sample($$$) {
$uids = ($min == $max ? $min : "$min:$max")
.(defined $uids ? ','.$uids : '');
}
- return ( $uids, ($count - $n + 1).':'.$count );
+ return ( ($count - $n + 1).':'.$count, $uids );
}