<<< Date Index >>>     <<< Thread Index >>>

[PATCH] remove obsolete/unused/broken function imap_close_connection



Hello together,
this patch is - as usual - against CVS head and removes the broken,
unused and of course obsoelte function imap_close_connection. I hit on
it while tracking the previous imap memleaks.

        Thomas
diff -Nru a/imap/imap.c b/imap/imap.c
--- a/imap/imap.c       2004-08-10 10:38:23 +02:00
+++ b/imap/imap.c       2004-08-10 10:38:23 +02:00
@@ -780,22 +780,6 @@
     ;
 }
 
-int imap_close_connection (CONTEXT *ctx)
-{
-  dprint (1, (debugfile, "imap_close_connection(): closing connection\n"));
-  /* if the server didn't shut down on us, close the connection gracefully */
-  if (CTX_DATA->status != IMAP_BYE)
-  {
-    mutt_message _("Closing connection to IMAP server...");
-    imap_logout (CTX_DATA);
-    mutt_clear_error ();
-  }
-  mutt_socket_close (CTX_DATA->conn);
-  CTX_DATA->state = IMAP_DISCONNECTED;
-  CTX_DATA->conn->data = NULL;
-  return 0;
-}
-
 /* imap_set_flag: append str to flags if we currently have permission
  *   according to aclbit */
 static void imap_set_flag (IMAP_DATA* idata, int aclbit, int flag,
diff -Nru a/imap/imap.h b/imap/imap.h
--- a/imap/imap.h       2004-08-10 10:38:23 +02:00
+++ b/imap/imap.h       2004-08-10 10:38:23 +02:00
@@ -34,7 +34,6 @@
 /* imap.c */
 int imap_access (const char*, int);
 int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force);
-int imap_close_connection (CONTEXT *ctx);
 int imap_delete_mailbox (CONTEXT* idata, IMAP_MBOX mx);
 int imap_open_mailbox (CONTEXT *ctx);
 int imap_open_mailbox_append (CONTEXT *ctx);