aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/Framework
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs48
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs104
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs46
-rw-r--r--OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs20
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs78
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs62
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs4
21 files changed, 257 insertions, 257 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
index 386694a..292099d 100644
--- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
@@ -47,23 +47,23 @@ namespace OpenSim.Region.CoreModules.Framework
47{ 47{
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")]
49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule 49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; 53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n";
54 54
55 protected Scene m_scene; 55 protected Scene m_scene;
56 56
57 /// <summary> 57 /// <summary>
58 /// Each agent has its own capabilities handler. 58 /// Each agent has its own capabilities handler.
59 /// </summary> 59 /// </summary>
60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>(); 60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>();
61 61
62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>(); 62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>();
63 63
64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds 64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds
65 = new Dictionary<UUID, Dictionary<ulong, string>>(); 65 = new Dictionary<UUID, Dictionary<ulong, string>>();
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 } 69 }
@@ -101,16 +101,16 @@ namespace OpenSim.Region.CoreModules.Framework
101 { 101 {
102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); 102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
103 } 103 }
104 104
105 public void PostInitialise() 105 public void PostInitialise()
106 { 106 {
107 } 107 }
108 108
109 public void Close() {} 109 public void Close() {}
110 110
111 public string Name 111 public string Name
112 { 112 {
113 get { return "Capabilities Module"; } 113 get { return "Capabilities Module"; }
114 } 114 }
115 115
116 public Type ReplaceableInterface 116 public Type ReplaceableInterface
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Framework
154 // new object created below 154 // new object created below
155 oldCaps.DeregisterHandlers(); 155 oldCaps.DeregisterHandlers();
156 156
157 // Better safe ... should not be needed but also 157 // Better safe ... should not be needed but also
158 // no big deal 158 // no big deal
159 m_capsObjects.Remove(circuitCode); 159 m_capsObjects.Remove(circuitCode);
160 } 160 }
@@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.Framework
215 } 215 }
216 } 216 }
217 } 217 }
218 218
219 public Caps GetCapsForUser(uint circuitCode) 219 public Caps GetCapsForUser(uint circuitCode)
220 { 220 {
221 lock (m_capsObjects) 221 lock (m_capsObjects)
@@ -225,10 +225,10 @@ namespace OpenSim.Region.CoreModules.Framework
225 return m_capsObjects[circuitCode]; 225 return m_capsObjects[circuitCode];
226 } 226 }
227 } 227 }
228 228
229 return null; 229 return null;
230 } 230 }
231 231
232 public void ActivateCaps(uint circuitCode) 232 public void ActivateCaps(uint circuitCode)
233 { 233 {
234 lock (m_capsObjects) 234 lock (m_capsObjects)
@@ -246,10 +246,10 @@ namespace OpenSim.Region.CoreModules.Framework
246 m_capsPaths[agent.AgentID] = agent.CapsPath; 246 m_capsPaths[agent.AgentID] = agent.CapsPath;
247 247
248 lock (m_childrenSeeds) 248 lock (m_childrenSeeds)
249 m_childrenSeeds[agent.AgentID] 249 m_childrenSeeds[agent.AgentID]
250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); 250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds);
251 } 251 }
252 252
253 public string GetCapsPath(UUID agentId) 253 public string GetCapsPath(UUID agentId)
254 { 254 {
255 lock (m_capsPaths) 255 lock (m_capsPaths)
@@ -262,7 +262,7 @@ namespace OpenSim.Region.CoreModules.Framework
262 262
263 return null; 263 return null;
264 } 264 }
265 265
266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID) 266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID)
267 { 267 {
268 Dictionary<ulong, string> seeds = null; 268 Dictionary<ulong, string> seeds = null;
@@ -414,8 +414,8 @@ namespace OpenSim.Region.CoreModules.Framework
414 { 414 {
415 receivedStats[sp.Name] = reqHandler.RequestsReceived; 415 receivedStats[sp.Name] = reqHandler.RequestsReceived;
416 handledStats[sp.Name] = reqHandler.RequestsHandled; 416 handledStats[sp.Name] = reqHandler.RequestsHandled;
417 } 417 }
418 else 418 else
419 { 419 {
420 PollServiceEventArgs pollHandler = null; 420 PollServiceEventArgs pollHandler = null;
421 if (caps.TryGetPollHandler(capName, out pollHandler)) 421 if (caps.TryGetPollHandler(capName, out pollHandler))
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Framework
454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID); 454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID);
455 455
456 if (caps == null) 456 if (caps == null)
457 return; 457 return;
458 458
459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values) 459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values)
460 { 460 {
@@ -490,7 +490,7 @@ namespace OpenSim.Region.CoreModules.Framework
490 } 490 }
491 } 491 }
492 ); 492 );
493 493
494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value)) 494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value))
495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]); 495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]);
496 496
@@ -559,7 +559,7 @@ namespace OpenSim.Region.CoreModules.Framework
559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled)); 559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled));
560 560
561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived)) 561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived))
562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled); 562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled);
563 563
564 sb.Append(cdt.ToString()); 564 sb.Append(cdt.ToString());
565 */ 565 */
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Framework
601 totalRequestsReceived += handler.RequestsReceived; 601 totalRequestsReceived += handler.RequestsReceived;
602 totalRequestsHandled += handler.RequestsHandled; 602 totalRequestsHandled += handler.RequestsHandled;
603 } 603 }
604 604
605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled); 605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled);
606 } 606 }
607 ); 607 );
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index 0c632b1..d652f43 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -53,12 +53,12 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
53 53
54 protected Scene m_scene; 54 protected Scene m_scene;
55 protected IDialogModule m_dialogMod; 55 protected IDialogModule m_dialogMod;
56 56
57 public string Name { get { return "DAExample Module"; } } 57 public string Name { get { return "DAExample Module"; } }
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) {} 60 public void Initialise(IConfigSource source) {}
61 61
62 public void AddRegion(Scene scene) 62 public void AddRegion(Scene scene)
63 { 63 {
64 if (ENABLED) 64 if (ENABLED)
@@ -70,22 +70,22 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name); 70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
71 } 71 }
72 } 72 }
73 73
74 public void RemoveRegion(Scene scene) 74 public void RemoveRegion(Scene scene)
75 { 75 {
76 if (ENABLED) 76 if (ENABLED)
77 { 77 {
78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
79 } 79 }
80 } 80 }
81 81
82 public void RegionLoaded(Scene scene) {} 82 public void RegionLoaded(Scene scene) {}
83 83
84 public void Close() 84 public void Close()
85 { 85 {
86 RemoveRegion(m_scene); 86 RemoveRegion(m_scene);
87 } 87 }
88 88
89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) 89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
90 { 90 {
91 OSDMap attrs = null; 91 OSDMap attrs = null;
@@ -96,28 +96,28 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
96 96
97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs)) 97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs))
98 attrs = new OSDMap(); 98 attrs = new OSDMap();
99 99
100 OSDInteger newValue; 100 OSDInteger newValue;
101 101
102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code. 102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code.
103 lock (sop.DynAttrs) 103 lock (sop.DynAttrs)
104 { 104 {
105 if (!attrs.ContainsKey("moves")) 105 if (!attrs.ContainsKey("moves"))
106 newValue = new OSDInteger(1); 106 newValue = new OSDInteger(1);
107 else 107 else
108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1); 108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1);
109 109
110 attrs["moves"] = newValue; 110 attrs["moves"] = newValue;
111 111
112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs); 112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs);
113 } 113 }
114 114
115 sop.ParentGroup.HasGroupChanged = true; 115 sop.ParentGroup.HasGroupChanged = true;
116 116
117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue); 117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue);
118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg); 118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg);
119 m_dialogMod.SendGeneralAlert(msg); 119 m_dialogMod.SendGeneralAlert(msg);
120 120
121 return true; 121 return true;
122 } 122 }
123 } 123 }
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
index 166a994..3364cbc 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
65 private Scene m_scene; 65 private Scene m_scene;
66 private IDialogModule m_dialogMod; 66 private IDialogModule m_dialogMod;
67 67
68 public string Name { get { return "DO"; } } 68 public string Name { get { return "DO"; } }
69 public Type ReplaceableInterface { get { return null; } } 69 public Type ReplaceableInterface { get { return null; } }
70 70
71 public void Initialise(IConfigSource source) {} 71 public void Initialise(IConfigSource source) {}
72 72
73 public void AddRegion(Scene scene) 73 public void AddRegion(Scene scene)
74 { 74 {
75 if (ENABLED) 75 if (ENABLED)
@@ -80,18 +80,18 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); 80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
81 } 81 }
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86 if (ENABLED) 86 if (ENABLED)
87 { 87 {
88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
89 } 89 }
90 } 90 }
91 91
92 public void RegionLoaded(Scene scene) {} 92 public void RegionLoaded(Scene scene) {}
93 93
94 public void Close() 94 public void Close()
95 { 95 {
96 RemoveRegion(m_scene); 96 RemoveRegion(m_scene);
97 } 97 }
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
116 116
117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar)); 117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar));
118 } 118 }
119 119
120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta) 120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta)
121 { 121 {
122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId); 122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId);
@@ -129,11 +129,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
129 if (rawObj != null) 129 if (rawObj != null)
130 { 130 {
131 MyObject myObj = (MyObject)rawObj; 131 MyObject myObj = (MyObject)rawObj;
132 132
133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves)); 133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves));
134 } 134 }
135 135
136 return true; 136 return true;
137 } 137 }
138 } 138 }
139} \ No newline at end of file 139} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 58d6cf2..6b1eb54 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -72,9 +72,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests. 72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests.
73 /// </summary> 73 /// </summary>
74 /// <remarks> 74 /// <remarks>
75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a 75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a
76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the 76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the
77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport 77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport
78 /// cancellation consistently suceed. 78 /// cancellation consistently suceed.
79 /// </remarks> 79 /// </remarks>
80 public bool DisableInterRegionTeleportCancellation { get; set; } 80 public bool DisableInterRegionTeleportCancellation { get; set; }
@@ -221,12 +221,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
221 IConfig transferConfig = source.Configs["EntityTransfer"]; 221 IConfig transferConfig = source.Configs["EntityTransfer"];
222 if (transferConfig != null) 222 if (transferConfig != null)
223 { 223 {
224 DisableInterRegionTeleportCancellation 224 DisableInterRegionTeleportCancellation
225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); 225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
226 226
227 WaitForAgentArrivedAtDestination 227 WaitForAgentArrivedAtDestination
228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); 228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault);
229 229
230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance); 230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance);
231 } 231 }
232 else 232 else
@@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
250 250
251 Scene = scene; 251 Scene = scene;
252 252
253 m_interRegionTeleportAttempts = 253 m_interRegionTeleportAttempts =
254 new Stat( 254 new Stat(
255 "InterRegionTeleportAttempts", 255 "InterRegionTeleportAttempts",
256 "Number of inter-region teleports attempted.", 256 "Number of inter-region teleports attempted.",
@@ -263,7 +263,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
263 null, 263 null,
264 StatVerbosity.Debug); 264 StatVerbosity.Debug);
265 265
266 m_interRegionTeleportAborts = 266 m_interRegionTeleportAborts =
267 new Stat( 267 new Stat(
268 "InterRegionTeleportAborts", 268 "InterRegionTeleportAborts",
269 "Number of inter-region teleports aborted due to client actions.", 269 "Number of inter-region teleports aborted due to client actions.",
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
275 null, 275 null,
276 StatVerbosity.Debug); 276 StatVerbosity.Debug);
277 277
278 m_interRegionTeleportCancels = 278 m_interRegionTeleportCancels =
279 new Stat( 279 new Stat(
280 "InterRegionTeleportCancels", 280 "InterRegionTeleportCancels",
281 "Number of inter-region teleports cancelled by the client.", 281 "Number of inter-region teleports cancelled by the client.",
@@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
287 null, 287 null,
288 StatVerbosity.Debug); 288 StatVerbosity.Debug);
289 289
290 m_interRegionTeleportFailures = 290 m_interRegionTeleportFailures =
291 new Stat( 291 new Stat(
292 "InterRegionTeleportFailures", 292 "InterRegionTeleportFailures",
293 "Number of inter-region teleports that failed due to server/client/network issues.", 293 "Number of inter-region teleports that failed due to server/client/network issues.",
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
321 321
322 public virtual void Close() {} 322 public virtual void Close() {}
323 323
324 public virtual void RemoveRegion(Scene scene) 324 public virtual void RemoveRegion(Scene scene)
325 { 325 {
326 if (m_Enabled) 326 if (m_Enabled)
327 { 327 {
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting)) 349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting))
350 { 350 {
351 m_log.DebugFormat( 351 m_log.DebugFormat(
352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout", 352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout",
353 client.Name, Scene.Name); 353 client.Name, Scene.Name);
354 } 354 }
355 } 355 }
@@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit."); 672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit.");
673 return; 673 return;
674 } 674 }
675 675
676 try 676 try
677 { 677 {
678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags); 678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags);
@@ -766,7 +766,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
766 m_interRegionTeleportAttempts.Value++; 766 m_interRegionTeleportAttempts.Value++;
767 767
768 m_log.DebugFormat( 768 m_log.DebugFormat(
769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}", 769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}",
770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion); 770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion);
771 771
772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo(); 797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo();
798 agentCircuit.startpos = position; 798 agentCircuit.startpos = position;
799 agentCircuit.child = true; 799 agentCircuit.child = true;
800 800
801// agentCircuit.Appearance = sp.Appearance; 801// agentCircuit.Appearance = sp.Appearance;
802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false); 802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false);
803 agentCircuit.Appearance = new AvatarAppearance(); 803 agentCircuit.Appearance = new AvatarAppearance();
@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
814 } 814 }
815 815
816 IClientIPEndpoint ipepClient; 816 IClientIPEndpoint ipepClient;
817 817
818 uint newRegionX, newRegionY, oldRegionX, oldRegionY; 818 uint newRegionX, newRegionY, oldRegionX, oldRegionY;
819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY); 819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY);
820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY); 820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY);
@@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
853 if (ctx.OutboundVersion >= 0.2f) 853 if (ctx.OutboundVersion >= 0.2f)
854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason); 854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason);
855 else 855 else
856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason); 856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason);
857 } 857 }
858 858
859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
@@ -863,12 +863,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
864 864
865 m_log.DebugFormat( 865 m_log.DebugFormat(
866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}", 866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}",
867 sp.Name, Scene.Name, finalDestination.RegionName); 867 sp.Name, Scene.Name, finalDestination.RegionName);
868 868
869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
870 870
871 // Let's create an agent there if one doesn't exist yet. 871 // Let's create an agent there if one doesn't exist yet.
872 // NOTE: logout will always be false for a non-HG teleport. 872 // NOTE: logout will always be false for a non-HG teleport.
873 bool logout = false; 873 bool logout = false;
874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -953,7 +953,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
953 SetCallbackURL(agent, sp.Scene.RegionInfo); 953 SetCallbackURL(agent, sp.Scene.RegionInfo);
954 954
955 955
956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to 956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to
957 // establish th econnection to the destination which makes it return true. 957 // establish th econnection to the destination which makes it return true.
958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
959 { 959 {
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
966 return; 966 return;
967 } 967 }
968 968
969 // A common teleport failure occurs when we can send CreateAgent to the 969 // A common teleport failure occurs when we can send CreateAgent to the
970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between 970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between
971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then 971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail(). 972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail().
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1011 1011
1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1013 // where that neighbour simulator could otherwise request a child agent create on the source which then 1013 // where that neighbour simulator could otherwise request a child agent create on the source which then
1014 // closes our existing agent which is still signalled as root. 1014 // closes our existing agent which is still signalled as root.
1015 sp.IsChildAgent = true; 1015 sp.IsChildAgent = true;
1016 1016
@@ -1071,7 +1071,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1071 AgentHasMovedAway(sp, logout); 1071 AgentHasMovedAway(sp, logout);
1072 1072
1073 sp.HasMovedAway(!(OutSideViewRange || logout)); 1073 sp.HasMovedAway(!(OutSideViewRange || logout));
1074 1074
1075// ulong sourceRegionHandle = sp.RegionHandle; 1075// ulong sourceRegionHandle = sp.RegionHandle;
1076 1076
1077 // Now let's make it officially a child agent 1077 // Now let's make it officially a child agent
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1107 1107
1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);; 1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);;
1109 1109
1110 // Let's create an agent there if one doesn't exist yet. 1110 // Let's create an agent there if one doesn't exist yet.
1111 // NOTE: logout will always be false for a non-HG teleport. 1111 // NOTE: logout will always be false for a non-HG teleport.
1112 bool logout = false; 1112 bool logout = false;
1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -1150,7 +1150,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
1151 1151
1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1153 // where that neighbour simulator could otherwise request a child agent create on the source which then 1153 // where that neighbour simulator could otherwise request a child agent create on the source which then
1154 // closes our existing agent which is still signalled as root. 1154 // closes our existing agent which is still signalled as root.
1155 //sp.IsChildAgent = true; 1155 //sp.IsChildAgent = true;
1156 1156
@@ -1166,7 +1166,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", 1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}",
1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1168 1168
1169 // Let's send a full update of the agent. 1169 // Let's send a full update of the agent.
1170 AgentData agent = new AgentData(); 1170 AgentData agent = new AgentData();
1171 sp.CopyTo(agent,false); 1171 sp.CopyTo(agent,false);
1172 agent.Position = agentCircuit.startpos; 1172 agent.Position = agentCircuit.startpos;
@@ -1207,7 +1207,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1207 sp.IsInTransit = false; 1207 sp.IsInTransit = false;
1208 return; 1208 return;
1209 } 1209 }
1210 1210
1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1212 1212
1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this 1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1248// Thread.Sleep(1000); 1248// Thread.Sleep(1000);
1249 1249
1250 // OK, it got this agent. Let's close everything 1250 // OK, it got this agent. Let's close everything
1251 // If we shouldn't close the agent due to some other region renewing the connection 1251 // If we shouldn't close the agent due to some other region renewing the connection
1252 // then this will be handled in IncomingCloseAgent under lock conditions 1252 // then this will be handled in IncomingCloseAgent under lock conditions
1253 m_log.DebugFormat( 1253 m_log.DebugFormat(
1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
@@ -1258,7 +1258,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1258/* 1258/*
1259 else 1259 else
1260 { 1260 {
1261 // now we have a child agent in this region. 1261 // now we have a child agent in this region.
1262 sp.Reset(); 1262 sp.Reset();
1263 } 1263 }
1264 */ 1264 */
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1343 /// </summary> 1343 /// </summary>
1344 /// <param name='sp'></param> 1344 /// <param name='sp'></param>
1345 /// <param name='logout'></param> 1345 /// <param name='logout'></param>
1346 /// 1346 ///
1347 /// now just a HG hook 1347 /// now just a HG hook
1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) 1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout)
1349 { 1349 {
@@ -1375,7 +1375,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1375 1375
1376 // HG Hook 1376 // HG Hook
1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange) 1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange)
1378 1378
1379 { 1379 {
1380 return OutViewRange; 1380 return OutViewRange;
1381 } 1381 }
@@ -1399,11 +1399,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1399 remoteClient.SendTeleportFailed("The teleport destination could not be found."); 1399 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
1400 return; 1400 return;
1401 } 1401 }
1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position, 1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position,
1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
1404 } 1404 }
1405 1405
1406 #endregion 1406 #endregion
1407 1407
1408 #region Teleport Home 1408 #region Teleport Home
1409 1409
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1437 client.SendTeleportFailed("Your home region could not be found."); 1437 client.SendTeleportFailed("Your home region could not be found.");
1438 return false; 1438 return false;
1439 } 1439 }
1440 1440
1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", 1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})",
1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY); 1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY);
1443 1443
@@ -1475,7 +1475,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1475 1475
1476 Scene ascene = agent.Scene; 1476 Scene ascene = agent.Scene;
1477 string homeURI = ascene.GetAgentHomeURI(agentID); 1477 string homeURI = ascene.GetAgentHomeURI(agentID);
1478 1478
1479 1479
1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position, 1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position,
1481 agent.Scene.GetFormatsOffered(), ctx, out reason)) 1481 agent.Scene.GetFormatsOffered(), ctx, out reason))
@@ -1489,7 +1489,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1489 1489
1490 // Given a position relative to the current region and outside of it 1490 // Given a position relative to the current region and outside of it
1491 // find the new region that the point is actually in. 1491 // find the new region that the point is actually in.
1492 // returns 'null' if new region not found or if information 1492 // returns 'null' if new region not found or if information
1493 // and new position relative to it 1493 // and new position relative to it
1494 // now only works for crossings 1494 // now only works for crossings
1495 1495
@@ -1611,14 +1611,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1611 Thread.Sleep(10000); 1611 Thread.Sleep(10000);
1612 1612
1613 m_log.DebugFormat( 1613 m_log.DebugFormat(
1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}", 1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}",
1615 agent.Name, regionX, regionY, position, initiatingScene.Name); 1615 agent.Name, regionX, regionY, position, initiatingScene.Name);
1616 1616
1617 agent.Scene.RequestTeleportLocation( 1617 agent.Scene.RequestTeleportLocation(
1618 agent.ControllingClient, 1618 agent.ControllingClient,
1619 Util.RegionGridLocToHandle(regionX, regionY), 1619 Util.RegionGridLocToHandle(regionX, regionY),
1620 position, 1620 position,
1621 agent.Lookat, 1621 agent.Lookat,
1622 (uint)Constants.TeleportFlags.ViaLocation); 1622 (uint)Constants.TeleportFlags.ViaLocation);
1623 1623
1624 /* 1624 /*
@@ -1662,7 +1662,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1662 icon.EndInvoke(iar); 1662 icon.EndInvoke(iar);
1663 } 1663 }
1664 1664
1665 1665
1666 1666
1667 /// <summary> 1667 /// <summary>
1668 /// This Closes child agents on neighbouring regions 1668 /// This Closes child agents on neighbouring regions
@@ -1708,7 +1708,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1708 int ts = Util.EnvironmentTickCount(); 1708 int ts = Util.EnvironmentTickCount();
1709 try 1709 try
1710 { 1710 {
1711 AgentData cAgent = new AgentData(); 1711 AgentData cAgent = new AgentData();
1712 agent.CopyTo(cAgent,true); 1712 agent.CopyTo(cAgent,true);
1713 1713
1714// agent.Appearance.WearableCacheItems = null; 1714// agent.Appearance.WearableCacheItems = null;
@@ -1731,7 +1731,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); 1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
1732 1732
1733 m_log.WarnFormat( 1733 m_log.WarnFormat(
1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.", 1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.",
1735 neighbourRegion.RegionName, agent.Name); 1735 neighbourRegion.RegionName, agent.Name);
1736 1736
1737 ReInstantiateScripts(agent); 1737 ReInstantiateScripts(agent);
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1827 1827
1828 return; 1828 return;
1829 } 1829 }
1830 1830
1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar) 1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar)
1832 { 1832 {
1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState; 1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState;
@@ -2167,7 +2167,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2167 return false; 2167 return false;
2168 } 2168 }
2169 } 2169 }
2170 2170
2171 private void DoExpiration() 2171 private void DoExpiration()
2172 { 2172 {
2173 List<ulong> m_toRemove = new List<ulong>();; 2173 List<ulong> m_toRemove = new List<ulong>();;
@@ -2179,7 +2179,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2179 if (kvp.Value < now) 2179 if (kvp.Value < now)
2180 m_toRemove.Add(kvp.Key); 2180 m_toRemove.Add(kvp.Key);
2181 } 2181 }
2182 2182
2183 if (m_toRemove.Count > 0) 2183 if (m_toRemove.Count > 0)
2184 { 2184 {
2185 foreach (ulong u in m_toRemove) 2185 foreach (ulong u in m_toRemove)
@@ -2199,7 +2199,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2199 // to find possible regions. 2199 // to find possible regions.
2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize); 2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize);
2201 } 2201 }
2202 2202
2203 // Given a world position, get the GridRegion info for 2203 // Given a world position, get the GridRegion info for
2204 // the region containing that point. 2204 // the region containing that point.
2205 // for compatibility with old grids it does a scan to find large regions 2205 // for compatibility with old grids it does a scan to find large regions
@@ -2285,7 +2285,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2285 if (newAgent) 2285 if (newAgent)
2286 { 2286 {
2287 // we may already had lost this sp 2287 // we may already had lost this sp
2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2289 return; 2289 return;
2290 2290
2291 Scene scene = sp.Scene; 2291 Scene scene = sp.Scene;
@@ -2303,13 +2303,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2303 2303
2304 if (regionAccepted) 2304 if (regionAccepted)
2305 { 2305 {
2306 // give time for createAgent to finish, since it is async and does grid services access 2306 // give time for createAgent to finish, since it is async and does grid services access
2307 Thread.Sleep(500); 2307 Thread.Sleep(500);
2308 2308
2309 if (m_eqModule != null) 2309 if (m_eqModule != null)
2310 { 2310 {
2311 #region IP Translation for NAT 2311 #region IP Translation for NAT
2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2313 return; 2313 return;
2314 2314
2315 IClientIPEndpoint ipepClient; 2315 IClientIPEndpoint ipepClient;
@@ -2344,7 +2344,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2344 reg.RegionName, sp.Name, sp.UUID, reason); 2344 reg.RegionName, sp.Name, sp.UUID, reason);
2345 } 2345 }
2346 } 2346 }
2347 2347
2348 } 2348 }
2349 2349
2350 /// <summary> 2350 /// <summary>
@@ -2353,7 +2353,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2353 /// <param name="avatar"></param> 2353 /// <param name="avatar"></param>
2354 /// <param name="pRegionLocX"></param> 2354 /// <param name="pRegionLocX"></param>
2355 /// <param name="pRegionLocY"></param> 2355 /// <param name="pRegionLocY"></param>
2356 /// <returns></returns> 2356 /// <returns></returns>
2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY) 2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY)
2358 { 2358 {
2359 Scene pScene = avatar.Scene; 2359 Scene pScene = avatar.Scene;
@@ -2588,7 +2588,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID)) 2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID))
2589 { 2589 {
2590 m_log.DebugFormat( 2590 m_log.DebugFormat(
2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}", 2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}",
2592 so.Name, so.UUID, Scene.Name, so.OwnerID); 2592 so.Name, so.UUID, Scene.Name, so.OwnerID);
2593 2593
2594 return false; 2594 return false;
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2600 if (!Scene.AddSceneObject(so)) 2600 if (!Scene.AddSceneObject(so))
2601 { 2601 {
2602 m_log.DebugFormat( 2602 m_log.DebugFormat(
2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ", 2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ",
2604 so.Name, so.UUID, Scene.Name); 2604 so.Name, so.UUID, Scene.Name);
2605 2605
2606 return false; 2606 return false;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
index acfdaef..0a24555 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
169 } 169 }
170 else 170 else
171 { 171 {
172 if (newState == AgentTransferState.Cancelling 172 if (newState == AgentTransferState.Cancelling
173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring)) 173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring))
174 { 174 {
175 transitionOkay = true; 175 transitionOkay = true;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
181 } 181 }
182 182
183 if (!transitionOkay) 183 if (!transitionOkay)
184 failureMessage 184 failureMessage
185 = string.Format( 185 = string.Format(
186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}", 186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}",
187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName); 187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName);
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
192 m_agentsInTransit[id] = newState; 192 m_agentsInTransit[id] = newState;
193 193
194// m_log.DebugFormat( 194// m_log.DebugFormat(
195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}", 195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}",
196// id, oldState, newState, m_mod.Scene.Name); 196// id, oldState, newState, m_mod.Scene.Name);
197 } 197 }
198 else if (failIfNotOkay) 198 else if (failIfNotOkay)
@@ -204,11 +204,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
204// { 204// {
205// if (oldState != null) 205// if (oldState != null)
206// m_log.DebugFormat( 206// m_log.DebugFormat(
207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}", 207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}",
208// id, oldState, newState, m_mod.Scene.Name); 208// id, oldState, newState, m_mod.Scene.Name);
209// else 209// else
210// m_log.DebugFormat( 210// m_log.DebugFormat(
211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit", 211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit",
212// id, newState, m_mod.Scene.Name); 212// id, newState, m_mod.Scene.Name);
213// } 213// }
214 } 214 }
@@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
281 { 281 {
282 if (!m_mod.WaitForAgentArrivedAtDestination) 282 if (!m_mod.WaitForAgentArrivedAtDestination)
283 return true; 283 return true;
284 284
285 lock (m_agentsInTransit) 285 lock (m_agentsInTransit)
286 { 286 {
287 AgentTransferState? currentState = GetAgentTransferState(id); 287 AgentTransferState? currentState = GetAgentTransferState(id);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index a9aaf12..4ad500a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this); 160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this);
161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject; 161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject;
162 162
163 m_incomingSceneObjectEngine 163 m_incomingSceneObjectEngine
164 = new JobEngine( 164 = new JobEngine(
165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name), 165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name),
166 "HG INCOMING SCENE OBJECT ENGINE"); 166 "HG INCOMING SCENE OBJECT ENGINE");
167 167
168 StatsManager.RegisterStat( 168 StatsManager.RegisterStat(
@@ -291,7 +291,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
291 291
292 GridRegion source = new GridRegion(Scene.RegionInfo); 292 GridRegion source = new GridRegion(Scene.RegionInfo);
293 source.RawServerURI = m_GatekeeperURI; 293 source.RawServerURI = m_GatekeeperURI;
294 294
295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason); 295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason);
296 logout = success; // flag for later logout from this grid; this is an HG TP 296 logout = success; // flag for later logout from this grid; this is an HG TP
297 297
@@ -347,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
347 break; 347 break;
348 } 348 }
349 349
350 if (!found) 350 if (!found)
351 { 351 {
352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i); 352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i);
353 return false; 353 return false;
@@ -416,7 +416,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
416 // // Rez needed npc attachments 416 // // Rez needed npc attachments
417 // Scene.AttachmentsModule.RezAttachments(sp); 417 // Scene.AttachmentsModule.RezAttachments(sp);
418 418
419 419
420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>(); 420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>();
421 // //module.SendAppearance(sp.UUID); 421 // //module.SendAppearance(sp.UUID);
422 // module.RequestRebake(sp, false); 422 // module.RequestRebake(sp, false);
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
433 // return base.UpdateAgent(reg, finalDestination, agentData, sp); 433 // return base.UpdateAgent(reg, finalDestination, agentData, sp);
434 //} 434 //}
435 435
436 436
437 public override bool TeleportHome(UUID id, IClientAPI client) 437 public override bool TeleportHome(UUID id, IClientAPI client)
438 { 438 {
439 m_log.DebugFormat( 439 m_log.DebugFormat(
@@ -449,7 +449,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
449 } 449 }
450 450
451 // Foreign user wants to go home 451 // Foreign user wants to go home
452 // 452 //
453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); 453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode);
454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI"))) 454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI")))
455 { 455 {
@@ -470,7 +470,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
470 { 470 {
471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e); 471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e);
472 } 472 }
473 473
474 if (finalDestination == null) 474 if (finalDestination == null)
475 { 475 {
476 client.SendTeleportFailed("Your home region could not be found"); 476 client.SendTeleportFailed("Your home region could not be found");
@@ -487,7 +487,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
487 } 487 }
488 488
489 GridRegion homeGatekeeper = MakeRegion(aCircuit); 489 GridRegion homeGatekeeper = MakeRegion(aCircuit);
490 490
491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}", 491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}",
492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); 492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName);
493 493
@@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
503 /// <param name="position"></param> 503 /// <param name="position"></param>
504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm) 504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm)
505 { 505 {
506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}", 506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}",
507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position); 507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position);
508 508
509 if (lm.Gatekeeper == string.Empty) 509 if (lm.Gatekeeper == string.Empty)
@@ -521,7 +521,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
521 remoteClient, info.RegionHandle, lm.Position, 521 remoteClient, info.RegionHandle, lm.Position,
522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
523 } 523 }
524 else 524 else
525 { 525 {
526 // Foreign region 526 // Foreign region
527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); 527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
@@ -581,7 +581,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count); 581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count);
582 582
583 if (jobsToReinsert.Count > 0) 583 if (jobsToReinsert.Count > 0)
584 { 584 {
585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert) 585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert)
586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert); 586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert);
587 } 587 }
@@ -611,16 +611,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
612 { 612 {
613 m_incomingSceneObjectEngine.QueueJob( 613 m_incomingSceneObjectEngine.QueueJob(
614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name), 614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name),
615 () => 615 () =>
616 { 616 {
617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
618 // m_log.DebugFormat( 618 // m_log.DebugFormat(
619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}", 619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}",
620 // so.Name, so.AttachedAvatar, url); 620 // so.Name, so.AttachedAvatar, url);
621 621
622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); 622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>();
623 HGUuidGatherer uuidGatherer 623 HGUuidGatherer uuidGatherer
624 = new HGUuidGatherer(Scene.AssetService, url, ids); 624 = new HGUuidGatherer(Scene.AssetService, url, ids);
625 uuidGatherer.AddForInspection(so); 625 uuidGatherer.AddForInspection(so);
626 626
@@ -646,7 +646,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
647 647
648 return; 648 return;
649 } 649 }
650 } 650 }
651 651
652 // m_log.DebugFormat( 652 // m_log.DebugFormat(
@@ -657,7 +657,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
657 { 657 {
658 int tickStart = Util.EnvironmentTickCount(); 658 int tickStart = Util.EnvironmentTickCount();
659 659
660 uuidGatherer.FetchAsset(kvp.Key); 660 uuidGatherer.FetchAsset(kvp.Key);
661 661
662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart); 662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart);
663 663
@@ -670,15 +670,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
671 671
672 return; 672 return;
673 } 673 }
674 } 674 }
675 675
676 base.HandleIncomingSceneObject(so, newPosition); 676 base.HandleIncomingSceneObject(so, newPosition);
677 677
678 // m_log.DebugFormat( 678 // m_log.DebugFormat(
679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}", 679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}",
680 // so.Name, so.OwnerID, url); 680 // so.Name, so.OwnerID, url);
681 }, 681 },
682 so.OwnerID.ToString()); 682 so.OwnerID.ToString());
683 } 683 }
684 } 684 }
@@ -698,7 +698,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
698 string url = aCircuit.ServiceURLs["HomeURI"].ToString(); 698 string url = aCircuit.ServiceURLs["HomeURI"].ToString();
699 IUserAgentService security = new UserAgentServiceConnector(url); 699 IUserAgentService security = new UserAgentServiceConnector(url);
700 return security.VerifyClient(aCircuit.SessionID, token); 700 return security.VerifyClient(aCircuit.SessionID, token);
701 } 701 }
702 else 702 else
703 { 703 {
704 m_log.DebugFormat( 704 m_log.DebugFormat(
@@ -746,7 +746,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
746 GridRegion region = new GridRegion(); 746 GridRegion region = new GridRegion();
747 747
748 Uri uri = null; 748 Uri uri = null;
749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") || 749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") ||
750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri))) 750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri)))
751 return null; 751 return null;
752 752
diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
index b5a4005..63dbb19 100644
--- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
+++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
@@ -41,34 +41,34 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
41 public class Commander : ICommander 41 public class Commander : ICommander
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 /// <value> 45 /// <value>
46 /// Used in runtime class generation 46 /// Used in runtime class generation
47 /// </summary> 47 /// </summary>
48 private string m_generatedApiClassName; 48 private string m_generatedApiClassName;
49 49
50 public string Name 50 public string Name
51 { 51 {
52 get { return m_name; } 52 get { return m_name; }
53 } 53 }
54 private string m_name; 54 private string m_name;
55 55
56 public string Help 56 public string Help
57 { 57 {
58 get 58 get
59 { 59 {
60 StringBuilder sb = new StringBuilder(); 60 StringBuilder sb = new StringBuilder();
61 61
62 sb.AppendLine("=== " + m_name + " ==="); 62 sb.AppendLine("=== " + m_name + " ===");
63 63
64 foreach (ICommand com in m_commands.Values) 64 foreach (ICommand com in m_commands.Values)
65 { 65 {
66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help); 66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help);
67 } 67 }
68 68
69 return sb.ToString(); 69 return sb.ToString();
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Constructor 74 /// Constructor
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
78 { 78 {
79 m_name = name; 79 m_name = name;
80 m_generatedApiClassName = m_name[0].ToString().ToUpper(); 80 m_generatedApiClassName = m_name[0].ToString().ToUpper();
81 81
82 if (m_name.Length > 1) 82 if (m_name.Length > 1)
83 m_generatedApiClassName += m_name.Substring(1); 83 m_generatedApiClassName += m_name.Substring(1);
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
87 { 87 {
88 get { return m_commands; } 88 get { return m_commands; }
89 } 89 }
90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); 90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>();
91 91
92 #region ICommander Members 92 #region ICommander Members
93 93
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
162 { 162 {
163 if (function != "help") 163 if (function != "help")
164 Console.WriteLine("ERROR: Invalid command - No such command exists"); 164 Console.WriteLine("ERROR: Invalid command - No such command exists");
165 165
166 Console.Write(Help); 166 Console.Write(Help);
167 } 167 }
168 } 168 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index f54298c..51ae217 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
178 { 178 {
179 UUID uuid = UUID.Zero; 179 UUID uuid = UUID.Zero;
180 UUID.TryParse(meta.CreatorID, out uuid); 180 UUID.TryParse(meta.CreatorID, out uuid);
181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); 181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid);
182 if (creator != null) 182 if (creator != null)
183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName; 183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName;
184 } 184 }
@@ -300,8 +300,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
300 { 300 {
301 m_log.Error( 301 m_log.Error(
302 string.Format( 302 string.Format(
303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ", 303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ",
304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL), 304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL),
305 e); 305 e);
306 306
307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after 307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
315 else 315 else
316 { 316 {
317 m_log.DebugFormat( 317 m_log.DebugFormat(
318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}", 318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}",
319 uuid, assetID, userAssetURL); 319 uuid, assetID, userAssetURL);
320 } 320 }
321 } 321 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 4d7c25b..f89e446 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -91,9 +91,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
91 if (name == Name) 91 if (name == Name)
92 { 92 {
93 m_Enabled = true; 93 m_Enabled = true;
94 94
95 InitialiseCommon(source); 95 InitialiseCommon(source);
96 96
97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name); 97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
98 98
99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); 117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
118 118
119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions", 119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions",
120 new string[] { "Startup", "Permissions" }, true); 120 new string[] { "Startup", "Permissions" }, true);
121 121
122 } 122 }
123 } 123 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
248 } 248 }
249 249
250 250
251 /// 251 ///
252 /// CapsUpdateInventoryItemAsset 252 /// CapsUpdateInventoryItemAsset
253 /// 253 ///
254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) 254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
@@ -268,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
268 return newAssetID; 268 return newAssetID;
269 } 269 }
270 270
271 /// 271 ///
272 /// UpdateInventoryItemAsset 272 /// UpdateInventoryItemAsset
273 /// 273 ///
274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) 274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
317 RezSelected, RemoveItem, fromTaskID, attachment); 317 RezSelected, RemoveItem, fromTaskID, attachment);
318 } 318 }
319 319
320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, 320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID,
321 UUID groupID, Vector3 RayEnd, Vector3 RayStart, 321 UUID groupID, Vector3 RayEnd, Vector3 RayStart,
322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
@@ -386,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
386 if (!m_CheckSeparateAssets) 386 if (!m_CheckSeparateAssets)
387 { 387 {
388 if (!UserManagementModule.IsLocalGridUser(userID)) 388 if (!UserManagementModule.IsLocalGridUser(userID))
389 { // foreign 389 { // foreign
390 ScenePresence sp = null; 390 ScenePresence sp = null;
391 if (m_Scene.TryGetScenePresence(userID, out sp)) 391 if (m_Scene.TryGetScenePresence(userID, out sp))
392 { 392 {
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
524 foreach (InventoryItemBase it in content.Items) 524 foreach (InventoryItemBase it in content.Items)
525 it.Name = it.Name + " (Unavailable)"; ; 525 it.Name = it.Name + " (Unavailable)"; ;
526 526
527 // Send the new names 527 // Send the new names
528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray()); 528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray());
529 529
530 } 530 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 771e5fe..fcf373b 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
68 return m_UserManagement; 68 return m_UserManagement;
69 } 69 }
70 } 70 }
71 71
72 public bool CoalesceMultipleObjectsToInventory { get; set; } 72 public bool CoalesceMultipleObjectsToInventory { get; set; }
73 73
74 #region INonSharedRegionModule 74 #region INonSharedRegionModule
@@ -92,14 +92,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
92 if (name == Name) 92 if (name == Name)
93 { 93 {
94 m_Enabled = true; 94 m_Enabled = true;
95 95
96 InitialiseCommon(source); 96 InitialiseCommon(source);
97 97
98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name); 98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
99 } 99 }
100 } 100 }
101 } 101 }
102 102
103 /// <summary> 103 /// <summary>
104 /// Common module config for both this and descendant classes. 104 /// Common module config for both this and descendant classes.
105 /// </summary> 105 /// </summary>
@@ -107,9 +107,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
107 protected virtual void InitialiseCommon(IConfigSource source) 107 protected virtual void InitialiseCommon(IConfigSource source)
108 { 108 {
109 IConfig inventoryConfig = source.Configs["Inventory"]; 109 IConfig inventoryConfig = source.Configs["Inventory"];
110 110
111 if (inventoryConfig != null) 111 if (inventoryConfig != null)
112 CoalesceMultipleObjectsToInventory 112 CoalesceMultipleObjectsToInventory
113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true); 113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
114 else 114 else
115 CoalesceMultipleObjectsToInventory = true; 115 CoalesceMultipleObjectsToInventory = true;
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
322 if (item != null && item.Owner == ownerID && asset != null) 322 if (item != null && item.Owner == ownerID && asset != null)
323 { 323 {
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}", 325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
326// item.Name, item.ID, asset.ID); 326// item.Name, item.ID, asset.ID);
327 327
328 item.AssetID = asset.FullID; 328 item.AssetID = asset.FullID;
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>(); 351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>();
352 352
353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>(); 353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>();
354 354
355 if (CoalesceMultipleObjectsToInventory) 355 if (CoalesceMultipleObjectsToInventory)
356 { 356 {
357 // The following code groups the SOG's by owner. No objects 357 // The following code groups the SOG's by owner. No objects
@@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
361 { 361 {
362 if (!bundlesToCopy.ContainsKey(g.OwnerID)) 362 if (!bundlesToCopy.ContainsKey(g.OwnerID))
363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>(); 363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>();
364 364
365 bundlesToCopy[g.OwnerID].Add(g); 365 bundlesToCopy[g.OwnerID].Add(g);
366 } 366 }
367 } 367 }
@@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
372 { 372 {
373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>(); 373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>();
374 bundle.Add(g); 374 bundle.Add(g);
375 bundlesToCopy[g.UUID] = bundle; 375 bundlesToCopy[g.UUID] = bundle;
376 } 376 }
377 } 377 }
378 378
@@ -384,10 +384,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
384 // with distinct destinations as well. 384 // with distinct destinations as well.
385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values) 385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values)
386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment)); 386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment));
387 387
388 return copiedItems; 388 return copiedItems;
389 } 389 }
390 390
391 /// <summary> 391 /// <summary>
392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object 392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object
393 /// item. If there are multiple objects then these will be saved as a single coalesced item. 393 /// item. If there are multiple objects then these will be saved as a single coalesced item.
@@ -408,7 +408,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>(); 408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>();
409 // this possible is not needed if keyframes are saved 409 // this possible is not needed if keyframes are saved
410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>(); 410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>();
411 411
412 foreach (SceneObjectGroup objectGroup in objlist) 412 foreach (SceneObjectGroup objectGroup in objlist)
413 { 413 {
414 if (objectGroup.RootPart.KeyframeMotion != null) 414 if (objectGroup.RootPart.KeyframeMotion != null)
@@ -457,7 +457,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
457 (uint)PermissionMask.Export); 457 (uint)PermissionMask.Export);
458 objectGroup.RootPart.NextOwnerMask |= 458 objectGroup.RootPart.NextOwnerMask |=
459 (uint)PermissionMask.Move; 459 (uint)PermissionMask.Move;
460 460
461 coa.Add(objectGroup); 461 coa.Add(objectGroup);
462 } 462 }
463 463
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment); 471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment);
472 else 472 else
473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment); 473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment);
474 474
475 // Restore the position of each group now that it has been stored to inventory. 475 // Restore the position of each group now that it has been stored to inventory.
476 foreach (SceneObjectGroup objectGroup in objlist) 476 foreach (SceneObjectGroup objectGroup in objlist)
477 { 477 {
@@ -493,11 +493,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
493 493
494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); 494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
495 item.CreatorData = objlist[0].RootPart.CreatorData; 495 item.CreatorData = objlist[0].RootPart.CreatorData;
496 496
497 if (objlist.Count > 1) 497 if (objlist.Count > 1)
498 { 498 {
499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; 499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems;
500 500
501 // If the objects have different creators then don't specify a creator at all 501 // If the objects have different creators then don't specify a creator at all
502 foreach (SceneObjectGroup objectGroup in objlist) 502 foreach (SceneObjectGroup objectGroup in objlist)
503 { 503 {
@@ -513,8 +513,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
513 else 513 else
514 { 514 {
515 item.SaleType = objlist[0].RootPart.ObjectSaleType; 515 item.SaleType = objlist[0].RootPart.ObjectSaleType;
516 item.SalePrice = objlist[0].RootPart.SalePrice; 516 item.SalePrice = objlist[0].RootPart.SalePrice;
517 } 517 }
518 518
519 AssetBase asset = CreateAsset( 519 AssetBase asset = CreateAsset(
520 objlist[0].GetPartName(objlist[0].RootPart.LocalId), 520 objlist[0].GetPartName(objlist[0].RootPart.LocalId),
@@ -523,7 +523,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
523 Utils.StringToBytes(itemXml), 523 Utils.StringToBytes(itemXml),
524 objlist[0].OwnerID.ToString()); 524 objlist[0].OwnerID.ToString());
525 m_Scene.AssetService.Store(asset); 525 m_Scene.AssetService.Store(asset);
526 526
527 item.AssetID = asset.FullID; 527 item.AssetID = asset.FullID;
528 528
529 if (DeRezAction.SaveToExistingUserInventoryItem == action) 529 if (DeRezAction.SaveToExistingUserInventoryItem == action)
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
562 // This is a hook to do some per-asset post-processing for subclasses that need that 562 // This is a hook to do some per-asset post-processing for subclasses that need that
563 if (remoteClient != null && action != DeRezAction.Delete) 563 if (remoteClient != null && action != DeRezAction.Delete)
564 ExportAsset(remoteClient.AgentId, asset.FullID); 564 ExportAsset(remoteClient.AgentId, asset.FullID);
565 565
566 return item; 566 return item;
567 } 567 }
568 568
@@ -580,7 +580,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
580 /// <param name="remoteClient"></param> 580 /// <param name="remoteClient"></param>
581 /// <returns></returns> 581 /// <returns></returns>
582 protected InventoryItemBase AddPermissions( 582 protected InventoryItemBase AddPermissions(
583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions, 583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions,
584 IClientAPI remoteClient) 584 IClientAPI remoteClient)
585 { 585 {
586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; 586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7;
@@ -614,7 +614,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
614 item.NextPermissions = perms & so.RootPart.NextOwnerMask; 614 item.NextPermissions = perms & so.RootPart.NextOwnerMask;
615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; 615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask;
616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; 616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
617 617
618 // apply next owner perms on rez 618 // apply next owner perms on rez
619 item.CurrentPermissions |= SceneObjectGroup.SLAM; 619 item.CurrentPermissions |= SceneObjectGroup.SLAM;
620 } 620 }
@@ -642,11 +642,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
642 7); // Preserve folded permissions 642 7); // Preserve folded permissions
643 } 643 }
644 644
645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions); 645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions);
646 646
647 return item; 647 return item;
648 } 648 }
649 649
650 /// <summary> 650 /// <summary>
651 /// Create an item using details for the given scene object. 651 /// Create an item using details for the given scene object.
652 /// </summary> 652 /// </summary>
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID) 659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID)
660 { 660 {
661// m_log.DebugFormat( 661// m_log.DebugFormat(
662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}", 662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}",
663// so.Name, so.UUID, folderID, action); 663// so.Name, so.UUID, folderID, action);
664// 664//
665 // Get the user info of the item destination 665 // Get the user info of the item destination
@@ -707,7 +707,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
707 // Delete is treated like return in this case 707 // Delete is treated like return in this case
708 // Deleting your own items makes them go to trash 708 // Deleting your own items makes them go to trash
709 // 709 //
710 710
711 InventoryFolderBase folder = null; 711 InventoryFolderBase folder = null;
712 InventoryItemBase item = null; 712 InventoryItemBase item = null;
713 713
@@ -723,7 +723,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
723 m_log.DebugFormat( 723 m_log.DebugFormat(
724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.", 724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.",
725 so.Name, so.UUID); 725 so.Name, so.UUID);
726 726
727 return null; 727 return null;
728 } 728 }
729 } 729 }
@@ -805,13 +805,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
805 } 805 }
806 } 806 }
807 807
808 item = new InventoryItemBase(); 808 item = new InventoryItemBase();
809 item.ID = UUID.Random(); 809 item.ID = UUID.Random();
810 item.InvType = (int)InventoryType.Object; 810 item.InvType = (int)InventoryType.Object;
811 item.Folder = folder.ID; 811 item.Folder = folder.ID;
812 item.Owner = userID; 812 item.Owner = userID;
813 } 813 }
814 814
815 return item; 815 return item;
816 } 816 }
817 // compatibility do not use 817 // compatibility do not use
@@ -863,7 +863,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
863 byte BypassRayCast, bool RayEndIsIntersection, 863 byte BypassRayCast, bool RayEndIsIntersection,
864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
865 { 865 {
866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString()); 866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString());
867 867
868 if (rezAsset == null) 868 if (rezAsset == null)
869 { 869 {
@@ -891,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()", 891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()",
892 assetID, remoteClient.Name); 892 assetID, remoteClient.Name);
893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false); 893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false);
894 return null; 894 return null;
895 } 895 }
896 896
897 SceneObjectGroup group = null; 897 SceneObjectGroup group = null;
@@ -903,7 +903,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
904 Vector3 pos; 904 Vector3 pos;
905 905
906 bool single 906 bool single
907 = m_Scene.GetObjectsToRez( 907 = m_Scene.GetObjectsToRez(
908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight); 908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight);
909 909
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1055 /// <param name="isAttachment"></param> 1055 /// <param name="isAttachment"></param>
1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns> 1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns>
1057 private bool DoPreRezWhenFromItem( 1057 private bool DoPreRezWhenFromItem(
1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, 1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist,
1059 Vector3 pos, List<Vector3> veclist, bool isAttachment) 1059 Vector3 pos, List<Vector3> veclist, bool isAttachment)
1060 { 1060 {
1061 UUID fromUserInventoryItemId = UUID.Zero; 1061 UUID fromUserInventoryItemId = UUID.Zero;
@@ -1142,7 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1142 //Need to kill the for sale here 1142 //Need to kill the for sale here
1143 rootPart.ObjectSaleType = 0; 1143 rootPart.ObjectSaleType = 0;
1144 rootPart.SalePrice = 10; 1144 rootPart.SalePrice = 10;
1145 1145
1146 if (m_Scene.Permissions.PropagatePermissions()) 1146 if (m_Scene.Permissions.PropagatePermissions())
1147 { 1147 {
1148 foreach (SceneObjectPart part in so.Parts) 1148 foreach (SceneObjectPart part in so.Parts)
@@ -1154,7 +1154,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1154 part.RezzerID = item.Owner; 1154 part.RezzerID = item.Owner;
1155 part.Inventory.ChangeInventoryOwner(item.Owner); 1155 part.Inventory.ChangeInventoryOwner(item.Owner);
1156 } 1156 }
1157 1157
1158 so.ApplyNextOwnerPermissions(); 1158 so.ApplyNextOwnerPermissions();
1159 1159
1160 // In case the user has changed flags on a received item 1160 // In case the user has changed flags on a received item
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1312 { 1312 {
1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); 1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>();
1314 InventoryItemBase item = invService.GetItem(agentID, itemID); 1314 InventoryItemBase item = invService.GetItem(agentID, itemID);
1315 1315
1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty) 1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty)
1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); 1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData);
1318 1318
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
index 007ff63..8f12331 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
77 scene.StartScripts(); 77 scene.StartScripts();
78 78
79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl); 79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl);
80 UserAccount ua 80 UserAccount ua
81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password"); 81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password");
82 82
83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail); 83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail);
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID"); 116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID");
117 Assert.NotNull(uuidAttribute); 117 Assert.NotNull(uuidAttribute);
118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task 118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task
119 // item created earlier. 119 // item created earlier.
120 } 120 }
121 121
122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId) 122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId)
@@ -131,9 +131,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
131 // immediately for tests rather than chunter through it's threaded mechanisms. 131 // immediately for tests rather than chunter through it's threaded mechanisms.
132 AutoResetEvent chatEvent = new AutoResetEvent(false); 132 AutoResetEvent chatEvent = new AutoResetEvent(false);
133 133
134 scene.EventManager.OnChatFromWorld += (s, c) => 134 scene.EventManager.OnChatFromWorld += (s, c) =>
135 { 135 {
136// Console.WriteLine("Got chat [{0}]", c.Message); 136// Console.WriteLine("Got chat [{0}]", c.Message);
137 chatEvent.Set(); 137 chatEvent.Set();
138 }; 138 };
139 139
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index b31d4df..de29ae9 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -48,12 +48,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
48{ 48{
49 [TestFixture] 49 [TestFixture]
50 public class InventoryAccessModuleTests : OpenSimTestCase 50 public class InventoryAccessModuleTests : OpenSimTestCase
51 { 51 {
52 protected TestScene m_scene; 52 protected TestScene m_scene;
53 protected BasicInventoryAccessModule m_iam; 53 protected BasicInventoryAccessModule m_iam;
54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
55 protected TestClient m_tc; 55 protected TestClient m_tc;
56 56
57 [SetUp] 57 [SetUp]
58 public override void SetUp() 58 public override void SetUp()
59 { 59 {
@@ -68,32 +68,32 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
68 SceneHelpers sceneHelpers = new SceneHelpers(); 68 SceneHelpers sceneHelpers = new SceneHelpers();
69 m_scene = sceneHelpers.SetupScene(); 69 m_scene = sceneHelpers.SetupScene();
70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam); 70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam);
71 71
72 // Create user 72 // Create user
73 string userFirstName = "Jock"; 73 string userFirstName = "Jock";
74 string userLastName = "Stirrup"; 74 string userLastName = "Stirrup";
75 string userPassword = "troll"; 75 string userPassword = "troll";
76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword); 76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword);
77 77
78 AgentCircuitData acd = new AgentCircuitData(); 78 AgentCircuitData acd = new AgentCircuitData();
79 acd.AgentID = m_userId; 79 acd.AgentID = m_userId;
80 m_tc = new TestClient(acd, m_scene); 80 m_tc = new TestClient(acd, m_scene);
81 } 81 }
82 82
83 [Test] 83 [Test]
84 public void TestRezCoalescedObject() 84 public void TestRezCoalescedObject()
85 { 85 {
86/* 86/*
87 TestHelpers.InMethod(); 87 TestHelpers.InMethod();
88// log4net.Config.XmlConfigurator.Configure(); 88// log4net.Config.XmlConfigurator.Configure();
89 89
90 // Create asset 90 // Create asset
91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); 91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20);
92 object1.AbsolutePosition = new Vector3(15, 30, 45); 92 object1.AbsolutePosition = new Vector3(15, 30, 45);
93 93
94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); 94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40);
95 object2.AbsolutePosition = new Vector3(25, 50, 75); 95 object2.AbsolutePosition = new Vector3(25, 50, 75);
96 96
97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); 97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2);
98 98
99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
@@ -107,46 +107,46 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
107 item1.Name = item1Name; 107 item1.Name = item1Name;
108 item1.AssetID = asset1.FullID; 108 item1.AssetID = asset1.FullID;
109 item1.ID = item1Id; 109 item1.ID = item1Id;
110 InventoryFolderBase objsFolder 110 InventoryFolderBase objsFolder
111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
112 item1.Folder = objsFolder.ID; 112 item1.Folder = objsFolder.ID;
113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems; 113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems;
114 m_scene.AddInventoryItem(item1); 114 m_scene.AddInventoryItem(item1);
115 115
116 SceneObjectGroup so 116 SceneObjectGroup so
117 = m_iam.RezObject( 117 = m_iam.RezObject(
118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
119 119
120 Assert.That(so, Is.Not.Null); 120 Assert.That(so, Is.Not.Null);
121 121
122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2)); 122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2));
123 123
124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name); 124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name);
125 Assert.That(retrievedObj1Part, Is.Null); 125 Assert.That(retrievedObj1Part, Is.Null);
126 126
127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name); 127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name);
128 Assert.That(retrievedObj1Part, Is.Not.Null); 128 Assert.That(retrievedObj1Part, Is.Not.Null);
129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); 129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name));
130 130
131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom 131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom
132 // object is unit square. 132 // object is unit square.
133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f))); 133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f)));
134 134
135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); 135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name);
136 Assert.That(retrievedObj2Part, Is.Not.Null); 136 Assert.That(retrievedObj2Part, Is.Not.Null);
137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name)); 137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name));
138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f))); 138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f)));
139*/ 139*/
140 } 140 }
141 141
142 [Test] 142 [Test]
143 public void TestRezObject() 143 public void TestRezObject()
144 { 144 {
145 TestHelpers.InMethod(); 145 TestHelpers.InMethod();
146// log4net.Config.XmlConfigurator.Configure(); 146// log4net.Config.XmlConfigurator.Configure();
147 147
148 // Create asset 148 // Create asset
149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); 149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40);
150 150
151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
@@ -159,17 +159,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
159 item1.Name = item1Name; 159 item1.Name = item1Name;
160 item1.AssetID = asset1.FullID; 160 item1.AssetID = asset1.FullID;
161 item1.ID = item1Id; 161 item1.ID = item1Id;
162 InventoryFolderBase objsFolder 162 InventoryFolderBase objsFolder
163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
164 item1.Folder = objsFolder.ID; 164 item1.Folder = objsFolder.ID;
165 m_scene.AddInventoryItem(item1); 165 m_scene.AddInventoryItem(item1);
166 166
167 SceneObjectGroup so 167 SceneObjectGroup so
168 = m_iam.RezObject( 168 = m_iam.RezObject(
169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
170 170
171 Assert.That(so, Is.Not.Null); 171 Assert.That(so, Is.Not.Null);
172 172
173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID); 173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID);
174 Assert.That(retrievedPart, Is.Not.Null); 174 Assert.That(retrievedPart, Is.Not.Null);
175 } 175 }
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index 862f0b7..df9d4f9 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
126 return; 126 return;
127 127
128 // This will never run more than once, even if the region is restarted 128 // This will never run more than once, even if the region is restarted
129 if (!m_HasRunOnce) 129 if (!m_HasRunOnce)
130 { 130 {
131 LoadLibrariesFromArchives(); 131 LoadLibrariesFromArchives();
132 //DumpLibrary(); 132 //DumpLibrary();
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
index 21e00b2..c1a9457 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
@@ -259,11 +259,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library
259 259
260 /// <summary> 260 /// <summary>
261 /// Get the union of permissions of all inventory items 261 /// Get the union of permissions of all inventory items
262 /// that hold the given assetID. 262 /// that hold the given assetID.
263 /// </summary> 263 /// </summary>
264 /// <param name="userID"></param> 264 /// <param name="userID"></param>
265 /// <param name="assetID"></param> 265 /// <param name="assetID"></param>
266 /// <returns>The permissions or 0 if no such asset is found in 266 /// <returns>The permissions or 0 if no such asset is found in
267 /// the user's inventory</returns> 267 /// the user's inventory</returns>
268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; } 268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; }
269 } 269 }
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index 93a7cf2..fb3d31c 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -44,7 +44,7 @@ using Mono.Addins;
44namespace OpenSim.Region.CoreModules.Framework.Monitoring 44namespace OpenSim.Region.CoreModules.Framework.Monitoring
45{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")]
47 public class MonitorModule : INonSharedRegionModule 47 public class MonitorModule : INonSharedRegionModule
48 { 48 {
49 /// <summary> 49 /// <summary>
50 /// Is this module enabled? 50 /// Is this module enabled?
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
78 78
79 if (cnfg != null) 79 if (cnfg != null)
80 Enabled = cnfg.GetBoolean("Enabled", true); 80 Enabled = cnfg.GetBoolean("Enabled", true);
81 81
82 if (!Enabled) 82 if (!Enabled)
83 return; 83 return;
84 84
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; }); 433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; });
434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; }); 434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; });
435 } 435 }
436 436
437 private void UnRegisterStatsManagerRegionStatistics() 437 private void UnRegisterStatsManagerRegionStatistics()
438 { 438 {
439 foreach (Stat stat in registeredStats) 439 foreach (Stat stat in registeredStats)
@@ -443,6 +443,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
443 } 443 }
444 registeredStats.Clear(); 444 registeredStats.Clear();
445 } 445 }
446 446
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
index 3849996..c04d856 100644
--- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Framework.Search
135 135
136 #endregion ISharedRegionModule 136 #endregion ISharedRegionModule
137 137
138 138
139 #region Event Handlers 139 #region Event Handlers
140 140
141 void EventManager_OnMakeRootAgent(ScenePresence sp) 141 void EventManager_OnMakeRootAgent(ScenePresence sp)
diff --git a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
index 36fb57a..924a1a3 100644
--- a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Framework
49 49
50 private readonly List<Scene> m_scenes = new List<Scene>(); 50 private readonly List<Scene> m_scenes = new List<Scene>();
51 private JobEngine m_processorJobEngine; 51 private JobEngine m_processorJobEngine;
52 52
53 #region ISharedRegionModule 53 #region ISharedRegionModule
54 54
55 public void Initialise(IConfigSource config) 55 public void Initialise(IConfigSource config)
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
index f3436d1..3e6c8b5 100644
--- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
45 public class BinaryLoggingModule : INonSharedRegionModule 45 public class BinaryLoggingModule : INonSharedRegionModule
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 protected bool m_collectStats; 49 protected bool m_collectStats;
50 protected Scene m_scene = null; 50 protected Scene m_scene = null;
51 51
52 public string Name { get { return "Binary Statistics Logging Module"; } } 52 public string Name { get { return "Binary Statistics Logging Module"; } }
53 public Type ReplaceableInterface { get { return null; } } 53 public Type ReplaceableInterface { get { return null; } }
54 54
55 public void Initialise(IConfigSource source) 55 public void Initialise(IConfigSource source)
56 { 56 {
57 try 57 try
58 { 58 {
@@ -81,23 +81,23 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
81 // if it doesn't work, we don't collect anything 81 // if it doesn't work, we don't collect anything
82 } 82 }
83 } 83 }
84 84
85 public void AddRegion(Scene scene) 85 public void AddRegion(Scene scene)
86 { 86 {
87 m_scene = scene; 87 m_scene = scene;
88 } 88 }
89 89
90 public void RemoveRegion(Scene scene) 90 public void RemoveRegion(Scene scene)
91 { 91 {
92 } 92 }
93 93
94 public void RegionLoaded(Scene scene) 94 public void RegionLoaded(Scene scene)
95 { 95 {
96 if (m_collectStats) 96 if (m_collectStats)
97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats; 97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats;
98 } 98 }
99 99
100 public void Close() 100 public void Close()
101 { 101 {
102 } 102 }
103 103
@@ -107,12 +107,12 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
107 public string Path; 107 public string Path;
108 public System.IO.BinaryWriter Log; 108 public System.IO.BinaryWriter Log;
109 } 109 }
110 110
111 static StatLogger m_statLog = null; 111 static StatLogger m_statLog = null;
112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300); 112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300);
113 static string m_statsDir = String.Empty; 113 static string m_statsDir = String.Empty;
114 static Object m_statLockObject = new Object(); 114 static Object m_statLockObject = new Object();
115 115
116 private void LogSimStats(SimStats stats) 116 private void LogSimStats(SimStats stats)
117 { 117 {
118 SimStatsPacket pack = new SimStatsPacket(); 118 SimStatsPacket pack = new SimStatsPacket();
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
index ea3bbe7..3e0a610 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
111 } 111 }
112 112
113 // This is it! Let's ask the other world 113 // This is it! Let's ask the other world
114 if (words[0].Contains(".")) 114 if (words[0].Contains("."))
115 { 115 {
116 string[] names = words[0].Split(new char[] { '.' }); 116 string[] names = words[0].Split(new char[] { '.' });
117 if (names.Length >= 2) 117 if (names.Length >= 2)
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
130 } 130 }
131 131
132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); 132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr);
133 133
134 UUID userID = UUID.Zero; 134 UUID userID = UUID.Zero;
135 try 135 try
136 { 136 {
@@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
140 { 140 {
141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e); 141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e);
142 } 142 }
143 143
144 if (!userID.Equals(UUID.Zero)) 144 if (!userID.Equals(UUID.Zero))
145 { 145 {
146 UserData ud = new UserData(); 146 UserData ud = new UserData();
@@ -163,8 +163,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
163 //{ 163 //{
164 // foreach (UserData d in m_UserCache.Values) 164 // foreach (UserData d in m_UserCache.Values)
165 // { 165 // {
166 // if (d.LastName.StartsWith("@") && 166 // if (d.LastName.StartsWith("@") &&
167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) || 167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) ||
168 // d.LastName.ToLower().StartsWith(query.ToLower()))) 168 // d.LastName.ToLower().StartsWith(query.ToLower())))
169 // users.Add(d); 169 // users.Add(d);
170 // } 170 // }
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
index 4e3b7e5..9d91aa3 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests
37{ 37{
38 [TestFixture] 38 [TestFixture]
39 public class HGUserManagementModuleTests : OpenSimTestCase 39 public class HGUserManagementModuleTests : OpenSimTestCase
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation. 42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation.
43 /// </summary> 43 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 2701912..51f973a 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -345,7 +345,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
345 } 345 }
346 346
347 /// <summary> 347 /// <summary>
348 /// 348 ///
349 /// </summary> 349 /// </summary>
350 /// <param name="uuid"></param> 350 /// <param name="uuid"></param>
351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param> 351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param>
@@ -557,7 +557,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
557 return ret; 557 return ret;
558 558
559 // try grid user service 559 // try grid user service
560 560
561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray()); 561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray());
562 if(pinfos.Length > 0) 562 if(pinfos.Length > 0)
563 { 563 {