mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Successfully logged into a grid.
This commit is contained in:
@@ -39,6 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
|
||||
namespace OpenSim.Services.Connectors.Simulation
|
||||
{
|
||||
@@ -52,7 +53,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
{
|
||||
}
|
||||
|
||||
public SimulationServiceConnector(GridRegion region)
|
||||
public SimulationServiceConnector(IConfigSource config)
|
||||
{
|
||||
//m_Region = region;
|
||||
}
|
||||
@@ -68,6 +69,13 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
{
|
||||
reason = String.Empty;
|
||||
|
||||
if (destination == null)
|
||||
{
|
||||
reason = "Destination is null";
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Eventually, we want to use a caps url instead of the agentID
|
||||
string uri = string.Empty;
|
||||
try
|
||||
@@ -128,7 +136,8 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = AgentCreateRequest.GetRequestStream();
|
||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateChildAgent request to remote sim {0}", uri);
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
|
||||
uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
|
||||
}
|
||||
//catch (WebException ex)
|
||||
catch
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace OpenSim.Services.LLLoginService
|
||||
private IGridService m_GridService;
|
||||
private IPresenceService m_PresenceService;
|
||||
private ISimulationService m_LocalSimulationService;
|
||||
private ISimulationService m_RemoteSimulationService;
|
||||
private ILibraryService m_LibraryService;
|
||||
private IAvatarService m_AvatarService;
|
||||
|
||||
private string m_DefaultRegionName;
|
||||
private string m_RemoteSimulationDll;
|
||||
private string m_WelcomeMessage;
|
||||
private bool m_RequireInventory;
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace OpenSim.Services.LLLoginService
|
||||
string presenceService = serverConfig.GetString("PresenceService", String.Empty);
|
||||
string libService = serverConfig.GetString("LibraryService", String.Empty);
|
||||
string avatarService = serverConfig.GetString("AvatarService", String.Empty);
|
||||
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
|
||||
|
||||
m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty);
|
||||
m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty);
|
||||
m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
|
||||
m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true);
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace OpenSim.Services.LLLoginService
|
||||
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
|
||||
if (avatarService != string.Empty)
|
||||
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args);
|
||||
if (simulationService != string.Empty)
|
||||
m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
|
||||
//
|
||||
// deal with the services given as argument
|
||||
//
|
||||
@@ -184,8 +186,8 @@ namespace OpenSim.Services.LLLoginService
|
||||
// independent login servers have just a remoteSimulationDll
|
||||
if (!startLocation.Contains("@") && (m_LocalSimulationService != null))
|
||||
simConnector = m_LocalSimulationService;
|
||||
else if (m_RemoteSimulationDll != string.Empty)
|
||||
simConnector = ServerUtils.LoadPlugin<ISimulationService>(m_RemoteSimulationDll, args);
|
||||
else if (m_RemoteSimulationService != null)
|
||||
simConnector = m_RemoteSimulationService;
|
||||
if (simConnector != null)
|
||||
{
|
||||
circuitCode = (uint)Util.RandomClass.Next(); ;
|
||||
@@ -362,6 +364,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
//aCircuit.BaseFolder = irrelevant
|
||||
aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
|
||||
aCircuit.child = false; // the first login agent is root
|
||||
aCircuit.ChildrenCapSeeds = new Dictionary<ulong, string>();
|
||||
aCircuit.circuitcode = circuit;
|
||||
aCircuit.firstname = account.FirstName;
|
||||
//aCircuit.InventoryFolder = irrelevant
|
||||
|
||||
Reference in New Issue
Block a user