evolution r37471 - trunk/mail



Author: mcrha
Date: Tue Mar 24 16:25:29 2009
New Revision: 37471
URL: http://svn.gnome.org/viewvc/evolution?rev=37471&view=rev

Log:
2009-03-24  Milan Crha  <mcrha redhat com>

	** Fix for bug #552583

	* mail-config.c: (only_username), (mail_config_account_url_equal):
	Compare only user names, without a domain part, if such exists.



Modified:
   trunk/mail/ChangeLog
   trunk/mail/mail-config.c

Modified: trunk/mail/mail-config.c
==============================================================================
--- trunk/mail/mail-config.c	(original)
+++ trunk/mail/mail-config.c	Tue Mar 24 16:25:29 2009
@@ -800,6 +800,19 @@
 	return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
 }
 
+static const char *
+only_username (const char *str)
+{
+	if (str) {
+		const char *p = strpbrk (str, "\\/");
+
+		if (p)
+			str = p + 1;
+	}
+
+	return str;
+}
+
 static gboolean
 mail_config_account_url_equal (const CamelURL *u1,
                                const CamelURL *u2)
@@ -810,7 +823,7 @@
 	if (g_strcmp0 (u1->protocol, u2->protocol) != 0)
 		return FALSE;
 
-	if (g_strcmp0 (u1->user, u2->user) != 0)
+	if (g_strcmp0 (only_username (u1->user), only_username (u2->user)) != 0)
 		return FALSE;
 
 	if (g_strcmp0 (u1->host, u2->host) != 0)



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