PATCH: Use already existing URL for IMAP sentbox



This patch does not add any functionality, but will simplify adding IMAPS
support - instead of creating the IMAP Sentbox URL "by hand" it takes
advantage of the already existing functionality of the LibBalsaMailboxImap
object.


--- libbalsa/send.c.orig	Wed Aug 15 20:54:36 2001
+++ libbalsa/send.c	Wed Aug 15 21:01:55 2001
@@ -283,9 +283,7 @@
 		       LibBalsaMailbox * fccbox, gint encoding)
 {
     MessageQueueItem *mqi;
-    LibBalsaMailboxImap *imapfccbox;
     LibBalsaServer *server;
-    char imappath[_POSIX_PATH_MAX];
 
 
     g_return_if_fail(message);
@@ -305,7 +303,6 @@
 	    mutt_write_fcc(libbalsa_mailbox_local_get_path(fccbox),
 			   mqi->message, NULL, 0, NULL);
 	    } else if (LIBBALSA_IS_MAILBOX_IMAP(fccbox)) {
-		imapfccbox = LIBBALSA_MAILBOX_IMAP(fccbox);
 		server = LIBBALSA_MAILBOX_REMOTE(fccbox)->server;
 		if(!CLIENT_CONTEXT_OPEN(fccbox)) /* Has not been opened */
 		{
@@ -329,11 +326,7 @@
 
 		/* Passwords are guaranteed to be set now */
 
-		snprintf(imappath, _POSIX_PATH_MAX, "{%s:%d}%s",
-		    server->host,
-		    server->port,
-		    imapfccbox->path);
-		mutt_write_fcc(imappath,
+		mutt_write_fcc(LIBBALSA_MAILBOX(fccbox)->url,
 			   mqi->message, NULL, 0, NULL);
 	    }
 	    libbalsa_unlock_mutt();


-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]