Successfully logged into a grid.

slimupdates
Diva Canto 2010-01-03 11:44:57 -08:00
parent c268e342d1
commit 99efa99585
9 changed files with 138 additions and 62 deletions

View File

@ -109,6 +109,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
if (!m_Enabled)
return;
if (!m_Registered) if (!m_Registered)
{ {
m_Registered = true; m_Registered = true;

View File

@ -87,6 +87,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{
if (!m_Enabled)
return;
}
public void RemoveRegion(Scene scene)
{
}
public void RegionLoaded(Scene scene)
{ {
if (!m_Enabled) if (!m_Enabled)
return; return;
@ -103,14 +114,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
} }
} }
public void RemoveRegion(Scene scene)
{
}
public void RegionLoaded(Scene scene)
{
}
#endregion #endregion
} }

View File

@ -103,6 +103,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
if (!m_enabled)
return;
if (!initialized)
{
InitOnce(scene);
initialized = true;
}
InitEach(scene);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -116,15 +125,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
if (m_enabled) if (!m_enabled)
{ return;
if (!initialized)
{ m_hyperlinkService = m_aScene.RequestModuleInterface<IHyperlinkService>();
InitOnce(scene);
initialized = true;
}
InitEach(scene);
}
} }
public Type ReplaceableInterface public Type ReplaceableInterface
@ -148,7 +153,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
m_localBackend = new LocalSimulationConnectorModule(); m_localBackend = new LocalSimulationConnectorModule();
m_commsManager = scene.CommsManager; m_commsManager = scene.CommsManager;
m_aScene = scene; m_aScene = scene;
m_hyperlinkService = m_aScene.RequestModuleInterface<IHyperlinkService>();
//m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName);
} }

View File

@ -134,8 +134,12 @@ namespace OpenSim.Server.Handlers.Simulation
uint teleportFlags = 0; uint teleportFlags = 0;
if (args.ContainsKey("destination_x") && args["destination_x"] != null) if (args.ContainsKey("destination_x") && args["destination_x"] != null)
Int32.TryParse(args["destination_x"].AsString(), out x); Int32.TryParse(args["destination_x"].AsString(), out x);
else
m_log.WarnFormat(" -- request didn't have destination_x");
if (args.ContainsKey("destination_y") && args["destination_y"] != null) if (args.ContainsKey("destination_y") && args["destination_y"] != null)
Int32.TryParse(args["destination_y"].AsString(), out y); Int32.TryParse(args["destination_y"].AsString(), out y);
else
m_log.WarnFormat(" -- request didn't have destination_y");
if (args.ContainsKey("destination_uuid") && args["destination_uuid"] != null) if (args.ContainsKey("destination_uuid") && args["destination_uuid"] != null)
UUID.TryParse(args["destination_uuid"].AsString(), out uuid); UUID.TryParse(args["destination_uuid"].AsString(), out uuid);
if (args.ContainsKey("destination_name") && args["destination_name"] != null) if (args.ContainsKey("destination_name") && args["destination_name"] != null)

View File

@ -39,6 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using log4net; using log4net;
using Nini.Config;
namespace OpenSim.Services.Connectors.Simulation 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; //m_Region = region;
} }
@ -68,6 +69,13 @@ namespace OpenSim.Services.Connectors.Simulation
{ {
reason = String.Empty; 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 // Eventually, we want to use a caps url instead of the agentID
string uri = string.Empty; string uri = string.Empty;
try try
@ -128,7 +136,8 @@ namespace OpenSim.Services.Connectors.Simulation
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
os = AgentCreateRequest.GetRequestStream(); os = AgentCreateRequest.GetRequestStream();
os.Write(buffer, 0, strBuffer.Length); //Send it 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 (WebException ex)
catch catch

View File

@ -26,11 +26,11 @@ namespace OpenSim.Services.LLLoginService
private IGridService m_GridService; private IGridService m_GridService;
private IPresenceService m_PresenceService; private IPresenceService m_PresenceService;
private ISimulationService m_LocalSimulationService; private ISimulationService m_LocalSimulationService;
private ISimulationService m_RemoteSimulationService;
private ILibraryService m_LibraryService; private ILibraryService m_LibraryService;
private IAvatarService m_AvatarService; private IAvatarService m_AvatarService;
private string m_DefaultRegionName; private string m_DefaultRegionName;
private string m_RemoteSimulationDll;
private string m_WelcomeMessage; private string m_WelcomeMessage;
private bool m_RequireInventory; private bool m_RequireInventory;
@ -47,9 +47,9 @@ namespace OpenSim.Services.LLLoginService
string presenceService = serverConfig.GetString("PresenceService", String.Empty); string presenceService = serverConfig.GetString("PresenceService", String.Empty);
string libService = serverConfig.GetString("LibraryService", String.Empty); string libService = serverConfig.GetString("LibraryService", String.Empty);
string avatarService = serverConfig.GetString("AvatarService", String.Empty); string avatarService = serverConfig.GetString("AvatarService", String.Empty);
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
m_DefaultRegionName = serverConfig.GetString("DefaultRegion", 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_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true);
@ -67,6 +67,8 @@ namespace OpenSim.Services.LLLoginService
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
if (avatarService != string.Empty) if (avatarService != string.Empty)
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); 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 // deal with the services given as argument
// //
@ -184,8 +186,8 @@ namespace OpenSim.Services.LLLoginService
// independent login servers have just a remoteSimulationDll // independent login servers have just a remoteSimulationDll
if (!startLocation.Contains("@") && (m_LocalSimulationService != null)) if (!startLocation.Contains("@") && (m_LocalSimulationService != null))
simConnector = m_LocalSimulationService; simConnector = m_LocalSimulationService;
else if (m_RemoteSimulationDll != string.Empty) else if (m_RemoteSimulationService != null)
simConnector = ServerUtils.LoadPlugin<ISimulationService>(m_RemoteSimulationDll, args); simConnector = m_RemoteSimulationService;
if (simConnector != null) if (simConnector != null)
{ {
circuitCode = (uint)Util.RandomClass.Next(); ; circuitCode = (uint)Util.RandomClass.Next(); ;
@ -362,6 +364,7 @@ namespace OpenSim.Services.LLLoginService
//aCircuit.BaseFolder = irrelevant //aCircuit.BaseFolder = irrelevant
aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
aCircuit.child = false; // the first login agent is root aCircuit.child = false; // the first login agent is root
aCircuit.ChildrenCapSeeds = new Dictionary<ulong, string>();
aCircuit.circuitcode = circuit; aCircuit.circuitcode = circuit;
aCircuit.firstname = account.FirstName; aCircuit.firstname = account.FirstName;
//aCircuit.InventoryFolder = irrelevant //aCircuit.InventoryFolder = irrelevant

View File

@ -1,15 +1,16 @@
; * The startup section lists all the connectors to start up in this server ; * The startup section lists all the connectors to start up in this server
; * instance. This may be only one, or it may be the entire server suite. ; * instance. This may be only one, or it may be the entire server suite.
; * Multiple connectors should be seaprated by commas. ; * Multiple connectors should be seaprated by commas.
; * The startup section lists all the connectors to start up in this server
; * instance. This may be only one, or it may be the entire server suite.
; * Multiple connectors should be seaprated by commas.
; * ; *
; * These are the IN connectors the server uses, the in connectors ; * These are the IN connectors the server uses, the in connectors
; * read this config file and load the needed OUT and database connectors ; * read this config file and load the needed service and database connectors
; * ; *
; * Add "OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" to
; * enable the experimental authentication service
; * ; *
[Startup] [Startup]
ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.Server.Handlers.dll:InventoryServiceInConnector,OpenSim.Server.Handlers.dll:FreeswitchServerConnector,OpenSim.Server.Handlers.dll:GridServiceConnector" ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.Server.Handlers.dll:InventoryServiceInConnector,OpenSim.Server.Handlers.dll:FreeswitchServerConnector,OpenSim.Server.Handlers.dll:GridServiceConnector,OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,OpenSim.Server.Handlers.dll:AvatarServiceConnector,OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,OpenSim.Server.Handlers.dll:PresenceServiceConnector,,OpenSim.Server.Handlers.dll:UserAccountServiceConnector"
; * This is common for all services, it's the network setup for the entire ; * This is common for all services, it's the network setup for the entire
; * server instance ; * server instance
@ -33,7 +34,7 @@ LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml" AssetLoaderArgs = "assets/AssetSets.xml"
StorageProvider = "OpenSim.Data.MySQL.dll" StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;" ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
; * This configuration loads the inventory server modules. It duplicates ; * This configuration loads the inventory server modules. It duplicates
; * the function of the legacy inventory server ; * the function of the legacy inventory server
@ -43,7 +44,17 @@ LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
UserServerURI = "http://127.0.0.1:8002" UserServerURI = "http://127.0.0.1:8002"
SessionAuthentication = "false" SessionAuthentication = "false"
StorageProvider = "OpenSim.Data.MySQL.dll" StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;" ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
; * This is the new style grid service.
; * "Realm" is the table that is used for user lookup.
; * It defaults to "regions", which uses the legacy tables
; *
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
Realm = "regions"
; * This is the configuration for the freeswitch server in grid mode ; * This is the configuration for the freeswitch server in grid mode
[FreeswitchService] [FreeswitchService]
@ -57,8 +68,7 @@ LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
[AuthenticationService] [AuthenticationService]
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
StorageProvider = "OpenSim.Data.MySQL.dll" StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;" ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
; Realm = "users"
; * This is the new style user service. ; * This is the new style user service.
; * "Realm" is the table that is used for user lookup. ; * "Realm" is the table that is used for user lookup.
@ -66,16 +76,29 @@ ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=gr
; * ; *
[UserAccountService] [UserAccountService]
AuthenticationServiceModule = "OpenSim.Services.UserService.dll:UserAccountService" AuthenticationServiceModule = "OpenSim.Services.UserService.dll:UserAccountService"
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
StorageProvider = "OpenSim.Data.MySQL.dll" StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;" ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
; Realm = "users" ; Realm = "useraccounts"
; * This is the new style grid service. [PresenceService]
; * "Realm" is the table that is used for user lookup. LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
; * It defaults to "regions", which uses the legacy tables StorageProvider = "OpenSim.Data.MySQL.dll"
; * ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" [LibraryService]
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" LibraryName = "OpenSim Library"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;" DefaultLibrary = "./inventory/Libraries.xml"
Realm = "regions"
[LoginService]
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService"
DefaultRegion = "OpenSim Test"
WelcomeMessage = "Welcome, Avatar!"

View File

@ -21,6 +21,24 @@
; ;
GridServerURI = "http://mygridserver.com:8003" GridServerURI = "http://mygridserver.com:8003"
[PresenceService]
;
; change this to your grid-wide presence server
;
PresenceServerURI = "http://mygridserver.com:8003"
[UserAccountService]
;
; change this to your grid-wide user accounts server
;
UserAccountServerURI = "http://mygridserver.com:8003"
[AuthenticationService]
;
; change this to your grid-wide authentication server
;
AuthenticationServerURI = "http://mygridserver.com:8003"
[Modules] [Modules]
;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists.
;; Copy the config .example file into your own .ini file and change configs there ;; Copy the config .example file into your own .ini file and change configs there

View File

@ -13,12 +13,21 @@
[Modules] [Modules]
AssetServices = "HGAssetBroker" AssetServices = "HGAssetBroker"
InventoryServices = "HGInventoryBroker" InventoryServices = "HGInventoryBroker"
NeighbourServices = "RemoteNeighbourServicesConnector"
GridServices = "HGGridServicesConnector" GridServices = "HGGridServicesConnector"
NeighbourServiceInConnector = true NeighbourServices = "RemoteNeighbourServicesConnector"
AuthenticationServices = "RemoteAuthenticationServicesConnector"
AuthorizationServices = "LocalAuthorizationServicesConnector"
PresenceServices = "RemotePresenceServicesConnector"
UserAccountServices = "RemoteUserAccountServicesConnector"
SimulationServices = "RemoteSimulationConnectorModule"
LandServiceInConnector = true LandServiceInConnector = true
NeighbourServiceInConnector = true
HypergridServiceInConnector = true HypergridServiceInConnector = true
LLProxyLoginModule = true SimulationServiceInConnector = true
InventoryServiceInConnector = false
AssetServiceInConnector = false
LibraryModule = false
LLLoginServiceInConnector = false
[AssetService] [AssetService]
LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector"