X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-account-store.c;h=e46ca556f239c49a04e24b71eddf85a1faf24f69;hp=d814bda0ecd495cff17adf31d6efd2d76d0f355b;hb=9ab3f9d0057226978b1ad756f37f84f8bff2fc5e;hpb=cbc98357b375f5408397e7b870d231dbcf922b93 diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index d814bda..e46ca55 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -852,7 +852,11 @@ modest_tny_account_store_finalize (GObject *obj) gboolean volume_path_is_mounted (const gchar* path) { + g_return_val_if_fail (path, FALSE); + gboolean result = FALSE; + gchar * path_as_uri = g_filename_to_uri (path, NULL, NULL); + g_return_val_if_fail (path_as_uri, FALSE); /* Get the monitor singleton: */ GnomeVFSVolumeMonitor *monitor = gnome_vfs_get_volume_monitor(); @@ -877,16 +881,16 @@ gboolean volume_path_is_mounted (const gchar* path) char *display_name = gnome_vfs_volume_get_display_name (volume); printf ("volume display name=%s\n", display_name); + g_free (display_name); */ - - char *device_path = - gnome_vfs_volume_get_device_path (volume); - /* printf (" device path=%s\n", device_path); */ - if (device_path && (strcmp (device_path, path) == 0)) + + char *uri = + gnome_vfs_volume_get_activation_uri (volume); + /* printf (" uri=%s\n", uri); */ + if (uri && (strcmp (uri, path_as_uri) == 0)) result = TRUE; - /* g_free (display_name); */ - g_free (device_path); + g_free (uri); gnome_vfs_volume_unref (volume); } @@ -894,6 +898,8 @@ gboolean volume_path_is_mounted (const gchar* path) g_list_free (list); + g_free (path_as_uri); + return result; } @@ -1407,6 +1413,12 @@ get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore * /* Get the connection-specific transport acccount, if any: */ ModestAccountMgr *account_manager = modest_runtime_get_account_mgr (); + + /* Check if this account has connection-specific SMTP enabled */ + if (!modest_account_mgr_get_use_connection_specific_smtp (account_manager, account_name)) { + return NULL; + } + gchar* server_account_name = modest_account_mgr_get_connection_specific_smtp (account_manager, account_name, connection_name);