* Partially reverted last commit, sometimes the gdk_threads_enter blocks, still...
[modest] / src / modest-tny-account-store.c
index c98b821..46516ac 100644 (file)
@@ -60,7 +60,7 @@
 
 #ifdef MODEST_PLATFORM_MAEMO
 #include <tny-maemo-conic-device.h>
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-note.h>
 #include <hildon-widgets/hildon-banner.h>
 #else
@@ -440,10 +440,7 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc
                if (!*cancel) {
                        /* The password will be returned as the result,
                         * but we need to tell tinymail about the username too: */
-                       /* TODO: This causes a crash because it frees memory that 
-                        * tinymail is already using. tinymail needs to detect the change 
-                        * and stop using the old username: 
-                        * tny_account_set_user (account, username); */
+                       tny_account_set_user (account, username);
                        
                        if (remember) {
                                printf ("%s: Storing username=%s, password=%s\n", 
@@ -1130,7 +1127,7 @@ modest_tny_account_store_get_tny_account_by (ModestTnyAccountStore *self,
                }
                
                if (type == MODEST_TNY_ACCOUNT_STORE_QUERY_URL && 
-                   tny_account_matches_url_string (TNY_ACCOUNT(cursor->data), val)) {
+                   tny_account_matches_url_string (TNY_ACCOUNT(cursor->data), str)) {
                        account = TNY_ACCOUNT (cursor->data);
                        goto end;
                } else {