Skipped 7 existing revision(s) on branch 'master'.
commit 71ced65fccb51d9ad42a248b8ac5dedb0defdeca
Merge: 77acc26 62808c9
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Apr 1 20:31:51 2017 +0200
Merge remote-tracking branch 'origin/1.2'
Conflicts:
src/sync.c
src/driver.h | 4 ++--
src/drv_imap.c | 14 +++++++++++++-
src/run-tests.pl | 4 ++--
src/sync.c | 4 +++-
4 files changed, 20 insertions(+), 6 deletions(-)
diff --cc src/driver.h
index a97c231,3b3ae1b..547fe5a
--- a/src/driver.h
+++ b/src/driver.h
@@@ -63,9 -63,8 +63,9 @@@ typedef struct store_conf
typedef struct message {
struct message *next;
struct sync_rec *srec;
+ char *msgid; /* owned */
/* string_list_t *keywords; */
- size_t size; /* zero implies "not fetched" */
+ int size; /* zero implies "not fetched" */
int uid;
uchar flags, status;
char tuid[TUIDL];
diff --cc src/sync.c
index eb48dc5,485e419..3f30d94
--- a/src/sync.c
+++ b/src/sync.c
@@@ -1409,7 -1371,7 +1411,7 @@@ box_loaded( int sts, void *aux
uid = tmsg->uid;
if (DFlags & DEBUG_SYNC) {
make_flags( tmsg->flags, fbuf );
- printf( tmsg->size ? " message %5d, %-4s, %6lu: " : "
message %5d, %-4s: ", uid, fbuf, tmsg->size );
- printf( svars->ctx[t]->opts & OPEN_SIZE ? " message
%5d, %-4s, %6d: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size );
++ printf( tmsg->size ? " message %5d, %-4s, %6d: " : "
message %5d, %-4s: ", uid, fbuf, tmsg->size );
}
idx = (uint)((uint)uid * 1103515245U) % hashsz;
while (srecmap[idx].uid) {
===== Full diff against 1st parent =====
diff --git a/src/driver.h b/src/driver.h
index a97c231..547fe5a 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -39,7 +39,7 @@ typedef struct store_conf {
const char *flat_delim;
const char *map_inbox;
const char *trash;
- uint max_size; /* off_t is overkill */
+ int max_size; /* off_t is overkill */
char trash_remote_new, trash_only_new;
} store_conf_t;
@@ -65,7 +65,7 @@ typedef struct message {
struct sync_rec *srec;
char *msgid; /* owned */
/* string_list_t *keywords; */
- size_t size; /* zero implies "not fetched" */
+ int size; /* zero implies "not fetched" */
int uid;
uchar flags, status;
char tuid[TUIDL];
diff --git a/src/drv_imap.c b/src/drv_imap.c
index e24c7d8..e89cea2 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -304,6 +304,12 @@ send_imap_cmd( imap_store_t *ctx, struct imap_cmd *cmd )
iov[0].len = bufl;
iov[0].takeOwn = KeepOwn;
if (litplus) {
+ if (DFlags & DEBUG_NET_ALL) {
+ printf( "%s>>>>>>>>>\n", ctx->label );
+ fwrite( cmd->param.data, cmd->param.data_len, 1, stdout
);
+ printf( "%s>>>>>>>>>\n", ctx->label );
+ fflush( stdout );
+ }
iov[1].buf = cmd->param.data;
iov[1].len = cmd->param.data_len;
iov[1].takeOwn = GiveOwn;
@@ -1363,6 +1369,12 @@ imap_socket_read( void *aux )
if (cmdp->param.data) {
if (cmdp->param.to_trash)
ctx->trashnc = TrashKnown; /* Can't get
NO [TRYCREATE] any more. */
+ if (DFlags & DEBUG_NET_ALL) {
+ printf( "%s>>>>>>>>>\n", ctx->label );
+ fwrite( cmdp->param.data,
cmdp->param.data_len, 1, stdout );
+ printf( "%s>>>>>>>>>\n", ctx->label );
+ fflush( stdout );
+ }
iov[0].buf = cmdp->param.data;
iov[0].len = cmdp->param.data_len;
iov[0].takeOwn = GiveOwn;
@@ -2715,7 +2727,7 @@ imap_find_new_msgs_p2( imap_store_t *ctx, struct imap_cmd
*gcmd, int response )
}
INIT_IMAP_CMD(imap_cmd_simple, cmd, cmdp->gen.callback,
cmdp->gen.callback_aux)
imap_exec( (imap_store_t *)ctx, &cmd->gen, imap_done_simple_box,
- "UID FETCH %d:1000000000 (UID BODY.PEEK[HEADER.FIELDS
(X-TUID)])", cmdp->uid );
+ "UID FETCH %d:" stringify(INT_MAX) " (UID
BODY.PEEK[HEADER.FIELDS (X-TUID)])", cmdp->uid );
}
/******************* imap_list_store *******************/
diff --git a/src/run-tests.pl b/src/run-tests.pl
index 7c7d3fd..d1121c5 100755
--- a/src/run-tests.pl
+++ b/src/run-tests.pl
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+use warnings;
use strict;
use File::Path;
@@ -222,7 +223,7 @@ my @X51 = (
[ 6, 3, 0,
2, 2, "FS", 4, 4, "", 5, 5, "", 6, 6, "" ],
);
-test("max messages + expire", \@x50, \@X51, @O51);
+test("max messages + expunge", \@x50, \@X51, @O51);
################################################################################
@@ -603,7 +604,6 @@ sub printstate(@)
print shift(@t).", ".shift(@t).", \"".shift(@t)."\"";
}
print " ],\n";
- close FILE;
}
# \@chan_state
diff --git a/src/sync.c b/src/sync.c
index eb48dc5..3f30d94 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1396,6 +1396,8 @@ box_loaded( int sts, void *aux )
if (srec->status & S_DEAD)
continue;
uid = srec->uid[t];
+ if (uid <= 0)
+ continue;
idx = (uint)((uint)uid * 1103515245U) % hashsz;
while (srecmap[idx].uid)
if (++idx == hashsz)
@@ -1409,7 +1411,7 @@ box_loaded( int sts, void *aux )
uid = tmsg->uid;
if (DFlags & DEBUG_SYNC) {
make_flags( tmsg->flags, fbuf );
- printf( tmsg->size ? " message %5d, %-4s, %6lu: " : "
message %5d, %-4s: ", uid, fbuf, tmsg->size );
+ printf( tmsg->size ? " message %5d, %-4s, %6d: " : "
message %5d, %-4s: ", uid, fbuf, tmsg->size );
}
idx = (uint)((uint)uid * 1103515245U) % hashsz;
while (srecmap[idx].uid) {
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel