aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs113
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs2
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs57
-rw-r--r--OpenSim/Framework/WebUtil.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs1
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs71
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs68
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs4
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs6
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs2
-rw-r--r--bin/OpenSimDefaults.ini17
14 files changed, 143 insertions, 212 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 17dbcd5..2dade5b 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -42,7 +42,6 @@ using Caps = OpenSim.Framework.Capabilities.Caps;
42 42
43namespace OpenSim.Capabilities.Handlers 43namespace OpenSim.Capabilities.Handlers
44{ 44{
45
46 public class WebFetchInvDescHandler 45 public class WebFetchInvDescHandler
47 { 46 {
48 private static readonly ILog m_log = 47 private static readonly ILog m_log =
@@ -50,7 +49,7 @@ namespace OpenSim.Capabilities.Handlers
50 49
51 private IInventoryService m_InventoryService; 50 private IInventoryService m_InventoryService;
52 private ILibraryService m_LibraryService; 51 private ILibraryService m_LibraryService;
53 private object m_fetchLock = new Object(); 52// private object m_fetchLock = new Object();
54 53
55 public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService) 54 public WebFetchInvDescHandler(IInventoryService invService, ILibraryService libService)
56 { 55 {
@@ -60,39 +59,40 @@ namespace OpenSim.Capabilities.Handlers
60 59
61 public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
62 { 61 {
63// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request"); 62// lock (m_fetchLock)
64 63// {
65 // nasty temporary hack here, the linden client falsely 64// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Received request {0}", request);
66 // identifies the uuid 00000000-0000-0000-0000-000000000000 65
67 // as a string which breaks us 66 // nasty temporary hack here, the linden client falsely
68 // 67 // identifies the uuid 00000000-0000-0000-0000-000000000000
69 // correctly mark it as a uuid 68 // as a string which breaks us
70 // 69 //
71 request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>"); 70 // correctly mark it as a uuid
72 71 //
73 // another hack <integer>1</integer> results in a 72 request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
74 // System.ArgumentException: Object type System.Int32 cannot 73
75 // be converted to target type: System.Boolean 74 // another hack <integer>1</integer> results in a
76 // 75 // System.ArgumentException: Object type System.Int32 cannot
77 request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>"); 76 // be converted to target type: System.Boolean
78 request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>"); 77 //
79 78 request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
80 Hashtable hash = new Hashtable(); 79 request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
81 try 80
82 { 81 Hashtable hash = new Hashtable();
83 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); 82 try
84 } 83 {
85 catch (LLSD.LLSDParseException pe) 84 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
86 { 85 }
87 m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message); 86 catch (LLSD.LLSDParseException e)
88 m_log.Error("Request: " + request.ToString()); 87 {
89 } 88 m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace);
90 89 m_log.Error("Request: " + request);
91 ArrayList foldersrequested = (ArrayList)hash["folders"]; 90 }
91
92 ArrayList foldersrequested = (ArrayList)hash["folders"];
93
94 string response = "";
92 95
93 string response = "";
94 lock (m_fetchLock)
95 {
96 for (int i = 0; i < foldersrequested.Count; i++) 96 for (int i = 0; i < foldersrequested.Count; i++)
97 { 97 {
98 string inventoryitemstr = ""; 98 string inventoryitemstr = "";
@@ -106,7 +106,7 @@ namespace OpenSim.Capabilities.Handlers
106 } 106 }
107 catch (Exception e) 107 catch (Exception e)
108 { 108 {
109 m_log.Debug("[CAPS]: caught exception doing OSD deserialize" + e); 109 m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e);
110 } 110 }
111 LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest); 111 LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
112 112
@@ -117,7 +117,6 @@ namespace OpenSim.Capabilities.Handlers
117 response += inventoryitemstr; 117 response += inventoryitemstr;
118 } 118 }
119 119
120
121 if (response.Length == 0) 120 if (response.Length == 0)
122 { 121 {
123 // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. 122 // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
@@ -131,11 +130,12 @@ namespace OpenSim.Capabilities.Handlers
131 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; 130 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
132 } 131 }
133 132
134 //m_log.DebugFormat("[CAPS]: Replying to CAPS fetch inventory request with following xml"); 133// m_log.DebugFormat("[WEB FETCH INV DESC HANDLER]: Replying to CAPS fetch inventory request");
135 //m_log.Debug("[CAPS] "+response); 134 //m_log.Debug("[WEB FETCH INV DESC HANDLER] "+response);
136 135
137 } 136 return response;
138 return response; 137
138// }
139 } 139 }
140 140
141 /// <summary> 141 /// <summary>
@@ -184,16 +184,31 @@ namespace OpenSim.Capabilities.Handlers
184 return reply; 184 return reply;
185 } 185 }
186 186
187 public InventoryCollection Fetch(UUID agentID, UUID folderID, UUID ownerID, 187 /// <summary>
188 bool fetchFolders, bool fetchItems, int sortOrder, out int version) 188 /// Handle the caps inventory descendents fetch.
189 /// </summary>
190 /// <param name="agentID"></param>
191 /// <param name="folderID"></param>
192 /// <param name="ownerID"></param>
193 /// <param name="fetchFolders"></param>
194 /// <param name="fetchItems"></param>
195 /// <param name="sortOrder"></param>
196 /// <param name="version"></param>
197 /// <returns>An empty InventoryCollection if the inventory look up failed</returns>
198 public InventoryCollection Fetch(
199 UUID agentID, UUID folderID, UUID ownerID,
200 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
189 { 201 {
190 m_log.DebugFormat( 202// m_log.DebugFormat(
191 "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", 203// "[WEB FETCH INV DESC HANDLER]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
192 fetchFolders, fetchItems, folderID, agentID); 204// fetchFolders, fetchItems, folderID, agentID);
205
206 // FIXME MAYBE: We're not handling sortOrder!
193 207
194 version = 0; 208 version = 0;
195 InventoryFolderImpl fold; 209 InventoryFolderImpl fold;
196 if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner) 210 if (m_LibraryService != null && m_LibraryService.LibraryRootFolder != null && agentID == m_LibraryService.LibraryRootFolder.Owner)
211 {
197 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) 212 if ((fold = m_LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
198 { 213 {
199 InventoryCollection ret = new InventoryCollection(); 214 InventoryCollection ret = new InventoryCollection();
@@ -202,6 +217,7 @@ namespace OpenSim.Capabilities.Handlers
202 217
203 return ret; 218 return ret;
204 } 219 }
220 }
205 221
206 InventoryCollection contents = new InventoryCollection(); 222 InventoryCollection contents = new InventoryCollection();
207 223
@@ -217,7 +233,7 @@ namespace OpenSim.Capabilities.Handlers
217 } 233 }
218 else 234 else
219 { 235 {
220 // Lost itemsm don't really need a version 236 // Lost items don't really need a version
221 version = 1; 237 version = 1;
222 } 238 }
223 239
@@ -235,10 +251,11 @@ namespace OpenSim.Capabilities.Handlers
235 llsdFolder.folder_id = invFolder.ID; 251 llsdFolder.folder_id = invFolder.ID;
236 llsdFolder.parent_id = invFolder.ParentID; 252 llsdFolder.parent_id = invFolder.ParentID;
237 llsdFolder.name = invFolder.Name; 253 llsdFolder.name = invFolder.Name;
238 if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length) 254
255 if (invFolder.Type == (short)AssetType.Unknown || !Enum.IsDefined(typeof(AssetType), (sbyte)invFolder.Type))
239 llsdFolder.type = "-1"; 256 llsdFolder.type = "-1";
240 else 257 else
241 llsdFolder.type = TaskInventoryItem.Types[invFolder.Type]; 258 llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
242 llsdFolder.preferred_type = "-1"; 259 llsdFolder.preferred_type = "-1";
243 260
244 return llsdFolder; 261 return llsdFolder;
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index f10b857..a0d3541 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -565,7 +565,7 @@ namespace OpenSim.Framework.Console
565 /// </summary> 565 /// </summary>
566 public class CommandConsole : ConsoleBase, ICommandConsole 566 public class CommandConsole : ConsoleBase, ICommandConsole
567 { 567 {
568 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 568// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
569 569
570 public ICommands Commands { get; private set; } 570 public ICommands Commands { get; private set; }
571 571
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index 30d775c..ba2a306 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -40,63 +40,6 @@ namespace OpenSim.Framework
40 /// </summary> 40 /// </summary>
41 private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647; 41 private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
42 42
43 /// <summary>
44 /// Inventory types
45 /// </summary>
46 public static string[] InvTypes = new string[]
47 {
48 "texture",
49 "sound",
50 "calling_card",
51 "landmark",
52 String.Empty,
53 String.Empty,
54 "object",
55 "notecard",
56 String.Empty,
57 String.Empty,
58 "lsl_text",
59 String.Empty,
60 String.Empty,
61 "bodypart",
62 String.Empty,
63 "snapshot",
64 String.Empty,
65 String.Empty,
66 "wearable",
67 "animation",
68 "gesture"
69 };
70
71 /// <summary>
72 /// Asset types
73 /// </summary>
74 public static string[] Types = new string[]
75 {
76 "texture",
77 "sound",
78 "callcard",
79 "landmark",
80 "clothing", // Deprecated
81 "clothing",
82 "object",
83 "notecard",
84 "category",
85 "root",
86 "lsltext",
87 "lslbyte",
88 "txtr_tga",
89 "bodypart",
90 "trash",
91 "snapshot",
92 "lstndfnd",
93 "snd_wav",
94 "img_tga",
95 "jpeg",
96 "animatn",
97 "gesture"
98 };
99
100 private UUID _assetID = UUID.Zero; 43 private UUID _assetID = UUID.Zero;
101 44
102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; 45 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index c6be79e..b761dfe 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -294,7 +294,7 @@ namespace OpenSim.Framework
294 return result; 294 return result;
295 } 295 }
296 } 296 }
297 catch (Exception e) 297 catch
298 { 298 {
299 // don't need to treat this as an error... we're just guessing anyway 299 // don't need to treat this as an error... we're just guessing anyway
300// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); 300// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index b93a41b..8f0ae76 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -134,7 +134,6 @@ namespace OpenSim.Region.ClientStack.Linden
134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem; 134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset; 135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset; 136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
137 CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
138 GetClient = m_Scene.SceneGraph.GetControllingClient; 137 GetClient = m_Scene.SceneGraph.GetControllingClient;
139 } 138 }
140 139
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 1c1d83c..10f43d1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -42,18 +42,25 @@ using OpenSim.Capabilities.Handlers;
42 42
43namespace OpenSim.Region.ClientStack.Linden 43namespace OpenSim.Region.ClientStack.Linden
44{ 44{
45 45 /// <summary>
46 /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
47 /// </summary>
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
47 public class WebFetchInvDescModule : INonSharedRegionModule 49 public class WebFetchInvDescModule : INonSharedRegionModule
48 { 50 {
49 private static readonly ILog m_log = 51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52
51 private Scene m_scene; 53 private Scene m_scene;
52 54
53 private IInventoryService m_InventoryService; 55 private IInventoryService m_InventoryService;
54 private ILibraryService m_LibraryService; 56 private ILibraryService m_LibraryService;
55 private bool m_Enabled = false; 57
56 private string m_URL; 58 private bool m_Enabled;
59
60 private string m_fetchInventoryDescendents2Url;
61 private string m_webFetchInventoryDescendentsUrl;
62
63 private WebFetchInvDescHandler m_webFetchHandler;
57 64
58 #region ISharedRegionModule Members 65 #region ISharedRegionModule Members
59 66
@@ -63,10 +70,13 @@ namespace OpenSim.Region.ClientStack.Linden
63 if (config == null) 70 if (config == null)
64 return; 71 return;
65 72
66 m_URL = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); 73 m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty);
67 // Cap doesn't exist 74 m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty);
68 if (m_URL != string.Empty) 75
76 if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty)
77 {
69 m_Enabled = true; 78 m_Enabled = true;
79 }
70 } 80 }
71 81
72 public void AddRegion(Scene s) 82 public void AddRegion(Scene s)
@@ -91,8 +101,13 @@ namespace OpenSim.Region.ClientStack.Linden
91 if (!m_Enabled) 101 if (!m_Enabled)
92 return; 102 return;
93 103
94 m_InventoryService = m_scene.InventoryService; ; 104 m_InventoryService = m_scene.InventoryService;
95 m_LibraryService = m_scene.LibraryService; 105 m_LibraryService = m_scene.LibraryService;
106
107 // We'll reuse the same handler for all requests.
108 if (m_fetchInventoryDescendents2Url == "localhost" || m_webFetchInventoryDescendentsUrl == "localhost")
109 m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
110
96 m_scene.EventManager.OnRegisterCaps += RegisterCaps; 111 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
97 } 112 }
98 113
@@ -111,26 +126,38 @@ namespace OpenSim.Region.ClientStack.Linden
111 126
112 #endregion 127 #endregion
113 128
114 public void RegisterCaps(UUID agentID, Caps caps) 129 private void RegisterCaps(UUID agentID, Caps caps)
115 { 130 {
116 UUID capID = UUID.Random(); 131 if (m_webFetchInventoryDescendentsUrl != "")
132 RegisterFetchCap(agentID, caps, "WebFetchInventoryDescendents", m_webFetchInventoryDescendentsUrl);
117 133
118 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); 134 if (m_fetchInventoryDescendents2Url != "")
119 if (m_URL == "localhost") 135 RegisterFetchCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url);
136 }
137
138 private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
139 {
140 string capUrl;
141
142 if (url == "localhost")
120 { 143 {
121 m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); 144 capUrl = "/CAPS/" + UUID.Random();
122 WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); 145
123 IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); 146 IRequestHandler reqHandler
124 caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); 147 = new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest);
125// caps.RegisterHandler("FetchInventoryDescendents2", reqHandler); 148
149 caps.RegisterHandler(capName, reqHandler);
126 } 150 }
127 else 151 else
128 { 152 {
129 m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); 153 capUrl = url;
130 caps.RegisterHandler("WebFetchInventoryDescendents", m_URL); 154
131// caps.RegisterHandler("FetchInventoryDescendents2", m_URL); 155 caps.RegisterHandler(capName, capUrl);
132 } 156 }
133 }
134 157
158// m_log.DebugFormat(
159// "[WEB FETCH INV DESC MODULE]: Registered capability {0} at {1} in region {2} for {3}",
160// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
161 }
135 } 162 }
136} 163}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 270e582..6ba74c7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes
330 } 330 }
331 } 331 }
332 } 332 }
333 } 333 }
334 334
335 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) 335 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
336 { 336 {
@@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes
484 // can be handled transparently). 484 // can be handled transparently).
485 InventoryFolderImpl fold = null; 485 InventoryFolderImpl fold = null;
486 if (LibraryService != null && LibraryService.LibraryRootFolder != null) 486 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
487 {
487 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) 488 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
488 { 489 {
489 remoteClient.SendInventoryFolderDetails( 490 remoteClient.SendInventoryFolderDetails(
@@ -491,6 +492,7 @@ namespace OpenSim.Region.Framework.Scenes
491 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); 492 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems);
492 return; 493 return;
493 } 494 }
495 }
494 496
495 // We're going to send the reply async, because there may be 497 // We're going to send the reply async, because there may be
496 // an enormous quantity of packets -- basically the entire inventory! 498 // an enormous quantity of packets -- basically the entire inventory!
@@ -511,64 +513,6 @@ namespace OpenSim.Region.Framework.Scenes
511 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; 513 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
512 d.EndInvoke(iar); 514 d.EndInvoke(iar);
513 } 515 }
514
515 /// <summary>
516 /// Handle the caps inventory descendents fetch.
517 ///
518 /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
519 /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime??
520 /// </summary>
521 /// <param name="agentID"></param>
522 /// <param name="folderID"></param>
523 /// <param name="ownerID"></param>
524 /// <param name="fetchFolders"></param>
525 /// <param name="fetchItems"></param>
526 /// <param name="sortOrder"></param>
527 /// <returns>null if the inventory look up failed</returns>
528 public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
529 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
530 {
531 m_log.DebugFormat(
532 "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
533 fetchFolders, fetchItems, folderID, agentID);
534
535 // FIXME MAYBE: We're not handling sortOrder!
536
537 // TODO: This code for looking in the folder for the library should be folded back into the
538 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
539 // can be handled transparently).
540 InventoryFolderImpl fold;
541 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
542 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
543 {
544 version = 0;
545 InventoryCollection ret = new InventoryCollection();
546 ret.Folders = new List<InventoryFolderBase>();
547 ret.Items = fold.RequestListOfItems();
548
549 return ret;
550 }
551
552 InventoryCollection contents = new InventoryCollection();
553
554 if (folderID != UUID.Zero)
555 {
556 contents = InventoryService.GetFolderContent(agentID, folderID);
557 InventoryFolderBase containingFolder = new InventoryFolderBase();
558 containingFolder.ID = folderID;
559 containingFolder.Owner = agentID;
560 containingFolder = InventoryService.GetFolder(containingFolder);
561 version = containingFolder.Version;
562 }
563 else
564 {
565 // Lost itemsm don't really need a version
566 version = 1;
567 }
568
569 return contents;
570
571 }
572 516
573 /// <summary> 517 /// <summary>
574 /// Handle an inventory folder creation request from the client. 518 /// Handle an inventory folder creation request from the client.
@@ -643,14 +587,13 @@ namespace OpenSim.Region.Framework.Scenes
643 } 587 }
644 } 588 }
645 589
590 delegate void PurgeFolderDelegate(UUID userID, UUID folder);
591
646 /// <summary> 592 /// <summary>
647 /// This should delete all the items and folders in the given directory. 593 /// This should delete all the items and folders in the given directory.
648 /// </summary> 594 /// </summary>
649 /// <param name="remoteClient"></param> 595 /// <param name="remoteClient"></param>
650 /// <param name="folderID"></param> 596 /// <param name="folderID"></param>
651
652 delegate void PurgeFolderDelegate(UUID userID, UUID folder);
653
654 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) 597 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
655 { 598 {
656 PurgeFolderDelegate d = PurgeFolderAsync; 599 PurgeFolderDelegate d = PurgeFolderAsync;
@@ -664,7 +607,6 @@ namespace OpenSim.Region.Framework.Scenes
664 } 607 }
665 } 608 }
666 609
667
668 private void PurgeFolderAsync(UUID userID, UUID folderID) 610 private void PurgeFolderAsync(UUID userID, UUID folderID)
669 { 611 {
670 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); 612 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d80944b..daddb90 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes
832 invString.AddSectionEnd(); 832 invString.AddSectionEnd();
833 833
834 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 834 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
835 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 835 invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
836 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 836 invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
837 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); 837 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
838 838
839 invString.AddSaleStart(); 839 invString.AddSaleStart();
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 7ab295a..2a6163c 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.Manager
56 56
57 public abstract class PhysicsScene 57 public abstract class PhysicsScene
58 { 58 {
59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 /// <summary> 61 /// <summary>
62 /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another. 62 /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another.
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 489a23a..73c1c02 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Physics.OdePlugin
86 private float CAPSULE_RADIUS = 0.37f; 86 private float CAPSULE_RADIUS = 0.37f;
87 private float CAPSULE_LENGTH = 2.140599f; 87 private float CAPSULE_LENGTH = 2.140599f;
88 private float m_tensor = 3800000f; 88 private float m_tensor = 3800000f;
89 private float heightFudgeFactor = 0.52f; 89// private float heightFudgeFactor = 0.52f;
90 private float walkDivisor = 1.3f; 90 private float walkDivisor = 1.3f;
91 private float runDivisor = 0.8f; 91 private float runDivisor = 0.8f;
92 private bool flying = false; 92 private bool flying = false;
@@ -149,7 +149,7 @@ namespace OpenSim.Region.Physics.OdePlugin
149 149
150 public OdeCharacter( 150 public OdeCharacter(
151 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p, 151 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p,
152 float capsule_radius, float tensor, float density, float height_fudge_factor, 152 float capsule_radius, float tensor, float density,
153 float walk_divisor, float rundivisor) 153 float walk_divisor, float rundivisor)
154 { 154 {
155 m_uuid = UUID.Random(); 155 m_uuid = UUID.Random();
@@ -187,7 +187,7 @@ namespace OpenSim.Region.Physics.OdePlugin
187 CAPSULE_RADIUS = capsule_radius; 187 CAPSULE_RADIUS = capsule_radius;
188 m_tensor = tensor; 188 m_tensor = tensor;
189 m_density = density; 189 m_density = density;
190 heightFudgeFactor = height_fudge_factor; 190// heightFudgeFactor = height_fudge_factor;
191 walkDivisor = walk_divisor; 191 walkDivisor = walk_divisor;
192 runDivisor = rundivisor; 192 runDivisor = rundivisor;
193 193
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 0456f56..5b28e7c 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin
156 private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode 156 private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode
157 public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } } 157 public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } }
158 private float avDensity = 80f; 158 private float avDensity = 80f;
159 private float avHeightFudgeFactor = 0.52f; 159// private float avHeightFudgeFactor = 0.52f;
160 private float avMovementDivisorWalk = 1.3f; 160 private float avMovementDivisorWalk = 1.3f;
161 private float avMovementDivisorRun = 0.8f; 161 private float avMovementDivisorRun = 0.8f;
162 private float minimumGroundFlightOffset = 3f; 162 private float minimumGroundFlightOffset = 3f;
@@ -316,7 +316,7 @@ namespace OpenSim.Region.Physics.OdePlugin
316 private int m_physicsiterations = 10; 316 private int m_physicsiterations = 10;
317 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag 317 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag
318 private readonly PhysicsActor PANull = new NullPhysicsActor(); 318 private readonly PhysicsActor PANull = new NullPhysicsActor();
319 private float step_time = 0.0f; 319// private float step_time = 0.0f;
320//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it 320//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it
321//Ckrinke private int ms = 0; 321//Ckrinke private int ms = 0;
322 public IntPtr world; 322 public IntPtr world;
@@ -479,7 +479,7 @@ namespace OpenSim.Region.Physics.OdePlugin
479 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); 479 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
480 480
481 avDensity = physicsconfig.GetFloat("av_density", 80f); 481 avDensity = physicsconfig.GetFloat("av_density", 80f);
482 avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f); 482// avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f);
483 avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); 483 avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
484 avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); 484 avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
485 avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); 485 avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1706 OdeCharacter newAv 1706 OdeCharacter newAv
1707 = new OdeCharacter( 1707 = new OdeCharacter(
1708 avName, this, pos, size, avPIDD, avPIDP, 1708 avName, this, pos, size, avPIDD, avPIDP,
1709 avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, 1709 avCapRadius, avStandupTensor, avDensity,
1710 avMovementDivisorWalk, avMovementDivisorRun); 1710 avMovementDivisorWalk, avMovementDivisorRun);
1711 1711
1712 newAv.Flying = isFlying; 1712 newAv.Flying = isFlying;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 5527d14..3eeb23d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
140 List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>(); 140 List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>();
141 foreach (SenseRepeatClass ts in SenseRepeaters) 141 foreach (SenseRepeatClass ts in SenseRepeaters)
142 { 142 {
143 if (ts.localID != m_localID && ts.itemID != m_itemID) 143 if (ts.localID != m_localID || ts.itemID != m_itemID)
144 { 144 {
145 NewSensors.Add(ts); 145 NewSensors.Add(ts);
146 } 146 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index f9af9c1..f9d6eee 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
55{ 55{
56 public class ScriptInstance : MarshalByRefObject, IScriptInstance 56 public class ScriptInstance : MarshalByRefObject, IScriptInstance
57 { 57 {
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59
60 private IScriptEngine m_Engine; 60 private IScriptEngine m_Engine;
61 private IScriptWorkItem m_CurrentResult = null; 61 private IScriptWorkItem m_CurrentResult = null;
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 5fe1352..972efe4 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -507,8 +507,7 @@
507 ; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps 507 ; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps
508 ; will also be affected. 508 ; will also be affected.
509 ; 509 ;
510 ;DisableFacelights = "false" 510 ;DisableFacelights = "false(1815)
511
512 511
513[ClientStack.LindenCaps] 512[ClientStack.LindenCaps]
514 ;; Long list of capabilities taken from 513 ;; Long list of capabilities taken from
@@ -574,11 +573,14 @@
574 Cap_UploadObjectAsset = "localhost" 573 Cap_UploadObjectAsset = "localhost"
575 Cap_ViewerStartAuction = "" 574 Cap_ViewerStartAuction = ""
576 Cap_ViewerStats = "" 575 Cap_ViewerStats = ""
577 ; This last one is supported by OpenSim, but may
578 ; lead to poor sim performance if served by the simulators,
579 ; so it is disabled by default.
580 Cap_WebFetchInventoryDescendents = ""
581 576
577 ; The fetch inventory descendents caps are supported by OpenSim, but may
578 ; lead to poor sim performance if served by the simulators,
579 ; so they are disabled by default.
580 ; FetchInventoryDescendents2 is the one used in the latest Linden Lab viewers (from some point in the v2 series and above)
581 Cap_WebFetchInventoryDescendents = ""
582 Cap_FetchInventoryDescendents2 = ""
583
582 584
583[Chat] 585[Chat]
584 ; Controls whether the chat module is enabled. Default is true. 586 ; Controls whether the chat module is enabled. Default is true.
@@ -722,7 +724,8 @@
722 av_density = 80 724 av_density = 80
723 725
724 ; use this value to cut 52% of the height the sim gives us 726 ; use this value to cut 52% of the height the sim gives us
725 av_height_fudge_factor = 0.52 727 ; Currently unused
728 ; av_height_fudge_factor = 0.52
726 729
727 ; Movement. Smaller is faster. 730 ; Movement. Smaller is faster.
728 731