diff options
author | John Hurliman | 2010-02-22 14:10:19 -0800 |
---|---|---|
committer | John Hurliman | 2010-02-22 14:10:19 -0800 |
commit | 71c6559a91a58d93588dcdd8c74b5fce0c1a3780 (patch) | |
tree | cca5b1ea88ad4b29156767afdd77e37ec072c8a7 /OpenSim/Services | |
parent | * Adds CreatorID to asset metadata. This is just the plumbing to support Crea... (diff) | |
parent | Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff) | |
download | opensim-SC_OLD-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.zip opensim-SC_OLD-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.gz opensim-SC_OLD-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.bz2 opensim-SC_OLD-71c6559a91a58d93588dcdd8c74b5fce0c1a3780.tar.xz |
Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim into presence-refactor
Diffstat (limited to 'OpenSim/Services')
7 files changed, 55 insertions, 42 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index a91b632..b9723a8 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -81,12 +81,12 @@ namespace OpenSim.Services.AssetService | |||
81 | } | 81 | } |
82 | 82 | ||
83 | public AssetBase Get(string id) | 83 | public AssetBase Get(string id) |
84 | { | 84 | { |
85 | UUID assetID; | 85 | UUID assetID; |
86 | 86 | ||
87 | if (!UUID.TryParse(id, out assetID)) | 87 | if (!UUID.TryParse(id, out assetID)) |
88 | { | 88 | { |
89 | m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested sset id {0}", id); | 89 | m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested sset id {0}", id); |
90 | return null; | 90 | return null; |
91 | } | 91 | } |
92 | 92 | ||
diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs index f6dd085..9af61a9 100644 --- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs +++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs | |||
@@ -106,12 +106,17 @@ namespace OpenSim.Services.AuthenticationService | |||
106 | string passwordSalt = Util.Md5Hash(UUID.Random().ToString()); | 106 | string passwordSalt = Util.Md5Hash(UUID.Random().ToString()); |
107 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt); | 107 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt); |
108 | 108 | ||
109 | AuthenticationData auth = new AuthenticationData(); | 109 | AuthenticationData auth = m_Database.Get(principalID); |
110 | auth.PrincipalID = principalID; | 110 | if (auth == null) |
111 | auth.Data = new System.Collections.Generic.Dictionary<string, object>(); | 111 | { |
112 | auth = new AuthenticationData(); | ||
113 | auth.PrincipalID = principalID; | ||
114 | auth.Data = new System.Collections.Generic.Dictionary<string, object>(); | ||
115 | auth.Data["accountType"] = "UserAccount"; | ||
116 | auth.Data["webLoginKey"] = UUID.Zero.ToString(); | ||
117 | } | ||
112 | auth.Data["passwordHash"] = md5PasswdHash; | 118 | auth.Data["passwordHash"] = md5PasswdHash; |
113 | auth.Data["passwordSalt"] = passwordSalt; | 119 | auth.Data["passwordSalt"] = passwordSalt; |
114 | auth.Data["webLoginKey"] = UUID.Zero.ToString(); | ||
115 | if (!m_Database.Store(auth)) | 120 | if (!m_Database.Store(auth)) |
116 | { | 121 | { |
117 | m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data"); | 122 | m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data"); |
diff --git a/OpenSim/Services/Base/ServiceBase.cs b/OpenSim/Services/Base/ServiceBase.cs index 6bbe978..8e24d85 100644 --- a/OpenSim/Services/Base/ServiceBase.cs +++ b/OpenSim/Services/Base/ServiceBase.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Services.Base | |||
64 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 64 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
65 | { | 65 | { |
66 | if (pluginType.IsPublic) | 66 | if (pluginType.IsPublic) |
67 | { | 67 | { |
68 | if (className != String.Empty && | 68 | if (className != String.Empty && |
69 | pluginType.ToString() != | 69 | pluginType.ToString() != |
70 | pluginType.Namespace + "." + className) | 70 | pluginType.Namespace + "." + className) |
@@ -84,8 +84,9 @@ namespace OpenSim.Services.Base | |||
84 | 84 | ||
85 | return null; | 85 | return null; |
86 | } | 86 | } |
87 | catch (Exception) | 87 | catch (Exception e) |
88 | { | 88 | { |
89 | Console.WriteLine("XXX Exception " + e.StackTrace); | ||
89 | return null; | 90 | return null; |
90 | } | 91 | } |
91 | } | 92 | } |
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index 876e7ed..966af0b 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Services.Connectors | |||
93 | } | 93 | } |
94 | 94 | ||
95 | public AssetBase Get(string id) | 95 | public AssetBase Get(string id) |
96 | { | 96 | { |
97 | string uri = m_ServerURI + "/assets/" + id; | 97 | string uri = m_ServerURI + "/assets/" + id; |
98 | 98 | ||
99 | AssetBase asset = null; | 99 | AssetBase asset = null; |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 4dee7a4..1368e46 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -82,20 +82,22 @@ namespace OpenSim.Services.GridService | |||
82 | { | 82 | { |
83 | m_RootInstance = this; | 83 | m_RootInstance = this; |
84 | 84 | ||
85 | MainConsole.Instance.Commands.AddCommand("grid", true, | 85 | if (MainConsole.Instance != null) |
86 | "show region", | 86 | { |
87 | "show region <Region name>", | 87 | MainConsole.Instance.Commands.AddCommand("grid", true, |
88 | "Show details on a region", | 88 | "show region", |
89 | String.Empty, | 89 | "show region <Region name>", |
90 | HandleShowRegion); | 90 | "Show details on a region", |
91 | 91 | String.Empty, | |
92 | MainConsole.Instance.Commands.AddCommand("grid", true, | 92 | HandleShowRegion); |
93 | "set region flags", | 93 | |
94 | "set region flags <Region name> <flags>", | 94 | MainConsole.Instance.Commands.AddCommand("grid", true, |
95 | "Set database flags for region", | 95 | "set region flags", |
96 | String.Empty, | 96 | "set region flags <Region name> <flags>", |
97 | HandleSetFlags); | 97 | "Set database flags for region", |
98 | 98 | String.Empty, | |
99 | HandleSetFlags); | ||
100 | } | ||
99 | m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); | 101 | m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); |
100 | } | 102 | } |
101 | } | 103 | } |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 18d0586..de5df9d 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -113,18 +113,20 @@ namespace OpenSim.Services.GridService | |||
113 | 113 | ||
114 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); | 114 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); |
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | if (MainConsole.Instance != null) | |
118 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", | 118 | { |
119 | "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", | 119 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", |
120 | "Link a hypergrid region", RunCommand); | 120 | "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", |
121 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", | 121 | "Link a hypergrid region", RunCommand); |
122 | "unlink-region <local name> or <HostName>:<HttpPort> <cr>", | 122 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", |
123 | "Unlink a hypergrid region", RunCommand); | 123 | "unlink-region <local name> or <HostName>:<HttpPort> <cr>", |
124 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", | 124 | "Unlink a hypergrid region", RunCommand); |
125 | "Set local coordinate to map HG regions to", RunCommand); | 125 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", |
126 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>", | 126 | "Set local coordinate to map HG regions to", RunCommand); |
127 | "List the HG regions", HandleShow); | 127 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>", |
128 | "List the HG regions", HandleShow); | ||
129 | } | ||
128 | } | 130 | } |
129 | 131 | ||
130 | 132 | ||
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index ffb9cca..e498bd5 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -77,13 +77,16 @@ namespace OpenSim.Services.UserAccountService | |||
77 | if (invServiceDll != string.Empty) | 77 | if (invServiceDll != string.Empty) |
78 | m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config }); | 78 | m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config }); |
79 | 79 | ||
80 | MainConsole.Instance.Commands.AddCommand("UserService", false, | 80 | if (MainConsole.Instance != null) |
81 | "create user", | 81 | { |
82 | "create user [<first> [<last> [<pass> [<email>]]]]", | 82 | MainConsole.Instance.Commands.AddCommand("UserService", false, |
83 | "Create a new user", HandleCreateUser); | 83 | "create user", |
84 | MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password", | 84 | "create user [<first> [<last> [<pass> [<email>]]]]", |
85 | "reset user password [<first> [<last> [<password>]]]", | 85 | "Create a new user", HandleCreateUser); |
86 | "Reset a user password", HandleResetUserPassword); | 86 | MainConsole.Instance.Commands.AddCommand("UserService", false, "reset user password", |
87 | "reset user password [<first> [<last> [<password>]]]", | ||
88 | "Reset a user password", HandleResetUserPassword); | ||
89 | } | ||
87 | 90 | ||
88 | } | 91 | } |
89 | 92 | ||