diff options
author | rsuen | 2008-03-09 15:08:06 +0000 |
---|---|---|
committer | rsuen | 2008-03-09 15:08:06 +0000 |
commit | 285df000da9308b75421081155d72317e6345b89 (patch) | |
tree | 7953863a993b7f195feee53158d12f7115173fba /protocols/bundles/org.eclipse.ecf.protocol.msn | |
parent | 57ba22603e299a1a8e0e7d08a343907d2f284a5e (diff) | |
download | org.eclipse.ecf-285df000da9308b75421081155d72317e6345b89.tar.gz org.eclipse.ecf-285df000da9308b75421081155d72317e6345b89.tar.xz org.eclipse.ecf-285df000da9308b75421081155d72317e6345b89.zip |
Fix bug 195275 - can't connect to MSN
Diffstat (limited to 'protocols/bundles/org.eclipse.ecf.protocol.msn')
-rw-r--r-- | protocols/bundles/org.eclipse.ecf.protocol.msn/src/org/eclipse/ecf/protocol/msn/NotificationSession.java | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/protocols/bundles/org.eclipse.ecf.protocol.msn/src/org/eclipse/ecf/protocol/msn/NotificationSession.java b/protocols/bundles/org.eclipse.ecf.protocol.msn/src/org/eclipse/ecf/protocol/msn/NotificationSession.java index 91cc04257..95fc643b8 100644 --- a/protocols/bundles/org.eclipse.ecf.protocol.msn/src/org/eclipse/ecf/protocol/msn/NotificationSession.java +++ b/protocols/bundles/org.eclipse.ecf.protocol.msn/src/org/eclipse/ecf/protocol/msn/NotificationSession.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 Remy Suen + * Copyright (c) 2005, 2008 Remy Suen and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * Remy Suen <remy.suen@gmail.com> - initial API and implementation * Cagatay Calli <ccalli@gmail.com> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=196812 + * David Pochet <pochet.david@wanadoo.fr> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=195275 ******************************************************************************/ package org.eclipse.ecf.protocol.msn; @@ -149,16 +150,20 @@ final class NotificationSession extends DispatchSession { count++; String[] contact = StringUtils.splitOnSpace(input); String email = contact[1].substring(2); - switch (contact.length) { - case 3 : - list.internalAddContact(email, email); - break; - case 5 : - list.addContact(email, email, contact[3].substring(2)); - break; - default : - list.addContact(contact[2].substring(2), email, contact[3].substring(2), contact[5]); - break; + + // Check that email address is valid + if (email.indexOf('@') != -1) { + switch (contact.length) { + case 3 : + list.internalAddContact(email, email); + break; + case 5 : + list.addContact(email, email, contact[3].substring(2)); + break; + default : + list.addContact(contact[2].substring(2), email, contact[3].substring(2), contact[5]); + break; + } } if (count == contacts) { |