isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit c333a36aeeb8f6ce6de672c17b83cb1962e2132d
parent 1701e3d84f333533060140f0c8e51dc2bebcade3
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 28 Mar 2015 17:54:23 +0100

Merge branch 'isync_1_1_branch'

Diffstat:
Msrc/drv_imap.c | 7++++---
Msrc/main.c | 2+-
Msrc/mbsyncrc.sample | 4++--
3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -1312,9 +1312,10 @@ imap_socket_read( void *aux ) error( "IMAP error: unexpected reply: %s %s\n", arg, cmd ? cmd : "" ); break; /* this may mean anything, so prefer not to spam the log */ } else if (*arg == '+') { - /* This can happen only with the last command underway, as - it enforces a round-trip. */ - cmdp = ctx->in_progress; + /* There can be any number of commands in flight, but only the last + * one can require a continuation, as it enforces a round-trip. */ + cmdp = (struct imap_cmd *)((char *)ctx->in_progress_append - + offsetof(struct imap_cmd, next)); if (cmdp->param.data) { if (cmdp->param.to_trash) ctx->trashnc = TrashKnown; /* Can't get NO [TRYCREATE] any more. */ diff --git a/src/main.c b/src/main.c @@ -750,7 +750,7 @@ store_opened( store_t *ctx, void *aux ) const char *pat = cpat->string; if (*pat != '!') { char buf[8]; - int bufl = snprintf( buf, sizeof(buf), "%s%s", mvars->chan->boxes[t], pat ); + int bufl = snprintf( buf, sizeof(buf), "%s%s", nz( mvars->chan->boxes[t], "" ), pat ); /* Partial matches like "INB*" or even "*" are not considered, * except implicity when the INBOX lives under Path. */ if (starts_with( buf, bufl, "INBOX", 5 )) { diff --git a/src/mbsyncrc.sample b/src/mbsyncrc.sample @@ -16,11 +16,11 @@ Pass xxxxxxxx # Fetch password from gnome-keyring: #PassCmd "gnome-keyring-query get mail_pw" # Fetch password from .netrc: -#PassCmd "sed -n -e 's,^machine work\.host\.com login tehuser password \(.*\),\1,p' < $HOME/.netrc" +#PassCmd "sed -n -e 's,^machine work\\.host\\.com login tehuser password \\(.*\\),\\1,p' < $HOME/.netrc" # Fetch password from a gpg-encrypted file: #PassCmd "gpg --quiet --for-your-eyes-only --decrypt $HOME/imappassword.gpg" # Fetch password from pwmd (http://pwmd.sourceforge.net/): -#PassCmd "echo -ne 'GET myIsp\tpassword' | pwmc datafile" +#PassCmd "echo -ne 'GET myIsp\\tpassword' | pwmc datafile" # On Mac OS X, run "KeyChain Access" -- File->New Password Item. Fill out form using # "Keychain Item Name" http://IMAPSERVER (note: the "http://" is a hack) # "Account Name" USERNAME