Эх сурвалжийг харах

Merge branch 'isync_1_1_branch'

Oswald Buddenhagen 10 жил өмнө
parent
commit
c333a36aee
3 өөрчлөгдсөн 7 нэмэгдсэн , 6 устгасан
  1. 4 3
      src/drv_imap.c
  2. 1 1
      src/main.c
  3. 2 2
      src/mbsyncrc.sample

+ 4 - 3
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. */

+ 1 - 1
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 )) {

+ 2 - 2
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