Small bug fixes for making tests work.

slimupdates
Diva Canto 2010-02-21 18:56:44 -08:00
parent b92645ac56
commit 70de6956ff
5 changed files with 44 additions and 36 deletions

View File

@ -43,16 +43,18 @@ namespace OpenSim.Data.Null
public NullPresenceData(string connectionString, string realm)
{
if (Instance == null)
{
Instance = this;
//Console.WriteLine("[XXX] NullRegionData constructor");
// Let's stick in a test presence
PresenceData p = new PresenceData();
p.SessionID = UUID.Zero;
p.UserID = UUID.Zero.ToString();
p.Data = new Dictionary<string, string>();
p.Data["Online"] = "true";
m_presenceData.Add(UUID.Zero, p);
//Console.WriteLine("[XXX] NullRegionData constructor");
// Let's stick in a test presence
PresenceData p = new PresenceData();
p.SessionID = UUID.Zero;
p.UserID = UUID.Zero.ToString();
p.Data = new Dictionary<string, string>();
p.Data["Online"] = true.ToString();
m_presenceData.Add(UUID.Zero, p);
}
}
public bool Store(PresenceData data)
@ -70,7 +72,9 @@ namespace OpenSim.Data.Null
return Instance.Get(sessionID);
if (m_presenceData.ContainsKey(sessionID))
{
return m_presenceData[sessionID];
}
return null;
}

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
config.AddConfig("GridService");
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
m_LocalConnector = new LocalGridServicesConnector(config);
}
@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
r2.HttpPort = 9002;
r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
s.RegionInfo.RegionID = r2.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r3 = new GridRegion();
@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
r3.HttpPort = 9003;
r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
s.RegionInfo.RegionID = r3.RegionID;
m_LocalConnector.AddRegion(s);
m_LocalConnector.RegisterRegion(UUID.Zero, r1);

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
config.AddConfig("PresenceService");
config.Configs["Modules"].Set("PresenceServices", "LocalPresenceServicesConnector");
config.Configs["PresenceService"].Set("LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService");
config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullPresenceData");
config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
m_LocalConnector = new LocalPresenceServicesConnector(config);
}

View File

@ -82,20 +82,22 @@ namespace OpenSim.Services.GridService
{
m_RootInstance = this;
MainConsole.Instance.Commands.AddCommand("grid", true,
"show region",
"show region <Region name>",
"Show details on a region",
String.Empty,
HandleShowRegion);
MainConsole.Instance.Commands.AddCommand("grid", true,
"set region flags",
"set region flags <Region name> <flags>",
"Set database flags for region",
String.Empty,
HandleSetFlags);
if (MainConsole.Instance != null)
{
MainConsole.Instance.Commands.AddCommand("grid", true,
"show region",
"show region <Region name>",
"Show details on a region",
String.Empty,
HandleShowRegion);
MainConsole.Instance.Commands.AddCommand("grid", true,
"set region flags",
"set region flags <Region name> <flags>",
"Set database flags for region",
String.Empty,
HandleSetFlags);
}
m_HypergridLinker = new HypergridLinker(m_config, this, m_Database);
}
}

View File

@ -113,18 +113,20 @@ namespace OpenSim.Services.GridService
m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services...");
}
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
"link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
"Link a hypergrid region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
"unlink-region <local name> or <HostName>:<HttpPort> <cr>",
"Unlink a hypergrid region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
"Set local coordinate to map HG regions to", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>",
"List the HG regions", HandleShow);
if (MainConsole.Instance != null)
{
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
"link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
"Link a hypergrid region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
"unlink-region <local name> or <HostName>:<HttpPort> <cr>",
"Unlink a hypergrid region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
"Set local coordinate to map HG regions to", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>",
"List the HG regions", HandleShow);
}
}