From e088dbce225e56862a0076ed6465eb217a56a977 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 15 Jun 2001 19:34:54 +0000 Subject: Fixed misuse of an uninitialized variable. 2001-06-15 Jeffrey Stedfast * mail-ops.c (mail_send_message): Fixed misuse of an uninitialized variable. * component-factory.c (destination_folder_handle_drop): Implemented. * mail.h: Added prototype for evolution_folder_info_factory_init. * mail-ops.c (mail_do_transfer_messages): Now takes a const char* as the dest_uri. This works better all around since we strdup'd the string anyway. svn path=/trunk/; revision=10255 --- mail/mail-ops.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index de2a933249..f79857de69 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -501,7 +501,7 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte /* Get information about the account this was composed by. */ acct_header = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account")); - if (header) { + if (acct_header) { const MailConfigAccount *account; account = mail_config_get_account_by_name (acct_header); @@ -900,7 +900,8 @@ struct _transfer_msg { char *dest_uri; }; -static char *transfer_messages_desc(struct _mail_msg *mm, int done) +static char * +transfer_messages_desc (struct _mail_msg *mm, int done) { struct _transfer_msg *m = (struct _transfer_msg *)mm; @@ -909,7 +910,8 @@ static char *transfer_messages_desc(struct _mail_msg *mm, int done) } -static void transfer_messages_transfer(struct _mail_msg *mm) +static void +transfer_messages_transfer (struct _mail_msg *mm) { struct _transfer_msg *m = (struct _transfer_msg *)mm; CamelFolder *dest; @@ -941,7 +943,8 @@ static void transfer_messages_transfer(struct _mail_msg *mm) camel_object_unref((CamelObject *)dest); } -static void transfer_messages_free(struct _mail_msg *mm) +static void +transfer_messages_free (struct _mail_msg *mm) { struct _transfer_msg *m = (struct _transfer_msg *)mm; int i; @@ -964,14 +967,14 @@ static struct _mail_msg_op transfer_messages_op = { void mail_do_transfer_messages (CamelFolder *source, GPtrArray *uids, gboolean delete_from_source, - gchar *dest_uri) + const char *dest_uri) { struct _transfer_msg *m; - + g_return_if_fail (CAMEL_IS_FOLDER (source)); g_return_if_fail (uids != NULL); g_return_if_fail (dest_uri != NULL); - + m = mail_msg_new(&transfer_messages_op, NULL, sizeof(*m)); m->source = source; camel_object_ref((CamelObject *)source); -- cgit