From: Thomas Roessler Date: Thu, 17 Aug 2000 06:03:59 +0000 (+0000) Subject: Random cleanup from Brendan Cully. X-Git-Tag: mutt-1-3-8-rel~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44125f214779591ba7f8f0792764d7c327e71a57;p=mutt Random cleanup from Brendan Cully. --- diff --git a/doc/Makefile.in b/doc/Makefile.in index 12596f42..cec97cc7 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -77,7 +77,7 @@ install: all $(INSTALL) -m 644 $(srcdir)/dotlock.man \ $(DESTDIR)$(mandir)/man1/mutt_dotlock.1 $(INSTALL) -m 644 muttrc.man $(DESTDIR)$(mandir)/man5/muttrc.5 - $(INSTALL) -m 644 mbox.man $(DESTDIR)$(mandir)/man5/mbox.5 + $(INSTALL) -m 644 $(srcdir)/mbox.man $(DESTDIR)$(mandir)/man5/mbox.5 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir) for f in $(srcdir_DOCFILES) ; do \ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \ diff --git a/imap/Makefile.am b/imap/Makefile.am index a911991d..2321cb60 100644 --- a/imap/Makefile.am +++ b/imap/Makefile.am @@ -9,9 +9,9 @@ GSSSOURCES = auth_gss.c endif if USE_SASL -AUTHENTICATORS = auth_sasl.c $(GSSSOURCES) +AUTHENTICATORS = auth_sasl.c else -AUTHENTICATORS = auth_anon.c auth_cram.c md5c.c $(GSSSOURCES) +AUTHENTICATORS = auth_anon.c auth_cram.c md5c.c endif if USE_SSL @@ -28,5 +28,5 @@ noinst_LIBRARIES = libimap.a noinst_HEADERS = auth.h imap_private.h md5.h message.h $(SSLHEADERS) libimap_a_SOURCES = auth.c auth_login.c browse.c command.c imap.c imap.h \ - message.c utf7.c util.c $(AUTHENTICATORS) $(SSLSOURCES) + message.c utf7.c util.c $(AUTHENTICATORS) $(SSLSOURCES) $(GSSSOURCES) diff --git a/mutt_socket.c b/mutt_socket.c index bc39fdf6..1379d2b7 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -51,7 +51,11 @@ int mutt_socket_close (CONNECTION* conn) { int rc; - rc = conn->close (conn); + if (conn->fd < 0) + dprint (1, (debugfile, "mutt_socket_close: Attempt to close closed connection.\n")); + else + rc = conn->close (conn); + conn->fd = -1; return rc; diff --git a/mx.c b/mx.c index 8106137b..45f3986d 100644 --- a/mx.c +++ b/mx.c @@ -1037,6 +1037,7 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint) { int rc, i; int purge = 1; + int msgcount, deleted; if (ctx->dontwrite) { @@ -1087,6 +1088,11 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint) } } + /* really only for IMAP - imap_sync_mailbox results in a call to + * mx_update_tables, so ctx->deleted is 0 when it comes back */ + msgcount = ctx->msgcount; + deleted = ctx->deleted; + #ifdef USE_IMAP if (ctx->magic == M_IMAP) rc = imap_sync_mailbox (ctx, purge, index_hint); @@ -1097,11 +1103,11 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint) { #ifdef USE_IMAP if (ctx->magic == M_IMAP && !purge) - mutt_message (_("Mailbox checkpointed."), ctx->msgcount); + mutt_message _("Mailbox checkpointed."); else #endif - mutt_message (_("%d kept, %d deleted."), ctx->msgcount - ctx->deleted, - ctx->deleted); + mutt_message (_("%d kept, %d deleted."), msgcount - deleted, + deleted); sleep (1); /* allow the user time to read the message */