[gvfs] afp: only show anonymous login as an option if the server supports it
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: only show anonymous login as an option if the server supports it
- Date: Thu, 25 Aug 2011 19:21:46 +0000 (UTC)
commit 06c88258933a6a37c8fceb9444b95a68a6e645a8
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Tue Jun 14 18:24:37 2011 +0200
afp: only show anonymous login as an option if the server supports it
daemon/gvfsafpserver.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsafpserver.c b/daemon/gvfsafpserver.c
index b8f0059..d8a0e8e 100644
--- a/daemon/gvfsafpserver.c
+++ b/daemon/gvfsafpserver.c
@@ -464,7 +464,8 @@ g_vfs_afp_server_login (GVfsAfpServer *afp_serv,
if (initial_user)
{
- if (g_str_equal (initial_user, "anonymous"))
+ if (g_str_equal (initial_user, "anonymous") &&
+ g_slist_find_custom (afp_serv->uams, AFP_UAM_NO_USER, g_str_equal))
{
user = NULL;
password = NULL;
@@ -509,7 +510,12 @@ g_vfs_afp_server_login (GVfsAfpServer *afp_serv,
flags = G_ASK_PASSWORD_NEED_PASSWORD;
if (!initial_user)
- flags |= G_ASK_PASSWORD_NEED_USERNAME | G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
+ {
+ flags |= G_ASK_PASSWORD_NEED_USERNAME;
+
+ if (g_slist_find_custom (afp_serv->uams, AFP_UAM_NO_USER, g_str_equal))
+ flags |= G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
+ }
if (g_vfs_keyring_is_available ())
flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]