diff options
author | Melanie | 2010-03-04 10:43:12 +0000 |
---|---|---|
committer | Melanie | 2010-03-04 10:43:12 +0000 |
commit | 31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca (patch) | |
tree | e351c23bd3f773e0ceb4cae518987c73edc90f6d /OpenSim/Services | |
parent | Remove a superfluous array creation (diff) | |
parent | compiler warnings revealed that public PlaySoundSlavePrims properties were ch... (diff) | |
download | opensim-SC_OLD-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.zip opensim-SC_OLD-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.gz opensim-SC_OLD-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.bz2 opensim-SC_OLD-31f7e06c25ba5c195cabd7a79d5fce8cbcec7fca.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Services')
5 files changed, 52 insertions, 19 deletions
diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index 021dcf3..2fc9248 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs | |||
@@ -47,9 +47,9 @@ namespace OpenSim.Services.AuthenticationService | |||
47 | public class PasswordAuthenticationService : | 47 | public class PasswordAuthenticationService : |
48 | AuthenticationServiceBase, IAuthenticationService | 48 | AuthenticationServiceBase, IAuthenticationService |
49 | { | 49 | { |
50 | //private static readonly ILog m_log = | 50 | private static readonly ILog m_log = |
51 | // LogManager.GetLogger( | 51 | LogManager.GetLogger( |
52 | // MethodBase.GetCurrentMethod().DeclaringType); | 52 | MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | public PasswordAuthenticationService(IConfigSource config) : | 54 | public PasswordAuthenticationService(IConfigSource config) : |
55 | base(config) | 55 | base(config) |
@@ -59,23 +59,27 @@ namespace OpenSim.Services.AuthenticationService | |||
59 | public string Authenticate(UUID principalID, string password, int lifetime) | 59 | public string Authenticate(UUID principalID, string password, int lifetime) |
60 | { | 60 | { |
61 | AuthenticationData data = m_Database.Get(principalID); | 61 | AuthenticationData data = m_Database.Get(principalID); |
62 | 62 | ||
63 | if (!data.Data.ContainsKey("passwordHash") || | 63 | if (data != null && data.Data != null) |
64 | !data.Data.ContainsKey("passwordSalt")) | ||
65 | { | 64 | { |
66 | return String.Empty; | 65 | if (!data.Data.ContainsKey("passwordHash") || |
67 | } | 66 | !data.Data.ContainsKey("passwordSalt")) |
67 | { | ||
68 | return String.Empty; | ||
69 | } | ||
68 | 70 | ||
69 | string hashed = Util.Md5Hash(password + ":" + | 71 | string hashed = Util.Md5Hash(password + ":" + |
70 | data.Data["passwordSalt"].ToString()); | 72 | data.Data["passwordSalt"].ToString()); |
71 | 73 | ||
72 | //m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString()); | 74 | //m_log.DebugFormat("[PASS AUTH]: got {0}; hashed = {1}; stored = {2}", password, hashed, data.Data["passwordHash"].ToString()); |
73 | 75 | ||
74 | if (data.Data["passwordHash"].ToString() == hashed) | 76 | if (data.Data["passwordHash"].ToString() == hashed) |
75 | { | 77 | { |
76 | return GetToken(principalID, lifetime); | 78 | return GetToken(principalID, lifetime); |
79 | } | ||
77 | } | 80 | } |
78 | 81 | ||
82 | m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); | ||
79 | return String.Empty; | 83 | return String.Empty; |
80 | } | 84 | } |
81 | } | 85 | } |
diff --git a/OpenSim/Services/Base/ServiceBase.cs b/OpenSim/Services/Base/ServiceBase.cs index 8e24d85..91d5c56 100644 --- a/OpenSim/Services/Base/ServiceBase.cs +++ b/OpenSim/Services/Base/ServiceBase.cs | |||
@@ -26,7 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Reflection; | 30 | using System.Reflection; |
31 | using log4net; | ||
30 | using Nini.Config; | 32 | using Nini.Config; |
31 | using OpenSim.Services.Interfaces; | 33 | using OpenSim.Services.Interfaces; |
32 | 34 | ||
@@ -34,6 +36,8 @@ namespace OpenSim.Services.Base | |||
34 | { | 36 | { |
35 | public class ServiceBase | 37 | public class ServiceBase |
36 | { | 38 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
37 | public T LoadPlugin<T>(string dllName) where T:class | 41 | public T LoadPlugin<T>(string dllName) where T:class |
38 | { | 42 | { |
39 | return LoadPlugin<T>(dllName, new Object[0]); | 43 | return LoadPlugin<T>(dllName, new Object[0]); |
@@ -61,8 +65,12 @@ namespace OpenSim.Services.Base | |||
61 | { | 65 | { |
62 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 66 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
63 | 67 | ||
68 | // m_log.DebugFormat("[SERVICE BASE]: Found assembly {0}", dllName); | ||
69 | |||
64 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 70 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
65 | { | 71 | { |
72 | // m_log.DebugFormat("[SERVICE BASE]: Found type {0}", pluginType); | ||
73 | |||
66 | if (pluginType.IsPublic) | 74 | if (pluginType.IsPublic) |
67 | { | 75 | { |
68 | if (className != String.Empty && | 76 | if (className != String.Empty && |
@@ -86,7 +94,15 @@ namespace OpenSim.Services.Base | |||
86 | } | 94 | } |
87 | catch (Exception e) | 95 | catch (Exception e) |
88 | { | 96 | { |
89 | Console.WriteLine("XXX Exception " + e.StackTrace); | 97 | List<string> strArgs = new List<string>(); |
98 | foreach (Object arg in args) | ||
99 | strArgs.Add(arg.ToString()); | ||
100 | |||
101 | m_log.Error( | ||
102 | string.Format( | ||
103 | "[SERVICE BASE]: Failed to load plugin {0} from {1} with args {2}", | ||
104 | interfaceName, dllName, string.Join(", ", strArgs.ToArray())), e); | ||
105 | |||
90 | return null; | 106 | return null; |
91 | } | 107 | } |
92 | } | 108 | } |
@@ -95,4 +111,4 @@ namespace OpenSim.Services.Base | |||
95 | { | 111 | { |
96 | } | 112 | } |
97 | } | 113 | } |
98 | } | 114 | } \ No newline at end of file |
diff --git a/OpenSim/Services/Friends/FriendsServiceBase.cs b/OpenSim/Services/Friends/FriendsServiceBase.cs index 9858972..6ab0bff 100644 --- a/OpenSim/Services/Friends/FriendsServiceBase.cs +++ b/OpenSim/Services/Friends/FriendsServiceBase.cs | |||
@@ -27,13 +27,12 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
32 | using OpenSim.Data; | 33 | using OpenSim.Data; |
33 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
34 | using OpenSim.Services.Base; | 35 | using OpenSim.Services.Base; |
35 | using Nini.Config; | ||
36 | using log4net; | ||
37 | 36 | ||
38 | namespace OpenSim.Services.Friends | 37 | namespace OpenSim.Services.Friends |
39 | { | 38 | { |
@@ -80,7 +79,11 @@ namespace OpenSim.Services.Friends | |||
80 | 79 | ||
81 | m_Database = LoadPlugin<IFriendsData>(dllName, new Object[] { connString, realm }); | 80 | m_Database = LoadPlugin<IFriendsData>(dllName, new Object[] { connString, realm }); |
82 | if (m_Database == null) | 81 | if (m_Database == null) |
83 | throw new Exception("Could not find a storage interface in the given module"); | 82 | { |
83 | throw new Exception( | ||
84 | string.Format( | ||
85 | "Could not find a storage interface {0} in the given StorageProvider {1}", "IFriendsData", dllName)); | ||
86 | } | ||
84 | } | 87 | } |
85 | } | 88 | } |
86 | } | 89 | } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 1d734eb..ee93f73 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -247,6 +247,7 @@ namespace OpenSim.Services.LLLoginService | |||
247 | LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, friendsList, m_LibraryService, | 247 | LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, friendsList, m_LibraryService, |
248 | where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); | 248 | where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); |
249 | 249 | ||
250 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); | ||
250 | return response; | 251 | return response; |
251 | } | 252 | } |
252 | catch (Exception e) | 253 | catch (Exception e) |
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index e498bd5..ca6e44a 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -280,6 +280,15 @@ namespace OpenSim.Services.UserAccountService | |||
280 | if (null == account) | 280 | if (null == account) |
281 | { | 281 | { |
282 | account = new UserAccount(UUID.Zero, firstName, lastName, email); | 282 | account = new UserAccount(UUID.Zero, firstName, lastName, email); |
283 | if (account.ServiceURLs == null) | ||
284 | { | ||
285 | account.ServiceURLs = new Dictionary<string, object>(); | ||
286 | account.ServiceURLs["HomeURI"] = string.Empty; | ||
287 | account.ServiceURLs["GatekeeperURI"] = string.Empty; | ||
288 | account.ServiceURLs["InventoryServerURI"] = string.Empty; | ||
289 | account.ServiceURLs["AssetServerURI"] = string.Empty; | ||
290 | } | ||
291 | |||
283 | if (StoreUserAccount(account)) | 292 | if (StoreUserAccount(account)) |
284 | { | 293 | { |
285 | bool success = false; | 294 | bool success = false; |