aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-09-14 16:30:36 -0400
committerTeravus Ovares (Dan Olivares)2009-09-14 16:30:36 -0400
commit1ad35f65b353a28a578c77ac62e72a5663107a8a (patch)
treea1945b99bc2cb3a9ba1a58941f50b77fcafb00f2 /OpenSim
parent* fix missing lock on XMLRPC GroupsModule (diff)
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-1ad35f65b353a28a578c77ac62e72a5663107a8a.zip
opensim-SC_OLD-1ad35f65b353a28a578c77ac62e72a5663107a8a.tar.gz
opensim-SC_OLD-1ad35f65b353a28a578c77ac62e72a5663107a8a.tar.bz2
opensim-SC_OLD-1ad35f65b353a28a578c77ac62e72a5663107a8a.tar.xz
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs30
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs8
5 files changed, 38 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 4d96b28..00faabb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -92,12 +92,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
92 scene.AddCommand( 92 scene.AddCommand(
93 this, "load iar", 93 this, "load iar",
94 "load iar <first> <last> <inventory path> [<archive path>]", 94 "load iar <first> <last> <inventory path> [<archive path>]",
95 "Load user inventory archive. EXPERIMENTAL, CURRENTLY DISABLED", HandleLoadInvConsoleCommand); 95 "Load user inventory archive. EXPERIMENTAL", HandleLoadInvConsoleCommand);
96 96
97 scene.AddCommand( 97 scene.AddCommand(
98 this, "save iar", 98 this, "save iar",
99 "save iar <first> <last> <inventory path> [<archive path>]", 99 "save iar <first> <last> <inventory path> [<archive path>]",
100 "Save user inventory archive. EXPERIMENTAL, CURRENTLY DISABLED", HandleSaveInvConsoleCommand); 100 "Save user inventory archive. EXPERIMENTAL", HandleSaveInvConsoleCommand);
101 101
102 m_aScene = scene; 102 m_aScene = scene;
103 } 103 }
@@ -233,9 +233,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
233 /// <param name="cmdparams"></param> 233 /// <param name="cmdparams"></param>
234 protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) 234 protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams)
235 { 235 {
236 return;
237
238 /*
239 if (cmdparams.Length < 5) 236 if (cmdparams.Length < 5)
240 { 237 {
241 m_log.Error( 238 m_log.Error(
@@ -243,6 +240,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
243 return; 240 return;
244 } 241 }
245 242
243 m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
244
246 string firstName = cmdparams[2]; 245 string firstName = cmdparams[2];
247 string lastName = cmdparams[3]; 246 string lastName = cmdparams[3];
248 string invPath = cmdparams[4]; 247 string invPath = cmdparams[4];
@@ -256,7 +255,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
256 m_log.InfoFormat( 255 m_log.InfoFormat(
257 "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", 256 "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}",
258 loadPath, firstName, lastName); 257 loadPath, firstName, lastName);
259 */
260 } 258 }
261 259
262 /// <summary> 260 /// <summary>
@@ -265,9 +263,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
265 /// <param name="cmdparams"></param> 263 /// <param name="cmdparams"></param>
266 protected void HandleSaveInvConsoleCommand(string module, string[] cmdparams) 264 protected void HandleSaveInvConsoleCommand(string module, string[] cmdparams)
267 { 265 {
268 return;
269
270 /*
271 if (cmdparams.Length < 5) 266 if (cmdparams.Length < 5)
272 { 267 {
273 m_log.Error( 268 m_log.Error(
@@ -275,6 +270,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
275 return; 270 return;
276 } 271 }
277 272
273 m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
274
278 string firstName = cmdparams[2]; 275 string firstName = cmdparams[2];
279 string lastName = cmdparams[3]; 276 string lastName = cmdparams[3];
280 string invPath = cmdparams[4]; 277 string invPath = cmdparams[4];
@@ -289,7 +286,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
289 286
290 lock (m_pendingConsoleSaves) 287 lock (m_pendingConsoleSaves)
291 m_pendingConsoleSaves.Add(id); 288 m_pendingConsoleSaves.Add(id);
292 */
293 } 289 }
294 290
295 private void SaveInvConsoleCommandCompleted( 291 private void SaveInvConsoleCommandCompleted(
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index 059c006..8a169f8 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
110 110
111 try 111 try
112 { 112 {
113 m_remoteDataPort = config.Configs["Network"].GetInt("remoteDataPort", m_remoteDataPort); 113 m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort);
114 } 114 }
115 catch (Exception) 115 catch (Exception)
116 { 116 {
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index 98c7aa8..1436912 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -80,10 +80,10 @@ namespace OpenSim.Region.CoreModules.World.Land
80 if (!enabledYN) 80 if (!enabledYN)
81 return; 81 return;
82 82
83 /* For testing on a single instance 83 // For testing on a single instance
84 if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000) 84 if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000)
85 return; 85 return;
86 */ 86 //
87 87
88 lock (m_startingScenes) 88 lock (m_startingScenes)
89 m_startingScenes.Add(scene.RegionInfo.originRegionID, scene); 89 m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index b38148b..204c319 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -1412,10 +1412,25 @@ namespace OpenSim.Region.Framework.Scenes
1412 d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d); 1412 d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d);
1413 } 1413 }
1414 1414
1415 public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene) 1415 public delegate void InformClientToInitateTeleportToLocationDelegate(ScenePresence agent, uint regionX, uint regionY,
1416 Vector3 position,
1417 Scene initiatingScene);
1418
1419 public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
1420 Scene initiatingScene)
1421 {
1422
1423 // This assumes that we know what our neighbors are.
1424
1425 InformClientToInitateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
1426 d.BeginInvoke(agent,regionX,regionY,position,initiatingScene,
1427 InformClientToInitiateTeleportToLocationCompleted,
1428 d);
1429 }
1430
1431 public void InformClientToInitiateTeleportToLocationAsync(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
1432 Scene initiatingScene)
1416 { 1433 {
1417 Util.FireAndForget(delegate
1418 {
1419 Thread.Sleep(10000); 1434 Thread.Sleep(10000);
1420 IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>(); 1435 IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
1421 if (im != null) 1436 if (im != null)
@@ -1440,13 +1455,18 @@ namespace OpenSim.Region.Framework.Scenes
1440 }); 1455 });
1441 1456
1442 } 1457 }
1458 }
1443 1459
1444 }); 1460 private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar)
1461 {
1462 InformClientToInitateTeleportToLocationDelegate icon =
1463 (InformClientToInitateTeleportToLocationDelegate) iar.AsyncState;
1464 icon.EndInvoke(iar);
1445 } 1465 }
1446 1466
1447 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying); 1467 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying);
1448 1468
1449 /// <summary> 1469 /// <summary>
1450 /// This Closes child agents on neighboring regions 1470 /// This Closes child agents on neighboring regions
1451 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 1471 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
1452 /// </summary> 1472 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 04f7862..650d9fa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -298,14 +298,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
298 try 298 try
299 { 299 {
300 FileInfo fi = new FileInfo(savedState); 300 FileInfo fi = new FileInfo(savedState);
301 int size=(int)fi.Length; 301 int size = (int)fi.Length;
302 if (size < 512000) 302 if (size < 512000)
303 { 303 {
304 using (FileStream fs = File.Open(savedState, 304 using (FileStream fs = File.Open(savedState,
305 FileMode.Open, FileAccess.Read, FileShare.None)) 305 FileMode.Open, FileAccess.Read, FileShare.None))
306 { 306 {
307 System.Text.ASCIIEncoding enc = 307 System.Text.UTF8Encoding enc =
308 new System.Text.ASCIIEncoding(); 308 new System.Text.UTF8Encoding();
309 309
310 Byte[] data = new Byte[size]; 310 Byte[] data = new Byte[size];
311 fs.Read(data, 0, size); 311 fs.Read(data, 0, size);
@@ -899,7 +899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
899 try 899 try
900 { 900 {
901 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state")); 901 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state"));
902 System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); 902 System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
903 Byte[] buf = enc.GetBytes(xml); 903 Byte[] buf = enc.GetBytes(xml);
904 fs.Write(buf, 0, buf.Length); 904 fs.Write(buf, 0, buf.Length);
905 fs.Close(); 905 fs.Close();