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 /OpenSim/Grid/UserServer/Main.cs | |
parent | * minor: Make create user command appear on the region console only if the re... (diff) | |
download | opensim-SC_OLD-b2b5675bd4b43861f95d3b576b427db519c17728.zip opensim-SC_OLD-b2b5675bd4b43861f95d3b576b427db519c17728.tar.gz opensim-SC_OLD-b2b5675bd4b43861f95d3b576b427db519c17728.tar.bz2 opensim-SC_OLD-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
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 15 |
1 files changed, 8 insertions, 7 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 | { |