From 5302fdbacd6135d3be8cdd2c48f30d468163817d Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 24 Jan 2002 20:14:36 +0000 Subject: Don't bother trying to see if the domain looks like a FQDN. 2002-01-24 Jeffrey Stedfast * mail-account-gui.c (is_email): Don't bother trying to see if the domain looks like a FQDN. svn path=/trunk/; revision=15457 --- mail/mail-account-gui.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'mail/mail-account-gui.c') diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 3009b7666c..f731e174c9 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -50,19 +50,16 @@ static void service_changed (GtkEntry *entry, gpointer user_data); static gboolean is_email (const char *address) { - const char *at, *hname; + /* This is supposed to check if the address's domain could be + an FQDN but alas, it's not worth the pain and suffering. */ + const char *at; at = strchr (address, '@'); /* make sure we have an '@' and that it's not the first or last char */ if (!at || at == address || *(at + 1) == '\0') return FALSE; - hname = at + 1; - /* make sure the first and last chars aren't '.' */ - if (*hname == '.' || hname[strlen (hname) - 1] == '.') - return FALSE; - - return strchr (hname, '.') != NULL; + return TRUE; } static GtkWidget * -- cgit