diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-08-02 04:37:45 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-08-02 04:37:45 +0000 |
commit | 5c417f85eb309197419c381ca59bab26788e7536 (patch) | |
tree | c721c40372e9735f08d81c60c72594de060cc91f /src/net/java/sip/communicator/service | |
parent | 45817241ad3790b5670d86615d1aa972f8218cd1 (diff) | |
download | jitsi-5c417f85eb309197419c381ca59bab26788e7536.zip jitsi-5c417f85eb309197419c381ca59bab26788e7536.tar.gz jitsi-5c417f85eb309197419c381ca59bab26788e7536.tar.bz2 |
Fixes ambiguous properties with "sip" prefix in configuration file.
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/AccountManager.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/AccountManager.java b/src/net/java/sip/communicator/service/protocol/AccountManager.java index ce34e82..b3ba69c 100644 --- a/src/net/java/sip/communicator/service/protocol/AccountManager.java +++ b/src/net/java/sip/communicator/service/protocol/AccountManager.java @@ -69,6 +69,11 @@ public class AccountManager private Vector<AccountID> storedAccounts = new Vector<AccountID>();
/**
+ * The prefix of the account unique identifier.
+ */
+ private static final String ACCOUNT_UID_PREFIX = "acc";
+
+ /**
* Initializes a new <tt>AccountManagerImpl</tt> instance loaded in a
* specific <tt>BundleContext</tt> (in which the caller will usually
* later register it).
@@ -129,7 +134,8 @@ public class AccountManager // If the property is not related to an account we skip it.
int dotIndex = storedAccount.lastIndexOf(".");
- if (!storedAccount.substring(dotIndex + 1).startsWith("acc"))
+ if (!storedAccount.substring(dotIndex + 1)
+ .startsWith(ACCOUNT_UID_PREFIX))
continue;
if (logger.isDebugEnabled())
@@ -548,6 +554,13 @@ public class AccountManager storedAccountIter.hasNext();)
{
String storedAccount = storedAccountIter.next();
+
+ // If the property is not related to an account we skip it.
+ int dotIndex = storedAccount.lastIndexOf(".");
+ if (!storedAccount.substring(dotIndex + 1)
+ .startsWith(ACCOUNT_UID_PREFIX))
+ continue;
+
String storedAccountUID =
configurationService.getString(storedAccount + "."
+ ProtocolProviderFactory.ACCOUNT_UID);
@@ -563,7 +576,8 @@ public class AccountManager // this account's properties.
if (accountNodeName == null)
{
- accountNodeName = "acc" + Long.toString(System.currentTimeMillis());
+ accountNodeName
+ = ACCOUNT_UID_PREFIX + Long.toString(System.currentTimeMillis());
// set a value for the persistent node so that we could later
// retrieve it as a property
|