* 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
0.6.0-stable
Justin Clarke Casey 2008-07-22 17:43:09 +00:00
parent a1d481d0f6
commit b2b5675bd4
4 changed files with 13 additions and 9 deletions

View File

@ -34,10 +34,12 @@ using libsecondlife;
using log4net; using log4net;
using log4net.Config; using log4net.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Statistics; using OpenSim.Framework.Statistics;
using OpenSim.Region.Communications.OGS1;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer
{ {
@ -52,6 +54,7 @@ namespace OpenSim.Grid.UserServer
public UserManager m_userManager; public UserManager m_userManager;
public UserLoginService m_loginService; public UserLoginService m_loginService;
public MessageServersConnector m_messagesService; public MessageServersConnector m_messagesService;
protected IInventoryServices m_inventoryService;
private LLUUID m_lastCreatedUser = LLUUID.Random(); private LLUUID m_lastCreatedUser = LLUUID.Random();
@ -100,6 +103,8 @@ namespace OpenSim.Grid.UserServer
m_loginService = new UserLoginService( m_loginService = new UserLoginService(
m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
m_inventoryService = new OGS1InventoryService(m_userManager._config.InventoryUrl);
m_messagesService = new MessageServersConnector(); m_messagesService = new MessageServersConnector();
m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation;
@ -178,6 +183,7 @@ namespace OpenSim.Grid.UserServer
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
LLUUID userID = new LLUUID(); LLUUID userID = new LLUUID();
try try
{ {
userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
@ -189,11 +195,7 @@ namespace OpenSim.Grid.UserServer
try try
{ {
bool created if (!m_inventoryService.CreateNewUserInventory(userID))
= SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
"POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
if (!created)
{ {
throw new Exception( throw new Exception(
String.Format( String.Format(
@ -201,7 +203,6 @@ namespace OpenSim.Grid.UserServer
+ " Please contact your inventory service provider for more information.", + " Please contact your inventory service provider for more information.",
userID)); userID));
} }
} }
catch (WebException) catch (WebException)
{ {

View File

@ -407,6 +407,7 @@ namespace OpenSim.Grid.UserServer
return ProfileToXmlRPCResponse(userProfile); return ProfileToXmlRPCResponse(userProfile);
} }
public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request)
{ {
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();

View File

@ -306,9 +306,10 @@ namespace OpenSim.Region.Communications.OGS1
return null; 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 // See IInventoryServices

View File

@ -1739,6 +1739,7 @@
<Reference name="OpenSim.Data"/> <Reference name="OpenSim.Data"/>
<Reference name="OpenSim.Framework.Servers"/> <Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Statistics"/> <Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.Communications.OGS1"/>
<Reference name="libsecondlife.dll"/> <Reference name="libsecondlife.dll"/>
<Reference name="XMLRPC.dll"/> <Reference name="XMLRPC.dll"/>
<Reference name="log4net.dll"/> <Reference name="log4net.dll"/>