[evolution] ** BUGFIX: #584733 - Fixed where account setup to work after Anjal merge



commit f7c4da545938f98cdedd552e50b1dd814050213e
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Tue Jun 9 23:34:11 2009 +0530

    ** BUGFIX: #584733 - Fixed where account setup to work after Anjal merge
    
    	* em-account-editor.c: fixed where a memory corruption, invalid
    	read was happening.
---
 mail/em-account-editor.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index bce0bbb..a9d0fcc 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -1421,7 +1421,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
 			current[len] = 0;
 		}
 	} else {
-		current = (gchar*)"imap";
+		current = (gchar *)"imap";
 	}
 
 	store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
@@ -2687,8 +2687,6 @@ emae_service_complete(EMAccountEditor *emae, EMAccountEditorService *service)
 	if (CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_HOST)) {
 		if (url->host == NULL || url->host[0] == 0)
 			ok = FALSE;
-		else
-			gtk_entry_set_text(service->hostname, url->host);
 	}
 	/* We only need the user if the service needs auth as well, i think */
 	if (ok
@@ -2772,7 +2770,7 @@ emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
 			if (!emae->priv->receive_set) {
 				gchar *user, *at;
 				gint index;
-				gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL);
+				gchar *uri = g_strdup(e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL));
 				CamelURL *url;
 
 				emae->priv->receive_set = 1;
@@ -2801,10 +2799,13 @@ emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
 						camel_url_set_host (url, "");
 					}
 					camel_url_set_user (url, user);
+					g_free (uri);
 					uri = camel_url_to_string(url, 0);
 					e_account_set_string(emae->account, E_ACCOUNT_SOURCE_URL, uri);
 					g_free(uri);
 					camel_url_free(url);
+				} else {
+					g_free(uri);
 				}
 
 			}



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