diff options
author | Justin Clarke Casey | 2008-07-22 17:43:09 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-07-22 17:43:09 +0000 |
commit | b2b5675bd4b43861f95d3b576b427db519c17728 (patch) | |
tree | 6d23908dbaf0c4ed0c0dc20b4e83689abdf5a866 | |
parent | * minor: Make create user command appear on the region console only if the re... (diff) | |
download | opensim-SC-b2b5675bd4b43861f95d3b576b427db519c17728.zip opensim-SC-b2b5675bd4b43861f95d3b576b427db519c17728.tar.gz opensim-SC-b2b5675bd4b43861f95d3b576b427db519c17728.tar.bz2 opensim-SC-b2b5675bd4b43861f95d3b576b427db519c17728.tar.xz |
* refactor: move new inventory service call by user server to OGS1 with all the other service calls
* will post to mailing list about moving this shortly
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 15 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | 5 | ||||
-rw-r--r-- | prebuild.xml | 1 |
4 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index a04b5ef..c7011a9 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -34,10 +34,12 @@ using libsecondlife; | |||
34 | using log4net; | 34 | using log4net; |
35 | using log4net.Config; | 35 | using log4net.Config; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications; | ||
37 | using OpenSim.Framework.Communications.Cache; | 38 | using OpenSim.Framework.Communications.Cache; |
38 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
39 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
40 | using OpenSim.Framework.Statistics; | 41 | using OpenSim.Framework.Statistics; |
42 | using OpenSim.Region.Communications.OGS1; | ||
41 | 43 | ||
42 | namespace OpenSim.Grid.UserServer | 44 | namespace OpenSim.Grid.UserServer |
43 | { | 45 | { |
@@ -52,6 +54,7 @@ namespace OpenSim.Grid.UserServer | |||
52 | public UserManager m_userManager; | 54 | public UserManager m_userManager; |
53 | public UserLoginService m_loginService; | 55 | public UserLoginService m_loginService; |
54 | public MessageServersConnector m_messagesService; | 56 | public MessageServersConnector m_messagesService; |
57 | protected IInventoryServices m_inventoryService; | ||
55 | 58 | ||
56 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 59 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
57 | 60 | ||
@@ -100,6 +103,8 @@ namespace OpenSim.Grid.UserServer | |||
100 | m_loginService = new UserLoginService( | 103 | m_loginService = new UserLoginService( |
101 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 104 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
102 | 105 | ||
106 | m_inventoryService = new OGS1InventoryService(m_userManager._config.InventoryUrl); | ||
107 | |||
103 | m_messagesService = new MessageServersConnector(); | 108 | m_messagesService = new MessageServersConnector(); |
104 | 109 | ||
105 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; | 110 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; |
@@ -178,6 +183,7 @@ namespace OpenSim.Grid.UserServer | |||
178 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); | 183 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); |
179 | 184 | ||
180 | LLUUID userID = new LLUUID(); | 185 | LLUUID userID = new LLUUID(); |
186 | |||
181 | try | 187 | try |
182 | { | 188 | { |
183 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 189 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
@@ -188,12 +194,8 @@ namespace OpenSim.Grid.UserServer | |||
188 | } | 194 | } |
189 | 195 | ||
190 | try | 196 | try |
191 | { | 197 | { |
192 | bool created | 198 | if (!m_inventoryService.CreateNewUserInventory(userID)) |
193 | = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( | ||
194 | "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); | ||
195 | |||
196 | if (!created) | ||
197 | { | 199 | { |
198 | throw new Exception( | 200 | throw new Exception( |
199 | String.Format( | 201 | String.Format( |
@@ -201,7 +203,6 @@ namespace OpenSim.Grid.UserServer | |||
201 | + " Please contact your inventory service provider for more information.", | 203 | + " Please contact your inventory service provider for more information.", |
202 | userID)); | 204 | userID)); |
203 | } | 205 | } |
204 | |||
205 | } | 206 | } |
206 | catch (WebException) | 207 | catch (WebException) |
207 | { | 208 | { |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index b48f20e..ff62d78 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -407,6 +407,7 @@ namespace OpenSim.Grid.UserServer | |||
407 | 407 | ||
408 | return ProfileToXmlRPCResponse(userProfile); | 408 | return ProfileToXmlRPCResponse(userProfile); |
409 | } | 409 | } |
410 | |||
410 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) | 411 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) |
411 | { | 412 | { |
412 | XmlRpcResponse response = new XmlRpcResponse(); | 413 | XmlRpcResponse response = new XmlRpcResponse(); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 4e4bfe8..05ecfcc 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -306,9 +306,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
306 | return null; | 306 | return null; |
307 | } | 307 | } |
308 | 308 | ||
309 | public bool CreateNewUserInventory(LLUUID user) | 309 | public bool CreateNewUserInventory(LLUUID userId) |
310 | { | 310 | { |
311 | return false; | 311 | return SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( |
312 | "POST", _inventoryServerUrl + "CreateInventory/", userId.UUID); | ||
312 | } | 313 | } |
313 | 314 | ||
314 | // See IInventoryServices | 315 | // See IInventoryServices |
diff --git a/prebuild.xml b/prebuild.xml index 513b419..40f4f5e 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1739,6 +1739,7 @@ | |||
1739 | <Reference name="OpenSim.Data"/> | 1739 | <Reference name="OpenSim.Data"/> |
1740 | <Reference name="OpenSim.Framework.Servers"/> | 1740 | <Reference name="OpenSim.Framework.Servers"/> |
1741 | <Reference name="OpenSim.Framework.Statistics"/> | 1741 | <Reference name="OpenSim.Framework.Statistics"/> |
1742 | <Reference name="OpenSim.Region.Communications.OGS1"/> | ||
1742 | <Reference name="libsecondlife.dll"/> | 1743 | <Reference name="libsecondlife.dll"/> |
1743 | <Reference name="XMLRPC.dll"/> | 1744 | <Reference name="XMLRPC.dll"/> |
1744 | <Reference name="log4net.dll"/> | 1745 | <Reference name="log4net.dll"/> |