aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Ivov <emcho@jitsi.org>2006-08-08 15:06:29 +0000
committerEmil Ivov <emcho@jitsi.org>2006-08-08 15:06:29 +0000
commitd93459a77b666b387d63149af8a53c187e4bf9f8 (patch)
tree4adee70bea95b0e51b902c4ace0be432dd4bde50 /src
parentc26061ccf77eff721db4b5f2fea842e3e0d03aea (diff)
downloadjitsi-d93459a77b666b387d63149af8a53c187e4bf9f8.zip
jitsi-d93459a77b666b387d63149af8a53c187e4bf9f8.tar.gz
jitsi-d93459a77b666b387d63149af8a53c187e4bf9f8.tar.bz2
Implementing SIP support (work in progress)
Throw un exception during account installation if the account exists.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderFactorySipImpl.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderFactorySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderFactorySipImpl.java
index 2c46456..31e66b5 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderFactorySipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderFactorySipImpl.java
@@ -112,6 +112,12 @@ public class ProtocolProviderFactorySipImpl
AccountID accountID =
new SipAccountID(userIDStr, accountProperties, serverAddress);
+ //make sure we haven't seen this account id before.
+ if( registeredAccounts.containsKey(accountID) )
+ throw new IllegalStateException(
+ "An account for id " + userIDStr + " was already installed!");
+
+
//first store the account and only then load it as the load generates
//an osgi event, the osgi event triggers (trhgough the UI) a call to
//the register() method and it needs to acces the configuration service
@@ -160,11 +166,6 @@ public class ProtocolProviderFactorySipImpl
AccountID accountID =
new SipAccountID(userIDStr, accountProperties, serverAddress);
- //make sure we haven't seen this account id before.
- if( registeredAccounts.containsKey(accountID) )
- throw new IllegalStateException(
- "An account for id " + userIDStr + " was already installed!");
-
//get a reference to the configuration service and register whatever
//properties we have in it.