diff options
author | Diva Canto | 2010-02-21 18:56:44 -0800 |
---|---|---|
committer | Diva Canto | 2010-02-21 18:56:44 -0800 |
commit | 70de6956ff6a3d833149156b6293122ef734b73d (patch) | |
tree | fce3f6a2e18a37c702dd57168dba445304855d6b /OpenSim | |
parent | MySQL tests pass, except T016_RandomSogWithSceneParts. Total mystery as to wh... (diff) | |
download | opensim-SC_OLD-70de6956ff6a3d833149156b6293122ef734b73d.zip opensim-SC_OLD-70de6956ff6a3d833149156b6293122ef734b73d.tar.gz opensim-SC_OLD-70de6956ff6a3d833149156b6293122ef734b73d.tar.bz2 opensim-SC_OLD-70de6956ff6a3d833149156b6293122ef734b73d.tar.xz |
Small bug fixes for making tests work.
Diffstat (limited to 'OpenSim')
5 files changed, 46 insertions, 38 deletions
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index 40700cf..5f78691 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -43,16 +43,18 @@ namespace OpenSim.Data.Null | |||
43 | public NullPresenceData(string connectionString, string realm) | 43 | public NullPresenceData(string connectionString, string realm) |
44 | { | 44 | { |
45 | if (Instance == null) | 45 | if (Instance == null) |
46 | { | ||
46 | Instance = this; | 47 | Instance = this; |
47 | 48 | ||
48 | //Console.WriteLine("[XXX] NullRegionData constructor"); | 49 | //Console.WriteLine("[XXX] NullRegionData constructor"); |
49 | // Let's stick in a test presence | 50 | // Let's stick in a test presence |
50 | PresenceData p = new PresenceData(); | 51 | PresenceData p = new PresenceData(); |
51 | p.SessionID = UUID.Zero; | 52 | p.SessionID = UUID.Zero; |
52 | p.UserID = UUID.Zero.ToString(); | 53 | p.UserID = UUID.Zero.ToString(); |
53 | p.Data = new Dictionary<string, string>(); | 54 | p.Data = new Dictionary<string, string>(); |
54 | p.Data["Online"] = "true"; | 55 | p.Data["Online"] = true.ToString(); |
55 | m_presenceData.Add(UUID.Zero, p); | 56 | m_presenceData.Add(UUID.Zero, p); |
57 | } | ||
56 | } | 58 | } |
57 | 59 | ||
58 | public bool Store(PresenceData data) | 60 | public bool Store(PresenceData data) |
@@ -70,7 +72,9 @@ namespace OpenSim.Data.Null | |||
70 | return Instance.Get(sessionID); | 72 | return Instance.Get(sessionID); |
71 | 73 | ||
72 | if (m_presenceData.ContainsKey(sessionID)) | 74 | if (m_presenceData.ContainsKey(sessionID)) |
75 | { | ||
73 | return m_presenceData[sessionID]; | 76 | return m_presenceData[sessionID]; |
77 | } | ||
74 | 78 | ||
75 | return null; | 79 | return null; |
76 | } | 80 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 2ca90f8..95d8737 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
56 | config.AddConfig("GridService"); | 56 | config.AddConfig("GridService"); |
57 | config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); | 57 | config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); |
58 | config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); | 58 | config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); |
59 | config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData"); | 59 | config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
60 | 60 | ||
61 | m_LocalConnector = new LocalGridServicesConnector(config); | 61 | m_LocalConnector = new LocalGridServicesConnector(config); |
62 | } | 62 | } |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
92 | r2.HttpPort = 9002; | 92 | r2.HttpPort = 9002; |
93 | r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 93 | r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
94 | s = new Scene(new RegionInfo()); | 94 | s = new Scene(new RegionInfo()); |
95 | s.RegionInfo.RegionID = r1.RegionID; | 95 | s.RegionInfo.RegionID = r2.RegionID; |
96 | m_LocalConnector.AddRegion(s); | 96 | m_LocalConnector.AddRegion(s); |
97 | 97 | ||
98 | GridRegion r3 = new GridRegion(); | 98 | GridRegion r3 = new GridRegion(); |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
104 | r3.HttpPort = 9003; | 104 | r3.HttpPort = 9003; |
105 | r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); | 105 | r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0); |
106 | s = new Scene(new RegionInfo()); | 106 | s = new Scene(new RegionInfo()); |
107 | s.RegionInfo.RegionID = r1.RegionID; | 107 | s.RegionInfo.RegionID = r3.RegionID; |
108 | m_LocalConnector.AddRegion(s); | 108 | m_LocalConnector.AddRegion(s); |
109 | 109 | ||
110 | m_LocalConnector.RegisterRegion(UUID.Zero, r1); | 110 | m_LocalConnector.RegisterRegion(UUID.Zero, r1); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs index 9ba1bdc..ca42461 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests | |||
56 | config.AddConfig("PresenceService"); | 56 | config.AddConfig("PresenceService"); |
57 | config.Configs["Modules"].Set("PresenceServices", "LocalPresenceServicesConnector"); | 57 | config.Configs["Modules"].Set("PresenceServices", "LocalPresenceServicesConnector"); |
58 | config.Configs["PresenceService"].Set("LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService"); | 58 | config.Configs["PresenceService"].Set("LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService"); |
59 | config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullPresenceData"); | 59 | config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
60 | 60 | ||
61 | m_LocalConnector = new LocalPresenceServicesConnector(config); | 61 | m_LocalConnector = new LocalPresenceServicesConnector(config); |
62 | } | 62 | } |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 4dee7a4..1368e46 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -82,20 +82,22 @@ namespace OpenSim.Services.GridService | |||
82 | { | 82 | { |
83 | m_RootInstance = this; | 83 | m_RootInstance = this; |
84 | 84 | ||
85 | MainConsole.Instance.Commands.AddCommand("grid", true, | 85 | if (MainConsole.Instance != null) |
86 | "show region", | 86 | { |
87 | "show region <Region name>", | 87 | MainConsole.Instance.Commands.AddCommand("grid", true, |
88 | "Show details on a region", | 88 | "show region", |
89 | String.Empty, | 89 | "show region <Region name>", |
90 | HandleShowRegion); | 90 | "Show details on a region", |
91 | 91 | String.Empty, | |
92 | MainConsole.Instance.Commands.AddCommand("grid", true, | 92 | HandleShowRegion); |
93 | "set region flags", | 93 | |
94 | "set region flags <Region name> <flags>", | 94 | MainConsole.Instance.Commands.AddCommand("grid", true, |
95 | "Set database flags for region", | 95 | "set region flags", |
96 | String.Empty, | 96 | "set region flags <Region name> <flags>", |
97 | HandleSetFlags); | 97 | "Set database flags for region", |
98 | 98 | String.Empty, | |
99 | HandleSetFlags); | ||
100 | } | ||
99 | m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); | 101 | m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); |
100 | } | 102 | } |
101 | } | 103 | } |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 18d0586..de5df9d 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -113,18 +113,20 @@ namespace OpenSim.Services.GridService | |||
113 | 113 | ||
114 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); | 114 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); |
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | if (MainConsole.Instance != null) | |
118 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", | 118 | { |
119 | "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", | 119 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", |
120 | "Link a hypergrid region", RunCommand); | 120 | "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", |
121 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", | 121 | "Link a hypergrid region", RunCommand); |
122 | "unlink-region <local name> or <HostName>:<HttpPort> <cr>", | 122 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", |
123 | "Unlink a hypergrid region", RunCommand); | 123 | "unlink-region <local name> or <HostName>:<HttpPort> <cr>", |
124 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", | 124 | "Unlink a hypergrid region", RunCommand); |
125 | "Set local coordinate to map HG regions to", RunCommand); | 125 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", |
126 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>", | 126 | "Set local coordinate to map HG regions to", RunCommand); |
127 | "List the HG regions", HandleShow); | 127 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>", |
128 | "List the HG regions", HandleShow); | ||
129 | } | ||
128 | } | 130 | } |
129 | 131 | ||
130 | 132 | ||