aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-03-05 00:54:46 +0000
committerJustin Clark-Casey (justincc)2010-03-05 00:54:46 +0000
commite39fc95659a405a8500c9014d2ac31c5d85741d7 (patch)
tree19cf14d99216d77ce5855aa75fc58f2f004c09fa /OpenSim
parentMerge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-e39fc95659a405a8500c9014d2ac31c5d85741d7.zip
opensim-SC_OLD-e39fc95659a405a8500c9014d2ac31c5d85741d7.tar.gz
opensim-SC_OLD-e39fc95659a405a8500c9014d2ac31c5d85741d7.tar.bz2
opensim-SC_OLD-e39fc95659a405a8500c9014d2ac31c5d85741d7.tar.xz
Fix LocalPresenceServiceConnector test now that the hardcoded test data has been removed from Data.Null.NullPresenceData
Unfortunately, this meant publicly exposing the underlying service for the connector. The other solution would be to create alternative initializers for services and connectors where objects could be given directly rather than loaded indirectly through config. Unfortunately, this would require a lot of work in this case but might be the better way forward.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/Null/NullPresenceData.cs9
-rw-r--r--OpenSim/Framework/SLUtil.cs12
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs1
6 files changed, 31 insertions, 24 deletions
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs
index 2ceb0c6..9fc4595 100644
--- a/OpenSim/Data/Null/NullPresenceData.cs
+++ b/OpenSim/Data/Null/NullPresenceData.cs
@@ -51,15 +51,6 @@ namespace OpenSim.Data.Null
51 Instance = this; 51 Instance = this;
52 52
53 //Console.WriteLine("[XXX] NullRegionData constructor"); 53 //Console.WriteLine("[XXX] NullRegionData constructor");
54 // Let's stick in a test presence
55 /*
56 PresenceData p = new PresenceData();
57 p.SessionID = UUID.Zero;
58 p.UserID = UUID.Zero.ToString();
59 p.Data = new Dictionary<string, string>();
60 p.Data["Online"] = true.ToString();
61 m_presenceData.Add(UUID.Zero, p);
62 */
63 } 54 }
64 } 55 }
65 56
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs
index ff5f8b9..81d82be 100644
--- a/OpenSim/Framework/SLUtil.cs
+++ b/OpenSim/Framework/SLUtil.cs
@@ -1,11 +1,15 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Reflection;
4using log4net;
3using OpenMetaverse; 5using OpenMetaverse;
4 6
5namespace OpenSim.Framework 7namespace OpenSim.Framework
6{ 8{
7 public static class SLUtil 9 public static class SLUtil
8 { 10 {
11// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
12
9 #region SL / file extension / content-type conversions 13 #region SL / file extension / content-type conversions
10 14
11 public static string SLAssetTypeToContentType(int assetType) 15 public static string SLAssetTypeToContentType(int assetType)
@@ -190,7 +194,12 @@ namespace OpenSim.Framework
190 /// <returns></returns> 194 /// <returns></returns>
191 public static string ParseNotecardToString(string rawInput) 195 public static string ParseNotecardToString(string rawInput)
192 { 196 {
193 return string.Join("\n", ParseNotecardToList(rawInput).ToArray()); 197 string[] output = ParseNotecardToList(rawInput).ToArray();
198
199// foreach (string line in output)
200// m_log.DebugFormat("[PARSE NOTECARD]: ParseNotecardToString got line {0}", line);
201
202 return string.Join("\n", output);
194 } 203 }
195 204
196 /// <summary> 205 /// <summary>
@@ -254,6 +263,7 @@ namespace OpenSim.Framework
254 if (ln.Length > need) 263 if (ln.Length > need)
255 ln = ln.Substring(0, need); 264 ln = ln.Substring(0, need);
256 265
266// m_log.DebugFormat("[PARSE NOTECARD]: Adding line {0}", ln);
257 output.Add(ln); 267 output.Add(ln);
258 count += ln.Length + 1; 268 count += ln.Length + 1;
259 idx++; 269 idx++;
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 8f19417..4ca6595 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -42,6 +42,8 @@ namespace OpenSim
42 /// </summary> 42 /// </summary>
43 public class ConfigurationLoader 43 public class ConfigurationLoader
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46
45 /// <summary> 47 /// <summary>
46 /// Various Config settings the region needs to start 48 /// Various Config settings the region needs to start
47 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, 49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
@@ -61,17 +63,6 @@ namespace OpenSim
61 protected NetworkServersInfo m_networkServersInfo; 63 protected NetworkServersInfo m_networkServersInfo;
62 64
63 /// <summary> 65 /// <summary>
64 /// Console logger
65 /// </summary>
66 private static readonly ILog m_log =
67 LogManager.GetLogger(
68 MethodBase.GetCurrentMethod().DeclaringType);
69
70 public ConfigurationLoader()
71 {
72 }
73
74 /// <summary>
75 /// Loads the region configuration 66 /// Loads the region configuration
76 /// </summary> 67 /// </summary>
77 /// <param name="argvSource">Parameters passed into the process when started</param> 68 /// <param name="argvSource">Parameters passed into the process when started</param>
@@ -188,7 +179,6 @@ namespace OpenSim
188 } 179 }
189 180
190 // Make sure command line options take precedence 181 // Make sure command line options take precedence
191 //
192 m_config.Source.Merge(argvSource); 182 m_config.Source.Merge(argvSource);
193 183
194 ReadConfigSettings(); 184 ReadConfigSettings();
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs
index d78daf9..c402a3f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs
@@ -47,7 +47,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
47 private bool m_Enabled = false; 47 private bool m_Enabled = false;
48 48
49 private PresenceDetector m_PresenceDetector; 49 private PresenceDetector m_PresenceDetector;
50 private IPresenceService m_PresenceService; 50
51 /// <summary>
52 /// Underlying presence service. Do not use directly.
53 /// </summary>
54 public IPresenceService m_PresenceService;
51 55
52 public LocalPresenceServicesConnector() 56 public LocalPresenceServicesConnector()
53 { 57 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
index ca42461..292ff8e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
@@ -59,6 +59,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
59 config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 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
63 // Let's stick in a test presence
64 m_LocalConnector.m_PresenceService.LoginAgent(UUID.Zero.ToString(), UUID.Zero, UUID.Zero);
62 } 65 }
63 66
64 /// <summary> 67 /// <summary>
@@ -68,6 +71,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
68 public void TestPresenceV0_1() 71 public void TestPresenceV0_1()
69 { 72 {
70 SetUp(); 73 SetUp();
74
75 // Let's stick in a test presence
76 /*
77 PresenceData p = new PresenceData();
78 p.SessionID = UUID.Zero;
79 p.UserID = UUID.Zero.ToString();
80 p.Data = new Dictionary<string, string>();
81 p.Data["Online"] = true.ToString();
82 m_presenceData.Add(UUID.Zero, p);
83 */
71 84
72 string user1 = UUID.Zero.ToString(); 85 string user1 = UUID.Zero.ToString();
73 UUID session1 = UUID.Zero; 86 UUID session1 = UUID.Zero;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 974f91b..0134b03 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -52,7 +52,6 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
52using OpenSim.Region.ScriptEngine.Interfaces; 52using OpenSim.Region.ScriptEngine.Interfaces;
53using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 53using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
54using OpenSim.Services.Interfaces; 54using OpenSim.Services.Interfaces;
55using OpenSim.Services.Interfaces;
56using GridRegion = OpenSim.Services.Interfaces.GridRegion; 55using GridRegion = OpenSim.Services.Interfaces.GridRegion;
57using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; 56using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
58using PrimType = OpenSim.Region.Framework.Scenes.PrimType; 57using PrimType = OpenSim.Region.Framework.Scenes.PrimType;