diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index a04b5ef7e1..c7011a9334 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -34,10 +34,12 @@ using libsecondlife; using log4net; using log4net.Config; using OpenSim.Framework; +using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Statistics; +using OpenSim.Region.Communications.OGS1; namespace OpenSim.Grid.UserServer { @@ -52,6 +54,7 @@ namespace OpenSim.Grid.UserServer public UserManager m_userManager; public UserLoginService m_loginService; public MessageServersConnector m_messagesService; + protected IInventoryServices m_inventoryService; private LLUUID m_lastCreatedUser = LLUUID.Random(); @@ -100,6 +103,8 @@ namespace OpenSim.Grid.UserServer m_loginService = new UserLoginService( m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); + m_inventoryService = new OGS1InventoryService(m_userManager._config.InventoryUrl); + m_messagesService = new MessageServersConnector(); m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; @@ -178,6 +183,7 @@ namespace OpenSim.Grid.UserServer tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); LLUUID userID = new LLUUID(); + try { userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); @@ -188,12 +194,8 @@ namespace OpenSim.Grid.UserServer } try - { - bool created - = SynchronousRestObjectPoster.BeginPostObject( - "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); - - if (!created) + { + if (!m_inventoryService.CreateNewUserInventory(userID)) { throw new Exception( String.Format( @@ -201,7 +203,6 @@ namespace OpenSim.Grid.UserServer + " Please contact your inventory service provider for more information.", userID)); } - } catch (WebException) { diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index b48f20e982..ff62d78fb4 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -407,6 +407,7 @@ namespace OpenSim.Grid.UserServer return ProfileToXmlRPCResponse(userProfile); } + public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) { XmlRpcResponse response = new XmlRpcResponse(); diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 4e4bfe836b..05ecfccbb0 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -306,9 +306,10 @@ namespace OpenSim.Region.Communications.OGS1 return null; } - public bool CreateNewUserInventory(LLUUID user) + public bool CreateNewUserInventory(LLUUID userId) { - return false; + return SynchronousRestObjectPoster.BeginPostObject( + "POST", _inventoryServerUrl + "CreateInventory/", userId.UUID); } // See IInventoryServices diff --git a/prebuild.xml b/prebuild.xml index 513b419933..40f4f5ec95 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1739,6 +1739,7 @@ +