aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/WebUtil.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs22
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs29
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs32
-rw-r--r--bin/OpenSim.ini.example17
9 files changed, 96 insertions, 29 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 94862a6..e20866e 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -114,7 +114,7 @@ namespace OpenSim.Framework
114 } 114 }
115 catch (Exception ex) 115 catch (Exception ex)
116 { 116 {
117 m_log.Warn("GET from URL " + url + " failed: " + ex.Message); 117 m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
118 errorMessage = ex.Message; 118 errorMessage = ex.Message;
119 } 119 }
120 120
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 83be61e..f535fe8 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -367,13 +367,13 @@ namespace OpenSim
367 Environment.Exit(1); 367 Environment.Exit(1);
368 } 368 }
369 369
370 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
371 scene.EventManager.TriggerParcelPrimCountUpdate();
372
370 // We need to do this after we've initialized the 373 // We need to do this after we've initialized the
371 // scripting engines. 374 // scripting engines.
372 scene.CreateScriptInstances(); 375 scene.CreateScriptInstances();
373 376
374 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
375 scene.EventManager.TriggerParcelPrimCountUpdate();
376
377 m_sceneManager.Add(scene); 377 m_sceneManager.Add(scene);
378 378
379 if (m_autoCreateClientStack) 379 if (m_autoCreateClientStack)
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index f8e3d59..75efb79 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -131,6 +131,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
131 131
132 if (texture != null) 132 if (texture != null)
133 { 133 {
134 if (texture.Type != (sbyte)AssetType.Texture)
135 {
136 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
137 httpResponse.Send();
138 return null;
139 }
134 SendTexture(httpRequest, httpResponse, texture); 140 SendTexture(httpRequest, httpResponse, texture);
135 } 141 }
136 else 142 else
@@ -147,6 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
147 153
148 if (texture != null) 154 if (texture != null)
149 { 155 {
156 if (texture.Type != (sbyte)AssetType.Texture)
157 {
158 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
159 httpResponse.Send();
160 return null;
161 }
150 SendTexture(httpRequest, httpResponse, texture); 162 SendTexture(httpRequest, httpResponse, texture);
151 } 163 }
152 else 164 else
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 7b7677b..de3c360 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -52,6 +52,9 @@ namespace OpenSim.Region.Framework.Scenes
52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity) 52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity)
53 { 53 {
54 double priority = 0; 54 double priority = 0;
55
56 if (entity == null)
57 return 100000;
55 58
56 switch (m_scene.UpdatePrioritizationScheme) 59 switch (m_scene.UpdatePrioritizationScheme)
57 { 60 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 866bb6e..3a8f168 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -31,6 +31,7 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
34using OpenMetaverse; 35using OpenMetaverse;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -200,6 +201,7 @@ namespace OpenSim.Region.Framework.Scenes
200 if ((int)InventoryType.LSL == item.InvType) 201 if ((int)InventoryType.LSL == item.InvType)
201 { 202 {
202 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); 203 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
204 Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
203 } 205 }
204 } 206 }
205 } 207 }
@@ -257,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
257 // m_log.InfoFormat( 259 // m_log.InfoFormat(
258 // "[PRIM INVENTORY]: " + 260 // "[PRIM INVENTORY]: " +
259 // "Starting script {0}, {1} in prim {2}, {3}", 261 // "Starting script {0}, {1} in prim {2}, {3}",
260 // item.Name, item.ItemID, Name, UUID); 262 // item.Name, item.ItemID, m_part.Name, m_part.UUID);
261 263
262 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 264 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
263 return; 265 return;
@@ -293,20 +295,20 @@ namespace OpenSim.Region.Framework.Scenes
293 } 295 }
294 else 296 else
295 { 297 {
296 if (m_part.ParentGroup.m_savedScriptState != null)
297 RestoreSavedScriptState(item.OldItemID, item.ItemID);
298
299 lock (m_items) 298 lock (m_items)
300 { 299 {
300 if (m_part.ParentGroup.m_savedScriptState != null)
301 RestoreSavedScriptState(item.OldItemID, item.ItemID);
302
301 m_items[item.ItemID].PermsMask = 0; 303 m_items[item.ItemID].PermsMask = 0;
302 m_items[item.ItemID].PermsGranter = UUID.Zero; 304 m_items[item.ItemID].PermsGranter = UUID.Zero;
305
306 string script = Utils.BytesToString(asset.Data);
307 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
308 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
309 m_part.ParentGroup.AddActiveScriptCount(1);
310 m_part.ScheduleFullUpdate();
303 } 311 }
304
305 string script = Utils.BytesToString(asset.Data);
306 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
307 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
308 m_part.ParentGroup.AddActiveScriptCount(1);
309 m_part.ScheduleFullUpdate();
310 } 312 }
311 } 313 }
312 } 314 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 3fdee9c..34bb8b3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -371,18 +371,33 @@ namespace OpenSim.Services.Connectors.SimianGrid
371 /// <returns></returns> 371 /// <returns></returns>
372 public bool Delete(string id) 372 public bool Delete(string id)
373 { 373 {
374 string errorMessage = String.Empty;
375 string url = m_serverUrl + id;
376
374 if (m_cache != null) 377 if (m_cache != null)
375 m_cache.Expire(id); 378 m_cache.Expire(id);
376 379
377 string url = m_serverUrl + id; 380 try
381 {
382 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
383 request.Method = "DELETE";
378 384
379 OSDMap response = WebUtil.ServiceRequest(url, "DELETE"); 385 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
380 if (response["Success"].AsBoolean()) 386 {
381 return true; 387 if (response.StatusCode != HttpStatusCode.NoContent)
382 else 388 {
383 m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service"); 389 m_log.Warn("[SIMIAN ASSET CONNECTOR]: Unexpected response when deleting asset " + url + ": " +
390 response.StatusCode + " (" + response.StatusDescription + ")");
391 }
392 }
384 393
385 return false; 394 return true;
395 }
396 catch (Exception ex)
397 {
398 m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service: " + ex.Message);
399 return false;
400 }
386 } 401 }
387 402
388 #endregion IAssetService 403 #endregion IAssetService
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index 3c784f2..7a96a05 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -198,6 +198,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
198 if (!String.IsNullOrEmpty(identifier)) 198 if (!String.IsNullOrEmpty(identifier))
199 { 199 {
200 // Add/update the md5hash identity 200 // Add/update the md5hash identity
201 // TODO: Support salts when AddIdentity does
202 // TODO: Create an a1hash too for WebDAV logins
201 requestArgs = new NameValueCollection 203 requestArgs = new NameValueCollection
202 { 204 {
203 { "RequestMethod", "AddIdentity" }, 205 { "RequestMethod", "AddIdentity" },
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index db9027a..bea8172 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -59,18 +59,35 @@ namespace OpenSim.Services.Connectors.SimianGrid
59 MethodBase.GetCurrentMethod().DeclaringType); 59 MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 private string m_serverUrl = String.Empty; 61 private string m_serverUrl = String.Empty;
62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
62 63
63 #region ISharedRegionModule 64 #region ISharedRegionModule
64 65
65 public Type ReplaceableInterface { get { return null; } } 66 public Type ReplaceableInterface { get { return null; } }
66 public void RegionLoaded(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { UploadMapTile(scene); } } 67 public void RegionLoaded(Scene scene) { }
67 public void PostInitialise() { } 68 public void PostInitialise() { }
68 public void Close() { } 69 public void Close() { }
69 70
70 public SimianGridServiceConnector() { } 71 public SimianGridServiceConnector() { }
71 public string Name { get { return "SimianGridServiceConnector"; } } 72 public string Name { get { return "SimianGridServiceConnector"; } }
72 public void AddRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.RegisterModuleInterface<IGridService>(this); } } 73 public void AddRegion(Scene scene)
73 public void RemoveRegion(Scene scene) { if (!String.IsNullOrEmpty(m_serverUrl)) { scene.UnregisterModuleInterface<IGridService>(this); } } 74 {
75 // Every shared region module has to maintain an indepedent list of
76 // currently running regions
77 lock (m_scenes)
78 m_scenes[scene.RegionInfo.RegionID] = scene;
79
80 if (!String.IsNullOrEmpty(m_serverUrl))
81 scene.RegisterModuleInterface<IGridService>(this);
82 }
83 public void RemoveRegion(Scene scene)
84 {
85 lock (m_scenes)
86 m_scenes.Remove(scene.RegionInfo.RegionID);
87
88 if (!String.IsNullOrEmpty(m_serverUrl))
89 scene.UnregisterModuleInterface<IGridService>(this);
90 }
74 91
75 #endregion ISharedRegionModule 92 #endregion ISharedRegionModule
76 93
@@ -105,6 +122,13 @@ namespace OpenSim.Services.Connectors.SimianGrid
105 122
106 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 123 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
107 { 124 {
125 // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
126 Scene scene;
127 if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
128 UploadMapTile(scene);
129 else
130 m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
131
108 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 132 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
109 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 133 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
110 134
@@ -430,7 +454,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
430 if (!String.IsNullOrEmpty(errorMessage)) 454 if (!String.IsNullOrEmpty(errorMessage))
431 { 455 {
432 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", 456 m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}",
433 pngData.Length, scene.RegionInfo.RegionName, errorMessage); 457 pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' '));
434 } 458 }
435 } 459 }
436 460
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index aab1a58..f4d9a18 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -597,21 +597,19 @@
597 ; Set this to a nonzero value to have remote admin use a different port 597 ; Set this to a nonzero value to have remote admin use a different port
598 port = 0 598 port = 0
599 599
600 ; This password is required to make any XMLRPC call (should be set as the "password" parameter)
600 access_password = unknown 601 access_password = unknown
601 602
602 ; set this variable to true if you want the create_region XmlRpc 603 ; set this variable to true if you want the create_region XmlRpc
603 ; call to unconditionally enable voice on all parcels for a newly 604 ; call to unconditionally enable voice on all parcels for a newly
604 ; created region [default: false] 605 ; created region [default: false]
605
606 create_region_enable_voice = false 606 create_region_enable_voice = false
607 607
608 ; set this variable to false if you want the create_region XmlRpc 608 ; set this variable to false if you want the create_region XmlRpc
609 ; call to create all regions as private per default (can be 609 ; call to create all regions as private per default (can be
610 ; overridden in the XmlRpc call) [default: true] 610 ; overridden in the XmlRpc call) [default: true]
611
612 create_region_public = false 611 create_region_public = false
613 612
614
615 ; the create_region XmlRpc call uses region_file_template to generate 613 ; the create_region XmlRpc call uses region_file_template to generate
616 ; the file name of newly create regions (if they are created 614 ; the file name of newly create regions (if they are created
617 ; persistent). the parameter available are: 615 ; persistent). the parameter available are:
@@ -620,7 +618,6 @@
620 ; {2} - region UUID 618 ; {2} - region UUID
621 ; {3} - region port 619 ; {3} - region port
622 ; {4} - region name with " ", ":", "/" mapped to "_" 620 ; {4} - region name with " ", ":", "/" mapped to "_"
623
624 region_file_template = "{0}x{1}-{2}.xml" 621 region_file_template = "{0}x{1}-{2}.xml"
625 622
626 ; we can limit the number of regions that XmlRpcCreateRegion will 623 ; we can limit the number of regions that XmlRpcCreateRegion will
@@ -635,6 +632,18 @@
635 ; if this parameter is not specified but enabled = true, all methods will be available 632 ; if this parameter is not specified but enabled = true, all methods will be available
636 enabled_methods = all 633 enabled_methods = all
637 634
635 ; specify the default appearance for an avatar created through the remote admin interface
636 ; This will only take effect is the file specified by the default_appearance setting below exists
637 ;default_male = Default Male
638 ;default_female = Default Female
639
640 ; update appearance copies inventory items and wearables of default avatars. if this value is false
641 ; (default), just worn assets are copied to the Clothes folder; if true, all Clothes and Bodyparts
642 ; subfolders are copied. the receiver will wear the same items the default avatar did wear.
643 ;copy_folders = false
644
645 ; path to default appearance XML file that specifies the look of the default avatars
646 ;default_appearance = default_appearance.xml
638 647
639[RestPlugins] 648[RestPlugins]
640 ; Change this to true to enable REST Plugins. This must be true if you wish to use 649 ; Change this to true to enable REST Plugins. This must be true if you wish to use