* 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 shortly0.6.0-stable
parent
a1d481d0f6
commit
b2b5675bd4
|
@ -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<Guid, bool>(
|
||||
"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)
|
||||
{
|
||||
|
|
|
@ -407,6 +407,7 @@ namespace OpenSim.Grid.UserServer
|
|||
|
||||
return ProfileToXmlRPCResponse(userProfile);
|
||||
}
|
||||
|
||||
public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
|
|
|
@ -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<Guid, bool>(
|
||||
"POST", _inventoryServerUrl + "CreateInventory/", userId.UUID);
|
||||
}
|
||||
|
||||
// See IInventoryServices
|
||||
|
|
|
@ -1739,6 +1739,7 @@
|
|||
<Reference name="OpenSim.Data"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<Reference name="OpenSim.Framework.Statistics"/>
|
||||
<Reference name="OpenSim.Region.Communications.OGS1"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="XMLRPC.dll"/>
|
||||
<Reference name="log4net.dll"/>
|
||||
|
|
Loading…
Reference in New Issue