diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2 opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim')
261 files changed, 3725 insertions, 3838 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs index 818974c..58a5638 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Build and Revision Numbers | 61 | // You can specify all the values or you can default the Build and Revision Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | // [assembly: AssemblyVersion("1.0.*")] | 63 | // [assembly: AssemblyVersion("1.0.*")] |
64 | 64 | ||
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e540e4d..c436596 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
58 | { | 58 | { |
59 | try | 59 | try |
60 | { | 60 | { |
61 | if (openSim.ConfigSource.Configs["RemoteAdmin"] != null && | 61 | if (openSim.ConfigSource.Configs["RemoteAdmin"] != null && |
62 | openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) | 62 | openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) |
63 | { | 63 | { |
64 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); | 64 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); |
@@ -96,7 +96,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
96 | if (requiredPassword != String.Empty && | 96 | if (requiredPassword != String.Empty && |
97 | (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) | 97 | (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) |
98 | throw new Exception("wrong password"); | 98 | throw new Exception("wrong password"); |
99 | 99 | ||
100 | LLUUID regionID = new LLUUID((string) requestData["regionID"]); | 100 | LLUUID regionID = new LLUUID((string) requestData["regionID"]); |
101 | 101 | ||
102 | responseData["accepted"] = "true"; | 102 | responseData["accepted"] = "true"; |
@@ -106,10 +106,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
106 | 106 | ||
107 | if (!m_app.SceneManager.TryGetScene(regionID, out rebootedScene)) | 107 | if (!m_app.SceneManager.TryGetScene(regionID, out rebootedScene)) |
108 | throw new Exception("region not found"); | 108 | throw new Exception("region not found"); |
109 | 109 | ||
110 | responseData["rebooting"] = "true"; | 110 | responseData["rebooting"] = "true"; |
111 | rebootedScene.Restart(30); | 111 | rebootedScene.Restart(30); |
112 | } | 112 | } |
113 | catch(Exception e) | 113 | catch(Exception e) |
114 | { | 114 | { |
115 | m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message); | 115 | m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message); |
@@ -136,7 +136,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
136 | if (requiredPassword != String.Empty && | 136 | if (requiredPassword != String.Empty && |
137 | (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) | 137 | (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) |
138 | throw new Exception("wrong password"); | 138 | throw new Exception("wrong password"); |
139 | 139 | ||
140 | string message = (string) requestData["message"]; | 140 | string message = (string) requestData["message"]; |
141 | m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message); | 141 | m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message); |
142 | 142 | ||
@@ -167,7 +167,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
167 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString()); | 167 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString()); |
168 | foreach (string k in requestData.Keys) | 168 | foreach (string k in requestData.Keys) |
169 | { | 169 | { |
170 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", | 170 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", |
171 | k, (string)requestData[k], ((string)requestData[k]).Length); | 171 | k, (string)requestData[k], ((string)requestData[k]).Length); |
172 | } | 172 | } |
173 | 173 | ||
@@ -198,7 +198,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
198 | 198 | ||
199 | response.Value = responseData; | 199 | response.Value = responseData; |
200 | } | 200 | } |
201 | catch (Exception e) | 201 | catch (Exception e) |
202 | { | 202 | { |
203 | m_log.ErrorFormat("[RADMIN] Terrain Loading: failed: {0}", e.Message); | 203 | m_log.ErrorFormat("[RADMIN] Terrain Loading: failed: {0}", e.Message); |
204 | m_log.DebugFormat("[RADMIN] Terrain Loading: failed: {0}", e.ToString()); | 204 | m_log.DebugFormat("[RADMIN] Terrain Loading: failed: {0}", e.ToString()); |
@@ -227,14 +227,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
227 | 227 | ||
228 | int timeout = 2000; | 228 | int timeout = 2000; |
229 | 229 | ||
230 | if (requestData.ContainsKey("shutdown") && | 230 | if (requestData.ContainsKey("shutdown") && |
231 | ((string) requestData["shutdown"] == "delayed") && | 231 | ((string) requestData["shutdown"] == "delayed") && |
232 | requestData.ContainsKey("milliseconds")) | 232 | requestData.ContainsKey("milliseconds")) |
233 | { | 233 | { |
234 | timeout = (Int32) requestData["milliseconds"]; | 234 | timeout = (Int32) requestData["milliseconds"]; |
235 | m_app.SceneManager.SendGeneralMessage("Region is going down in " + ((int) (timeout/1000)).ToString() + | 235 | m_app.SceneManager.SendGeneralMessage("Region is going down in " + ((int) (timeout/1000)).ToString() + |
236 | " second(s). Please save what you are doing and log out."); | 236 | " second(s). Please save what you are doing and log out."); |
237 | } | 237 | } |
238 | else | 238 | else |
239 | { | 239 | { |
240 | m_app.SceneManager.SendGeneralMessage("Region is going down now."); | 240 | m_app.SceneManager.SendGeneralMessage("Region is going down now."); |
@@ -248,7 +248,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
248 | 248 | ||
249 | responseData["success"] = "true"; | 249 | responseData["success"] = "true"; |
250 | } | 250 | } |
251 | catch (Exception e) | 251 | catch (Exception e) |
252 | { | 252 | { |
253 | m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message); | 253 | m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message); |
254 | m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString()); | 254 | m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString()); |
@@ -272,7 +272,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
272 | Hashtable requestData = (Hashtable) request.Params[0]; | 272 | Hashtable requestData = (Hashtable) request.Params[0]; |
273 | foreach (string p in param) | 273 | foreach (string p in param) |
274 | { | 274 | { |
275 | if (!requestData.Contains(p)) | 275 | if (!requestData.Contains(p)) |
276 | throw new Exception(String.Format("missing string parameter {0}", p)); | 276 | throw new Exception(String.Format("missing string parameter {0}", p)); |
277 | if (String.IsNullOrEmpty((string)requestData[p])) | 277 | if (String.IsNullOrEmpty((string)requestData[p])) |
278 | throw new Exception(String.Format("parameter {0} is empty", p)); | 278 | throw new Exception(String.Format("parameter {0} is empty", p)); |
@@ -284,7 +284,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
284 | Hashtable requestData = (Hashtable) request.Params[0]; | 284 | Hashtable requestData = (Hashtable) request.Params[0]; |
285 | foreach (string p in param) | 285 | foreach (string p in param) |
286 | { | 286 | { |
287 | if (!requestData.Contains(p)) | 287 | if (!requestData.Contains(p)) |
288 | throw new Exception(String.Format("missing integer parameter {0}", p)); | 288 | throw new Exception(String.Format("missing integer parameter {0}", p)); |
289 | } | 289 | } |
290 | } | 290 | } |
@@ -324,7 +324,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
324 | /// <description>if true, persist the region info | 324 | /// <description>if true, persist the region info |
325 | /// ('true' or 'false')</description></item> | 325 | /// ('true' or 'false')</description></item> |
326 | /// </list> | 326 | /// </list> |
327 | /// | 327 | /// |
328 | /// XmlRpcCreateRegionMethod returns | 328 | /// XmlRpcCreateRegionMethod returns |
329 | /// <list type="table"> | 329 | /// <list type="table"> |
330 | /// <listheader><term>name</term><description>description</description></listheader> | 330 | /// <listheader><term>name</term><description>description</description></listheader> |
@@ -346,9 +346,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
346 | Hashtable responseData = new Hashtable(); | 346 | Hashtable responseData = new Hashtable(); |
347 | 347 | ||
348 | try { | 348 | try { |
349 | checkStringParameters(request, new string[] { "password", | 349 | checkStringParameters(request, new string[] { "password", |
350 | "region_name", | 350 | "region_name", |
351 | "region_master_first", "region_master_last", | 351 | "region_master_first", "region_master_last", |
352 | "region_master_password", | 352 | "region_master_password", |
353 | "listen_ip", "external_address"}); | 353 | "listen_ip", "external_address"}); |
354 | checkIntegerParams(request, new string[] { "region_x", "region_y", "listen_port"}); | 354 | checkIntegerParams(request, new string[] { "region_x", "region_y", "listen_port"}); |
@@ -360,16 +360,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
360 | // extract or generate region ID now | 360 | // extract or generate region ID now |
361 | Scene scene = null; | 361 | Scene scene = null; |
362 | LLUUID regionID = LLUUID.Zero; | 362 | LLUUID regionID = LLUUID.Zero; |
363 | if (requestData.ContainsKey("region_id") && | 363 | if (requestData.ContainsKey("region_id") && |
364 | !String.IsNullOrEmpty((string)requestData["region_id"])) | 364 | !String.IsNullOrEmpty((string)requestData["region_id"])) |
365 | { | 365 | { |
366 | regionID = (string) requestData["region_id"]; | 366 | regionID = (string) requestData["region_id"]; |
367 | if (m_app.SceneManager.TryGetScene(regionID, out scene)) | 367 | if (m_app.SceneManager.TryGetScene(regionID, out scene)) |
368 | throw new Exception(String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", | 368 | throw new Exception(String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", |
369 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, | 369 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, |
370 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); | 370 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); |
371 | } | 371 | } |
372 | else | 372 | else |
373 | { | 373 | { |
374 | regionID = LLUUID.Random(); | 374 | regionID = LLUUID.Random(); |
375 | m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID); | 375 | m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID); |
@@ -385,7 +385,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
385 | 385 | ||
386 | // check for collisions: region name, region UUID, | 386 | // check for collisions: region name, region UUID, |
387 | // region location | 387 | // region location |
388 | if (m_app.SceneManager.TryGetScene(region.RegionName, out scene)) | 388 | if (m_app.SceneManager.TryGetScene(region.RegionName, out scene)) |
389 | throw new Exception(String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>", | 389 | throw new Exception(String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>", |
390 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, | 390 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, |
391 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); | 391 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); |
@@ -395,43 +395,43 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
395 | region.RegionLocX, region.RegionLocY, | 395 | region.RegionLocX, region.RegionLocY, |
396 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, | 396 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, |
397 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); | 397 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); |
398 | 398 | ||
399 | // Security risk [and apparently not used] | 399 | // Security risk [and apparently not used] |
400 | // if (requestData.ContainsKey("datastore")) | 400 | // if (requestData.ContainsKey("datastore")) |
401 | // region.DataStore = (string) requestData["datastore"]; | 401 | // region.DataStore = (string) requestData["datastore"]; |
402 | 402 | ||
403 | region.InternalEndPoint = | 403 | region.InternalEndPoint = |
404 | new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0); | 404 | new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0); |
405 | 405 | ||
406 | region.InternalEndPoint.Port = (Int32) requestData["listen_port"]; | 406 | region.InternalEndPoint.Port = (Int32) requestData["listen_port"]; |
407 | if (0 == region.InternalEndPoint.Port) throw new Exception("listen_port is 0"); | 407 | if (0 == region.InternalEndPoint.Port) throw new Exception("listen_port is 0"); |
408 | if (m_app.SceneManager.TryGetScene(region.InternalEndPoint, out scene)) | 408 | if (m_app.SceneManager.TryGetScene(region.InternalEndPoint, out scene)) |
409 | throw new Exception(String.Format("region internal IP {0} and port {1} already in use by region {2}, UUID {3}, <{4},{5}>", | 409 | throw new Exception(String.Format("region internal IP {0} and port {1} already in use by region {2}, UUID {3}, <{4},{5}>", |
410 | region.InternalEndPoint.Address, | 410 | region.InternalEndPoint.Address, |
411 | region.InternalEndPoint.Port, | 411 | region.InternalEndPoint.Port, |
412 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, | 412 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, |
413 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); | 413 | scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); |
414 | 414 | ||
415 | 415 | ||
416 | region.ExternalHostName = (string) requestData["external_address"]; | 416 | region.ExternalHostName = (string) requestData["external_address"]; |
417 | 417 | ||
418 | region.MasterAvatarFirstName = (string) requestData["region_master_first"]; | 418 | region.MasterAvatarFirstName = (string) requestData["region_master_first"]; |
419 | region.MasterAvatarLastName = (string) requestData["region_master_last"]; | 419 | region.MasterAvatarLastName = (string) requestData["region_master_last"]; |
420 | region.MasterAvatarSandboxPassword = (string) requestData["region_master_password"]; | 420 | region.MasterAvatarSandboxPassword = (string) requestData["region_master_password"]; |
421 | 421 | ||
422 | bool persist = Convert.ToBoolean((string)requestData["persist"]); | 422 | bool persist = Convert.ToBoolean((string)requestData["persist"]); |
423 | if (persist) | 423 | if (persist) |
424 | { | 424 | { |
425 | string regionConfigPath = Path.Combine(Path.Combine(Util.configDir(), "Regions"), | 425 | string regionConfigPath = Path.Combine(Path.Combine(Util.configDir(), "Regions"), |
426 | String.Format("{0}x{1}-{2}.xml", | 426 | String.Format("{0}x{1}-{2}.xml", |
427 | region.RegionLocX.ToString(), | 427 | region.RegionLocX.ToString(), |
428 | region.RegionLocY.ToString(), | 428 | region.RegionLocY.ToString(), |
429 | regionID.ToString())); | 429 | regionID.ToString())); |
430 | m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", | 430 | m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", |
431 | region.RegionID, regionConfigPath); | 431 | region.RegionID, regionConfigPath); |
432 | region.SaveRegionToFile("dynamic region", regionConfigPath); | 432 | region.SaveRegionToFile("dynamic region", regionConfigPath); |
433 | } | 433 | } |
434 | 434 | ||
435 | m_app.CreateRegion(region); | 435 | m_app.CreateRegion(region); |
436 | 436 | ||
437 | responseData["success"] = "true"; | 437 | responseData["success"] = "true"; |
@@ -476,7 +476,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
476 | /// <item><term>start_region_y</term> | 476 | /// <item><term>start_region_y</term> |
477 | /// <description>avatar's start region coordinates, Y value</description></item> | 477 | /// <description>avatar's start region coordinates, Y value</description></item> |
478 | /// </list> | 478 | /// </list> |
479 | /// | 479 | /// |
480 | /// XmlRpcCreateUserMethod returns | 480 | /// XmlRpcCreateUserMethod returns |
481 | /// <list type="table"> | 481 | /// <list type="table"> |
482 | /// <listheader><term>name</term><description>description</description></listheader> | 482 | /// <listheader><term>name</term><description>description</description></listheader> |
@@ -497,10 +497,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
497 | Hashtable requestData = (Hashtable) request.Params[0]; | 497 | Hashtable requestData = (Hashtable) request.Params[0]; |
498 | Hashtable responseData = new Hashtable(); | 498 | Hashtable responseData = new Hashtable(); |
499 | 499 | ||
500 | try | 500 | try |
501 | { | 501 | { |
502 | // check completeness | 502 | // check completeness |
503 | checkStringParameters(request, new string[] { "password", "user_firstname", | 503 | checkStringParameters(request, new string[] { "password", "user_firstname", |
504 | "user_lastname", "user_password" }); | 504 | "user_lastname", "user_password" }); |
505 | checkIntegerParams(request, new string[] { "start_region_x", "start_region_y" }); | 505 | checkIntegerParams(request, new string[] { "start_region_x", "start_region_y" }); |
506 | 506 | ||
@@ -514,16 +514,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
514 | string passwd = (string) requestData["user_password"]; | 514 | string passwd = (string) requestData["user_password"]; |
515 | uint regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); | 515 | uint regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); |
516 | uint regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); | 516 | uint regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); |
517 | 517 | ||
518 | UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); | 518 | UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); |
519 | if (null != userProfile) | 519 | if (null != userProfile) |
520 | throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); | 520 | throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); |
521 | 521 | ||
522 | LLUUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY); | 522 | LLUUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY); |
523 | 523 | ||
524 | if (userID == LLUUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", | 524 | if (userID == LLUUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", |
525 | firstname, lastname)); | 525 | firstname, lastname)); |
526 | 526 | ||
527 | responseData["success"] = "true"; | 527 | responseData["success"] = "true"; |
528 | responseData["avatar_uuid"] = userID.ToString(); | 528 | responseData["avatar_uuid"] = userID.ToString(); |
529 | 529 | ||
@@ -531,7 +531,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
531 | 531 | ||
532 | m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstname, lastname, userID); | 532 | m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstname, lastname, userID); |
533 | } | 533 | } |
534 | catch (Exception e) | 534 | catch (Exception e) |
535 | { | 535 | { |
536 | m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message); | 536 | m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message); |
537 | m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); | 537 | m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); |
@@ -553,33 +553,33 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
553 | Hashtable requestData = (Hashtable) request.Params[0]; | 553 | Hashtable requestData = (Hashtable) request.Params[0]; |
554 | Hashtable responseData = new Hashtable(); | 554 | Hashtable responseData = new Hashtable(); |
555 | 555 | ||
556 | try | 556 | try |
557 | { | 557 | { |
558 | // check completeness | 558 | // check completeness |
559 | foreach (string p in new string[] { "password", "filename" }) | 559 | foreach (string p in new string[] { "password", "filename" }) |
560 | { | 560 | { |
561 | if (!requestData.Contains(p)) | 561 | if (!requestData.Contains(p)) |
562 | throw new Exception(String.Format("missing parameter {0}", p)); | 562 | throw new Exception(String.Format("missing parameter {0}", p)); |
563 | if (String.IsNullOrEmpty((string)requestData[p])) | 563 | if (String.IsNullOrEmpty((string)requestData[p])) |
564 | throw new Exception(String.Format("parameter {0} is empty")); | 564 | throw new Exception(String.Format("parameter {0} is empty")); |
565 | } | 565 | } |
566 | 566 | ||
567 | // check password | 567 | // check password |
568 | if (!String.IsNullOrEmpty(requiredPassword) && | 568 | if (!String.IsNullOrEmpty(requiredPassword) && |
569 | (string)requestData["password"] != requiredPassword) throw new Exception("wrong password"); | 569 | (string)requestData["password"] != requiredPassword) throw new Exception("wrong password"); |
570 | 570 | ||
571 | string filename = (string)requestData["filename"]; | 571 | string filename = (string)requestData["filename"]; |
572 | if (requestData.Contains("region_uuid")) | 572 | if (requestData.Contains("region_uuid")) |
573 | { | 573 | { |
574 | LLUUID region_uuid = (string)requestData["region_uuid"]; | 574 | LLUUID region_uuid = (string)requestData["region_uuid"]; |
575 | if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) | 575 | if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) |
576 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 576 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
577 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 577 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); |
578 | } | 578 | } |
579 | else if (requestData.Contains("region_name")) | 579 | else if (requestData.Contains("region_name")) |
580 | { | 580 | { |
581 | string region_name = (string)requestData["region_name"]; | 581 | string region_name = (string)requestData["region_name"]; |
582 | if (!m_app.SceneManager.TrySetCurrentScene(region_name)) | 582 | if (!m_app.SceneManager.TrySetCurrentScene(region_name)) |
583 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 583 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
584 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 584 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); |
585 | } | 585 | } |
@@ -589,7 +589,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
589 | 589 | ||
590 | m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); | 590 | m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); |
591 | responseData["loaded"] = "true"; | 591 | responseData["loaded"] = "true"; |
592 | 592 | ||
593 | response.Value = responseData; | 593 | response.Value = responseData; |
594 | } | 594 | } |
595 | catch (Exception e) | 595 | catch (Exception e) |
@@ -600,10 +600,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
600 | responseData["loaded"] = "false"; | 600 | responseData["loaded"] = "false"; |
601 | responseData["switched"] = "false"; | 601 | responseData["switched"] = "false"; |
602 | responseData["error"] = e.Message; | 602 | responseData["error"] = e.Message; |
603 | 603 | ||
604 | response.Value = responseData; | 604 | response.Value = responseData; |
605 | } | 605 | } |
606 | 606 | ||
607 | return response; | 607 | return response; |
608 | } | 608 | } |
609 | 609 | ||
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs index 7fc1267..5102e3f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using libsecondlife; | 29 | using libsecondlife; |
@@ -65,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
65 | region_external_hostname = regInfo.ExternalHostName; | 65 | region_external_hostname = regInfo.ExternalHostName; |
66 | 66 | ||
67 | if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) | 67 | if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) |
68 | region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, | 68 | region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, |
69 | regInfo.MasterAvatarLastName); | 69 | regInfo.MasterAvatarLastName); |
70 | } | 70 | } |
71 | } | 71 | } |
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs index 8a6fb09..0716cf6 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -57,12 +57,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
57 | [Extension("/OpenSim/Startup")] | 57 | [Extension("/OpenSim/Startup")] |
58 | public class RestRegionPlugin : RestPlugin | 58 | public class RestRegionPlugin : RestPlugin |
59 | { | 59 | { |
60 | private static readonly log4net.ILog _log = | 60 | private static readonly log4net.ILog _log = |
61 | log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 61 | log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
62 | 62 | ||
63 | #region overriding properties | 63 | #region overriding properties |
64 | public override string Name | 64 | public override string Name |
65 | { | 65 | { |
66 | get { return "REGION"; } | 66 | get { return "REGION"; } |
67 | } | 67 | } |
68 | 68 | ||
@@ -86,7 +86,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
86 | try | 86 | try |
87 | { | 87 | { |
88 | base.Initialise(openSim); | 88 | base.Initialise(openSim); |
89 | if (IsEnabled) | 89 | if (IsEnabled) |
90 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); | 90 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); |
91 | else | 91 | else |
92 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); | 92 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); |
@@ -122,7 +122,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
122 | StringWriter sw = new StringWriter(); | 122 | StringWriter sw = new StringWriter(); |
123 | XmlTextWriter xw = new XmlTextWriter(sw); | 123 | XmlTextWriter xw = new XmlTextWriter(sw); |
124 | xw.Formatting = Formatting.Indented; | 124 | xw.Formatting = Formatting.Indented; |
125 | 125 | ||
126 | xw.WriteStartElement(String.Empty, "regions", String.Empty); | 126 | xw.WriteStartElement(String.Empty, "regions", String.Empty); |
127 | foreach (Scene s in App.SceneManager.Scenes) | 127 | foreach (Scene s in App.SceneManager.Scenes) |
128 | { | 128 | { |
@@ -132,7 +132,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
132 | } | 132 | } |
133 | xw.WriteEndElement(); | 133 | xw.WriteEndElement(); |
134 | xw.Close(); | 134 | xw.Close(); |
135 | 135 | ||
136 | return sw.ToString(); | 136 | return sw.ToString(); |
137 | } | 137 | } |
138 | 138 | ||
@@ -154,7 +154,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
154 | 154 | ||
155 | xs.Serialize(xw, new RegionDetails(scene.RegionInfo)); | 155 | xs.Serialize(xw, new RegionDetails(scene.RegionInfo)); |
156 | xw.Close(); | 156 | xw.Close(); |
157 | 157 | ||
158 | return sw.ToString(); | 158 | return sw.ToString(); |
159 | } | 159 | } |
160 | #endregion methods | 160 | #endregion methods |
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index 0e54f4d..05ea956 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -54,7 +54,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
54 | { | 54 | { |
55 | #region properties | 55 | #region properties |
56 | 56 | ||
57 | protected static readonly log4net.ILog m_log = | 57 | protected static readonly log4net.ILog m_log = |
58 | log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | private IConfig _config; // Configuration source: Rest Plugins | 60 | private IConfig _config; // Configuration source: Rest Plugins |
@@ -100,8 +100,8 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
100 | /// </summary> | 100 | /// </summary> |
101 | public bool IsEnabled | 101 | public bool IsEnabled |
102 | { | 102 | { |
103 | get | 103 | get |
104 | { | 104 | { |
105 | return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false); | 105 | return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false); |
106 | } | 106 | } |
107 | } | 107 | } |
@@ -109,7 +109,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
109 | /// <summary> | 109 | /// <summary> |
110 | /// OpenSimMain application | 110 | /// OpenSimMain application |
111 | /// </summary> | 111 | /// </summary> |
112 | public OpenSimMain App | 112 | public OpenSimMain App |
113 | { | 113 | { |
114 | get { return _app; } | 114 | get { return _app; } |
115 | } | 115 | } |
@@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
117 | /// <summary> | 117 | /// <summary> |
118 | /// RPC server | 118 | /// RPC server |
119 | /// </summary> | 119 | /// </summary> |
120 | public BaseHttpServer HttpServer | 120 | public BaseHttpServer HttpServer |
121 | { | 121 | { |
122 | get { return _httpd; } | 122 | get { return _httpd; } |
123 | } | 123 | } |
@@ -171,7 +171,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
171 | return; | 171 | return; |
172 | } | 172 | } |
173 | 173 | ||
174 | if (!_config.GetBoolean("enabled", false)) | 174 | if (!_config.GetBoolean("enabled", false)) |
175 | { | 175 | { |
176 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); | 176 | m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID); |
177 | return; | 177 | return; |
@@ -184,10 +184,10 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
184 | _godkey = _config.GetString("god_key", String.Empty); | 184 | _godkey = _config.GetString("god_key", String.Empty); |
185 | // Retrive prefix if any. | 185 | // Retrive prefix if any. |
186 | _prefix = _config.GetString("prefix", "/admin"); | 186 | _prefix = _config.GetString("prefix", "/admin"); |
187 | 187 | ||
188 | // Get plugin specific config | 188 | // Get plugin specific config |
189 | _pluginConfig = openSim.ConfigSource.Configs[ConfigName]; | 189 | _pluginConfig = openSim.ConfigSource.Configs[ConfigName]; |
190 | 190 | ||
191 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); | 191 | m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID); |
192 | } | 192 | } |
193 | catch (Exception e) | 193 | catch (Exception e) |
@@ -200,7 +200,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
200 | // not possible for the openSim pointer to be null. However | 200 | // not possible for the openSim pointer to be null. However |
201 | // were the implementation to be changed, this could | 201 | // were the implementation to be changed, this could |
202 | // result in a silent initialization failure. Harmless | 202 | // result in a silent initialization failure. Harmless |
203 | // except for lack of function and lack of any | 203 | // except for lack of function and lack of any |
204 | // diagnostic indication as to why. The same is true if | 204 | // diagnostic indication as to why. The same is true if |
205 | // the HTTP server reference is bad. | 205 | // the HTTP server reference is bad. |
206 | // We should at least issue a message... | 206 | // We should at least issue a message... |
@@ -214,7 +214,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
214 | 214 | ||
215 | public void AddRestStreamHandler(string httpMethod, string path, RestMethod method) | 215 | public void AddRestStreamHandler(string httpMethod, string path, RestMethod method) |
216 | { | 216 | { |
217 | if (!path.StartsWith(_prefix)) | 217 | if (!path.StartsWith(_prefix)) |
218 | { | 218 | { |
219 | path = String.Format("{0}{1}", _prefix, path); | 219 | path = String.Format("{0}{1}", _prefix, path); |
220 | } | 220 | } |
@@ -226,7 +226,7 @@ namespace OpenSim.ApplicationPlugins.Rest | |||
226 | m_log.DebugFormat("{0} Added REST handler {1} {2}", MsgID, httpMethod, path); | 226 | m_log.DebugFormat("{0} Added REST handler {1} {2}", MsgID, httpMethod, path); |
227 | } | 227 | } |
228 | 228 | ||
229 | 229 | ||
230 | public bool VerifyGod(string key) | 230 | public bool VerifyGod(string key) |
231 | { | 231 | { |
232 | if (String.IsNullOrEmpty(key)) return false; | 232 | if (String.IsNullOrEmpty(key)) return false; |
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs index b71a966..517f672 100644 --- a/OpenSim/Data/Base/BaseDataReader.cs +++ b/OpenSim/Data/Base/BaseDataReader.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Data.Base | |||
126 | { | 126 | { |
127 | int ordinal = m_source.GetOrdinal(name); | 127 | int ordinal = m_source.GetOrdinal(name); |
128 | int int32 = m_source.GetInt32(ordinal); | 128 | int int32 = m_source.GetInt32(ordinal); |
129 | return int32; | 129 | return int32; |
130 | } | 130 | } |
131 | 131 | ||
132 | public Int64 GetInt64(string name) | 132 | public Int64 GetInt64(string name) |
diff --git a/OpenSim/Data/Base/BaseFieldMapper.cs b/OpenSim/Data/Base/BaseFieldMapper.cs index 64adb32..4fdc7b9 100644 --- a/OpenSim/Data/Base/BaseFieldMapper.cs +++ b/OpenSim/Data/Base/BaseFieldMapper.cs | |||
@@ -30,7 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Data.Common; | 30 | using System.Data.Common; |
31 | 31 | ||
32 | namespace OpenSim.Data.Base | 32 | namespace OpenSim.Data.Base |
33 | { | 33 | { |
34 | public delegate TField ObjectGetAccessor<TObj, TField>(TObj obj); | 34 | public delegate TField ObjectGetAccessor<TObj, TField>(TObj obj); |
35 | public delegate void ObjectSetAccessor<TObj, TField>(TObj obj, TField value); | 35 | public delegate void ObjectSetAccessor<TObj, TField>(TObj obj, TField value); |
36 | 36 | ||
diff --git a/OpenSim/Data/Base/Properties/AssemblyInfo.cs b/OpenSim/Data/Base/Properties/AssemblyInfo.cs index f851df0..f165434 100644 --- a/OpenSim/Data/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Base/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | using System.Security; | 30 | using System.Security; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | 35 | ||
@@ -42,8 +42,8 @@ using System.Security; | |||
42 | [assembly : AssemblyTrademark("")] | 42 | [assembly : AssemblyTrademark("")] |
43 | [assembly : AssemblyCulture("")] | 43 | [assembly : AssemblyCulture("")] |
44 | 44 | ||
45 | // Setting ComVisible to false makes the types in this assembly not visible | 45 | // Setting ComVisible to false makes the types in this assembly not visible |
46 | // to COM components. If you need to access a type in this assembly from | 46 | // to COM components. If you need to access a type in this assembly from |
47 | // COM, set the ComVisible attribute to true on that type. | 47 | // COM, set the ComVisible attribute to true on that type. |
48 | 48 | ||
49 | [assembly : ComVisible(false)] | 49 | [assembly : ComVisible(false)] |
@@ -55,11 +55,11 @@ using System.Security; | |||
55 | // Version information for an assembly consists of the following four values: | 55 | // Version information for an assembly consists of the following four values: |
56 | // | 56 | // |
57 | // Major Version | 57 | // Major Version |
58 | // Minor Version | 58 | // Minor Version |
59 | // Build Number | 59 | // Build Number |
60 | // Revision | 60 | // Revision |
61 | // | 61 | // |
62 | // You can specify all the values or you can default the Revision and Build Numbers | 62 | // You can specify all the values or you can default the Revision and Build Numbers |
63 | // by using the '*' as shown below: | 63 | // by using the '*' as shown below: |
64 | 64 | ||
65 | [assembly : AssemblyVersion("1.0.0.0")] | 65 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs index 7681516..b2a8d26 100644 --- a/OpenSim/Data/IGridData.cs +++ b/OpenSim/Data/IGridData.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Data | 30 | namespace OpenSim.Data |
31 | { | 31 | { |
32 | public enum DataResponse | 32 | public enum DataResponse |
33 | { | 33 | { |
34 | RESPONSE_OK, | 34 | RESPONSE_OK, |
@@ -74,7 +74,7 @@ namespace OpenSim.Data | |||
74 | RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); | 74 | RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Authenticates a sim by use of its recv key. | 77 | /// Authenticates a sim by use of its recv key. |
78 | /// WARNING: Insecure | 78 | /// WARNING: Insecure |
79 | /// </summary> | 79 | /// </summary> |
80 | /// <param name="UUID">The UUID sent by the sim</param> | 80 | /// <param name="UUID">The UUID sent by the sim</param> |
diff --git a/OpenSim/Data/IniConfig.cs b/OpenSim/Data/IniConfig.cs index 700a681..d8a435d 100644 --- a/OpenSim/Data/IniConfig.cs +++ b/OpenSim/Data/IniConfig.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.IO; | 28 | using System.IO; |
29 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
30 | 30 | ||
31 | /* | 31 | /* |
32 | Taken from public code listing at by Alex Pinsker | 32 | Taken from public code listing at by Alex Pinsker |
33 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html | 33 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html |
34 | */ | 34 | */ |
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 5ae60a1..12a03eb 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -216,7 +216,7 @@ namespace OpenSim.Data.MSSQL | |||
216 | 216 | ||
217 | override public string Version | 217 | override public string Version |
218 | { | 218 | { |
219 | // get { return database.getVersion(); } | 219 | // get { return database.getVersion(); } |
220 | get { return database.getVersion(); } | 220 | get { return database.getVersion(); } |
221 | } | 221 | } |
222 | 222 | ||
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs index 08217dc..8bb15c8 100644 --- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Data.MSSQL | |||
140 | m_landAccessListTable = createLandAccessListTable(); | 140 | m_landAccessListTable = createLandAccessListTable(); |
141 | m_dataSet.Tables.Add(m_landAccessListTable); | 141 | m_dataSet.Tables.Add(m_landAccessListTable); |
142 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); | 142 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); |
143 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); | 143 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
@@ -172,7 +172,7 @@ namespace OpenSim.Data.MSSQL | |||
172 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 172 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
173 | { | 173 | { |
174 | // Instance.RemoveObject(obj, regionUUID); | 174 | // Instance.RemoveObject(obj, regionUUID); |
175 | 175 | ||
176 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 176 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); |
177 | 177 | ||
178 | DataTable prims = m_primTable; | 178 | DataTable prims = m_primTable; |
@@ -222,7 +222,7 @@ namespace OpenSim.Data.MSSQL | |||
222 | 222 | ||
223 | /// <summary> | 223 | /// <summary> |
224 | /// Load persisted objects from region storage. | 224 | /// Load persisted objects from region storage. |
225 | /// </summary> | 225 | /// </summary> |
226 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 226 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
227 | { | 227 | { |
228 | // return Instance.LoadObjects(regionUUID); | 228 | // return Instance.LoadObjects(regionUUID); |
@@ -328,12 +328,12 @@ namespace OpenSim.Data.MSSQL | |||
328 | TaskInventoryItem item = buildItem(row); | 328 | TaskInventoryItem item = buildItem(row); |
329 | inventory.Add(item); | 329 | inventory.Add(item); |
330 | 330 | ||
331 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 331 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
332 | } | 332 | } |
333 | 333 | ||
334 | prim.RestoreInventoryItems(inventory); | 334 | prim.RestoreInventoryItems(inventory); |
335 | 335 | ||
336 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 336 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
337 | // every item). This data should really be stored in the prim table itself. | 337 | // every item). This data should really be stored in the prim table itself. |
338 | if (dbItemRows.Length > 0) | 338 | if (dbItemRows.Length > 0) |
339 | { | 339 | { |
@@ -527,7 +527,7 @@ namespace OpenSim.Data.MSSQL | |||
527 | /*********************************************************************** | 527 | /*********************************************************************** |
528 | * | 528 | * |
529 | * Database Definition Functions | 529 | * Database Definition Functions |
530 | * | 530 | * |
531 | * This should be db agnostic as we define them in ADO.NET terms | 531 | * This should be db agnostic as we define them in ADO.NET terms |
532 | * | 532 | * |
533 | **********************************************************************/ | 533 | **********************************************************************/ |
@@ -742,7 +742,7 @@ namespace OpenSim.Data.MSSQL | |||
742 | } | 742 | } |
743 | 743 | ||
744 | /*********************************************************************** | 744 | /*********************************************************************** |
745 | * | 745 | * |
746 | * Convert between ADO.NET <=> OpenSim Objects | 746 | * Convert between ADO.NET <=> OpenSim Objects |
747 | * | 747 | * |
748 | * These should be database independant | 748 | * These should be database independant |
@@ -1198,7 +1198,7 @@ namespace OpenSim.Data.MSSQL | |||
1198 | 1198 | ||
1199 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1199 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1200 | 1200 | ||
1201 | // For now, we're just going to crudely remove all the previous inventory items | 1201 | // For now, we're just going to crudely remove all the previous inventory items |
1202 | // no matter whether they have changed or not, and replace them with the current set. | 1202 | // no matter whether they have changed or not, and replace them with the current set. |
1203 | lock (m_dataSet) | 1203 | lock (m_dataSet) |
1204 | { | 1204 | { |
@@ -1209,7 +1209,7 @@ namespace OpenSim.Data.MSSQL | |||
1209 | { | 1209 | { |
1210 | // m_log.InfoFormat( | 1210 | // m_log.InfoFormat( |
1211 | // "[REGION DB]: " + | 1211 | // "[REGION DB]: " + |
1212 | // "Adding item {0}, {1} to prim ID {2}", | 1212 | // "Adding item {0}, {1} to prim ID {2}", |
1213 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1213 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1214 | 1214 | ||
1215 | DataRow newItemRow = m_itemsTable.NewRow(); | 1215 | DataRow newItemRow = m_itemsTable.NewRow(); |
@@ -1282,7 +1282,7 @@ namespace OpenSim.Data.MSSQL | |||
1282 | sql += subsql; | 1282 | sql += subsql; |
1283 | sql += " where " + pk; | 1283 | sql += " where " + pk; |
1284 | SqlCommand cmd = new SqlCommand(sql); | 1284 | SqlCommand cmd = new SqlCommand(sql); |
1285 | 1285 | ||
1286 | // this provides the binding for all our parameters, so | 1286 | // this provides the binding for all our parameters, so |
1287 | // much less code than it used to be | 1287 | // much less code than it used to be |
1288 | 1288 | ||
@@ -1329,7 +1329,7 @@ namespace OpenSim.Data.MSSQL | |||
1329 | /// This is a convenience function that collapses 5 repetitive | 1329 | /// This is a convenience function that collapses 5 repetitive |
1330 | /// lines for defining SqlParameters to 2 parameters: | 1330 | /// lines for defining SqlParameters to 2 parameters: |
1331 | /// column name and database type. | 1331 | /// column name and database type. |
1332 | /// | 1332 | /// |
1333 | /// It assumes certain conventions like :param as the param | 1333 | /// It assumes certain conventions like :param as the param |
1334 | /// name to replace in parametrized queries, and that source | 1334 | /// name to replace in parametrized queries, and that source |
1335 | /// version is always current version, both of which are fine | 1335 | /// version is always current version, both of which are fine |
@@ -1424,7 +1424,7 @@ namespace OpenSim.Data.MSSQL | |||
1424 | SqlCommand tcmd = new SqlCommand(createTerrain, conn); | 1424 | SqlCommand tcmd = new SqlCommand(createTerrain, conn); |
1425 | SqlCommand lcmd = new SqlCommand(createLand, conn); | 1425 | SqlCommand lcmd = new SqlCommand(createLand, conn); |
1426 | SqlCommand lalcmd = new SqlCommand(createLandAccessList, conn); | 1426 | SqlCommand lalcmd = new SqlCommand(createLandAccessList, conn); |
1427 | 1427 | ||
1428 | conn.Open(); | 1428 | conn.Open(); |
1429 | try | 1429 | try |
1430 | { | 1430 | { |
@@ -1604,6 +1604,6 @@ namespace OpenSim.Data.MSSQL | |||
1604 | { | 1604 | { |
1605 | return DbType.String; | 1605 | return DbType.String; |
1606 | } | 1606 | } |
1607 | } | 1607 | } |
1608 | } | 1608 | } |
1609 | } | 1609 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs index cf81bee..0bdd460 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MSSQL | |||
79 | private void TestTables() | 79 | private void TestTables() |
80 | { | 80 | { |
81 | IDbCommand cmd = database.Query("SELECT TOP 1 * FROM "+m_regionsTableName, new Dictionary<string, string>()); | 81 | IDbCommand cmd = database.Query("SELECT TOP 1 * FROM "+m_regionsTableName, new Dictionary<string, string>()); |
82 | 82 | ||
83 | try | 83 | try |
84 | { | 84 | { |
85 | cmd.ExecuteNonQuery(); | 85 | cmd.ExecuteNonQuery(); |
@@ -88,7 +88,7 @@ namespace OpenSim.Data.MSSQL | |||
88 | catch (Exception) | 88 | catch (Exception) |
89 | { | 89 | { |
90 | m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating"); | 90 | m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating"); |
91 | database.ExecuteResourceSql("Mssql-regions.sql"); | 91 | database.ExecuteResourceSql("Mssql-regions.sql"); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
@@ -161,7 +161,7 @@ namespace OpenSim.Data.MSSQL | |||
161 | } | 161 | } |
162 | return null; | 162 | return null; |
163 | } | 163 | } |
164 | 164 | ||
165 | /// <summary> | 165 | /// <summary> |
166 | /// Returns a sim profile from its UUID | 166 | /// Returns a sim profile from its UUID |
167 | /// </summary> | 167 | /// </summary> |
@@ -255,17 +255,17 @@ namespace OpenSim.Data.MSSQL | |||
255 | { | 255 | { |
256 | //Insert new region | 256 | //Insert new region |
257 | string sql = | 257 | string sql = |
258 | "UPDATE " + m_regionsTableName + @" SET | 258 | "UPDATE " + m_regionsTableName + @" SET |
259 | [regionHandle]=@regionHandle, [regionName]=@regionName, | 259 | [regionHandle]=@regionHandle, [regionName]=@regionName, |
260 | [regionRecvKey]=@regionRecvKey, [regionSecret]=@regionSecret, [regionSendKey]=@regionSendKey, | 260 | [regionRecvKey]=@regionRecvKey, [regionSecret]=@regionSecret, [regionSendKey]=@regionSendKey, |
261 | [regionDataURI]=@regionDataURI, [serverIP]=@serverIP, [serverPort]=@serverPort, [serverURI]=@serverURI, | 261 | [regionDataURI]=@regionDataURI, [serverIP]=@serverIP, [serverPort]=@serverPort, [serverURI]=@serverURI, |
262 | [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle, | 262 | [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle, |
263 | [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle, | 263 | [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle, |
264 | [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI, | 264 | [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI, |
265 | [regionAssetRecvKey]=@regionAssetRecvKey, [regionAssetSendKey]=@regionAssetSendKey, | 265 | [regionAssetRecvKey]=@regionAssetRecvKey, [regionAssetSendKey]=@regionAssetSendKey, |
266 | [regionUserURI]=@regionUserURI, [regionUserRecvKey]=@regionUserRecvKey, [regionUserSendKey]=@regionUserSendKey, | 266 | [regionUserURI]=@regionUserURI, [regionUserRecvKey]=@regionUserRecvKey, [regionUserSendKey]=@regionUserSendKey, |
267 | [regionMapTexture]=@regionMapTexture, [serverHttpPort]=@serverHttpPort, | 267 | [regionMapTexture]=@regionMapTexture, [serverHttpPort]=@serverHttpPort, |
268 | [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid | 268 | [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid |
269 | where [uuid]=@uuid"; | 269 | where [uuid]=@uuid"; |
270 | 270 | ||
271 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 271 | Dictionary<string, string> parameters = new Dictionary<string, string>(); |
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 611a559..69d45f7 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Data.MSSQL | |||
80 | if (tableName == null) | 80 | if (tableName == null) |
81 | { | 81 | { |
82 | database.ExecuteResourceSql("CreateFoldersTable.sql"); | 82 | database.ExecuteResourceSql("CreateFoldersTable.sql"); |
83 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); | 83 | //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql"); |
84 | return; | 84 | return; |
85 | } | 85 | } |
86 | } | 86 | } |
@@ -236,9 +236,9 @@ namespace OpenSim.Data.MSSQL | |||
236 | 236 | ||
237 | // There should only ever be one root folder for a user. However, if there's more | 237 | // There should only ever be one root folder for a user. However, if there's more |
238 | // than one we'll simply use the first one rather than failing. It would be even | 238 | // than one we'll simply use the first one rather than failing. It would be even |
239 | // nicer to print some message to this effect, but this feels like it's too low a | 239 | // nicer to print some message to this effect, but this feels like it's too low a |
240 | // to put such a message out, and it's too minor right now to spare the time to | 240 | // to put such a message out, and it's too minor right now to spare the time to |
241 | // suitably refactor. | 241 | // suitably refactor. |
242 | if (items.Count > 0) | 242 | if (items.Count > 0) |
243 | { | 243 | { |
244 | rootFolder = items[0]; | 244 | rootFolder = items[0]; |
@@ -326,7 +326,7 @@ namespace OpenSim.Data.MSSQL | |||
326 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 326 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
327 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 327 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
328 | item.Flags = (uint) reader["flags"]; | 328 | item.Flags = (uint) reader["flags"]; |
329 | 329 | ||
330 | return item; | 330 | return item; |
331 | } | 331 | } |
332 | catch (SqlException e) | 332 | catch (SqlException e) |
@@ -455,7 +455,7 @@ namespace OpenSim.Data.MSSQL | |||
455 | + ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID" | 455 | + ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID" |
456 | + ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType" | 456 | + ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType" |
457 | + ", @creationDate, @groupID, @groupOwned, @flags);"; | 457 | + ", @creationDate, @groupID, @groupOwned, @flags);"; |
458 | 458 | ||
459 | try | 459 | try |
460 | { | 460 | { |
461 | Dictionary<string, string> param = new Dictionary<string, string>(); | 461 | Dictionary<string, string> param = new Dictionary<string, string>(); |
@@ -472,7 +472,7 @@ namespace OpenSim.Data.MSSQL | |||
472 | param["creatorID"] = item.Creator.ToString(); | 472 | param["creatorID"] = item.Creator.ToString(); |
473 | param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); | 473 | param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); |
474 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); | 474 | param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); |
475 | 475 | ||
476 | param["salePrice"] = Convert.ToString(item.SalePrice); | 476 | param["salePrice"] = Convert.ToString(item.SalePrice); |
477 | param["saleType"] = Convert.ToString(item.SaleType); | 477 | param["saleType"] = Convert.ToString(item.SaleType); |
478 | param["creationDate"] = Convert.ToString(item.CreationDate); | 478 | param["creationDate"] = Convert.ToString(item.CreationDate); |
@@ -550,7 +550,7 @@ namespace OpenSim.Data.MSSQL | |||
550 | } | 550 | } |
551 | 551 | ||
552 | /// <summary> | 552 | /// <summary> |
553 | /// | 553 | /// |
554 | /// </summary> | 554 | /// </summary> |
555 | /// <param name="item"></param> | 555 | /// <param name="item"></param> |
556 | public void deleteInventoryItem(LLUUID itemID) | 556 | public void deleteInventoryItem(LLUUID itemID) |
@@ -667,7 +667,7 @@ namespace OpenSim.Data.MSSQL | |||
667 | } | 667 | } |
668 | 668 | ||
669 | /// <summary> | 669 | /// <summary> |
670 | /// Append a list of all the child folders of a parent folder | 670 | /// Append a list of all the child folders of a parent folder |
671 | /// </summary> | 671 | /// </summary> |
672 | /// <param name="folders">list where folders will be appended</param> | 672 | /// <param name="folders">list where folders will be appended</param> |
673 | /// <param name="parentID">ID of parent</param> | 673 | /// <param name="parentID">ID of parent</param> |
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 2aea641..3221b3a 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -442,7 +442,7 @@ namespace OpenSim.Data.MSSQL | |||
442 | 442 | ||
443 | return returnval; | 443 | return returnval; |
444 | } | 444 | } |
445 | 445 | ||
446 | /// <summary> | 446 | /// <summary> |
447 | /// Execute a SQL statement stored in a resource, as a string | 447 | /// Execute a SQL statement stored in a resource, as a string |
448 | /// </summary> | 448 | /// </summary> |
@@ -509,7 +509,7 @@ namespace OpenSim.Data.MSSQL | |||
509 | throw new Exception(string.Format("Resource '{0}' was not found", name)); | 509 | throw new Exception(string.Format("Resource '{0}' was not found", name)); |
510 | } | 510 | } |
511 | 511 | ||
512 | /// <summary> | 512 | /// <summary> |
513 | /// Returns the version of this DB provider | 513 | /// Returns the version of this DB provider |
514 | /// </summary> | 514 | /// </summary> |
515 | /// <returns>A string containing the DB provider</returns> | 515 | /// <returns>A string containing the DB provider</returns> |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 844b7fa..9dc6812 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Data.MSSQL | |||
105 | { | 105 | { |
106 | database.ExecuteResourceSql("Mssql-users.sql"); | 106 | database.ExecuteResourceSql("Mssql-users.sql"); |
107 | } | 107 | } |
108 | 108 | ||
109 | cmd = database.Query("select top 1 * from " + m_agentsTableName, new Dictionary<string, string>()); | 109 | cmd = database.Query("select top 1 * from " + m_agentsTableName, new Dictionary<string, string>()); |
110 | try | 110 | try |
111 | { | 111 | { |
@@ -747,7 +747,7 @@ namespace OpenSim.Data.MSSQL | |||
747 | 747 | ||
748 | /// Appearance | 748 | /// Appearance |
749 | /// TODO: stubs for now to get us to a compiling state gently | 749 | /// TODO: stubs for now to get us to a compiling state gently |
750 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 750 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
751 | // { | 751 | // { |
752 | // return new AvatarAppearance(); | 752 | // return new AvatarAppearance(); |
753 | // } | 753 | // } |
@@ -761,12 +761,12 @@ namespace OpenSim.Data.MSSQL | |||
761 | { | 761 | { |
762 | return; | 762 | return; |
763 | } | 763 | } |
764 | 764 | ||
765 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 765 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
766 | { | 766 | { |
767 | return; | 767 | return; |
768 | } | 768 | } |
769 | 769 | ||
770 | override public List<LLUUID> GetAttachments(LLUUID user) | 770 | override public List<LLUUID> GetAttachments(LLUUID user) |
771 | { | 771 | { |
772 | return new List<LLUUID>(); | 772 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs index 6b2c214..279e1a9 100644 --- a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/MapperFactory/DataMapperFactory.cs b/OpenSim/Data/MapperFactory/DataMapperFactory.cs index 1d981f8..0b1fadd 100644 --- a/OpenSim/Data/MapperFactory/DataMapperFactory.cs +++ b/OpenSim/Data/MapperFactory/DataMapperFactory.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Data.MapperFactory | |||
49 | return new MSSQLDatabaseMapper(connectionString); | 49 | return new MSSQLDatabaseMapper(connectionString); |
50 | default: | 50 | default: |
51 | throw new ArgumentException("Unknown Database Mapper type [" + type + "]."); | 51 | throw new ArgumentException("Unknown Database Mapper type [" + type + "]."); |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } | 55 | } |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 7e6289b..e556352 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL | |||
79 | _dbConnection.Connection); | 79 | _dbConnection.Connection); |
80 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); | 80 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); |
81 | p.Value = assetID.GetBytes(); | 81 | p.Value = assetID.GetBytes(); |
82 | 82 | ||
83 | try | 83 | try |
84 | { | 84 | { |
85 | using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) | 85 | using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) |
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL | |||
111 | } | 111 | } |
112 | 112 | ||
113 | override public void CreateAsset(AssetBase asset) | 113 | override public void CreateAsset(AssetBase asset) |
114 | { | 114 | { |
115 | lock (_dbConnection) | 115 | lock (_dbConnection) |
116 | { | 116 | { |
117 | MySqlCommand cmd = | 117 | MySqlCommand cmd = |
@@ -119,10 +119,10 @@ namespace OpenSim.Data.MySQL | |||
119 | "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + | 119 | "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + |
120 | "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", | 120 | "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", |
121 | _dbConnection.Connection); | 121 | _dbConnection.Connection); |
122 | 122 | ||
123 | // need to ensure we dispose | 123 | // need to ensure we dispose |
124 | try | 124 | try |
125 | { | 125 | { |
126 | using (cmd) | 126 | using (cmd) |
127 | { | 127 | { |
128 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); | 128 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); |
@@ -145,7 +145,7 @@ namespace OpenSim.Data.MySQL | |||
145 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() | 145 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() |
146 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); | 146 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); |
147 | _dbConnection.Reconnect(); | 147 | _dbConnection.Reconnect(); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs index ac0d382..3c39a5e 100644 --- a/OpenSim/Data/MySQL/MySQLDataStore.cs +++ b/OpenSim/Data/MySQL/MySQLDataStore.cs | |||
@@ -50,12 +50,12 @@ namespace OpenSim.Data.MySQL | |||
50 | private const string m_terrainSelect = "select * from terrain limit 1"; | 50 | private const string m_terrainSelect = "select * from terrain limit 1"; |
51 | private const string m_landSelect = "select * from land"; | 51 | private const string m_landSelect = "select * from land"; |
52 | private const string m_landAccessListSelect = "select * from landaccesslist"; | 52 | private const string m_landAccessListSelect = "select * from landaccesslist"; |
53 | 53 | ||
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// We're only using this to version the table! | 56 | /// We're only using this to version the table! |
57 | /// </summary> | 57 | /// </summary> |
58 | 58 | ||
59 | 59 | ||
60 | private DataSet m_dataSet; | 60 | private DataSet m_dataSet; |
61 | private MySqlDataAdapter m_primDataAdapter; | 61 | private MySqlDataAdapter m_primDataAdapter; |
@@ -65,16 +65,16 @@ namespace OpenSim.Data.MySQL | |||
65 | private MySqlDataAdapter m_terrainDataAdapter; | 65 | private MySqlDataAdapter m_terrainDataAdapter; |
66 | private MySqlDataAdapter m_landDataAdapter; | 66 | private MySqlDataAdapter m_landDataAdapter; |
67 | private MySqlDataAdapter m_landAccessListDataAdapter; | 67 | private MySqlDataAdapter m_landAccessListDataAdapter; |
68 | 68 | ||
69 | private DataTable m_primTable; | 69 | private DataTable m_primTable; |
70 | private DataTable m_shapeTable; | 70 | private DataTable m_shapeTable; |
71 | private DataTable m_itemsTable; | 71 | private DataTable m_itemsTable; |
72 | private DataTable m_terrainTable; | 72 | private DataTable m_terrainTable; |
73 | private DataTable m_landTable; | 73 | private DataTable m_landTable; |
74 | private DataTable m_landAccessListTable; | 74 | private DataTable m_landAccessListTable; |
75 | 75 | ||
76 | // Temporary attribute while this is experimental | 76 | // Temporary attribute while this is experimental |
77 | private bool persistPrimInventories; | 77 | private bool persistPrimInventories; |
78 | 78 | ||
79 | /*********************************************************************** | 79 | /*********************************************************************** |
80 | * | 80 | * |
@@ -98,9 +98,9 @@ namespace OpenSim.Data.MySQL | |||
98 | 98 | ||
99 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, m_connection); | 99 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, m_connection); |
100 | m_shapeDataAdapter = new MySqlDataAdapter(shapeSelectCmd); | 100 | m_shapeDataAdapter = new MySqlDataAdapter(shapeSelectCmd); |
101 | 101 | ||
102 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, m_connection); | 102 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, m_connection); |
103 | m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd); | 103 | m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd); |
104 | 104 | ||
105 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, m_connection); | 105 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, m_connection); |
106 | m_terrainDataAdapter = new MySqlDataAdapter(terrainSelectCmd); | 106 | m_terrainDataAdapter = new MySqlDataAdapter(terrainSelectCmd); |
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL | |||
111 | MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, m_connection); | 111 | MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, m_connection); |
112 | m_landAccessListDataAdapter = new MySqlDataAdapter(landAccessListSelectCmd); | 112 | m_landAccessListDataAdapter = new MySqlDataAdapter(landAccessListSelectCmd); |
113 | 113 | ||
114 | 114 | ||
115 | TestTables(m_connection); | 115 | TestTables(m_connection); |
116 | 116 | ||
117 | lock (m_dataSet) | 117 | lock (m_dataSet) |
@@ -125,13 +125,13 @@ namespace OpenSim.Data.MySQL | |||
125 | m_dataSet.Tables.Add(m_shapeTable); | 125 | m_dataSet.Tables.Add(m_shapeTable); |
126 | SetupShapeCommands(m_shapeDataAdapter, m_connection); | 126 | SetupShapeCommands(m_shapeDataAdapter, m_connection); |
127 | m_shapeDataAdapter.Fill(m_shapeTable); | 127 | m_shapeDataAdapter.Fill(m_shapeTable); |
128 | 128 | ||
129 | if (persistPrimInventories) | 129 | if (persistPrimInventories) |
130 | { | 130 | { |
131 | m_itemsTable = createItemsTable(); | 131 | m_itemsTable = createItemsTable(); |
132 | m_dataSet.Tables.Add(m_itemsTable); | 132 | m_dataSet.Tables.Add(m_itemsTable); |
133 | SetupItemsCommands(m_itemsDataAdapter, m_connection); | 133 | SetupItemsCommands(m_itemsDataAdapter, m_connection); |
134 | m_itemsDataAdapter.Fill(m_itemsTable); | 134 | m_itemsDataAdapter.Fill(m_itemsTable); |
135 | } | 135 | } |
136 | 136 | ||
137 | m_terrainTable = createTerrainTable(); | 137 | m_terrainTable = createTerrainTable(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Data.MySQL | |||
195 | 195 | ||
196 | UpgradeLandTable(tableList["land"], dbconn); | 196 | UpgradeLandTable(tableList["land"], dbconn); |
197 | //database.Close(); | 197 | //database.Close(); |
198 | 198 | ||
199 | } | 199 | } |
200 | 200 | ||
201 | /// <summary> | 201 | /// <summary> |
@@ -290,12 +290,12 @@ namespace OpenSim.Data.MySQL | |||
290 | { | 290 | { |
291 | shapeRow.Delete(); | 291 | shapeRow.Delete(); |
292 | } | 292 | } |
293 | 293 | ||
294 | if (persistPrimInventories) | 294 | if (persistPrimInventories) |
295 | { | 295 | { |
296 | RemoveItems(uuid); | 296 | RemoveItems(uuid); |
297 | } | 297 | } |
298 | 298 | ||
299 | // Remove prim row | 299 | // Remove prim row |
300 | row.Delete(); | 300 | row.Delete(); |
301 | } | 301 | } |
@@ -309,18 +309,18 @@ namespace OpenSim.Data.MySQL | |||
309 | /// </summary> | 309 | /// </summary> |
310 | private void RemoveItems(LLUUID uuid) | 310 | private void RemoveItems(LLUUID uuid) |
311 | { | 311 | { |
312 | String sql = String.Format("primID = '{0}'", uuid); | 312 | String sql = String.Format("primID = '{0}'", uuid); |
313 | DataRow[] itemRows = m_itemsTable.Select(sql); | 313 | DataRow[] itemRows = m_itemsTable.Select(sql); |
314 | 314 | ||
315 | foreach (DataRow itemRow in itemRows) | 315 | foreach (DataRow itemRow in itemRows) |
316 | { | 316 | { |
317 | itemRow.Delete(); | 317 | itemRow.Delete(); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | /// <summary> | 321 | /// <summary> |
322 | /// Load persisted objects from region storage. | 322 | /// Load persisted objects from region storage. |
323 | /// </summary> | 323 | /// </summary> |
324 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 324 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
325 | { | 325 | { |
326 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 326 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
@@ -341,17 +341,17 @@ namespace OpenSim.Data.MySQL | |||
341 | 341 | ||
342 | foreach (DataRow primRow in primsForRegion) | 342 | foreach (DataRow primRow in primsForRegion) |
343 | { | 343 | { |
344 | try | 344 | try |
345 | { | 345 | { |
346 | string uuid = (string) primRow["UUID"]; | 346 | string uuid = (string) primRow["UUID"]; |
347 | string objID = (string) primRow["SceneGroupID"]; | 347 | string objID = (string) primRow["SceneGroupID"]; |
348 | 348 | ||
349 | SceneObjectPart prim = buildPrim(primRow); | 349 | SceneObjectPart prim = buildPrim(primRow); |
350 | 350 | ||
351 | if (uuid == objID) //is new SceneObjectGroup ? | 351 | if (uuid == objID) //is new SceneObjectGroup ? |
352 | { | 352 | { |
353 | SceneObjectGroup group = new SceneObjectGroup(); | 353 | SceneObjectGroup group = new SceneObjectGroup(); |
354 | 354 | ||
355 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); | 355 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
356 | if (shapeRow != null) | 356 | if (shapeRow != null) |
357 | { | 357 | { |
@@ -384,11 +384,11 @@ namespace OpenSim.Data.MySQL | |||
384 | } | 384 | } |
385 | createdObjects[new LLUUID(objID)].AddPart(prim); | 385 | createdObjects[new LLUUID(objID)].AddPart(prim); |
386 | } | 386 | } |
387 | 387 | ||
388 | if (persistPrimInventories) | 388 | if (persistPrimInventories) |
389 | { | 389 | { |
390 | LoadItems(prim); | 390 | LoadItems(prim); |
391 | } | 391 | } |
392 | } | 392 | } |
393 | catch (Exception e) | 393 | catch (Exception e) |
394 | { | 394 | { |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.MySQL | |||
403 | } | 403 | } |
404 | return retvals; | 404 | return retvals; |
405 | } | 405 | } |
406 | 406 | ||
407 | /// <summary> | 407 | /// <summary> |
408 | /// Load in a prim's persisted inventory. | 408 | /// Load in a prim's persisted inventory. |
409 | /// </summary> | 409 | /// </summary> |
@@ -411,31 +411,31 @@ namespace OpenSim.Data.MySQL | |||
411 | private void LoadItems(SceneObjectPart prim) | 411 | private void LoadItems(SceneObjectPart prim) |
412 | { | 412 | { |
413 | //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 413 | //m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); |
414 | 414 | ||
415 | DataTable dbItems = m_itemsTable; | 415 | DataTable dbItems = m_itemsTable; |
416 | 416 | ||
417 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 417 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
418 | DataRow[] dbItemRows = dbItems.Select(sql); | 418 | DataRow[] dbItemRows = dbItems.Select(sql); |
419 | 419 | ||
420 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 420 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
421 | 421 | ||
422 | foreach (DataRow row in dbItemRows) | 422 | foreach (DataRow row in dbItemRows) |
423 | { | 423 | { |
424 | TaskInventoryItem item = buildItem(row); | 424 | TaskInventoryItem item = buildItem(row); |
425 | inventory.Add(item); | 425 | inventory.Add(item); |
426 | 426 | ||
427 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 427 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
428 | } | 428 | } |
429 | 429 | ||
430 | prim.RestoreInventoryItems(inventory); | 430 | prim.RestoreInventoryItems(inventory); |
431 | 431 | ||
432 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 432 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
433 | // every item). This data should really be stored in the prim table itself. | 433 | // every item). This data should really be stored in the prim table itself. |
434 | if (dbItemRows.Length > 0) | 434 | if (dbItemRows.Length > 0) |
435 | { | 435 | { |
436 | prim.FolderID = inventory[0].ParentID; | 436 | prim.FolderID = inventory[0].ParentID; |
437 | } | 437 | } |
438 | } | 438 | } |
439 | 439 | ||
440 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 440 | public void StoreTerrain(double[,] ter, LLUUID regionID) |
441 | { | 441 | { |
@@ -474,8 +474,8 @@ namespace OpenSim.Data.MySQL | |||
474 | { | 474 | { |
475 | m_connection.Open(); | 475 | m_connection.Open(); |
476 | } | 476 | } |
477 | 477 | ||
478 | lock (m_dataSet) | 478 | lock (m_dataSet) |
479 | { | 479 | { |
480 | using (MySqlDataReader row = cmd.ExecuteReader()) | 480 | using (MySqlDataReader row = cmd.ExecuteReader()) |
481 | { | 481 | { |
@@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL | |||
498 | m_log.Info("[REGION DB]: No terrain found for region"); | 498 | m_log.Info("[REGION DB]: No terrain found for region"); |
499 | return null; | 499 | return null; |
500 | } | 500 | } |
501 | 501 | ||
502 | m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString()); | 502 | m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString()); |
503 | } | 503 | } |
504 | } | 504 | } |
@@ -558,7 +558,7 @@ namespace OpenSim.Data.MySQL | |||
558 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); | 558 | fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); |
559 | landaccesslist.Rows.Add(newAccessRow); | 559 | landaccesslist.Rows.Add(newAccessRow); |
560 | } | 560 | } |
561 | 561 | ||
562 | Commit(); | 562 | Commit(); |
563 | } | 563 | } |
564 | } | 564 | } |
@@ -624,7 +624,7 @@ namespace OpenSim.Data.MySQL | |||
624 | /*********************************************************************** | 624 | /*********************************************************************** |
625 | * | 625 | * |
626 | * Database Definition Functions | 626 | * Database Definition Functions |
627 | * | 627 | * |
628 | * This should be db agnostic as we define them in ADO.NET terms | 628 | * This should be db agnostic as we define them in ADO.NET terms |
629 | * | 629 | * |
630 | **********************************************************************/ | 630 | **********************************************************************/ |
@@ -803,7 +803,7 @@ namespace OpenSim.Data.MySQL | |||
803 | 803 | ||
804 | return shapes; | 804 | return shapes; |
805 | } | 805 | } |
806 | 806 | ||
807 | private static DataTable createItemsTable() | 807 | private static DataTable createItemsTable() |
808 | { | 808 | { |
809 | DataTable items = new DataTable("primitems"); | 809 | DataTable items = new DataTable("primitems"); |
@@ -812,8 +812,8 @@ namespace OpenSim.Data.MySQL | |||
812 | createCol(items, "primID", typeof (String)); | 812 | createCol(items, "primID", typeof (String)); |
813 | createCol(items, "assetID", typeof (String)); | 813 | createCol(items, "assetID", typeof (String)); |
814 | createCol(items, "parentFolderID", typeof (String)); | 814 | createCol(items, "parentFolderID", typeof (String)); |
815 | 815 | ||
816 | createCol(items, "invType", typeof (Int32)); | 816 | createCol(items, "invType", typeof (Int32)); |
817 | createCol(items, "assetType", typeof (Int32)); | 817 | createCol(items, "assetType", typeof (Int32)); |
818 | 818 | ||
819 | createCol(items, "name", typeof (String)); | 819 | createCol(items, "name", typeof (String)); |
@@ -834,10 +834,10 @@ namespace OpenSim.Data.MySQL | |||
834 | items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]}; | 834 | items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]}; |
835 | 835 | ||
836 | return items; | 836 | return items; |
837 | } | 837 | } |
838 | 838 | ||
839 | /*********************************************************************** | 839 | /*********************************************************************** |
840 | * | 840 | * |
841 | * Convert between ADO.NET <=> OpenSim Objects | 841 | * Convert between ADO.NET <=> OpenSim Objects |
842 | * | 842 | * |
843 | * These should be database independant | 843 | * These should be database independant |
@@ -932,8 +932,8 @@ namespace OpenSim.Data.MySQL | |||
932 | } | 932 | } |
933 | return prim; | 933 | return prim; |
934 | } | 934 | } |
935 | 935 | ||
936 | 936 | ||
937 | /// <summary> | 937 | /// <summary> |
938 | /// Build a prim inventory item from the persisted data. | 938 | /// Build a prim inventory item from the persisted data. |
939 | /// </summary> | 939 | /// </summary> |
@@ -942,15 +942,15 @@ namespace OpenSim.Data.MySQL | |||
942 | private static TaskInventoryItem buildItem(DataRow row) | 942 | private static TaskInventoryItem buildItem(DataRow row) |
943 | { | 943 | { |
944 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 944 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
945 | 945 | ||
946 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 946 | taskItem.ItemID = new LLUUID((String)row["itemID"]); |
947 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 947 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
948 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 948 | taskItem.AssetID = new LLUUID((String)row["assetID"]); |
949 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 949 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); |
950 | 950 | ||
951 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 951 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
952 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 952 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
953 | 953 | ||
954 | taskItem.Name = (String)row["name"]; | 954 | taskItem.Name = (String)row["name"]; |
955 | taskItem.Description = (String)row["description"]; | 955 | taskItem.Description = (String)row["description"]; |
956 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 956 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
@@ -958,15 +958,15 @@ namespace OpenSim.Data.MySQL | |||
958 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 958 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); |
959 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 959 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); |
960 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 960 | taskItem.GroupID = new LLUUID((String)row["groupID"]); |
961 | 961 | ||
962 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); | 962 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); |
963 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); | 963 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); |
964 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); | 964 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); |
965 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); | 965 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); |
966 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); | 966 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); |
967 | 967 | ||
968 | return taskItem; | 968 | return taskItem; |
969 | } | 969 | } |
970 | 970 | ||
971 | private static LandData buildLandData(DataRow row) | 971 | private static LandData buildLandData(DataRow row) |
972 | { | 972 | { |
@@ -1117,17 +1117,17 @@ namespace OpenSim.Data.MySQL | |||
1117 | } | 1117 | } |
1118 | } | 1118 | } |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) | 1121 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1122 | { | 1122 | { |
1123 | row["itemID"] = taskItem.ItemID; | 1123 | row["itemID"] = taskItem.ItemID; |
1124 | row["primID"] = taskItem.ParentPartID; | 1124 | row["primID"] = taskItem.ParentPartID; |
1125 | row["assetID"] = taskItem.AssetID; | 1125 | row["assetID"] = taskItem.AssetID; |
1126 | row["parentFolderID"] = taskItem.ParentID; | 1126 | row["parentFolderID"] = taskItem.ParentID; |
1127 | 1127 | ||
1128 | row["invType"] = taskItem.InvType; | 1128 | row["invType"] = taskItem.InvType; |
1129 | row["assetType"] = taskItem.Type; | 1129 | row["assetType"] = taskItem.Type; |
1130 | 1130 | ||
1131 | row["name"] = taskItem.Name; | 1131 | row["name"] = taskItem.Name; |
1132 | row["description"] = taskItem.Description; | 1132 | row["description"] = taskItem.Description; |
1133 | row["creationDate"] = taskItem.CreationDate; | 1133 | row["creationDate"] = taskItem.CreationDate; |
@@ -1140,7 +1140,7 @@ namespace OpenSim.Data.MySQL | |||
1140 | row["basePermissions"] = taskItem.BaseMask; | 1140 | row["basePermissions"] = taskItem.BaseMask; |
1141 | row["everyonePermissions"] = taskItem.EveryoneMask; | 1141 | row["everyonePermissions"] = taskItem.EveryoneMask; |
1142 | row["groupPermissions"] = taskItem.GroupMask; | 1142 | row["groupPermissions"] = taskItem.GroupMask; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 1145 | private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
1146 | { | 1146 | { |
@@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL | |||
1322 | else | 1322 | else |
1323 | { | 1323 | { |
1324 | fillShapeRow(shapeRow, prim); | 1324 | fillShapeRow(shapeRow, prim); |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | // see IRegionDatastore | 1328 | // see IRegionDatastore |
1329 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1329 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
1330 | { | 1330 | { |
1331 | if (!persistPrimInventories) | 1331 | if (!persistPrimInventories) |
1332 | return; | 1332 | return; |
1333 | 1333 | ||
1334 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1334 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1335 | 1335 | ||
1336 | // For now, we're just going to crudely remove all the previous inventory items | 1336 | // For now, we're just going to crudely remove all the previous inventory items |
1337 | // no matter whether they have changed or not, and replace them with the current set. | 1337 | // no matter whether they have changed or not, and replace them with the current set. |
1338 | lock (m_dataSet) | 1338 | lock (m_dataSet) |
1339 | { | 1339 | { |
1340 | RemoveItems(primID); | 1340 | RemoveItems(primID); |
1341 | 1341 | ||
1342 | // repalce with current inventory details | 1342 | // repalce with current inventory details |
1343 | foreach (TaskInventoryItem newItem in items) | 1343 | foreach (TaskInventoryItem newItem in items) |
1344 | { | 1344 | { |
1345 | // m_log.InfoFormat( | 1345 | // m_log.InfoFormat( |
1346 | // "[REGION DB]: " + | 1346 | // "[REGION DB]: " + |
1347 | // "Adding item {0}, {1} to prim ID {2}", | 1347 | // "Adding item {0}, {1} to prim ID {2}", |
1348 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1348 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1349 | 1349 | ||
1350 | DataRow newItemRow = m_itemsTable.NewRow(); | 1350 | DataRow newItemRow = m_itemsTable.NewRow(); |
1351 | fillItemRow(newItemRow, newItem); | 1351 | fillItemRow(newItemRow, newItem); |
1352 | m_itemsTable.Rows.Add(newItemRow); | 1352 | m_itemsTable.Rows.Add(newItemRow); |
1353 | } | 1353 | } |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | Commit(); | 1356 | Commit(); |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | /*********************************************************************** | 1359 | /*********************************************************************** |
1360 | * | 1360 | * |
@@ -1447,9 +1447,9 @@ namespace OpenSim.Data.MySQL | |||
1447 | } | 1447 | } |
1448 | sql += subsql; | 1448 | sql += subsql; |
1449 | sql += ")"; | 1449 | sql += ")"; |
1450 | 1450 | ||
1451 | //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); | 1451 | //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql); |
1452 | 1452 | ||
1453 | return sql; | 1453 | return sql; |
1454 | } | 1454 | } |
1455 | 1455 | ||
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.MySQL | |||
1466 | /// This is a convenience function that collapses 5 repetitive | 1466 | /// This is a convenience function that collapses 5 repetitive |
1467 | /// lines for defining MySqlParameters to 2 parameters: | 1467 | /// lines for defining MySqlParameters to 2 parameters: |
1468 | /// column name and database type. | 1468 | /// column name and database type. |
1469 | /// | 1469 | /// |
1470 | /// It assumes certain conventions like ?param as the param | 1470 | /// It assumes certain conventions like ?param as the param |
1471 | /// name to replace in parametrized queries, and that source | 1471 | /// name to replace in parametrized queries, and that source |
1472 | /// version is always current version, both of which are fine | 1472 | /// version is always current version, both of which are fine |
@@ -1498,7 +1498,7 @@ namespace OpenSim.Data.MySQL | |||
1498 | delete.Connection = conn; | 1498 | delete.Connection = conn; |
1499 | da.DeleteCommand = delete; | 1499 | da.DeleteCommand = delete; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | private void SetupItemsCommands(MySqlDataAdapter da, MySqlConnection conn) | 1502 | private void SetupItemsCommands(MySqlDataAdapter da, MySqlConnection conn) |
1503 | { | 1503 | { |
1504 | da.InsertCommand = createInsertCommand("primitems", m_itemsTable); | 1504 | da.InsertCommand = createInsertCommand("primitems", m_itemsTable); |
@@ -1511,7 +1511,7 @@ namespace OpenSim.Data.MySQL | |||
1511 | delete.Parameters.Add(createMySqlParameter("itemID", typeof (String))); | 1511 | delete.Parameters.Add(createMySqlParameter("itemID", typeof (String))); |
1512 | delete.Connection = conn; | 1512 | delete.Connection = conn; |
1513 | da.DeleteCommand = delete; | 1513 | da.DeleteCommand = delete; |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | private void SetupTerrainCommands(MySqlDataAdapter da, MySqlConnection conn) | 1516 | private void SetupTerrainCommands(MySqlDataAdapter da, MySqlConnection conn) |
1517 | { | 1517 | { |
@@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL | |||
1597 | { | 1597 | { |
1598 | m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); | 1598 | m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | try | 1601 | try |
1602 | { | 1602 | { |
1603 | icmd.ExecuteNonQuery(); | 1603 | icmd.ExecuteNonQuery(); |
@@ -1605,7 +1605,7 @@ namespace OpenSim.Data.MySQL | |||
1605 | catch (MySqlException e) | 1605 | catch (MySqlException e) |
1606 | { | 1606 | { |
1607 | m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); | 1607 | m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e); |
1608 | } | 1608 | } |
1609 | 1609 | ||
1610 | try | 1610 | try |
1611 | { | 1611 | { |
@@ -1643,7 +1643,7 @@ namespace OpenSim.Data.MySQL | |||
1643 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn); | 1643 | MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn); |
1644 | MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd); | 1644 | MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd); |
1645 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn); | 1645 | MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn); |
1646 | MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd); | 1646 | MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd); |
1647 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn); | 1647 | MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn); |
1648 | MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd); | 1648 | MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd); |
1649 | MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn); | 1649 | MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn); |
@@ -1656,10 +1656,10 @@ namespace OpenSim.Data.MySQL | |||
1656 | { | 1656 | { |
1657 | pDa.Fill(tmpDS, "prims"); | 1657 | pDa.Fill(tmpDS, "prims"); |
1658 | sDa.Fill(tmpDS, "primshapes"); | 1658 | sDa.Fill(tmpDS, "primshapes"); |
1659 | 1659 | ||
1660 | if (persistPrimInventories) | 1660 | if (persistPrimInventories) |
1661 | iDa.Fill(tmpDS, "primitems"); | 1661 | iDa.Fill(tmpDS, "primitems"); |
1662 | 1662 | ||
1663 | tDa.Fill(tmpDS, "terrain"); | 1663 | tDa.Fill(tmpDS, "terrain"); |
1664 | lDa.Fill(tmpDS, "land"); | 1664 | lDa.Fill(tmpDS, "land"); |
1665 | lalDa.Fill(tmpDS, "landaccesslist"); | 1665 | lalDa.Fill(tmpDS, "landaccesslist"); |
@@ -1672,10 +1672,10 @@ namespace OpenSim.Data.MySQL | |||
1672 | 1672 | ||
1673 | pDa.Fill(tmpDS, "prims"); | 1673 | pDa.Fill(tmpDS, "prims"); |
1674 | sDa.Fill(tmpDS, "primshapes"); | 1674 | sDa.Fill(tmpDS, "primshapes"); |
1675 | 1675 | ||
1676 | if (persistPrimInventories) | 1676 | if (persistPrimInventories) |
1677 | iDa.Fill(tmpDS, "primitems"); | 1677 | iDa.Fill(tmpDS, "primitems"); |
1678 | 1678 | ||
1679 | tDa.Fill(tmpDS, "terrain"); | 1679 | tDa.Fill(tmpDS, "terrain"); |
1680 | lDa.Fill(tmpDS, "land"); | 1680 | lDa.Fill(tmpDS, "land"); |
1681 | lalDa.Fill(tmpDS, "landaccesslist"); | 1681 | lalDa.Fill(tmpDS, "landaccesslist"); |
@@ -1688,7 +1688,7 @@ namespace OpenSim.Data.MySQL | |||
1688 | return false; | 1688 | return false; |
1689 | } | 1689 | } |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | foreach (DataColumn col in createShapeTable().Columns) | 1692 | foreach (DataColumn col in createShapeTable().Columns) |
1693 | { | 1693 | { |
1694 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1694 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
@@ -1697,9 +1697,9 @@ namespace OpenSim.Data.MySQL | |||
1697 | return false; | 1697 | return false; |
1698 | } | 1698 | } |
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | // XXX primitems should probably go here eventually | 1701 | // XXX primitems should probably go here eventually |
1702 | 1702 | ||
1703 | foreach (DataColumn col in createTerrainTable().Columns) | 1703 | foreach (DataColumn col in createTerrainTable().Columns) |
1704 | { | 1704 | { |
1705 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1705 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
@@ -1708,7 +1708,7 @@ namespace OpenSim.Data.MySQL | |||
1708 | return false; | 1708 | return false; |
1709 | } | 1709 | } |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | foreach (DataColumn col in createLandTable().Columns) | 1712 | foreach (DataColumn col in createLandTable().Columns) |
1713 | { | 1713 | { |
1714 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) | 1714 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) |
@@ -1717,7 +1717,7 @@ namespace OpenSim.Data.MySQL | |||
1717 | return false; | 1717 | return false; |
1718 | } | 1718 | } |
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | foreach (DataColumn col in createLandAccessListTable().Columns) | 1721 | foreach (DataColumn col in createLandAccessListTable().Columns) |
1722 | { | 1722 | { |
1723 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) | 1723 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) |
@@ -1726,7 +1726,7 @@ namespace OpenSim.Data.MySQL | |||
1726 | return false; | 1726 | return false; |
1727 | } | 1727 | } |
1728 | } | 1728 | } |
1729 | 1729 | ||
1730 | return true; | 1730 | return true; |
1731 | } | 1731 | } |
1732 | 1732 | ||
@@ -1783,7 +1783,7 @@ namespace OpenSim.Data.MySQL | |||
1783 | else if (type == typeof (Int64)) | 1783 | else if (type == typeof (Int64)) |
1784 | { | 1784 | { |
1785 | return "bigint"; | 1785 | return "bigint"; |
1786 | } | 1786 | } |
1787 | else if (type == typeof (Double)) | 1787 | else if (type == typeof (Double)) |
1788 | { | 1788 | { |
1789 | return "float"; | 1789 | return "float"; |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 90664ff..92b005d 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class MySQLInventoryData : IInventoryData | 41 | public class MySQLInventoryData : IInventoryData |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
@@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL | |||
249 | 249 | ||
250 | // There should only ever be one root folder for a user. However, if there's more | 250 | // There should only ever be one root folder for a user. However, if there's more |
251 | // than one we'll simply use the first one rather than failing. It would be even | 251 | // than one we'll simply use the first one rather than failing. It would be even |
252 | // nicer to print some message to this effect, but this feels like it's too low a | 252 | // nicer to print some message to this effect, but this feels like it's too low a |
253 | // to put such a message out, and it's too minor right now to spare the time to | 253 | // to put such a message out, and it's too minor right now to spare the time to |
254 | // suitably refactor. | 254 | // suitably refactor. |
255 | if (items.Count > 0) | 255 | if (items.Count > 0) |
@@ -332,13 +332,13 @@ namespace OpenSim.Data.MySQL | |||
332 | item.InvType = (int) reader["invType"]; | 332 | item.InvType = (int) reader["invType"]; |
333 | item.Creator = new LLUUID((string) reader["creatorID"]); | 333 | item.Creator = new LLUUID((string) reader["creatorID"]); |
334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; | 334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; |
335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
336 | item.SalePrice = (int) reader["salePrice"]; | 336 | item.SalePrice = (int) reader["salePrice"]; |
337 | item.SaleType = Convert.ToByte(reader["saleType"]); | 337 | item.SaleType = Convert.ToByte(reader["saleType"]); |
338 | item.CreationDate = (int) reader["creationDate"]; | 338 | item.CreationDate = (int) reader["creationDate"]; |
339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
341 | item.Flags = (uint) reader["flags"]; | 341 | item.Flags = (uint) reader["flags"]; |
342 | 342 | ||
343 | return item; | 343 | return item; |
344 | } | 344 | } |
@@ -483,12 +483,12 @@ namespace OpenSim.Data.MySQL | |||
483 | result.Parameters.AddWithValue("?groupID", item.GroupID); | 483 | result.Parameters.AddWithValue("?groupID", item.GroupID); |
484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); | 484 | result.Parameters.AddWithValue("?groupOwned", item.GroupOwned); |
485 | result.Parameters.AddWithValue("?flags", item.Flags); | 485 | result.Parameters.AddWithValue("?flags", item.Flags); |
486 | 486 | ||
487 | lock (database) | 487 | lock (database) |
488 | { | 488 | { |
489 | result.ExecuteNonQuery(); | 489 | result.ExecuteNonQuery(); |
490 | } | 490 | } |
491 | 491 | ||
492 | result.Dispose(); | 492 | result.Dispose(); |
493 | } | 493 | } |
494 | catch (MySqlException e) | 494 | catch (MySqlException e) |
@@ -507,7 +507,7 @@ namespace OpenSim.Data.MySQL | |||
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// | 510 | /// |
511 | /// </summary> | 511 | /// </summary> |
512 | /// <param name="item"></param> | 512 | /// <param name="item"></param> |
513 | public void deleteInventoryItem(LLUUID itemID) | 513 | public void deleteInventoryItem(LLUUID itemID) |
@@ -517,7 +517,7 @@ namespace OpenSim.Data.MySQL | |||
517 | MySqlCommand cmd = | 517 | MySqlCommand cmd = |
518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); | 518 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); |
519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); | 519 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); |
520 | 520 | ||
521 | lock (database) | 521 | lock (database) |
522 | { | 522 | { |
523 | cmd.ExecuteNonQuery(); | 523 | cmd.ExecuteNonQuery(); |
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL | |||
596 | } | 596 | } |
597 | 597 | ||
598 | /// <summary> | 598 | /// <summary> |
599 | /// Append a list of all the child folders of a parent folder | 599 | /// Append a list of all the child folders of a parent folder |
600 | /// </summary> | 600 | /// </summary> |
601 | /// <param name="folders">list where folders will be appended</param> | 601 | /// <param name="folders">list where folders will be appended</param> |
602 | /// <param name="parentID">ID of parent</param> | 602 | /// <param name="parentID">ID of parent</param> |
@@ -623,11 +623,11 @@ namespace OpenSim.Data.MySQL | |||
623 | protected void deleteOneFolder(LLUUID folderID) | 623 | protected void deleteOneFolder(LLUUID folderID) |
624 | { | 624 | { |
625 | try | 625 | try |
626 | { | 626 | { |
627 | MySqlCommand cmd = | 627 | MySqlCommand cmd = |
628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); | 628 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); |
629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 629 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
630 | 630 | ||
631 | lock (database) | 631 | lock (database) |
632 | { | 632 | { |
633 | cmd.ExecuteNonQuery(); | 633 | cmd.ExecuteNonQuery(); |
@@ -647,7 +647,7 @@ namespace OpenSim.Data.MySQL | |||
647 | MySqlCommand cmd = | 647 | MySqlCommand cmd = |
648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); | 648 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); |
649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); | 649 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
650 | 650 | ||
651 | lock (database) | 651 | lock (database) |
652 | { | 652 | { |
653 | cmd.ExecuteNonQuery(); | 653 | cmd.ExecuteNonQuery(); |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 4455c3b..f7baadc 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -302,7 +302,7 @@ namespace OpenSim.Data.MySQL | |||
302 | // Region Main gotta-have-or-we-return-null parts | 302 | // Region Main gotta-have-or-we-return-null parts |
303 | UInt64 tmp64; | 303 | UInt64 tmp64; |
304 | if (!UInt64.TryParse(reader["regionHandle"].ToString(), out tmp64)) | 304 | if (!UInt64.TryParse(reader["regionHandle"].ToString(), out tmp64)) |
305 | { | 305 | { |
306 | return null; | 306 | return null; |
307 | } | 307 | } |
308 | else | 308 | else |
@@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL | |||
310 | retval.regionHandle = tmp64; | 310 | retval.regionHandle = tmp64; |
311 | } | 311 | } |
312 | LLUUID tmp_uuid; | 312 | LLUUID tmp_uuid; |
313 | if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) | 313 | if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) |
314 | { | 314 | { |
315 | return null; | 315 | return null; |
316 | } | 316 | } |
@@ -321,7 +321,7 @@ namespace OpenSim.Data.MySQL | |||
321 | 321 | ||
322 | // non-critical parts | 322 | // non-critical parts |
323 | retval.regionName = (string)reader["regionName"]; | 323 | retval.regionName = (string)reader["regionName"]; |
324 | retval.originUUID = new LLUUID((string) reader["originUUID"]); | 324 | retval.originUUID = new LLUUID((string) reader["originUUID"]); |
325 | 325 | ||
326 | // Secrets | 326 | // Secrets |
327 | retval.regionRecvKey = (string) reader["regionRecvKey"]; | 327 | retval.regionRecvKey = (string) reader["regionRecvKey"]; |
@@ -360,8 +360,8 @@ namespace OpenSim.Data.MySQL | |||
360 | 360 | ||
361 | // World Map Addition | 361 | // World Map Addition |
362 | LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); | 362 | LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); |
363 | LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); | 363 | LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); |
364 | } | 364 | } |
365 | else | 365 | else |
366 | { | 366 | { |
367 | return null; | 367 | return null; |
@@ -418,7 +418,7 @@ namespace OpenSim.Data.MySQL | |||
418 | 418 | ||
419 | LLUUID.TryParse((string) reader["sessionID"], out tmp); | 419 | LLUUID.TryParse((string) reader["sessionID"], out tmp); |
420 | retval.SessionID = tmp; | 420 | retval.SessionID = tmp; |
421 | 421 | ||
422 | LLUUID.TryParse((string)reader["secureSessionID"], out tmp); | 422 | LLUUID.TryParse((string)reader["secureSessionID"], out tmp); |
423 | retval.SecureSessionID = tmp; | 423 | retval.SecureSessionID = tmp; |
424 | 424 | ||
@@ -488,7 +488,7 @@ namespace OpenSim.Data.MySQL | |||
488 | 488 | ||
489 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) | 489 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) |
490 | retval.AboutText = ""; | 490 | retval.AboutText = ""; |
491 | else | 491 | else |
492 | retval.AboutText = (string) reader["profileAboutText"]; | 492 | retval.AboutText = (string) reader["profileAboutText"]; |
493 | 493 | ||
494 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) | 494 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) |
@@ -511,7 +511,7 @@ namespace OpenSim.Data.MySQL | |||
511 | LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); | 511 | LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); |
512 | retval.FirstLifeImage = tmp; | 512 | retval.FirstLifeImage = tmp; |
513 | } | 513 | } |
514 | 514 | ||
515 | if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) | 515 | if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) |
516 | { | 516 | { |
517 | retval.WebLoginKey = LLUUID.Zero; | 517 | retval.WebLoginKey = LLUUID.Zero; |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index a1e1094..0acf47b 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Data.MySQL | |||
59 | { | 59 | { |
60 | // TODO: actually do something with our connect string | 60 | // TODO: actually do something with our connect string |
61 | // instead of loading the second config | 61 | // instead of loading the second config |
62 | 62 | ||
63 | IniFile iniFile = new IniFile("mysql_connection.ini"); | 63 | IniFile iniFile = new IniFile("mysql_connection.ini"); |
64 | string settingHostname = iniFile.ParseFileReadValue("hostname"); | 64 | string settingHostname = iniFile.ParseFileReadValue("hostname"); |
65 | string settingDatabase = iniFile.ParseFileReadValue("database"); | 65 | string settingDatabase = iniFile.ParseFileReadValue("database"); |
@@ -67,7 +67,7 @@ namespace OpenSim.Data.MySQL | |||
67 | string settingPassword = iniFile.ParseFileReadValue("password"); | 67 | string settingPassword = iniFile.ParseFileReadValue("password"); |
68 | string settingPooling = iniFile.ParseFileReadValue("pooling"); | 68 | string settingPooling = iniFile.ParseFileReadValue("pooling"); |
69 | string settingPort = iniFile.ParseFileReadValue("port"); | 69 | string settingPort = iniFile.ParseFileReadValue("port"); |
70 | 70 | ||
71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); | 71 | m_usersTableName = iniFile.ParseFileReadValue("userstablename"); |
72 | if (m_usersTableName == null) | 72 | if (m_usersTableName == null) |
73 | { | 73 | { |
@@ -206,15 +206,15 @@ namespace OpenSim.Data.MySQL | |||
206 | param["?friendID"] = friend.UUID.ToString(); | 206 | param["?friendID"] = friend.UUID.ToString(); |
207 | param["?friendPerms"] = perms.ToString(); | 207 | param["?friendPerms"] = perms.ToString(); |
208 | param["?datetimestamp"] = dtvalue.ToString(); | 208 | param["?datetimestamp"] = dtvalue.ToString(); |
209 | 209 | ||
210 | try | 210 | try |
211 | { | 211 | { |
212 | lock (database) | 212 | lock (database) |
213 | { | 213 | { |
214 | IDbCommand adder = | 214 | IDbCommand adder = |
215 | database.Query( | 215 | database.Query( |
216 | "INSERT INTO `" + m_userFriendsTableName + "` " + | 216 | "INSERT INTO `" + m_userFriendsTableName + "` " + |
217 | "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " + | 217 | "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " + |
218 | "VALUES " + | 218 | "VALUES " + |
219 | "(?ownerID,?friendID,?friendPerms,?datetimestamp)", | 219 | "(?ownerID,?friendID,?friendPerms,?datetimestamp)", |
220 | param); | 220 | param); |
@@ -325,7 +325,7 @@ namespace OpenSim.Data.MySQL | |||
325 | 325 | ||
326 | // This is not a real column in the database table, it's a joined column from the opposite record | 326 | // This is not a real column in the database table, it's a joined column from the opposite record |
327 | fli.FriendListOwnerPerms = (uint)Convert.ToInt32(reader["ownerperms"]); | 327 | fli.FriendListOwnerPerms = (uint)Convert.ToInt32(reader["ownerperms"]); |
328 | 328 | ||
329 | Lfli.Add(fli); | 329 | Lfli.Add(fli); |
330 | } | 330 | } |
331 | reader.Close(); | 331 | reader.Close(); |
@@ -599,7 +599,7 @@ namespace OpenSim.Data.MySQL | |||
599 | user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, | 599 | user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, |
600 | user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); | 600 | user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); |
601 | } | 601 | } |
602 | 602 | ||
603 | return true; | 603 | return true; |
604 | } | 604 | } |
605 | 605 | ||
@@ -630,7 +630,7 @@ namespace OpenSim.Data.MySQL | |||
630 | 630 | ||
631 | /// Appearance | 631 | /// Appearance |
632 | /// TODO: stubs for now to get us to a compiling state gently | 632 | /// TODO: stubs for now to get us to a compiling state gently |
633 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 633 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
634 | // { | 634 | // { |
635 | // return new AvatarAppearance(); | 635 | // return new AvatarAppearance(); |
636 | // } | 636 | // } |
@@ -644,12 +644,12 @@ namespace OpenSim.Data.MySQL | |||
644 | { | 644 | { |
645 | return; | 645 | return; |
646 | } | 646 | } |
647 | 647 | ||
648 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 648 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
649 | { | 649 | { |
650 | return; | 650 | return; |
651 | } | 651 | } |
652 | 652 | ||
653 | override public List<LLUUID> GetAttachments(LLUUID user) | 653 | override public List<LLUUID> GetAttachments(LLUUID user) |
654 | { | 654 | { |
655 | return new List<LLUUID>(); | 655 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs index 16b2a4f..b3e08a3 100644 --- a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs index e4f1dc2..0f10344 100644 --- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs +++ b/OpenSim/Data/NHibernate/LLUUIDUserType.cs | |||
@@ -35,7 +35,7 @@ using NHibernate.UserTypes; | |||
35 | namespace OpenSim.Data.NHibernate | 35 | namespace OpenSim.Data.NHibernate |
36 | { | 36 | { |
37 | [Serializable] | 37 | [Serializable] |
38 | public class LLUUIDUserType: IUserType | 38 | public class LLUUIDUserType: IUserType |
39 | { | 39 | { |
40 | public object Assemble(object cached, object owner) | 40 | public object Assemble(object cached, object owner) |
41 | { | 41 | { |
@@ -69,7 +69,7 @@ namespace OpenSim.Data.NHibernate | |||
69 | 69 | ||
70 | public object NullSafeGet(IDataReader rs, string[] names, object owner) | 70 | public object NullSafeGet(IDataReader rs, string[] names, object owner) |
71 | { | 71 | { |
72 | object uuid = null; | 72 | object uuid = null; |
73 | 73 | ||
74 | int ord = rs.GetOrdinal(names[0]); | 74 | int ord = rs.GetOrdinal(names[0]); |
75 | if (!rs.IsDBNull(ord)) | 75 | if (!rs.IsDBNull(ord)) |
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index 4eb9eef..075f2e9 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs | |||
@@ -65,20 +65,20 @@ namespace OpenSim.Data.NHibernate | |||
65 | // TODO: make this a real exception type | 65 | // TODO: make this a real exception type |
66 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); | 66 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); |
67 | } | 67 | } |
68 | 68 | ||
69 | // NHibernate setup | 69 | // NHibernate setup |
70 | cfg = new Configuration(); | 70 | cfg = new Configuration(); |
71 | cfg.SetProperty(Environment.ConnectionProvider, | 71 | cfg.SetProperty(Environment.ConnectionProvider, |
72 | "NHibernate.Connection.DriverConnectionProvider"); | 72 | "NHibernate.Connection.DriverConnectionProvider"); |
73 | cfg.SetProperty(Environment.Dialect, | 73 | cfg.SetProperty(Environment.Dialect, |
74 | "NHibernate.Dialect." + parts[0]); | 74 | "NHibernate.Dialect." + parts[0]); |
75 | cfg.SetProperty(Environment.ConnectionDriver, | 75 | cfg.SetProperty(Environment.ConnectionDriver, |
76 | "NHibernate.Driver." + parts[1]); | 76 | "NHibernate.Driver." + parts[1]); |
77 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 77 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
78 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 78 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
79 | 79 | ||
80 | HbmSerializer.Default.Validate = true; | 80 | HbmSerializer.Default.Validate = true; |
81 | using ( MemoryStream stream = | 81 | using ( MemoryStream stream = |
82 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 82 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
83 | cfg.AddInputStream(stream); | 83 | cfg.AddInputStream(stream); |
84 | 84 | ||
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index fa75588..228e0b6 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -62,23 +62,23 @@ namespace OpenSim.Data.NHibernate | |||
62 | // TODO: make this a real exception type | 62 | // TODO: make this a real exception type |
63 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); | 63 | throw new Exception("Malformed Inventory connection string '" + connect + "'"); |
64 | } | 64 | } |
65 | 65 | ||
66 | // Establish NHibernate Connection | 66 | // Establish NHibernate Connection |
67 | cfg = new Configuration(); | 67 | cfg = new Configuration(); |
68 | cfg.SetProperty(Environment.ConnectionProvider, | 68 | cfg.SetProperty(Environment.ConnectionProvider, |
69 | "NHibernate.Connection.DriverConnectionProvider"); | 69 | "NHibernate.Connection.DriverConnectionProvider"); |
70 | cfg.SetProperty(Environment.Dialect, | 70 | cfg.SetProperty(Environment.Dialect, |
71 | "NHibernate.Dialect." + parts[0]); | 71 | "NHibernate.Dialect." + parts[0]); |
72 | cfg.SetProperty(Environment.ConnectionDriver, | 72 | cfg.SetProperty(Environment.ConnectionDriver, |
73 | "NHibernate.Driver." + parts[1]); | 73 | "NHibernate.Driver." + parts[1]); |
74 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 74 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
75 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 75 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
76 | 76 | ||
77 | HbmSerializer.Default.Validate = true; | 77 | HbmSerializer.Default.Validate = true; |
78 | using ( MemoryStream stream = | 78 | using ( MemoryStream stream = |
79 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 79 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
80 | cfg.AddInputStream(stream); | 80 | cfg.AddInputStream(stream); |
81 | 81 | ||
82 | // If uncommented this will auto create tables, but it | 82 | // If uncommented this will auto create tables, but it |
83 | // does drops of the old tables, so we need a smarter way | 83 | // does drops of the old tables, so we need a smarter way |
84 | // to acturally manage this. | 84 | // to acturally manage this. |
@@ -120,8 +120,8 @@ namespace OpenSim.Data.NHibernate | |||
120 | 120 | ||
121 | /***************************************************************** | 121 | /***************************************************************** |
122 | * | 122 | * |
123 | * Basic CRUD operations on Data | 123 | * Basic CRUD operations on Data |
124 | * | 124 | * |
125 | ****************************************************************/ | 125 | ****************************************************************/ |
126 | 126 | ||
127 | // READ | 127 | // READ |
@@ -195,7 +195,7 @@ namespace OpenSim.Data.NHibernate | |||
195 | } | 195 | } |
196 | 196 | ||
197 | /// <summary> | 197 | /// <summary> |
198 | /// | 198 | /// |
199 | /// </summary> | 199 | /// </summary> |
200 | /// <param name="item"></param> | 200 | /// <param name="item"></param> |
201 | public void deleteInventoryItem(LLUUID itemID) | 201 | public void deleteInventoryItem(LLUUID itemID) |
@@ -279,7 +279,7 @@ namespace OpenSim.Data.NHibernate | |||
279 | } | 279 | } |
280 | 280 | ||
281 | /// <summary> | 281 | /// <summary> |
282 | /// | 282 | /// |
283 | /// </summary> | 283 | /// </summary> |
284 | /// <param name="folder"></param> | 284 | /// <param name="folder"></param> |
285 | public void deleteInventoryFolder(LLUUID folderID) | 285 | public void deleteInventoryFolder(LLUUID folderID) |
@@ -353,7 +353,7 @@ namespace OpenSim.Data.NHibernate | |||
353 | { | 353 | { |
354 | updateInventoryItem(item); | 354 | updateInventoryItem(item); |
355 | } | 355 | } |
356 | 356 | ||
357 | 357 | ||
358 | 358 | ||
359 | /// <summary> | 359 | /// <summary> |
@@ -403,9 +403,9 @@ namespace OpenSim.Data.NHibernate | |||
403 | return null; | 403 | return null; |
404 | } | 404 | } |
405 | } | 405 | } |
406 | 406 | ||
407 | /// <summary> | 407 | /// <summary> |
408 | /// Append a list of all the child folders of a parent folder | 408 | /// Append a list of all the child folders of a parent folder |
409 | /// </summary> | 409 | /// </summary> |
410 | /// <param name="folders">list where folders will be appended</param> | 410 | /// <param name="folders">list where folders will be appended</param> |
411 | /// <param name="parentID">ID of parent</param> | 411 | /// <param name="parentID">ID of parent</param> |
@@ -413,7 +413,7 @@ namespace OpenSim.Data.NHibernate | |||
413 | { | 413 | { |
414 | using (ISession session = factory.OpenSession()) | 414 | using (ISession session = factory.OpenSession()) |
415 | { | 415 | { |
416 | 416 | ||
417 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); | 417 | ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); |
418 | criteria.Add(Expression.Eq("ParentID", parentID)); | 418 | criteria.Add(Expression.Eq("ParentID", parentID)); |
419 | foreach (InventoryFolderBase item in criteria.List()) | 419 | foreach (InventoryFolderBase item in criteria.List()) |
@@ -443,7 +443,7 @@ namespace OpenSim.Data.NHibernate | |||
443 | 443 | ||
444 | for (int i = 0; i < folders.Count; i++) | 444 | for (int i = 0; i < folders.Count; i++) |
445 | getInventoryFolders(ref folders, folders[i].ID); | 445 | getInventoryFolders(ref folders, folders[i].ID); |
446 | 446 | ||
447 | return folders; | 447 | return folders; |
448 | } | 448 | } |
449 | } | 449 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 6ba2783..4de0291 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -64,20 +64,20 @@ namespace OpenSim.Data.NHibernate | |||
64 | 64 | ||
65 | // This is stubbing for now, it will become dynamic later and support different db backends | 65 | // This is stubbing for now, it will become dynamic later and support different db backends |
66 | cfg = new Configuration(); | 66 | cfg = new Configuration(); |
67 | cfg.SetProperty(Environment.ConnectionProvider, | 67 | cfg.SetProperty(Environment.ConnectionProvider, |
68 | "NHibernate.Connection.DriverConnectionProvider"); | 68 | "NHibernate.Connection.DriverConnectionProvider"); |
69 | cfg.SetProperty(Environment.Dialect, | 69 | cfg.SetProperty(Environment.Dialect, |
70 | "NHibernate.Dialect." + parts[0]); | 70 | "NHibernate.Dialect." + parts[0]); |
71 | cfg.SetProperty(Environment.ConnectionDriver, | 71 | cfg.SetProperty(Environment.ConnectionDriver, |
72 | "NHibernate.Driver." + parts[1]); | 72 | "NHibernate.Driver." + parts[1]); |
73 | cfg.SetProperty(Environment.ConnectionString, parts[2]); | 73 | cfg.SetProperty(Environment.ConnectionString, parts[2]); |
74 | cfg.AddAssembly("OpenSim.Data.NHibernate"); | 74 | cfg.AddAssembly("OpenSim.Data.NHibernate"); |
75 | 75 | ||
76 | HbmSerializer.Default.Validate = true; | 76 | HbmSerializer.Default.Validate = true; |
77 | using ( MemoryStream stream = | 77 | using ( MemoryStream stream = |
78 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) | 78 | HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) |
79 | cfg.AddInputStream(stream); | 79 | cfg.AddInputStream(stream); |
80 | 80 | ||
81 | // new SchemaExport(cfg).Create(true, true); | 81 | // new SchemaExport(cfg).Create(true, true); |
82 | 82 | ||
83 | factory = cfg.BuildSessionFactory(); | 83 | factory = cfg.BuildSessionFactory(); |
@@ -122,7 +122,7 @@ namespace OpenSim.Data.NHibernate | |||
122 | // BUG: CATCHALL IS BAD. | 122 | // BUG: CATCHALL IS BAD. |
123 | } | 123 | } |
124 | catch (Exception) {} | 124 | catch (Exception) {} |
125 | 125 | ||
126 | return (user != null); | 126 | return (user != null); |
127 | } | 127 | } |
128 | 128 | ||
@@ -151,7 +151,7 @@ namespace OpenSim.Data.NHibernate | |||
151 | // TODO: save agent | 151 | // TODO: save agent |
152 | transaction.Commit(); | 152 | transaction.Commit(); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | } | 155 | } |
156 | else | 156 | else |
157 | { | 157 | { |
@@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate | |||
162 | 162 | ||
163 | private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) | 163 | private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) |
164 | { | 164 | { |
165 | if (agent == null) | 165 | if (agent == null) |
166 | { | 166 | { |
167 | // TODO: got to figure out how to do a delete right | 167 | // TODO: got to figure out how to do a delete right |
168 | } | 168 | } |
@@ -178,7 +178,7 @@ namespace OpenSim.Data.NHibernate | |||
178 | session.Update(agent); | 178 | session.Update(agent); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | } | 182 | } |
183 | override public bool UpdateUserProfile(UserProfileData profile) | 183 | override public bool UpdateUserProfile(UserProfileData profile) |
184 | { | 184 | { |
@@ -193,7 +193,7 @@ namespace OpenSim.Data.NHibernate | |||
193 | transaction.Commit(); | 193 | transaction.Commit(); |
194 | return true; | 194 | return true; |
195 | } | 195 | } |
196 | } | 196 | } |
197 | } | 197 | } |
198 | else | 198 | else |
199 | { | 199 | { |
@@ -202,7 +202,7 @@ namespace OpenSim.Data.NHibernate | |||
202 | return true; | 202 | return true; |
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | override public void AddNewUserAgent(UserAgentData agent) | 206 | override public void AddNewUserAgent(UserAgentData agent) |
207 | { | 207 | { |
208 | using (ISession session = factory.OpenSession()) | 208 | using (ISession session = factory.OpenSession()) |
@@ -212,9 +212,9 @@ namespace OpenSim.Data.NHibernate | |||
212 | session.Save(agent); | 212 | session.Save(agent); |
213 | transaction.Commit(); | 213 | transaction.Commit(); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | public void UpdateUserAgent(UserAgentData agent) | 218 | public void UpdateUserAgent(UserAgentData agent) |
219 | { | 219 | { |
220 | using (ISession session = factory.OpenSession()) | 220 | using (ISession session = factory.OpenSession()) |
@@ -224,7 +224,7 @@ namespace OpenSim.Data.NHibernate | |||
224 | session.Update(agent); | 224 | session.Update(agent); |
225 | transaction.Commit(); | 225 | transaction.Commit(); |
226 | } | 226 | } |
227 | } | 227 | } |
228 | } | 228 | } |
229 | 229 | ||
230 | override public UserAgentData GetAgentByUUID(LLUUID uuid) | 230 | override public UserAgentData GetAgentByUUID(LLUUID uuid) |
@@ -262,7 +262,7 @@ namespace OpenSim.Data.NHibernate | |||
262 | { | 262 | { |
263 | return GetUserByName(fname, lname).CurrentAgent; | 263 | return GetUserByName(fname, lname).CurrentAgent; |
264 | } | 264 | } |
265 | 265 | ||
266 | override public UserAgentData GetAgentByName(string name) | 266 | override public UserAgentData GetAgentByName(string name) |
267 | { | 267 | { |
268 | return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); | 268 | return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); |
@@ -273,7 +273,7 @@ namespace OpenSim.Data.NHibernate | |||
273 | List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); | 273 | List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); |
274 | string[] querysplit; | 274 | string[] querysplit; |
275 | querysplit = query.Split(' '); | 275 | querysplit = query.Split(' '); |
276 | 276 | ||
277 | if (querysplit.Length == 2) | 277 | if (querysplit.Length == 2) |
278 | { | 278 | { |
279 | using (ISession session = factory.OpenSession()) | 279 | using (ISession session = factory.OpenSession()) |
@@ -293,7 +293,7 @@ namespace OpenSim.Data.NHibernate | |||
293 | } | 293 | } |
294 | return results; | 294 | return results; |
295 | } | 295 | } |
296 | 296 | ||
297 | // TODO: actually implement these | 297 | // TODO: actually implement these |
298 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;} | 298 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;} |
299 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} | 299 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} |
@@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate | |||
306 | 306 | ||
307 | /// Appearance | 307 | /// Appearance |
308 | /// TODO: stubs for now to get us to a compiling state gently | 308 | /// TODO: stubs for now to get us to a compiling state gently |
309 | public AvatarAppearance GetUserAppearance(LLUUID user) | 309 | public AvatarAppearance GetUserAppearance(LLUUID user) |
310 | { | 310 | { |
311 | AvatarAppearance appearance; | 311 | AvatarAppearance appearance; |
312 | // TODO: I'm sure I'll have to do something silly here | 312 | // TODO: I'm sure I'll have to do something silly here |
@@ -345,19 +345,19 @@ namespace OpenSim.Data.NHibernate | |||
345 | } | 345 | } |
346 | transaction.Commit(); | 346 | transaction.Commit(); |
347 | } | 347 | } |
348 | } | 348 | } |
349 | } | 349 | } |
350 | 350 | ||
351 | override public void AddAttachment(LLUUID user, LLUUID item) | 351 | override public void AddAttachment(LLUUID user, LLUUID item) |
352 | { | 352 | { |
353 | return; | 353 | return; |
354 | } | 354 | } |
355 | 355 | ||
356 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 356 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
357 | { | 357 | { |
358 | return; | 358 | return; |
359 | } | 359 | } |
360 | 360 | ||
361 | override public List<LLUUID> GetAttachments(LLUUID user) | 361 | override public List<LLUUID> GetAttachments(LLUUID user) |
362 | { | 362 | { |
363 | return new List<LLUUID>(); | 363 | return new List<LLUUID>(); |
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs index 096171c..487f72e 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullDataStore.cs | |||
@@ -47,11 +47,11 @@ namespace OpenSim.Data.Null | |||
47 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 47 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
48 | { | 48 | { |
49 | } | 49 | } |
50 | 50 | ||
51 | // see IRegionDatastore | 51 | // see IRegionDatastore |
52 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 52 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
53 | { | 53 | { |
54 | } | 54 | } |
55 | 55 | ||
56 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 56 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
57 | { | 57 | { |
diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs index 5db915c..135a64d 100644 --- a/OpenSim/Data/Null/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Null/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Data/OpenSimObjectFieldMapper.cs index d67881b..ff375fb 100644 --- a/OpenSim/Data/OpenSimObjectFieldMapper.cs +++ b/OpenSim/Data/OpenSimObjectFieldMapper.cs | |||
@@ -95,6 +95,6 @@ namespace OpenSim.Data | |||
95 | } | 95 | } |
96 | 96 | ||
97 | return value; | 97 | return value; |
98 | } | 98 | } |
99 | } | 99 | } |
100 | } | 100 | } |
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs index cb3d33d..a4e39a1 100644 --- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs +++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Data | |||
135 | 135 | ||
136 | rowMapperSchema.AddMapping<byte[]>("ExtraParams", | 136 | rowMapperSchema.AddMapping<byte[]>("ExtraParams", |
137 | delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; }, | 137 | delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; }, |
138 | delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; }); | 138 | delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; }); |
139 | } | 139 | } |
140 | 140 | ||
141 | public override PrimitiveBaseShapeRowMapper FromReader(BaseDataReader reader) | 141 | public override PrimitiveBaseShapeRowMapper FromReader(BaseDataReader reader) |
diff --git a/OpenSim/Data/Properties/AssemblyInfo.cs b/OpenSim/Data/Properties/AssemblyInfo.cs index 357aaa0..03985c3 100644 --- a/OpenSim/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs index 000a500..897dcbf 100644 --- a/OpenSim/Data/RegionProfileData.cs +++ b/OpenSim/Data/RegionProfileData.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Data | |||
120 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); | 120 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// this particular mod to the file provides support within the spec for RegionProfileData for the | 123 | /// this particular mod to the file provides support within the spec for RegionProfileData for the |
124 | /// owner_uuid for the region | 124 | /// owner_uuid for the region |
125 | /// </summary> | 125 | /// </summary> |
126 | public LLUUID owner_uuid = LLUUID.Zero; | 126 | public LLUUID owner_uuid = LLUUID.Zero; |
@@ -128,7 +128,7 @@ namespace OpenSim.Data | |||
128 | /// <summary> | 128 | /// <summary> |
129 | /// OGS/OpenSim Specific original ID for a region after move/split | 129 | /// OGS/OpenSim Specific original ID for a region after move/split |
130 | /// </summary> | 130 | /// </summary> |
131 | public LLUUID originUUID; | 131 | public LLUUID originUUID; |
132 | 132 | ||
133 | /// <summary> | 133 | /// <summary> |
134 | /// Get Sim profile data from grid server when in grid mode | 134 | /// Get Sim profile data from grid server when in grid mode |
@@ -163,7 +163,7 @@ namespace OpenSim.Data | |||
163 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); | 163 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); |
164 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 164 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
165 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 165 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
166 | simData.serverURI = (string)responseData["server_uri"]; | 166 | simData.serverURI = (string)responseData["server_uri"]; |
167 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 167 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
168 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 168 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
169 | simData.regionName = (string) responseData["region_name"]; | 169 | simData.regionName = (string) responseData["region_name"]; |
@@ -206,7 +206,7 @@ namespace OpenSim.Data | |||
206 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); | 206 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
207 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 207 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
208 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 208 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
209 | simData.serverURI = (string)responseData["server_uri"]; | 209 | simData.serverURI = (string)responseData["server_uri"]; |
210 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); | 210 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
211 | simData.regionName = (string) responseData["region_name"]; | 211 | simData.regionName = (string) responseData["region_name"]; |
212 | 212 | ||
diff --git a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs index 4616cbc..221495e 100644 --- a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 34329bb..8d4fb99 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Data.SQLite | |||
51 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; | 51 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; |
52 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; | 52 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; |
53 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)"; | 53 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)"; |
54 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; | 54 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; |
55 | private const string assetSelect = "select * from assets"; | 55 | private const string assetSelect = "select * from assets"; |
56 | 56 | ||
57 | private SqliteConnection m_conn; | 57 | private SqliteConnection m_conn; |
@@ -70,11 +70,11 @@ namespace OpenSim.Data.SQLite | |||
70 | 70 | ||
71 | override public AssetBase FetchAsset(LLUUID uuid) | 71 | override public AssetBase FetchAsset(LLUUID uuid) |
72 | { | 72 | { |
73 | 73 | ||
74 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 74 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
75 | { | 75 | { |
76 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 76 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
77 | using (IDataReader reader = cmd.ExecuteReader()) | 77 | using (IDataReader reader = cmd.ExecuteReader()) |
78 | { | 78 | { |
79 | if (reader.Read()) | 79 | if (reader.Read()) |
80 | { | 80 | { |
@@ -98,7 +98,7 @@ namespace OpenSim.Data.SQLite | |||
98 | { | 98 | { |
99 | m_log.Info("[ASSET DB]: Asset exists already, ignoring."); | 99 | m_log.Info("[ASSET DB]: Asset exists already, ignoring."); |
100 | } | 100 | } |
101 | else | 101 | else |
102 | { | 102 | { |
103 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) | 103 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) |
104 | { | 104 | { |
@@ -110,7 +110,7 @@ namespace OpenSim.Data.SQLite | |||
110 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 110 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
111 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 111 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
112 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 112 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
113 | 113 | ||
114 | cmd.ExecuteNonQuery(); | 114 | cmd.ExecuteNonQuery(); |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite | |||
119 | override public void UpdateAsset(AssetBase asset) | 119 | override public void UpdateAsset(AssetBase asset) |
120 | { | 120 | { |
121 | LogAssetLoad(asset); | 121 | LogAssetLoad(asset); |
122 | 122 | ||
123 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) | 123 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) |
124 | { | 124 | { |
125 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 125 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
@@ -130,7 +130,7 @@ namespace OpenSim.Data.SQLite | |||
130 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 130 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
131 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 131 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
132 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 132 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
133 | 133 | ||
134 | cmd.ExecuteNonQuery(); | 134 | cmd.ExecuteNonQuery(); |
135 | } | 135 | } |
136 | 136 | ||
@@ -154,14 +154,14 @@ namespace OpenSim.Data.SQLite | |||
154 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 154 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
155 | { | 155 | { |
156 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 156 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
157 | using (IDataReader reader = cmd.ExecuteReader()) | 157 | using (IDataReader reader = cmd.ExecuteReader()) |
158 | { | 158 | { |
159 | if (reader.Read()) | 159 | if (reader.Read()) |
160 | { | 160 | { |
161 | reader.Close(); | 161 | reader.Close(); |
162 | return true; | 162 | return true; |
163 | } | 163 | } |
164 | else | 164 | else |
165 | { | 165 | { |
166 | reader.Close(); | 166 | reader.Close(); |
167 | return false; | 167 | return false; |
@@ -175,7 +175,7 @@ namespace OpenSim.Data.SQLite | |||
175 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | 175 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) |
176 | { | 176 | { |
177 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); | 177 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
178 | 178 | ||
179 | cmd.ExecuteNonQuery(); | 179 | cmd.ExecuteNonQuery(); |
180 | } | 180 | } |
181 | } | 181 | } |
@@ -193,7 +193,7 @@ namespace OpenSim.Data.SQLite | |||
193 | /*********************************************************************** | 193 | /*********************************************************************** |
194 | * | 194 | * |
195 | * Database Definition Functions | 195 | * Database Definition Functions |
196 | * | 196 | * |
197 | * This should be db agnostic as we define them in ADO.NET terms | 197 | * This should be db agnostic as we define them in ADO.NET terms |
198 | * | 198 | * |
199 | **********************************************************************/ | 199 | **********************************************************************/ |
@@ -216,7 +216,7 @@ namespace OpenSim.Data.SQLite | |||
216 | } | 216 | } |
217 | 217 | ||
218 | /*********************************************************************** | 218 | /*********************************************************************** |
219 | * | 219 | * |
220 | * Convert between ADO.NET <=> OpenSim Objects | 220 | * Convert between ADO.NET <=> OpenSim Objects |
221 | * | 221 | * |
222 | * These should be database independant | 222 | * These should be database independant |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 1ab971c..5acc5f2 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -106,22 +106,22 @@ namespace OpenSim.Data.SQLite | |||
106 | // new fields | 106 | // new fields |
107 | if (!Convert.IsDBNull(row["salePrice"])) | 107 | if (!Convert.IsDBNull(row["salePrice"])) |
108 | item.SalePrice = Convert.ToInt32(row["salePrice"]); | 108 | item.SalePrice = Convert.ToInt32(row["salePrice"]); |
109 | 109 | ||
110 | if (!Convert.IsDBNull(row["saleType"])) | 110 | if (!Convert.IsDBNull(row["saleType"])) |
111 | item.SaleType = Convert.ToByte(row["saleType"]); | 111 | item.SaleType = Convert.ToByte(row["saleType"]); |
112 | 112 | ||
113 | if (!Convert.IsDBNull(row["creationDate"])) | 113 | if (!Convert.IsDBNull(row["creationDate"])) |
114 | item.CreationDate = Convert.ToInt32(row["creationDate"]); | 114 | item.CreationDate = Convert.ToInt32(row["creationDate"]); |
115 | 115 | ||
116 | if (!Convert.IsDBNull(row["groupID"])) | 116 | if (!Convert.IsDBNull(row["groupID"])) |
117 | item.GroupID = new LLUUID((string)row["groupID"]); | 117 | item.GroupID = new LLUUID((string)row["groupID"]); |
118 | 118 | ||
119 | if (!Convert.IsDBNull(row["groupOwned"])) | 119 | if (!Convert.IsDBNull(row["groupOwned"])) |
120 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); | 120 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); |
121 | 121 | ||
122 | if (!Convert.IsDBNull(row["Flags"])) | 122 | if (!Convert.IsDBNull(row["Flags"])) |
123 | item.Flags = Convert.ToUInt32(row["Flags"]); | 123 | item.Flags = Convert.ToUInt32(row["Flags"]); |
124 | 124 | ||
125 | return item; | 125 | return item; |
126 | } | 126 | } |
127 | 127 | ||
@@ -221,7 +221,7 @@ namespace OpenSim.Data.SQLite | |||
221 | { | 221 | { |
222 | if (add) | 222 | if (add) |
223 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); | 223 | m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); |
224 | 224 | ||
225 | fillItemRow(inventoryRow, item); | 225 | fillItemRow(inventoryRow, item); |
226 | } | 226 | } |
227 | invItemsDa.Update(ds, "inventoryitems"); | 227 | invItemsDa.Update(ds, "inventoryitems"); |
@@ -314,9 +314,9 @@ namespace OpenSim.Data.SQLite | |||
314 | 314 | ||
315 | // There should only ever be one root folder for a user. However, if there's more | 315 | // There should only ever be one root folder for a user. However, if there's more |
316 | // than one we'll simply use the first one rather than failing. It would be even | 316 | // than one we'll simply use the first one rather than failing. It would be even |
317 | // nicer to print some message to this effect, but this feels like it's too low a | 317 | // nicer to print some message to this effect, but this feels like it's too low a |
318 | // to put such a message out, and it's too minor right now to spare the time to | 318 | // to put such a message out, and it's too minor right now to spare the time to |
319 | // suitably refactor. | 319 | // suitably refactor. |
320 | if (folders.Count > 0) | 320 | if (folders.Count > 0) |
321 | { | 321 | { |
322 | return folders[0]; | 322 | return folders[0]; |
@@ -327,7 +327,7 @@ namespace OpenSim.Data.SQLite | |||
327 | } | 327 | } |
328 | 328 | ||
329 | /// <summary> | 329 | /// <summary> |
330 | /// Append a list of all the child folders of a parent folder | 330 | /// Append a list of all the child folders of a parent folder |
331 | /// </summary> | 331 | /// </summary> |
332 | /// <param name="folders">list where folders will be appended</param> | 332 | /// <param name="folders">list where folders will be appended</param> |
333 | /// <param name="parentID">ID of parent</param> | 333 | /// <param name="parentID">ID of parent</param> |
@@ -435,7 +435,7 @@ namespace OpenSim.Data.SQLite | |||
435 | } | 435 | } |
436 | 436 | ||
437 | /// <summary> | 437 | /// <summary> |
438 | /// | 438 | /// |
439 | /// </summary> | 439 | /// </summary> |
440 | /// <param name="item"></param> | 440 | /// <param name="item"></param> |
441 | public void deleteInventoryItem(LLUUID itemID) | 441 | public void deleteInventoryItem(LLUUID itemID) |
@@ -664,7 +664,7 @@ namespace OpenSim.Data.SQLite | |||
664 | { | 664 | { |
665 | string createInventoryItems = defineTable(createInventoryItemsTable()); | 665 | string createInventoryItems = defineTable(createInventoryItemsTable()); |
666 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); | 666 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); |
667 | 667 | ||
668 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); | 668 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); |
669 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | 669 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); |
670 | 670 | ||
@@ -697,7 +697,7 @@ namespace OpenSim.Data.SQLite | |||
697 | // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only | 697 | // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only |
698 | // putting up with this because this code should be blown away soon by nhibernate... | 698 | // putting up with this because this code should be blown away soon by nhibernate... |
699 | conn.Open(); | 699 | conn.Open(); |
700 | 700 | ||
701 | SqliteCommand cmd; | 701 | SqliteCommand cmd; |
702 | try | 702 | try |
703 | { | 703 | { |
@@ -707,7 +707,7 @@ namespace OpenSim.Data.SQLite | |||
707 | catch (SqliteSyntaxException) | 707 | catch (SqliteSyntaxException) |
708 | { | 708 | { |
709 | m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2"); | 709 | m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2"); |
710 | 710 | ||
711 | cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn); | 711 | cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn); |
712 | cmd.ExecuteNonQuery(); | 712 | cmd.ExecuteNonQuery(); |
713 | cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn); | 713 | cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn); |
@@ -719,15 +719,15 @@ namespace OpenSim.Data.SQLite | |||
719 | cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn); | 719 | cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn); |
720 | cmd.ExecuteNonQuery(); | 720 | cmd.ExecuteNonQuery(); |
721 | cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn); | 721 | cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn); |
722 | cmd.ExecuteNonQuery(); | 722 | cmd.ExecuteNonQuery(); |
723 | 723 | ||
724 | pDa.Fill(tmpDS, "inventoryitems"); | 724 | pDa.Fill(tmpDS, "inventoryitems"); |
725 | } | 725 | } |
726 | finally | 726 | finally |
727 | { | 727 | { |
728 | conn.Close(); | 728 | conn.Close(); |
729 | } | 729 | } |
730 | 730 | ||
731 | foreach (DataColumn col in createInventoryItemsTable().Columns) | 731 | foreach (DataColumn col in createInventoryItemsTable().Columns) |
732 | { | 732 | { |
733 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) | 733 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 1b577db..6a16a88 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -90,11 +90,11 @@ namespace OpenSim.Data.SQLite | |||
90 | 90 | ||
91 | SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, m_conn); | 91 | SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, m_conn); |
92 | shapeDa = new SqliteDataAdapter(shapeSelectCmd); | 92 | shapeDa = new SqliteDataAdapter(shapeSelectCmd); |
93 | // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa); | 93 | // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa); |
94 | 94 | ||
95 | SqliteCommand itemsSelectCmd = new SqliteCommand(itemsSelect, m_conn); | 95 | SqliteCommand itemsSelectCmd = new SqliteCommand(itemsSelect, m_conn); |
96 | itemsDa = new SqliteDataAdapter(itemsSelectCmd); | 96 | itemsDa = new SqliteDataAdapter(itemsSelectCmd); |
97 | 97 | ||
98 | SqliteCommand terrainSelectCmd = new SqliteCommand(terrainSelect, m_conn); | 98 | SqliteCommand terrainSelectCmd = new SqliteCommand(terrainSelect, m_conn); |
99 | terrainDa = new SqliteDataAdapter(terrainSelectCmd); | 99 | terrainDa = new SqliteDataAdapter(terrainSelectCmd); |
100 | 100 | ||
@@ -117,7 +117,7 @@ namespace OpenSim.Data.SQLite | |||
117 | 117 | ||
118 | ds.Tables.Add(createShapeTable()); | 118 | ds.Tables.Add(createShapeTable()); |
119 | setupShapeCommands(shapeDa, m_conn); | 119 | setupShapeCommands(shapeDa, m_conn); |
120 | 120 | ||
121 | if (persistPrimInventories) | 121 | if (persistPrimInventories) |
122 | { | 122 | { |
123 | ds.Tables.Add(createItemsTable()); | 123 | ds.Tables.Add(createItemsTable()); |
@@ -183,8 +183,8 @@ namespace OpenSim.Data.SQLite | |||
183 | { | 183 | { |
184 | foreach (SceneObjectPart prim in obj.Children.Values) | 184 | foreach (SceneObjectPart prim in obj.Children.Values) |
185 | { | 185 | { |
186 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 | 186 | if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 |
187 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 | 187 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 |
188 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) | 188 | && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) |
189 | { | 189 | { |
190 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | 190 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
@@ -210,7 +210,7 @@ namespace OpenSim.Data.SQLite | |||
210 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 210 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
211 | { | 211 | { |
212 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 212 | m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); |
213 | 213 | ||
214 | DataTable prims = ds.Tables["prims"]; | 214 | DataTable prims = ds.Tables["prims"]; |
215 | DataTable shapes = ds.Tables["primshapes"]; | 215 | DataTable shapes = ds.Tables["primshapes"]; |
216 | 216 | ||
@@ -234,7 +234,7 @@ namespace OpenSim.Data.SQLite | |||
234 | } | 234 | } |
235 | 235 | ||
236 | // Remove prim row | 236 | // Remove prim row |
237 | row.Delete(); | 237 | row.Delete(); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
@@ -247,11 +247,11 @@ namespace OpenSim.Data.SQLite | |||
247 | /// </summary> | 247 | /// </summary> |
248 | private void RemoveItems(LLUUID uuid) | 248 | private void RemoveItems(LLUUID uuid) |
249 | { | 249 | { |
250 | DataTable items = ds.Tables["primitems"]; | 250 | DataTable items = ds.Tables["primitems"]; |
251 | 251 | ||
252 | String sql = String.Format("primID = '{0}'", uuid); | 252 | String sql = String.Format("primID = '{0}'", uuid); |
253 | DataRow[] itemRows = items.Select(sql); | 253 | DataRow[] itemRows = items.Select(sql); |
254 | 254 | ||
255 | foreach (DataRow itemRow in itemRows) | 255 | foreach (DataRow itemRow in itemRows) |
256 | { | 256 | { |
257 | itemRow.Delete(); | 257 | itemRow.Delete(); |
@@ -286,7 +286,7 @@ namespace OpenSim.Data.SQLite | |||
286 | try | 286 | try |
287 | { | 287 | { |
288 | SceneObjectPart prim = null; | 288 | SceneObjectPart prim = null; |
289 | 289 | ||
290 | string uuid = (string) primRow["UUID"]; | 290 | string uuid = (string) primRow["UUID"]; |
291 | string objID = (string) primRow["SceneGroupID"]; | 291 | string objID = (string) primRow["SceneGroupID"]; |
292 | if (uuid == objID) //is new SceneObjectGroup ? | 292 | if (uuid == objID) //is new SceneObjectGroup ? |
@@ -353,25 +353,25 @@ namespace OpenSim.Data.SQLite | |||
353 | private void LoadItems(SceneObjectPart prim) | 353 | private void LoadItems(SceneObjectPart prim) |
354 | { | 354 | { |
355 | //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 355 | //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); |
356 | 356 | ||
357 | DataTable dbItems = ds.Tables["primitems"]; | 357 | DataTable dbItems = ds.Tables["primitems"]; |
358 | 358 | ||
359 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 359 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
360 | DataRow[] dbItemRows = dbItems.Select(sql); | 360 | DataRow[] dbItemRows = dbItems.Select(sql); |
361 | 361 | ||
362 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 362 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
363 | 363 | ||
364 | foreach (DataRow row in dbItemRows) | 364 | foreach (DataRow row in dbItemRows) |
365 | { | 365 | { |
366 | TaskInventoryItem item = buildItem(row); | 366 | TaskInventoryItem item = buildItem(row); |
367 | inventory.Add(item); | 367 | inventory.Add(item); |
368 | 368 | ||
369 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); | 369 | //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); |
370 | } | 370 | } |
371 | 371 | ||
372 | prim.RestoreInventoryItems(inventory); | 372 | prim.RestoreInventoryItems(inventory); |
373 | 373 | ||
374 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in | 374 | // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in |
375 | // every item). This data should really be stored in the prim table itself. | 375 | // every item). This data should really be stored in the prim table itself. |
376 | if (dbItemRows.Length > 0) | 376 | if (dbItemRows.Length > 0) |
377 | { | 377 | { |
@@ -548,12 +548,12 @@ namespace OpenSim.Data.SQLite | |||
548 | { | 548 | { |
549 | primDa.Update(ds, "prims"); | 549 | primDa.Update(ds, "prims"); |
550 | shapeDa.Update(ds, "primshapes"); | 550 | shapeDa.Update(ds, "primshapes"); |
551 | 551 | ||
552 | if (persistPrimInventories) | 552 | if (persistPrimInventories) |
553 | { | 553 | { |
554 | itemsDa.Update(ds, "primitems"); | 554 | itemsDa.Update(ds, "primitems"); |
555 | } | 555 | } |
556 | 556 | ||
557 | terrainDa.Update(ds, "terrain"); | 557 | terrainDa.Update(ds, "terrain"); |
558 | landDa.Update(ds, "land"); | 558 | landDa.Update(ds, "land"); |
559 | landAccessListDa.Update(ds, "landaccesslist"); | 559 | landAccessListDa.Update(ds, "landaccesslist"); |
@@ -569,7 +569,7 @@ namespace OpenSim.Data.SQLite | |||
569 | /*********************************************************************** | 569 | /*********************************************************************** |
570 | * | 570 | * |
571 | * Database Definition Functions | 571 | * Database Definition Functions |
572 | * | 572 | * |
573 | * This should be db agnostic as we define them in ADO.NET terms | 573 | * This should be db agnostic as we define them in ADO.NET terms |
574 | * | 574 | * |
575 | **********************************************************************/ | 575 | **********************************************************************/ |
@@ -705,8 +705,8 @@ namespace OpenSim.Data.SQLite | |||
705 | createCol(items, "primID", typeof (String)); | 705 | createCol(items, "primID", typeof (String)); |
706 | createCol(items, "assetID", typeof (String)); | 706 | createCol(items, "assetID", typeof (String)); |
707 | createCol(items, "parentFolderID", typeof (String)); | 707 | createCol(items, "parentFolderID", typeof (String)); |
708 | 708 | ||
709 | createCol(items, "invType", typeof (Int32)); | 709 | createCol(items, "invType", typeof (Int32)); |
710 | createCol(items, "assetType", typeof (Int32)); | 710 | createCol(items, "assetType", typeof (Int32)); |
711 | 711 | ||
712 | createCol(items, "name", typeof (String)); | 712 | createCol(items, "name", typeof (String)); |
@@ -784,7 +784,7 @@ namespace OpenSim.Data.SQLite | |||
784 | } | 784 | } |
785 | 785 | ||
786 | /*********************************************************************** | 786 | /*********************************************************************** |
787 | * | 787 | * |
788 | * Convert between ADO.NET <=> OpenSim Objects | 788 | * Convert between ADO.NET <=> OpenSim Objects |
789 | * | 789 | * |
790 | * These should be database independant | 790 | * These should be database independant |
@@ -897,7 +897,7 @@ namespace OpenSim.Data.SQLite | |||
897 | 897 | ||
898 | return prim; | 898 | return prim; |
899 | } | 899 | } |
900 | 900 | ||
901 | /// <summary> | 901 | /// <summary> |
902 | /// Build a prim inventory item from the persisted data. | 902 | /// Build a prim inventory item from the persisted data. |
903 | /// </summary> | 903 | /// </summary> |
@@ -906,15 +906,15 @@ namespace OpenSim.Data.SQLite | |||
906 | private static TaskInventoryItem buildItem(DataRow row) | 906 | private static TaskInventoryItem buildItem(DataRow row) |
907 | { | 907 | { |
908 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 908 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
909 | 909 | ||
910 | taskItem.ItemID = new LLUUID((String)row["itemID"]); | 910 | taskItem.ItemID = new LLUUID((String)row["itemID"]); |
911 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 911 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
912 | taskItem.AssetID = new LLUUID((String)row["assetID"]); | 912 | taskItem.AssetID = new LLUUID((String)row["assetID"]); |
913 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); | 913 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); |
914 | 914 | ||
915 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 915 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
916 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 916 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
917 | 917 | ||
918 | taskItem.Name = (String)row["name"]; | 918 | taskItem.Name = (String)row["name"]; |
919 | taskItem.Description = (String)row["description"]; | 919 | taskItem.Description = (String)row["description"]; |
920 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 920 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
@@ -922,13 +922,13 @@ namespace OpenSim.Data.SQLite | |||
922 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); | 922 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); |
923 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); | 923 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); |
924 | taskItem.GroupID = new LLUUID((String)row["groupID"]); | 924 | taskItem.GroupID = new LLUUID((String)row["groupID"]); |
925 | 925 | ||
926 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); | 926 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); |
927 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); | 927 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); |
928 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); | 928 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); |
929 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); | 929 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); |
930 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); | 930 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); |
931 | 931 | ||
932 | return taskItem; | 932 | return taskItem; |
933 | } | 933 | } |
934 | 934 | ||
@@ -990,14 +990,14 @@ namespace OpenSim.Data.SQLite | |||
990 | cmd.ExecuteNonQuery(); | 990 | cmd.ExecuteNonQuery(); |
991 | m_conn.Close(); | 991 | m_conn.Close(); |
992 | m_conn.Dispose(); | 992 | m_conn.Dispose(); |
993 | 993 | ||
994 | m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now."); | 994 | m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now."); |
995 | 995 | ||
996 | Thread.Sleep(10000); | 996 | Thread.Sleep(10000); |
997 | 997 | ||
998 | // ICK! but it's better then A thousand red SQLITE error messages! | 998 | // ICK! but it's better then A thousand red SQLITE error messages! |
999 | Environment.Exit(0); | 999 | Environment.Exit(0); |
1000 | 1000 | ||
1001 | } | 1001 | } |
1002 | catch (Exception) | 1002 | catch (Exception) |
1003 | { | 1003 | { |
@@ -1006,7 +1006,7 @@ namespace OpenSim.Data.SQLite | |||
1006 | Environment.Exit(0); | 1006 | Environment.Exit(0); |
1007 | } | 1007 | } |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | return newData; | 1010 | return newData; |
1011 | } | 1011 | } |
1012 | 1012 | ||
@@ -1107,17 +1107,17 @@ namespace OpenSim.Data.SQLite | |||
1107 | row["SitTargetOrientY"] = sitTargetOrient.Y; | 1107 | row["SitTargetOrientY"] = sitTargetOrient.Y; |
1108 | row["SitTargetOrientZ"] = sitTargetOrient.Z; | 1108 | row["SitTargetOrientZ"] = sitTargetOrient.Z; |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) | 1111 | private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1112 | { | 1112 | { |
1113 | row["itemID"] = taskItem.ItemID; | 1113 | row["itemID"] = taskItem.ItemID; |
1114 | row["primID"] = taskItem.ParentPartID; | 1114 | row["primID"] = taskItem.ParentPartID; |
1115 | row["assetID"] = taskItem.AssetID; | 1115 | row["assetID"] = taskItem.AssetID; |
1116 | row["parentFolderID"] = taskItem.ParentID; | 1116 | row["parentFolderID"] = taskItem.ParentID; |
1117 | 1117 | ||
1118 | row["invType"] = taskItem.InvType; | 1118 | row["invType"] = taskItem.InvType; |
1119 | row["assetType"] = taskItem.Type; | 1119 | row["assetType"] = taskItem.Type; |
1120 | 1120 | ||
1121 | row["name"] = taskItem.Name; | 1121 | row["name"] = taskItem.Name; |
1122 | row["description"] = taskItem.Description; | 1122 | row["description"] = taskItem.Description; |
1123 | row["creationDate"] = taskItem.CreationDate; | 1123 | row["creationDate"] = taskItem.CreationDate; |
@@ -1294,37 +1294,37 @@ namespace OpenSim.Data.SQLite | |||
1294 | fillShapeRow(shapeRow, prim); | 1294 | fillShapeRow(shapeRow, prim); |
1295 | } | 1295 | } |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | // see IRegionDatastore | 1298 | // see IRegionDatastore |
1299 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1299 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
1300 | { | 1300 | { |
1301 | if (!persistPrimInventories) | 1301 | if (!persistPrimInventories) |
1302 | return; | 1302 | return; |
1303 | 1303 | ||
1304 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); | 1304 | m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); |
1305 | 1305 | ||
1306 | DataTable dbItems = ds.Tables["primitems"]; | 1306 | DataTable dbItems = ds.Tables["primitems"]; |
1307 | 1307 | ||
1308 | // For now, we're just going to crudely remove all the previous inventory items | 1308 | // For now, we're just going to crudely remove all the previous inventory items |
1309 | // no matter whether they have changed or not, and replace them with the current set. | 1309 | // no matter whether they have changed or not, and replace them with the current set. |
1310 | lock (ds) | 1310 | lock (ds) |
1311 | { | 1311 | { |
1312 | RemoveItems(primID); | 1312 | RemoveItems(primID); |
1313 | 1313 | ||
1314 | // repalce with current inventory details | 1314 | // repalce with current inventory details |
1315 | foreach (TaskInventoryItem newItem in items) | 1315 | foreach (TaskInventoryItem newItem in items) |
1316 | { | 1316 | { |
1317 | // m_log.InfoFormat( | 1317 | // m_log.InfoFormat( |
1318 | // "[DATASTORE]: ", | 1318 | // "[DATASTORE]: ", |
1319 | // "Adding item {0}, {1} to prim ID {2}", | 1319 | // "Adding item {0}, {1} to prim ID {2}", |
1320 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1320 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1321 | 1321 | ||
1322 | DataRow newItemRow = dbItems.NewRow(); | 1322 | DataRow newItemRow = dbItems.NewRow(); |
1323 | fillItemRow(newItemRow, newItem); | 1323 | fillItemRow(newItemRow, newItem); |
1324 | dbItems.Rows.Add(newItemRow); | 1324 | dbItems.Rows.Add(newItemRow); |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | Commit(); | 1328 | Commit(); |
1329 | } | 1329 | } |
1330 | 1330 | ||
@@ -1436,7 +1436,7 @@ namespace OpenSim.Data.SQLite | |||
1436 | /// This is a convenience function that collapses 5 repetitive | 1436 | /// This is a convenience function that collapses 5 repetitive |
1437 | /// lines for defining SqliteParameters to 2 parameters: | 1437 | /// lines for defining SqliteParameters to 2 parameters: |
1438 | /// column name and database type. | 1438 | /// column name and database type. |
1439 | /// | 1439 | /// |
1440 | /// It assumes certain conventions like :param as the param | 1440 | /// It assumes certain conventions like :param as the param |
1441 | /// name to replace in parametrized queries, and that source | 1441 | /// name to replace in parametrized queries, and that source |
1442 | /// version is always current version, both of which are fine | 1442 | /// version is always current version, both of which are fine |
@@ -1451,7 +1451,7 @@ namespace OpenSim.Data.SQLite | |||
1451 | param.SourceColumn = name; | 1451 | param.SourceColumn = name; |
1452 | param.SourceVersion = DataRowVersion.Current; | 1452 | param.SourceVersion = DataRowVersion.Current; |
1453 | return param; | 1453 | return param; |
1454 | } | 1454 | } |
1455 | 1455 | ||
1456 | private void setupPrimCommands(SqliteDataAdapter da, SqliteConnection conn) | 1456 | private void setupPrimCommands(SqliteDataAdapter da, SqliteConnection conn) |
1457 | { | 1457 | { |
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.SQLite | |||
1466 | delete.Connection = conn; | 1466 | delete.Connection = conn; |
1467 | da.DeleteCommand = delete; | 1467 | da.DeleteCommand = delete; |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn) | 1470 | private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn) |
1471 | { | 1471 | { |
1472 | da.InsertCommand = createInsertCommand("primitems", ds.Tables["primitems"]); | 1472 | da.InsertCommand = createInsertCommand("primitems", ds.Tables["primitems"]); |
@@ -1479,7 +1479,7 @@ namespace OpenSim.Data.SQLite | |||
1479 | delete.Parameters.Add(createSqliteParameter("itemID", typeof (String))); | 1479 | delete.Parameters.Add(createSqliteParameter("itemID", typeof (String))); |
1480 | delete.Connection = conn; | 1480 | delete.Connection = conn; |
1481 | da.DeleteCommand = delete; | 1481 | da.DeleteCommand = delete; |
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | private void setupTerrainCommands(SqliteDataAdapter da, SqliteConnection conn) | 1484 | private void setupTerrainCommands(SqliteDataAdapter da, SqliteConnection conn) |
1485 | { | 1485 | { |
@@ -1660,7 +1660,7 @@ namespace OpenSim.Data.SQLite | |||
1660 | return false; | 1660 | return false; |
1661 | } | 1661 | } |
1662 | } | 1662 | } |
1663 | 1663 | ||
1664 | // XXX primitems should probably go here eventually | 1664 | // XXX primitems should probably go here eventually |
1665 | 1665 | ||
1666 | foreach (DataColumn col in createTerrainTable().Columns) | 1666 | foreach (DataColumn col in createTerrainTable().Columns) |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 8f78e0b..d8b140c 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite | |||
58 | 58 | ||
59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; | 59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; |
60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; | 60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; |
61 | 61 | ||
62 | private DataSet ds; | 62 | private DataSet ds; |
63 | private SqliteDataAdapter da; | 63 | private SqliteDataAdapter da; |
64 | private SqliteDataAdapter daf; | 64 | private SqliteDataAdapter daf; |
@@ -67,16 +67,16 @@ namespace OpenSim.Data.SQLite | |||
67 | override public void Initialise(string connect) | 67 | override public void Initialise(string connect) |
68 | { | 68 | { |
69 | // default to something sensible | 69 | // default to something sensible |
70 | if (connect == "") | 70 | if (connect == "") |
71 | connect = "URI=file:userprofiles.db,version=3"; | 71 | connect = "URI=file:userprofiles.db,version=3"; |
72 | 72 | ||
73 | SqliteConnection conn = new SqliteConnection(connect); | 73 | SqliteConnection conn = new SqliteConnection(connect); |
74 | TestTables(conn); | 74 | TestTables(conn); |
75 | 75 | ||
76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P | 76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P |
77 | g_conn = conn; | 77 | g_conn = conn; |
78 | g_conn.Open(); | 78 | g_conn.Open(); |
79 | 79 | ||
80 | ds = new DataSet(); | 80 | ds = new DataSet(); |
81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); | 81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); |
82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); | 82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); |
@@ -159,7 +159,7 @@ namespace OpenSim.Data.SQLite | |||
159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
160 | { | 160 | { |
161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; | 161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; |
162 | 162 | ||
163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) | 163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) |
164 | { | 164 | { |
165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); | 165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); |
@@ -228,11 +228,11 @@ namespace OpenSim.Data.SQLite | |||
228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); | 228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | return returnlist; | 232 | return returnlist; |
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | #endregion | 238 | #endregion |
@@ -380,9 +380,9 @@ namespace OpenSim.Data.SQLite | |||
380 | else | 380 | else |
381 | { | 381 | { |
382 | fillUserRow(row, user); | 382 | fillUserRow(row, user); |
383 | 383 | ||
384 | } | 384 | } |
385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the | 385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the |
386 | // useragents table once the useragent is null | 386 | // useragents table once the useragent is null |
387 | // | 387 | // |
388 | // A database guy should look at this and figure out the best way to clear the useragents table. | 388 | // A database guy should look at this and figure out the best way to clear the useragents table. |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.SQLite | |||
403 | } | 403 | } |
404 | else | 404 | else |
405 | { | 405 | { |
406 | // I just added this to help the standalone login situation. | 406 | // I just added this to help the standalone login situation. |
407 | //It still needs to be looked at by a Database guy | 407 | //It still needs to be looked at by a Database guy |
408 | DataTable ua = ds.Tables["useragents"]; | 408 | DataTable ua = ds.Tables["useragents"]; |
409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); | 409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); |
@@ -480,7 +480,7 @@ namespace OpenSim.Data.SQLite | |||
480 | 480 | ||
481 | /// Appearance | 481 | /// Appearance |
482 | /// TODO: stubs for now to get us to a compiling state gently | 482 | /// TODO: stubs for now to get us to a compiling state gently |
483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
484 | // { | 484 | // { |
485 | // return new AvatarAppearance(); | 485 | // return new AvatarAppearance(); |
486 | // } | 486 | // } |
@@ -494,17 +494,17 @@ namespace OpenSim.Data.SQLite | |||
494 | { | 494 | { |
495 | return; | 495 | return; |
496 | } | 496 | } |
497 | 497 | ||
498 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 498 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
499 | { | 499 | { |
500 | return; | 500 | return; |
501 | } | 501 | } |
502 | 502 | ||
503 | override public List<LLUUID> GetAttachments(LLUUID user) | 503 | override public List<LLUUID> GetAttachments(LLUUID user) |
504 | { | 504 | { |
505 | return new List<LLUUID>(); | 505 | return new List<LLUUID>(); |
506 | } | 506 | } |
507 | 507 | ||
508 | /// <summary> | 508 | /// <summary> |
509 | /// Returns the name of the storage provider | 509 | /// Returns the name of the storage provider |
510 | /// </summary> | 510 | /// </summary> |
@@ -525,13 +525,13 @@ namespace OpenSim.Data.SQLite | |||
525 | 525 | ||
526 | /*********************************************************************** | 526 | /*********************************************************************** |
527 | * | 527 | * |
528 | * DataTable creation | 528 | * DataTable creation |
529 | * | 529 | * |
530 | **********************************************************************/ | 530 | **********************************************************************/ |
531 | /*********************************************************************** | 531 | /*********************************************************************** |
532 | * | 532 | * |
533 | * Database Definition Functions | 533 | * Database Definition Functions |
534 | * | 534 | * |
535 | * This should be db agnostic as we define them in ADO.NET terms | 535 | * This should be db agnostic as we define them in ADO.NET terms |
536 | * | 536 | * |
537 | **********************************************************************/ | 537 | **********************************************************************/ |
@@ -610,7 +610,7 @@ namespace OpenSim.Data.SQLite | |||
610 | } | 610 | } |
611 | 611 | ||
612 | /*********************************************************************** | 612 | /*********************************************************************** |
613 | * | 613 | * |
614 | * Convert between ADO.NET <=> OpenSim Objects | 614 | * Convert between ADO.NET <=> OpenSim Objects |
615 | * | 615 | * |
616 | * These should be database independant | 616 | * These should be database independant |
diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs index 5bb22f7..0862de0 100644 --- a/OpenSim/Data/SQLite/SQLiteUtils.cs +++ b/OpenSim/Data/SQLite/SQLiteUtils.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Data.SQLite | |||
39 | /*********************************************************************** | 39 | /*********************************************************************** |
40 | * | 40 | * |
41 | * Database Definition Helper Functions | 41 | * Database Definition Helper Functions |
42 | * | 42 | * |
43 | * This should be db agnostic as we define them in ADO.NET terms | 43 | * This should be db agnostic as we define them in ADO.NET terms |
44 | * | 44 | * |
45 | **********************************************************************/ | 45 | **********************************************************************/ |
@@ -161,7 +161,7 @@ namespace OpenSim.Data.SQLite | |||
161 | /// This is a convenience function that collapses 5 repetitive | 161 | /// This is a convenience function that collapses 5 repetitive |
162 | /// lines for defining SqliteParameters to 2 parameters: | 162 | /// lines for defining SqliteParameters to 2 parameters: |
163 | /// column name and database type. | 163 | /// column name and database type. |
164 | /// | 164 | /// |
165 | /// It assumes certain conventions like :param as the param | 165 | /// It assumes certain conventions like :param as the param |
166 | /// name to replace in parametrized queries, and that source | 166 | /// name to replace in parametrized queries, and that source |
167 | /// version is always current version, both of which are fine | 167 | /// version is always current version, both of which are fine |
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index 817ac3e..82cbda4 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs | |||
@@ -36,11 +36,11 @@ namespace OpenSim.Data | |||
36 | public abstract class UserDataBase : IUserData | 36 | public abstract class UserDataBase : IUserData |
37 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | 39 | ||
40 | private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); | 40 | private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); |
41 | 41 | ||
42 | public abstract UserProfileData GetUserByUUID(LLUUID user); | 42 | public abstract UserProfileData GetUserByUUID(LLUUID user); |
43 | public abstract UserProfileData GetUserByName(string fname, string lname); | 43 | public abstract UserProfileData GetUserByName(string fname, string lname); |
44 | public abstract UserAgentData GetAgentByUUID(LLUUID user); | 44 | public abstract UserAgentData GetAgentByUUID(LLUUID user); |
45 | public abstract UserAgentData GetAgentByName(string name); | 45 | public abstract UserAgentData GetAgentByName(string name); |
46 | public abstract UserAgentData GetAgentByName(string fname, string lname); | 46 | public abstract UserAgentData GetAgentByName(string fname, string lname); |
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs index d43b259..3cd3def 100644 --- a/OpenSim/Framework/AssemblyInfo.cs +++ b/OpenSim/Framework/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 945163c..7adcb4a 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -38,7 +38,7 @@ using Nini.Config; | |||
38 | /// Loads assets from the filesystem location. Not yet a plugin, though it should be. | 38 | /// Loads assets from the filesystem location. Not yet a plugin, though it should be. |
39 | /// </summary> | 39 | /// </summary> |
40 | namespace OpenSim.Framework.AssetLoader.Filesystem | 40 | namespace OpenSim.Framework.AssetLoader.Filesystem |
41 | { | 41 | { |
42 | public class AssetLoaderFileSystem : IAssetLoader | 42 | public class AssetLoaderFileSystem : IAssetLoader |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
63 | 63 | ||
64 | return asset; | 64 | return asset; |
65 | } | 65 | } |
66 | 66 | ||
67 | protected static void LoadAsset(AssetBase info, bool image, string path) | 67 | protected static void LoadAsset(AssetBase info, bool image, string path) |
68 | { | 68 | { |
69 | FileInfo fInfo = new FileInfo(path); | 69 | FileInfo fInfo = new FileInfo(path); |
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
77 | info.Data = idata; | 77 | info.Data = idata; |
78 | //info.loaded=true; | 78 | //info.loaded=true; |
79 | } | 79 | } |
80 | 80 | ||
81 | public void ForEachDefaultXmlAsset(Action<AssetBase> action) | 81 | public void ForEachDefaultXmlAsset(Action<AssetBase> action) |
82 | { | 82 | { |
83 | string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); | 83 | string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); |
@@ -91,28 +91,28 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
91 | if (File.Exists(assetSetFilename)) | 91 | if (File.Exists(assetSetFilename)) |
92 | { | 92 | { |
93 | string assetSetPath = "ERROR"; | 93 | string assetSetPath = "ERROR"; |
94 | 94 | ||
95 | try | 95 | try |
96 | { | 96 | { |
97 | XmlConfigSource source = new XmlConfigSource(assetSetFilename); | 97 | XmlConfigSource source = new XmlConfigSource(assetSetFilename); |
98 | 98 | ||
99 | for (int i = 0; i < source.Configs.Count; i++) | 99 | for (int i = 0; i < source.Configs.Count; i++) |
100 | { | 100 | { |
101 | assetSetPath = source.Configs[i].GetString("file", String.Empty); | 101 | assetSetPath = source.Configs[i].GetString("file", String.Empty); |
102 | 102 | ||
103 | LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); | 103 | LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); |
104 | } | 104 | } |
105 | } | 105 | } |
106 | catch (XmlException e) | 106 | catch (XmlException e) |
107 | { | 107 | { |
108 | m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); | 108 | m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | else | 111 | else |
112 | { | 112 | { |
113 | m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); | 113 | m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); |
114 | } | 114 | } |
115 | 115 | ||
116 | assets.ForEach(action); | 116 | assets.ForEach(action); |
117 | } | 117 | } |
118 | 118 | ||
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
124 | protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) | 124 | protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) |
125 | { | 125 | { |
126 | m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); | 126 | m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); |
127 | 127 | ||
128 | if (File.Exists(assetSetPath)) | 128 | if (File.Exists(assetSetPath)) |
129 | { | 129 | { |
130 | try | 130 | try |
@@ -156,6 +156,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
156 | { | 156 | { |
157 | m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); | 157 | m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | } | 160 | } |
161 | } | 161 | } |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index cf9ff58..365df1a 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Framework | |||
56 | public readonly static int SKIRT = 12; | 56 | public readonly static int SKIRT = 12; |
57 | 57 | ||
58 | private readonly static int MAX_WEARABLES = 13; | 58 | private readonly static int MAX_WEARABLES = 13; |
59 | 59 | ||
60 | private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); | 60 | private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); |
61 | private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); | 61 | private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); |
62 | private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); | 62 | private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); |
@@ -204,7 +204,7 @@ namespace OpenSim.Framework | |||
204 | set { m_wearables[SKIRT].AssetID = value; } | 204 | set { m_wearables[SKIRT].AssetID = value; } |
205 | } | 205 | } |
206 | 206 | ||
207 | public void SetDefaultWearables() | 207 | public void SetDefaultWearables() |
208 | { | 208 | { |
209 | m_wearables[BODY].AssetID = BODY_ASSET; | 209 | m_wearables[BODY].AssetID = BODY_ASSET; |
210 | m_wearables[BODY].ItemID = BODY_ITEM; | 210 | m_wearables[BODY].ItemID = BODY_ITEM; |
@@ -257,7 +257,7 @@ namespace OpenSim.Framework | |||
257 | } | 257 | } |
258 | 258 | ||
259 | /// <summary> | 259 | /// <summary> |
260 | /// | 260 | /// |
261 | /// </summary> | 261 | /// </summary> |
262 | /// <param name="texture"></param> | 262 | /// <param name="texture"></param> |
263 | /// <param name="visualParam"></param> | 263 | /// <param name="visualParam"></param> |
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 2395c99..a70f7fa 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Framework | |||
72 | 72 | ||
73 | public void Remove(uint id) | 73 | public void Remove(uint id) |
74 | { | 74 | { |
75 | //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count); | 75 | //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count); |
76 | lock (m_clients) | 76 | lock (m_clients) |
77 | { | 77 | { |
78 | m_clients.Remove(id); | 78 | m_clients.Remove(id); |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 1414260..0669ce9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -40,12 +40,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Manages local cache of assets and their sending to viewers. | 42 | /// Manages local cache of assets and their sending to viewers. |
43 | /// | 43 | /// |
44 | /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either | 44 | /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either |
45 | /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and | 45 | /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and |
46 | /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and | 46 | /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and |
47 | /// AssetNotFound(), which means they do share the same asset and texture caches. | 47 | /// AssetNotFound(), which means they do share the same asset and texture caches. |
48 | /// | 48 | /// |
49 | /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). | 49 | /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). |
50 | /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets | 50 | /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets |
51 | /// but it's something to bear in mind. | 51 | /// but it's something to bear in mind. |
@@ -281,8 +281,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
281 | 281 | ||
282 | /// <summary> | 282 | /// <summary> |
283 | /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to | 283 | /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to |
284 | /// load it into the cache. | 284 | /// load it into the cache. |
285 | /// | 285 | /// |
286 | /// XXX We'll keep polling the cache until we get the asset or we exceed | 286 | /// XXX We'll keep polling the cache until we get the asset or we exceed |
287 | /// the allowed number of polls. This isn't a very good way of doing things since a single thread | 287 | /// the allowed number of polls. This isn't a very good way of doing things since a single thread |
288 | /// is processing inbound packets, so if the asset server is slow, we could block this for up to | 288 | /// is processing inbound packets, so if the asset server is slow, we could block this for up to |
@@ -431,11 +431,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
431 | //making a copy of the list is not ideal | 431 | //making a copy of the list is not ideal |
432 | //but the old method of locking around this whole block of code was causing a multi-thread lock | 432 | //but the old method of locking around this whole block of code was causing a multi-thread lock |
433 | //between this and the TextureDownloadModule | 433 | //between this and the TextureDownloadModule |
434 | //while the localAsset thread running this and trying to send a texture to the callback in the | 434 | //while the localAsset thread running this and trying to send a texture to the callback in the |
435 | //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding | 435 | //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding |
436 | // the lock in the texturedownload module) was trying to | 436 | // the lock in the texturedownload module) was trying to |
437 | //request a new asset and hitting a lock in here on the RequestLists. | 437 | //request a new asset and hitting a lock in here on the RequestLists. |
438 | 438 | ||
439 | List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); | 439 | List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); |
440 | reqList.Requests.Clear(); | 440 | reqList.Requests.Clear(); |
441 | 441 | ||
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
460 | { | 460 | { |
461 | // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); | 461 | // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); |
462 | 462 | ||
463 | // Notify requesters for this asset | 463 | // Notify requesters for this asset |
464 | AssetRequestsList reqList = null; | 464 | AssetRequestsList reqList = null; |
465 | lock (RequestLists) | 465 | lock (RequestLists) |
466 | { | 466 | { |
@@ -552,7 +552,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
552 | } | 552 | } |
553 | return; | 553 | return; |
554 | } | 554 | } |
555 | //it is in our cache | 555 | //it is in our cache |
556 | AssetInfo asset = Assets[requestID]; | 556 | AssetInfo asset = Assets[requestID]; |
557 | 557 | ||
558 | // add to the AssetRequests list | 558 | // add to the AssetRequests list |
@@ -679,14 +679,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
679 | public byte AssetRequestSource = 2; | 679 | public byte AssetRequestSource = 2; |
680 | public byte[] Params = null; | 680 | public byte[] Params = null; |
681 | //public bool AssetInCache; | 681 | //public bool AssetInCache; |
682 | //public int TimeRequested; | 682 | //public int TimeRequested; |
683 | public int DiscardLevel = -1; | 683 | public int DiscardLevel = -1; |
684 | 684 | ||
685 | public AssetRequest() | 685 | public AssetRequest() |
686 | { | 686 | { |
687 | } | 687 | } |
688 | } | 688 | } |
689 | 689 | ||
690 | public class AssetInfo : AssetBase | 690 | public class AssetInfo : AssetBase |
691 | { | 691 | { |
692 | public AssetInfo() | 692 | public AssetInfo() |
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 1a7f872..b16512c 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | { | 36 | { |
37 | public abstract class AssetServerBase : IAssetServer | 37 | public abstract class AssetServerBase : IAssetServer |
38 | { | 38 | { |
39 | private static readonly ILog m_log | 39 | private static readonly ILog m_log |
40 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 41 | ||
42 | protected IAssetReceiver m_receiver; | 42 | protected IAssetReceiver m_receiver; |
@@ -47,12 +47,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
47 | 47 | ||
48 | // Temporarily hardcoded - should be a plugin | 48 | // Temporarily hardcoded - should be a plugin |
49 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); | 49 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); |
50 | 50 | ||
51 | protected abstract void StoreAsset(AssetBase asset); | 51 | protected abstract void StoreAsset(AssetBase asset); |
52 | protected abstract void CommitAssets(); | 52 | protected abstract void CommitAssets(); |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
55 | /// This method must be implemented by a subclass to retrieve the asset named in the | 55 | /// This method must be implemented by a subclass to retrieve the asset named in the |
56 | /// AssetRequest. If the asset is not found, null should be returned. | 56 | /// AssetRequest. If the asset is not found, null should be returned. |
57 | /// </summary> | 57 | /// </summary> |
58 | /// <param name="req"></param> | 58 | /// <param name="req"></param> |
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
60 | protected abstract AssetBase GetAsset(AssetRequest req); | 60 | protected abstract AssetBase GetAsset(AssetRequest req); |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// Process an asset request. This method will call GetAsset(AssetRequest req) | 63 | /// Process an asset request. This method will call GetAsset(AssetRequest req) |
64 | /// on the subclass. | 64 | /// on the subclass. |
65 | /// </summary> | 65 | /// </summary> |
66 | /// <param name="req"></param> | 66 | /// <param name="req"></param> |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 218fd5a..f40f078 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -36,55 +36,55 @@ using log4net; | |||
36 | namespace OpenSim.Framework.Communications.Cache | 36 | namespace OpenSim.Framework.Communications.Cache |
37 | { | 37 | { |
38 | internal delegate void AddItemDelegate(InventoryItemBase itemInfo); | 38 | internal delegate void AddItemDelegate(InventoryItemBase itemInfo); |
39 | internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); | 39 | internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); |
40 | internal delegate void DeleteItemDelegate(LLUUID itemID); | 40 | internal delegate void DeleteItemDelegate(LLUUID itemID); |
41 | 41 | ||
42 | internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); | 42 | internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); |
43 | internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); | 43 | internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); |
44 | internal delegate void PurgeFolderDelegate(LLUUID folderID); | 44 | internal delegate void PurgeFolderDelegate(LLUUID folderID); |
45 | internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); | 45 | internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); |
46 | 46 | ||
47 | internal delegate void SendInventoryDescendentsDelegate( | 47 | internal delegate void SendInventoryDescendentsDelegate( |
48 | IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); | 48 | IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Stores user profile and inventory data received from backend services for a particular user. | 51 | /// Stores user profile and inventory data received from backend services for a particular user. |
52 | /// </summary> | 52 | /// </summary> |
53 | public class CachedUserInfo | 53 | public class CachedUserInfo |
54 | { | 54 | { |
55 | private static readonly ILog m_log | 55 | private static readonly ILog m_log |
56 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 56 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// The comms manager holds references to services (user, grid, inventory, etc.) | 59 | /// The comms manager holds references to services (user, grid, inventory, etc.) |
60 | /// </summary> | 60 | /// </summary> |
61 | private readonly CommunicationsManager m_commsManager; | 61 | private readonly CommunicationsManager m_commsManager; |
62 | 62 | ||
63 | public UserProfileData UserProfile { get { return m_userProfile; } } | 63 | public UserProfileData UserProfile { get { return m_userProfile; } } |
64 | private readonly UserProfileData m_userProfile; | 64 | private readonly UserProfileData m_userProfile; |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// Has we received the user's inventory from the inventory service? | 67 | /// Has we received the user's inventory from the inventory service? |
68 | /// </summary> | 68 | /// </summary> |
69 | private bool m_hasInventory; | 69 | private bool m_hasInventory; |
70 | 70 | ||
71 | /// <summary> | 71 | /// <summary> |
72 | /// Inventory requests waiting for receipt of this user's inventory from the inventory service. | 72 | /// Inventory requests waiting for receipt of this user's inventory from the inventory service. |
73 | /// </summary> | 73 | /// </summary> |
74 | private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>(); | 74 | private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>(); |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Has this user info object yet received its inventory information from the invetnroy service? | 77 | /// Has this user info object yet received its inventory information from the invetnroy service? |
78 | /// </summary> | 78 | /// </summary> |
79 | public bool HasInventory { get { return m_hasInventory; } } | 79 | public bool HasInventory { get { return m_hasInventory; } } |
80 | 80 | ||
81 | private InventoryFolderImpl m_rootFolder; | 81 | private InventoryFolderImpl m_rootFolder; |
82 | public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } | 82 | public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } |
83 | 83 | ||
84 | /// <summary> | 84 | /// <summary> |
85 | /// FIXME: This could be contained within a local variable - it doesn't need to be a field | 85 | /// FIXME: This could be contained within a local variable - it doesn't need to be a field |
86 | /// </summary> | 86 | /// </summary> |
87 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders | 87 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders |
88 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); | 88 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); |
89 | 89 | ||
90 | /// <summary> | 90 | /// <summary> |
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
97 | m_commsManager = commsManager; | 97 | m_commsManager = commsManager; |
98 | m_userProfile = userProfile; | 98 | m_userProfile = userProfile; |
99 | } | 99 | } |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// This allows a request to be added to be processed once we receive a user's inventory | 102 | /// This allows a request to be added to be processed once we receive a user's inventory |
103 | /// from the inventory service. If we already have the inventory, the request | 103 | /// from the inventory service. If we already have the inventory, the request |
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// Store a folder pending arrival of its parent | 123 | /// Store a folder pending arrival of its parent |
124 | /// </summary> | 124 | /// </summary> |
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
126 | private void AddPendingFolder(InventoryFolderImpl folder) | 126 | private void AddPendingFolder(InventoryFolderImpl folder) |
127 | { | 127 | { |
128 | LLUUID parentFolderId = folder.ParentID; | 128 | LLUUID parentFolderId = folder.ParentID; |
129 | 129 | ||
130 | if (pendingCategorizationFolders.ContainsKey(parentFolderId)) | 130 | if (pendingCategorizationFolders.ContainsKey(parentFolderId)) |
131 | { | 131 | { |
132 | pendingCategorizationFolders[parentFolderId].Add(folder); | 132 | pendingCategorizationFolders[parentFolderId].Add(folder); |
@@ -135,11 +135,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
135 | { | 135 | { |
136 | IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); | 136 | IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); |
137 | folders.Add(folder); | 137 | folders.Add(folder); |
138 | 138 | ||
139 | pendingCategorizationFolders[parentFolderId] = folders; | 139 | pendingCategorizationFolders[parentFolderId] = folders; |
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | /// <summary> | 143 | /// <summary> |
144 | /// Add any pending folders which were received before the given folder | 144 | /// Add any pending folders which were received before the given folder |
145 | /// </summary> | 145 | /// </summary> |
@@ -155,18 +155,18 @@ namespace OpenSim.Framework.Communications.Cache | |||
155 | // m_log.DebugFormat( | 155 | // m_log.DebugFormat( |
156 | // "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", | 156 | // "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", |
157 | // folder.name, folder.folderID, parent.name, parent.folderID); | 157 | // folder.name, folder.folderID, parent.name, parent.folderID); |
158 | 158 | ||
159 | lock (newFolder.SubFolders) | 159 | lock (newFolder.SubFolders) |
160 | { | 160 | { |
161 | if (!newFolder.SubFolders.ContainsKey(folder.ID)) | 161 | if (!newFolder.SubFolders.ContainsKey(folder.ID)) |
162 | { | 162 | { |
163 | newFolder.SubFolders.Add(folder.ID, folder); | 163 | newFolder.SubFolders.Add(folder.ID, folder); |
164 | } | 164 | } |
165 | } | 165 | } |
166 | } | 166 | } |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | /// <summary> | 170 | /// <summary> |
171 | /// Callback invoked when the inventory is received from an async request to the inventory service | 171 | /// Callback invoked when the inventory is received from an async request to the inventory service |
172 | /// </summary> | 172 | /// </summary> |
@@ -177,12 +177,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
177 | // FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these | 177 | // FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these |
178 | // are simply being swallowed | 178 | // are simply being swallowed |
179 | try | 179 | try |
180 | { | 180 | { |
181 | foreach (InventoryFolderImpl folder in folders) | 181 | foreach (InventoryFolderImpl folder in folders) |
182 | { | 182 | { |
183 | FolderReceive(folder); | 183 | FolderReceive(folder); |
184 | } | 184 | } |
185 | 185 | ||
186 | foreach (InventoryItemBase item in items) | 186 | foreach (InventoryItemBase item in items) |
187 | { | 187 | { |
188 | ItemReceive(item); | 188 | ItemReceive(item); |
@@ -191,15 +191,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
191 | catch (Exception e) | 191 | catch (Exception e) |
192 | { | 192 | { |
193 | m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e); | 193 | m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e); |
194 | } | 194 | } |
195 | 195 | ||
196 | // Deal with pending requests | 196 | // Deal with pending requests |
197 | lock (m_pendingRequests) | 197 | lock (m_pendingRequests) |
198 | { | 198 | { |
199 | // We're going to change inventory status within the lock to avoid a race condition | 199 | // We're going to change inventory status within the lock to avoid a race condition |
200 | // where requests are processed after the AddRequest() method has been called. | 200 | // where requests are processed after the AddRequest() method has been called. |
201 | m_hasInventory = true; | 201 | m_hasInventory = true; |
202 | 202 | ||
203 | foreach (IInventoryRequest request in m_pendingRequests) | 203 | foreach (IInventoryRequest request in m_pendingRequests) |
204 | { | 204 | { |
205 | request.Execute(); | 205 | request.Execute(); |
@@ -215,7 +215,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
215 | private void FolderReceive(InventoryFolderImpl newFolder) | 215 | private void FolderReceive(InventoryFolderImpl newFolder) |
216 | { | 216 | { |
217 | // m_log.DebugFormat( | 217 | // m_log.DebugFormat( |
218 | // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", | 218 | // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", |
219 | // folderInfo.Name, folderInfo.ID, userID); | 219 | // folderInfo.Name, folderInfo.ID, userID); |
220 | 220 | ||
221 | if (RootFolder == null) | 221 | if (RootFolder == null) |
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
232 | else | 232 | else |
233 | { | 233 | { |
234 | InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID); | 234 | InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID); |
235 | 235 | ||
236 | if (parentFolder != null) | 236 | if (parentFolder != null) |
237 | { | 237 | { |
238 | lock (parentFolder.SubFolders) | 238 | lock (parentFolder.SubFolders) |
@@ -252,44 +252,44 @@ namespace OpenSim.Framework.Communications.Cache | |||
252 | else | 252 | else |
253 | { | 253 | { |
254 | AddPendingFolder(newFolder); | 254 | AddPendingFolder(newFolder); |
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | ResolvePendingFolders(newFolder); | 258 | ResolvePendingFolders(newFolder); |
259 | } | 259 | } |
260 | 260 | ||
261 | /// <summary> | 261 | /// <summary> |
262 | /// Callback invoked when an item is received from an async request to the inventory service. | 262 | /// Callback invoked when an item is received from an async request to the inventory service. |
263 | /// | 263 | /// |
264 | /// We're assuming here that items are always received after all the folders | 264 | /// We're assuming here that items are always received after all the folders |
265 | /// received. | 265 | /// received. |
266 | /// </summary> | 266 | /// </summary> |
267 | /// <param name="folderInfo"></param> | 267 | /// <param name="folderInfo"></param> |
268 | private void ItemReceive(InventoryItemBase itemInfo) | 268 | private void ItemReceive(InventoryItemBase itemInfo) |
269 | { | 269 | { |
270 | // m_log.DebugFormat( | 270 | // m_log.DebugFormat( |
271 | // "[INVENTORY CACHE]: Received item {0} {1} for user {2}", | 271 | // "[INVENTORY CACHE]: Received item {0} {1} for user {2}", |
272 | // itemInfo.Name, itemInfo.ID, userID); | 272 | // itemInfo.Name, itemInfo.ID, userID); |
273 | InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); | 273 | InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); |
274 | 274 | ||
275 | if (null == folder) | 275 | if (null == folder) |
276 | { | 276 | { |
277 | m_log.WarnFormat( | 277 | m_log.WarnFormat( |
278 | "Received item {0} {1} but its folder {2} does not exist", | 278 | "Received item {0} {1} but its folder {2} does not exist", |
279 | itemInfo.Name, itemInfo.ID, itemInfo.Folder); | 279 | itemInfo.Name, itemInfo.ID, itemInfo.Folder); |
280 | 280 | ||
281 | return; | 281 | return; |
282 | } | 282 | } |
283 | 283 | ||
284 | lock (folder.Items) | 284 | lock (folder.Items) |
285 | { | 285 | { |
286 | folder.Items[itemInfo.ID] = itemInfo; | 286 | folder.Items[itemInfo.ID] = itemInfo; |
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | /// <summary> | 290 | /// <summary> |
291 | /// Create a folder in this agent's inventory. | 291 | /// Create a folder in this agent's inventory. |
292 | /// | 292 | /// |
293 | /// If the inventory service has not yet delievered the inventory | 293 | /// If the inventory service has not yet delievered the inventory |
294 | /// for this user then the request will be queued. | 294 | /// for this user then the request will be queued. |
295 | /// </summary> | 295 | /// </summary> |
@@ -299,20 +299,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
299 | { | 299 | { |
300 | // m_log.DebugFormat( | 300 | // m_log.DebugFormat( |
301 | // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); | 301 | // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); |
302 | 302 | ||
303 | if (HasInventory) | 303 | if (HasInventory) |
304 | { | 304 | { |
305 | InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID); | 305 | InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID); |
306 | 306 | ||
307 | if (null == parentFolder) | 307 | if (null == parentFolder) |
308 | { | 308 | { |
309 | m_log.WarnFormat( | 309 | m_log.WarnFormat( |
310 | "[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist", | 310 | "[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist", |
311 | folderName, folderID, parentID); | 311 | folderName, folderID, parentID); |
312 | 312 | ||
313 | return false; | 313 | return false; |
314 | } | 314 | } |
315 | 315 | ||
316 | InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType); | 316 | InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType); |
317 | 317 | ||
318 | if (createdFolder != null) | 318 | if (createdFolder != null) |
@@ -324,17 +324,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
324 | createdBaseFolder.ParentID = createdFolder.ParentID; | 324 | createdBaseFolder.ParentID = createdFolder.ParentID; |
325 | createdBaseFolder.Type = createdFolder.Type; | 325 | createdBaseFolder.Type = createdFolder.Type; |
326 | createdBaseFolder.Version = createdFolder.Version; | 326 | createdBaseFolder.Version = createdFolder.Version; |
327 | 327 | ||
328 | m_commsManager.InventoryService.AddFolder(createdBaseFolder); | 328 | m_commsManager.InventoryService.AddFolder(createdBaseFolder); |
329 | 329 | ||
330 | return true; | 330 | return true; |
331 | } | 331 | } |
332 | else | 332 | else |
333 | { | 333 | { |
334 | m_log.WarnFormat( | 334 | m_log.WarnFormat( |
335 | "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists", | 335 | "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists", |
336 | folderName, folderID); | 336 | folderName, folderID); |
337 | 337 | ||
338 | return false; | 338 | return false; |
339 | } | 339 | } |
340 | } | 340 | } |
@@ -344,22 +344,22 @@ namespace OpenSim.Framework.Communications.Cache | |||
344 | new InventoryRequest( | 344 | new InventoryRequest( |
345 | Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"), | 345 | Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"), |
346 | new object[] { folderName, folderID, folderType, parentID })); | 346 | new object[] { folderName, folderID, folderType, parentID })); |
347 | 347 | ||
348 | return true; | 348 | return true; |
349 | } | 349 | } |
350 | } | 350 | } |
351 | 351 | ||
352 | /// <summary> | 352 | /// <summary> |
353 | /// Handle a client request to update the inventory folder | 353 | /// Handle a client request to update the inventory folder |
354 | /// | 354 | /// |
355 | /// If the inventory service has not yet delievered the inventory | 355 | /// If the inventory service has not yet delievered the inventory |
356 | /// for this user then the request will be queued. | 356 | /// for this user then the request will be queued. |
357 | /// | 357 | /// |
358 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE | 358 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE |
359 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, | 359 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, |
360 | /// and needs to be changed. | 360 | /// and needs to be changed. |
361 | /// </summary> | 361 | /// </summary> |
362 | /// | 362 | /// |
363 | /// <param name="folderID"></param> | 363 | /// <param name="folderID"></param> |
364 | /// <param name="type"></param> | 364 | /// <param name="type"></param> |
365 | /// <param name="name"></param> | 365 | /// <param name="name"></param> |
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
367 | public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) | 367 | public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) |
368 | { | 368 | { |
369 | // m_log.DebugFormat( | 369 | // m_log.DebugFormat( |
370 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); | 370 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); |
371 | 371 | ||
372 | if (HasInventory) | 372 | if (HasInventory) |
373 | { | 373 | { |
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
378 | baseFolder.ParentID = parentID; | 378 | baseFolder.ParentID = parentID; |
379 | baseFolder.Type = (short) type; | 379 | baseFolder.Type = (short) type; |
380 | baseFolder.Version = RootFolder.Version; | 380 | baseFolder.Version = RootFolder.Version; |
381 | 381 | ||
382 | m_commsManager.InventoryService.AddFolder(baseFolder); | 382 | m_commsManager.InventoryService.AddFolder(baseFolder); |
383 | } | 383 | } |
384 | else | 384 | else |
@@ -387,18 +387,18 @@ namespace OpenSim.Framework.Communications.Cache | |||
387 | new InventoryRequest( | 387 | new InventoryRequest( |
388 | Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"), | 388 | Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"), |
389 | new object[] { name, folderID, type, parentID })); | 389 | new object[] { name, folderID, type, parentID })); |
390 | } | 390 | } |
391 | 391 | ||
392 | return true; | 392 | return true; |
393 | } | 393 | } |
394 | 394 | ||
395 | /// <summary> | 395 | /// <summary> |
396 | /// Handle an inventory folder move request from the client. | 396 | /// Handle an inventory folder move request from the client. |
397 | /// | 397 | /// |
398 | /// If the inventory service has not yet delievered the inventory | 398 | /// If the inventory service has not yet delievered the inventory |
399 | /// for this user then the request will be queued. | 399 | /// for this user then the request will be queued. |
400 | /// </summary> | 400 | /// </summary> |
401 | /// | 401 | /// |
402 | /// <param name="folderID"></param> | 402 | /// <param name="folderID"></param> |
403 | /// <param name="parentID"></param> | 403 | /// <param name="parentID"></param> |
404 | public bool MoveFolder(LLUUID folderID, LLUUID parentID) | 404 | public bool MoveFolder(LLUUID folderID, LLUUID parentID) |
@@ -413,9 +413,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
413 | baseFolder.Owner = m_userProfile.ID; | 413 | baseFolder.Owner = m_userProfile.ID; |
414 | baseFolder.ID = folderID; | 414 | baseFolder.ID = folderID; |
415 | baseFolder.ParentID = parentID; | 415 | baseFolder.ParentID = parentID; |
416 | 416 | ||
417 | m_commsManager.InventoryService.MoveFolder(baseFolder); | 417 | m_commsManager.InventoryService.MoveFolder(baseFolder); |
418 | 418 | ||
419 | return true; | 419 | return true; |
420 | } | 420 | } |
421 | else | 421 | else |
@@ -424,30 +424,30 @@ namespace OpenSim.Framework.Communications.Cache | |||
424 | new InventoryRequest( | 424 | new InventoryRequest( |
425 | Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"), | 425 | Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"), |
426 | new object[] { folderID, parentID })); | 426 | new object[] { folderID, parentID })); |
427 | 427 | ||
428 | return true; | 428 | return true; |
429 | } | 429 | } |
430 | } | 430 | } |
431 | 431 | ||
432 | /// <summary> | 432 | /// <summary> |
433 | /// This method will delete all the items and folders in the given folder. | 433 | /// This method will delete all the items and folders in the given folder. |
434 | /// | 434 | /// |
435 | /// If the inventory service has not yet delievered the inventory | 435 | /// If the inventory service has not yet delievered the inventory |
436 | /// for this user then the request will be queued. | 436 | /// for this user then the request will be queued. |
437 | /// </summary> | 437 | /// </summary> |
438 | /// | 438 | /// |
439 | /// <param name="folderID"></param> | 439 | /// <param name="folderID"></param> |
440 | public bool PurgeFolder(LLUUID folderID) | 440 | public bool PurgeFolder(LLUUID folderID) |
441 | { | 441 | { |
442 | // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", | 442 | // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", |
443 | // folderID, remoteClient.Name, remoteClient.AgentId); | 443 | // folderID, remoteClient.Name, remoteClient.AgentId); |
444 | 444 | ||
445 | if (HasInventory) | 445 | if (HasInventory) |
446 | { | 446 | { |
447 | InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID); | 447 | InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID); |
448 | 448 | ||
449 | if (purgedFolder != null) | 449 | if (purgedFolder != null) |
450 | { | 450 | { |
451 | // XXX Nasty - have to create a new object to hold details we already have | 451 | // XXX Nasty - have to create a new object to hold details we already have |
452 | InventoryFolderBase purgedBaseFolder = new InventoryFolderBase(); | 452 | InventoryFolderBase purgedBaseFolder = new InventoryFolderBase(); |
453 | purgedBaseFolder.Owner = purgedFolder.Owner; | 453 | purgedBaseFolder.Owner = purgedFolder.Owner; |
@@ -455,12 +455,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
455 | purgedBaseFolder.Name = purgedFolder.Name; | 455 | purgedBaseFolder.Name = purgedFolder.Name; |
456 | purgedBaseFolder.ParentID = purgedFolder.ParentID; | 456 | purgedBaseFolder.ParentID = purgedFolder.ParentID; |
457 | purgedBaseFolder.Type = purgedFolder.Type; | 457 | purgedBaseFolder.Type = purgedFolder.Type; |
458 | purgedBaseFolder.Version = purgedFolder.Version; | 458 | purgedBaseFolder.Version = purgedFolder.Version; |
459 | 459 | ||
460 | m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); | 460 | m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); |
461 | 461 | ||
462 | purgedFolder.Purge(); | 462 | purgedFolder.Purge(); |
463 | 463 | ||
464 | return true; | 464 | return true; |
465 | } | 465 | } |
466 | } | 466 | } |
@@ -470,12 +470,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
470 | new InventoryRequest( | 470 | new InventoryRequest( |
471 | Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"), | 471 | Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"), |
472 | new object[] { folderID })); | 472 | new object[] { folderID })); |
473 | 473 | ||
474 | return true; | 474 | return true; |
475 | } | 475 | } |
476 | 476 | ||
477 | return false; | 477 | return false; |
478 | } | 478 | } |
479 | 479 | ||
480 | /// <summary> | 480 | /// <summary> |
481 | /// Add an item to the user's inventory | 481 | /// Add an item to the user's inventory |
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
494 | new InventoryRequest( | 494 | new InventoryRequest( |
495 | Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"), | 495 | Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"), |
496 | new object[] { item })); | 496 | new object[] { item })); |
497 | } | 497 | } |
498 | } | 498 | } |
499 | 499 | ||
500 | /// <summary> | 500 | /// <summary> |
@@ -514,18 +514,18 @@ namespace OpenSim.Framework.Communications.Cache | |||
514 | new InventoryRequest( | 514 | new InventoryRequest( |
515 | Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"), | 515 | Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"), |
516 | new object[] { item })); | 516 | new object[] { item })); |
517 | } | 517 | } |
518 | } | 518 | } |
519 | 519 | ||
520 | /// <summary> | 520 | /// <summary> |
521 | /// Delete an item from the user's inventory | 521 | /// Delete an item from the user's inventory |
522 | /// | 522 | /// |
523 | /// If the inventory service has not yet delievered the inventory | 523 | /// If the inventory service has not yet delievered the inventory |
524 | /// for this user then the request will be queued. | 524 | /// for this user then the request will be queued. |
525 | /// </summary> | 525 | /// </summary> |
526 | /// <param name="itemID"></param> | 526 | /// <param name="itemID"></param> |
527 | /// <returns> | 527 | /// <returns> |
528 | /// true on a successful delete or a if the request is queued. | 528 | /// true on a successful delete or a if the request is queued. |
529 | /// Returns false on an immediate failure | 529 | /// Returns false on an immediate failure |
530 | /// </returns> | 530 | /// </returns> |
531 | public bool DeleteItem(LLUUID itemID) | 531 | public bool DeleteItem(LLUUID itemID) |
@@ -535,14 +535,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
535 | // XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though | 535 | // XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though |
536 | // really only the item id is required. | 536 | // really only the item id is required. |
537 | InventoryItemBase item = RootFolder.FindItem(itemID); | 537 | InventoryItemBase item = RootFolder.FindItem(itemID); |
538 | 538 | ||
539 | if (null == item) | 539 | if (null == item) |
540 | { | 540 | { |
541 | m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID); | 541 | m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID); |
542 | 542 | ||
543 | return false; | 543 | return false; |
544 | } | 544 | } |
545 | 545 | ||
546 | if (RootFolder.DeleteItem(item.ID)) | 546 | if (RootFolder.DeleteItem(item.ID)) |
547 | { | 547 | { |
548 | return m_commsManager.InventoryService.DeleteItem(item); | 548 | return m_commsManager.InventoryService.DeleteItem(item); |
@@ -554,13 +554,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
554 | new InventoryRequest( | 554 | new InventoryRequest( |
555 | Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"), | 555 | Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"), |
556 | new object[] { itemID })); | 556 | new object[] { itemID })); |
557 | 557 | ||
558 | return true; | 558 | return true; |
559 | } | 559 | } |
560 | 560 | ||
561 | return false; | 561 | return false; |
562 | } | 562 | } |
563 | 563 | ||
564 | /// <summary> | 564 | /// <summary> |
565 | /// Send details of the inventory items and/or folders in a given folder to the client. | 565 | /// Send details of the inventory items and/or folders in a given folder to the client. |
566 | /// </summary> | 566 | /// </summary> |
@@ -574,13 +574,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
574 | if (HasInventory) | 574 | if (HasInventory) |
575 | { | 575 | { |
576 | InventoryFolderImpl folder; | 576 | InventoryFolderImpl folder; |
577 | 577 | ||
578 | if ((folder = RootFolder.FindFolder(folderID)) != null) | 578 | if ((folder = RootFolder.FindFolder(folderID)) != null) |
579 | { | 579 | { |
580 | // m_log.DebugFormat( | 580 | // m_log.DebugFormat( |
581 | // "[AGENT INVENTORY]: Found folder {0} for client {1}", | 581 | // "[AGENT INVENTORY]: Found folder {0} for client {1}", |
582 | // folderID, remoteClient.AgentId); | 582 | // folderID, remoteClient.AgentId); |
583 | 583 | ||
584 | client.SendInventoryFolderDetails( | 584 | client.SendInventoryFolderDetails( |
585 | client.AgentId, folderID, folder.RequestListOfItems(), | 585 | client.AgentId, folderID, folder.RequestListOfItems(), |
586 | folder.RequestListOfFolders(), fetchFolders, fetchItems); | 586 | folder.RequestListOfFolders(), fetchFolders, fetchItems); |
@@ -592,7 +592,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
592 | m_log.WarnFormat( | 592 | m_log.WarnFormat( |
593 | "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}", | 593 | "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}", |
594 | folderID, client.Name, client.AgentId); | 594 | folderID, client.Name, client.AgentId); |
595 | 595 | ||
596 | return false; | 596 | return false; |
597 | } | 597 | } |
598 | } | 598 | } |
@@ -604,13 +604,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
604 | new object[] { client, folderID, fetchFolders, fetchItems })); | 604 | new object[] { client, folderID, fetchFolders, fetchItems })); |
605 | 605 | ||
606 | return true; | 606 | return true; |
607 | } | 607 | } |
608 | } | 608 | } |
609 | } | 609 | } |
610 | 610 | ||
611 | /// <summary> | 611 | /// <summary> |
612 | /// Should be implemented by callers which require a callback when the user's inventory is received | 612 | /// Should be implemented by callers which require a callback when the user's inventory is received |
613 | /// </summary> | 613 | /// </summary> |
614 | public interface IInventoryRequest | 614 | public interface IInventoryRequest |
615 | { | 615 | { |
616 | /// <summary> | 616 | /// <summary> |
@@ -618,7 +618,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
618 | /// </summary> | 618 | /// </summary> |
619 | void Execute(); | 619 | void Execute(); |
620 | } | 620 | } |
621 | 621 | ||
622 | /// <summary> | 622 | /// <summary> |
623 | /// Generic inventory request | 623 | /// Generic inventory request |
624 | /// </summary> | 624 | /// </summary> |
@@ -626,16 +626,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
626 | { | 626 | { |
627 | private Delegate m_delegate; | 627 | private Delegate m_delegate; |
628 | private Object[] m_args; | 628 | private Object[] m_args; |
629 | 629 | ||
630 | internal InventoryRequest(Delegate delegat, Object[] args) | 630 | internal InventoryRequest(Delegate delegat, Object[] args) |
631 | { | 631 | { |
632 | m_delegate = delegat; | 632 | m_delegate = delegat; |
633 | m_args = args; | 633 | m_args = args; |
634 | } | 634 | } |
635 | 635 | ||
636 | public void Execute() | 636 | public void Execute() |
637 | { | 637 | { |
638 | m_delegate.DynamicInvoke(m_args); | 638 | m_delegate.DynamicInvoke(m_args); |
639 | } | 639 | } |
640 | } | 640 | } |
641 | } | 641 | } |
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index d5b7fea..4b4ef17 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |||
@@ -95,9 +95,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
95 | // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); | 95 | // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); |
96 | // xs.Serialize(s, asset); | 96 | // xs.Serialize(s, asset); |
97 | // RestClient rc = new RestClient(_assetServerUrl); | 97 | // RestClient rc = new RestClient(_assetServerUrl); |
98 | 98 | ||
99 | string assetUrl = _assetServerUrl + "/assets/"; | 99 | string assetUrl = _assetServerUrl + "/assets/"; |
100 | 100 | ||
101 | //rc.AddResourcePath("assets"); | 101 | //rc.AddResourcePath("assets"); |
102 | 102 | ||
103 | // rc.RequestMethod = "POST"; | 103 | // rc.RequestMethod = "POST"; |
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
105 | //m_log.InfoFormat("[ASSET]: Stored {0}", rc); | 105 | //m_log.InfoFormat("[ASSET]: Stored {0}", rc); |
106 | 106 | ||
107 | m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID); | 107 | m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID); |
108 | 108 | ||
109 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); | 109 | RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); |
110 | } | 110 | } |
111 | catch (Exception e) | 111 | catch (Exception e) |
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index c8cec69..0fbc427 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | public class InventoryFolderImpl : InventoryFolderBase | 36 | public class InventoryFolderImpl : InventoryFolderBase |
37 | { | 37 | { |
38 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
39 | 39 | ||
40 | // Fields | 40 | // Fields |
41 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); | 41 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); |
42 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); | 42 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); |
@@ -82,14 +82,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
82 | subFold.ParentID = this.ID; | 82 | subFold.ParentID = this.ID; |
83 | subFold.Owner = Owner; | 83 | subFold.Owner = Owner; |
84 | SubFolders.Add(subFold.ID, subFold); | 84 | SubFolders.Add(subFold.ID, subFold); |
85 | 85 | ||
86 | return subFold; | 86 | return subFold; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | return null; | 90 | return null; |
91 | } | 91 | } |
92 | 92 | ||
93 | /// <summary> | 93 | /// <summary> |
94 | /// Delete all the folders and items in this folder. | 94 | /// Delete all the folders and items in this folder. |
95 | /// </summary> | 95 | /// </summary> |
@@ -97,9 +97,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
97 | { | 97 | { |
98 | foreach (InventoryFolderImpl folder in SubFolders.Values) | 98 | foreach (InventoryFolderImpl folder in SubFolders.Values) |
99 | { | 99 | { |
100 | folder.Purge(); | 100 | folder.Purge(); |
101 | } | 101 | } |
102 | 102 | ||
103 | SubFolders.Clear(); | 103 | SubFolders.Clear(); |
104 | Items.Clear(); | 104 | Items.Clear(); |
105 | } | 105 | } |
@@ -118,20 +118,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
118 | return Items[itemID]; | 118 | return Items[itemID]; |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | lock (SubFolders) | 122 | lock (SubFolders) |
123 | { | 123 | { |
124 | foreach (InventoryFolderImpl folder in SubFolders.Values) | 124 | foreach (InventoryFolderImpl folder in SubFolders.Values) |
125 | { | 125 | { |
126 | InventoryItemBase item = folder.FindItem(itemID); | 126 | InventoryItemBase item = folder.FindItem(itemID); |
127 | 127 | ||
128 | if (item != null) | 128 | if (item != null) |
129 | { | 129 | { |
130 | return item; | 130 | return item; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | return null; | 135 | return null; |
136 | } | 136 | } |
137 | 137 | ||
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
143 | public bool DeleteItem(LLUUID itemID) | 143 | public bool DeleteItem(LLUUID itemID) |
144 | { | 144 | { |
145 | bool found = false; | 145 | bool found = false; |
146 | 146 | ||
147 | lock (Items) | 147 | lock (Items) |
148 | { | 148 | { |
149 | if (Items.ContainsKey(itemID)) | 149 | if (Items.ContainsKey(itemID)) |
@@ -152,20 +152,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
152 | return true; | 152 | return true; |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | lock (SubFolders) | 156 | lock (SubFolders) |
157 | { | 157 | { |
158 | foreach (InventoryFolderImpl folder in SubFolders.Values) | 158 | foreach (InventoryFolderImpl folder in SubFolders.Values) |
159 | { | 159 | { |
160 | found = folder.DeleteItem(itemID); | 160 | found = folder.DeleteItem(itemID); |
161 | 161 | ||
162 | if (found == true) | 162 | if (found == true) |
163 | { | 163 | { |
164 | break; | 164 | break; |
165 | } | 165 | } |
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | return found; | 169 | return found; |
170 | } | 170 | } |
171 | 171 | ||
@@ -175,25 +175,25 @@ namespace OpenSim.Framework.Communications.Cache | |||
175 | /// </summary> | 175 | /// </summary> |
176 | /// <returns>The requested folder if it exists, null if it does not.</returns> | 176 | /// <returns>The requested folder if it exists, null if it does not.</returns> |
177 | public InventoryFolderImpl FindFolder(LLUUID folderID) | 177 | public InventoryFolderImpl FindFolder(LLUUID folderID) |
178 | { | 178 | { |
179 | if (folderID == ID) | 179 | if (folderID == ID) |
180 | { | 180 | { |
181 | return this; | 181 | return this; |
182 | } | 182 | } |
183 | 183 | ||
184 | lock (SubFolders) | 184 | lock (SubFolders) |
185 | { | 185 | { |
186 | foreach (InventoryFolderImpl folder in SubFolders.Values) | 186 | foreach (InventoryFolderImpl folder in SubFolders.Values) |
187 | { | 187 | { |
188 | InventoryFolderImpl returnFolder = folder.FindFolder(folderID); | 188 | InventoryFolderImpl returnFolder = folder.FindFolder(folderID); |
189 | 189 | ||
190 | if (returnFolder != null) | 190 | if (returnFolder != null) |
191 | { | 191 | { |
192 | return returnFolder; | 192 | return returnFolder; |
193 | } | 193 | } |
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | return null; | 197 | return null; |
198 | } | 198 | } |
199 | 199 | ||
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
203 | public List<InventoryItemBase> RequestListOfItems() | 203 | public List<InventoryItemBase> RequestListOfItems() |
204 | { | 204 | { |
205 | List<InventoryItemBase> itemList = new List<InventoryItemBase>(); | 205 | List<InventoryItemBase> itemList = new List<InventoryItemBase>(); |
206 | 206 | ||
207 | lock (Items) | 207 | lock (Items) |
208 | { | 208 | { |
209 | foreach (InventoryItemBase item in Items.Values) | 209 | foreach (InventoryItemBase item in Items.Values) |
@@ -211,9 +211,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
211 | itemList.Add(item); | 211 | itemList.Add(item); |
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | //m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count); | 215 | //m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count); |
216 | 216 | ||
217 | return itemList; | 217 | return itemList; |
218 | } | 218 | } |
219 | 219 | ||
@@ -221,9 +221,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
221 | /// Return the list of immediate child folders in this folder. | 221 | /// Return the list of immediate child folders in this folder. |
222 | /// </summary> | 222 | /// </summary> |
223 | public List<InventoryFolderBase> RequestListOfFolders() | 223 | public List<InventoryFolderBase> RequestListOfFolders() |
224 | { | 224 | { |
225 | List<InventoryFolderBase> folderList = new List<InventoryFolderBase>(); | 225 | List<InventoryFolderBase> folderList = new List<InventoryFolderBase>(); |
226 | 226 | ||
227 | lock (SubFolders) | 227 | lock (SubFolders) |
228 | { | 228 | { |
229 | foreach (InventoryFolderBase folder in SubFolders.Values) | 229 | foreach (InventoryFolderBase folder in SubFolders.Values) |
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
231 | folderList.Add(folder); | 231 | folderList.Add(folder); |
232 | } | 232 | } |
233 | } | 233 | } |
234 | 234 | ||
235 | return folderList; | 235 | return folderList; |
236 | } | 236 | } |
237 | } | 237 | } |
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index b3852c0..ca7eb13 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -45,34 +45,34 @@ namespace OpenSim.Framework.Communications.Cache | |||
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); | 47 | private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); |
48 | 48 | ||
49 | /// <summary> | 49 | /// <summary> |
50 | /// Holds the root library folder and all its descendents. This is really only used during inventory | 50 | /// Holds the root library folder and all its descendents. This is really only used during inventory |
51 | /// setup so that we don't have to repeatedly search the tree of library folders. | 51 | /// setup so that we don't have to repeatedly search the tree of library folders. |
52 | /// </summary> | 52 | /// </summary> |
53 | protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders | 53 | protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders |
54 | = new Dictionary<LLUUID, InventoryFolderImpl>(); | 54 | = new Dictionary<LLUUID, InventoryFolderImpl>(); |
55 | 55 | ||
56 | public LibraryRootFolder() | 56 | public LibraryRootFolder() |
57 | { | 57 | { |
58 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); | 58 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); |
59 | 59 | ||
60 | Owner = libOwner; | 60 | Owner = libOwner; |
61 | ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); | 61 | ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); |
62 | Name = "OpenSim Library"; | 62 | Name = "OpenSim Library"; |
63 | ParentID = LLUUID.Zero; | 63 | ParentID = LLUUID.Zero; |
64 | Type = (short) 8; | 64 | Type = (short) 8; |
65 | Version = (ushort) 1; | 65 | Version = (ushort) 1; |
66 | 66 | ||
67 | libraryFolders.Add(ID, this); | 67 | libraryFolders.Add(ID, this); |
68 | 68 | ||
69 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); | 69 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); |
70 | 70 | ||
71 | // CreateLibraryItems(); | 71 | // CreateLibraryItems(); |
72 | } | 72 | } |
73 | 73 | ||
74 | /// <summary> | 74 | /// <summary> |
75 | /// Hardcoded item creation. Please don't add any more items here - future items should be created | 75 | /// Hardcoded item creation. Please don't add any more items here - future items should be created |
76 | /// in the xml in the bin/inventory folder. | 76 | /// in the xml in the bin/inventory folder. |
77 | /// </summary> | 77 | /// </summary> |
78 | /// | 78 | /// |
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
132 | item.NextPermissions = 0x7FFFFFFF; | 132 | item.NextPermissions = 0x7FFFFFFF; |
133 | return item; | 133 | return item; |
134 | } | 134 | } |
135 | 135 | ||
136 | /// <summary> | 136 | /// <summary> |
137 | /// Use the asset set information at path to load assets | 137 | /// Use the asset set information at path to load assets |
138 | /// </summary> | 138 | /// </summary> |
@@ -142,49 +142,49 @@ namespace OpenSim.Framework.Communications.Cache | |||
142 | { | 142 | { |
143 | m_log.InfoFormat( | 143 | m_log.InfoFormat( |
144 | "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath); | 144 | "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath); |
145 | 145 | ||
146 | LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); | 146 | LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); |
147 | } | 147 | } |
148 | 148 | ||
149 | /// <summary> | 149 | /// <summary> |
150 | /// Read a library set from config | 150 | /// Read a library set from config |
151 | /// </summary> | 151 | /// </summary> |
152 | /// <param name="config"></param> | 152 | /// <param name="config"></param> |
153 | protected void ReadLibraryFromConfig(IConfig config) | 153 | protected void ReadLibraryFromConfig(IConfig config) |
154 | { | 154 | { |
155 | string foldersPath | 155 | string foldersPath |
156 | = Path.Combine( | 156 | = Path.Combine( |
157 | Util.inventoryDir(), config.GetString("foldersFile", String.Empty)); | 157 | Util.inventoryDir(), config.GetString("foldersFile", String.Empty)); |
158 | 158 | ||
159 | LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig); | 159 | LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig); |
160 | 160 | ||
161 | string itemsPath | 161 | string itemsPath |
162 | = Path.Combine( | 162 | = Path.Combine( |
163 | Util.inventoryDir(), config.GetString("itemsFile", String.Empty)); | 163 | Util.inventoryDir(), config.GetString("itemsFile", String.Empty)); |
164 | 164 | ||
165 | LoadFromFile(itemsPath, "Library items", ReadItemFromConfig); | 165 | LoadFromFile(itemsPath, "Library items", ReadItemFromConfig); |
166 | } | 166 | } |
167 | 167 | ||
168 | /// <summary> | 168 | /// <summary> |
169 | /// Read a library inventory folder from a loaded configuration | 169 | /// Read a library inventory folder from a loaded configuration |
170 | /// </summary> | 170 | /// </summary> |
171 | /// <param name="source"></param> | 171 | /// <param name="source"></param> |
172 | private void ReadFolderFromConfig(IConfig config) | 172 | private void ReadFolderFromConfig(IConfig config) |
173 | { | 173 | { |
174 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); | 174 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); |
175 | 175 | ||
176 | folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); | 176 | folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); |
177 | folderInfo.Name = config.GetString("name", "unknown"); | 177 | folderInfo.Name = config.GetString("name", "unknown"); |
178 | folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); | 178 | folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); |
179 | folderInfo.Type = (short)config.GetInt("type", 8); | 179 | folderInfo.Type = (short)config.GetInt("type", 8); |
180 | 180 | ||
181 | folderInfo.Owner = libOwner; | 181 | folderInfo.Owner = libOwner; |
182 | folderInfo.Version = 1; | 182 | folderInfo.Version = 1; |
183 | 183 | ||
184 | if (libraryFolders.ContainsKey(folderInfo.ParentID)) | 184 | if (libraryFolders.ContainsKey(folderInfo.ParentID)) |
185 | { | 185 | { |
186 | InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID]; | 186 | InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID]; |
187 | 187 | ||
188 | libraryFolders.Add(folderInfo.ID, folderInfo); | 188 | libraryFolders.Add(folderInfo.ID, folderInfo); |
189 | parentFolder.SubFolders.Add(folderInfo.ID, folderInfo); | 189 | parentFolder.SubFolders.Add(folderInfo.ID, folderInfo); |
190 | 190 | ||
@@ -201,7 +201,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
201 | /// <summary> | 201 | /// <summary> |
202 | /// Read a library inventory item metadata from a loaded configuration | 202 | /// Read a library inventory item metadata from a loaded configuration |
203 | /// </summary> | 203 | /// </summary> |
204 | /// <param name="source"></param> | 204 | /// <param name="source"></param> |
205 | private void ReadItemFromConfig(IConfig config) | 205 | private void ReadItemFromConfig(IConfig config) |
206 | { | 206 | { |
207 | InventoryItemBase item = new InventoryItemBase(); | 207 | InventoryItemBase item = new InventoryItemBase(); |
@@ -218,11 +218,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
218 | item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); | 218 | item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); |
219 | item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); | 219 | item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); |
220 | item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); | 220 | item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); |
221 | 221 | ||
222 | if (libraryFolders.ContainsKey(item.Folder)) | 222 | if (libraryFolders.ContainsKey(item.Folder)) |
223 | { | 223 | { |
224 | InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; | 224 | InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; |
225 | 225 | ||
226 | parentFolder.Items.Add(item.ID, item); | 226 | parentFolder.Items.Add(item.ID, item); |
227 | } | 227 | } |
228 | else | 228 | else |
@@ -230,11 +230,11 @@ namespace OpenSim.Framework.Communications.Cache | |||
230 | m_log.WarnFormat( | 230 | m_log.WarnFormat( |
231 | "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", | 231 | "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", |
232 | item.Name, item.ID, item.Folder); | 232 | item.Name, item.ID, item.Folder); |
233 | } | 233 | } |
234 | } | 234 | } |
235 | 235 | ||
236 | private delegate void ConfigAction(IConfig config); | 236 | private delegate void ConfigAction(IConfig config); |
237 | 237 | ||
238 | /// <summary> | 238 | /// <summary> |
239 | /// Load the given configuration at a path and perform an action on each Config contained within it | 239 | /// Load the given configuration at a path and perform an action on each Config contained within it |
240 | /// </summary> | 240 | /// </summary> |
@@ -242,7 +242,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
242 | /// <param name="fileDescription"></param> | 242 | /// <param name="fileDescription"></param> |
243 | /// <param name="action"></param> | 243 | /// <param name="action"></param> |
244 | private static void LoadFromFile(string path, string fileDescription, ConfigAction action) | 244 | private static void LoadFromFile(string path, string fileDescription, ConfigAction action) |
245 | { | 245 | { |
246 | if (File.Exists(path)) | 246 | if (File.Exists(path)) |
247 | { | 247 | { |
248 | try | 248 | try |
@@ -250,21 +250,21 @@ namespace OpenSim.Framework.Communications.Cache | |||
250 | XmlConfigSource source = new XmlConfigSource(path); | 250 | XmlConfigSource source = new XmlConfigSource(path); |
251 | 251 | ||
252 | for (int i = 0; i < source.Configs.Count; i++) | 252 | for (int i = 0; i < source.Configs.Count; i++) |
253 | { | 253 | { |
254 | action(source.Configs[i]); | 254 | action(source.Configs[i]); |
255 | } | 255 | } |
256 | } | 256 | } |
257 | catch (XmlException e) | 257 | catch (XmlException e) |
258 | { | 258 | { |
259 | m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e); | 259 | m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e); |
260 | } | 260 | } |
261 | } | 261 | } |
262 | else | 262 | else |
263 | { | 263 | { |
264 | m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path); | 264 | m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path); |
265 | } | 265 | } |
266 | } | 266 | } |
267 | 267 | ||
268 | /// <summary> | 268 | /// <summary> |
269 | /// Looks like a simple getter, but is written like this for some consistency with the other Request | 269 | /// Looks like a simple getter, but is written like this for some consistency with the other Request |
270 | /// methods in the superclass | 270 | /// methods in the superclass |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 7f911dc..fe61406 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -33,7 +33,7 @@ using libsecondlife; | |||
33 | using log4net; | 33 | using log4net; |
34 | 34 | ||
35 | namespace OpenSim.Framework.Communications.Cache | 35 | namespace OpenSim.Framework.Communications.Cache |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Holds user profile information and retrieves it from backend services. | 38 | /// Holds user profile information and retrieves it from backend services. |
39 | /// </summary> | 39 | /// </summary> |
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
45 | /// The comms manager holds references to services (user, grid, inventory, etc.) | 45 | /// The comms manager holds references to services (user, grid, inventory, etc.) |
46 | /// </summary> | 46 | /// </summary> |
47 | private readonly CommunicationsManager m_commsManager; | 47 | private readonly CommunicationsManager m_commsManager; |
48 | 48 | ||
49 | /// <summary> | 49 | /// <summary> |
50 | /// Each user has a cached profile. | 50 | /// Each user has a cached profile. |
51 | /// </summary> | 51 | /// </summary> |
@@ -84,8 +84,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
84 | } | 84 | } |
85 | } | 85 | } |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | /// <summary> | 89 | /// <summary> |
90 | /// Remove this user's profile cache. | 90 | /// Remove this user's profile cache. |
91 | /// </summary> | 91 | /// </summary> |
@@ -103,9 +103,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
103 | else | 103 | else |
104 | { | 104 | { |
105 | m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID); | 105 | m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | return false; | 109 | return false; |
110 | } | 110 | } |
111 | 111 | ||
@@ -118,14 +118,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
118 | { | 118 | { |
119 | CachedUserInfo userInfo = GetUserDetails(userID); | 119 | CachedUserInfo userInfo = GetUserDetails(userID); |
120 | if (userInfo != null) | 120 | if (userInfo != null) |
121 | { | 121 | { |
122 | m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); | 122 | m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); |
123 | } | 123 | } |
124 | else | 124 | else |
125 | { | 125 | { |
126 | m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID); | 126 | m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID); |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | /// <summary> | 130 | /// <summary> |
131 | /// Get the details of the given user. A caller should try this method first if it isn't sure that | 131 | /// Get the details of the given user. A caller should try this method first if it isn't sure that |
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
151 | /// <param name="parentID"></param> | 151 | /// <param name="parentID"></param> |
152 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, | 152 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, |
153 | string folderName, LLUUID parentID) | 153 | string folderName, LLUUID parentID) |
154 | { | 154 | { |
155 | CachedUserInfo userProfile; | 155 | CachedUserInfo userProfile; |
156 | 156 | ||
157 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | 157 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) |
@@ -159,21 +159,21 @@ namespace OpenSim.Framework.Communications.Cache | |||
159 | if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID)) | 159 | if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID)) |
160 | { | 160 | { |
161 | m_log.ErrorFormat( | 161 | m_log.ErrorFormat( |
162 | "[AGENT INVENTORY]: Failed to create folder for user {0} {1}", | 162 | "[AGENT INVENTORY]: Failed to create folder for user {0} {1}", |
163 | remoteClient.Name, remoteClient.AgentId); | 163 | remoteClient.Name, remoteClient.AgentId); |
164 | } | 164 | } |
165 | } | 165 | } |
166 | else | 166 | else |
167 | { | 167 | { |
168 | m_log.ErrorFormat( | 168 | m_log.ErrorFormat( |
169 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 169 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
170 | remoteClient.Name, remoteClient.AgentId); | 170 | remoteClient.Name, remoteClient.AgentId); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | /// <summary> | 174 | /// <summary> |
175 | /// Handle a client request to update the inventory folder | 175 | /// Handle a client request to update the inventory folder |
176 | /// | 176 | /// |
177 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE | 177 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE |
178 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, | 178 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, |
179 | /// and needs to be changed. | 179 | /// and needs to be changed. |
@@ -188,7 +188,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
188 | { | 188 | { |
189 | // m_log.DebugFormat( | 189 | // m_log.DebugFormat( |
190 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); | 190 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); |
191 | 191 | ||
192 | CachedUserInfo userProfile; | 192 | CachedUserInfo userProfile; |
193 | 193 | ||
194 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | 194 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) |
@@ -196,16 +196,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
196 | if (!userProfile.UpdateFolder(name, folderID, type, parentID)) | 196 | if (!userProfile.UpdateFolder(name, folderID, type, parentID)) |
197 | { | 197 | { |
198 | m_log.ErrorFormat( | 198 | m_log.ErrorFormat( |
199 | "[AGENT INVENTORY]: Failed to update folder for user {0} {1}", | 199 | "[AGENT INVENTORY]: Failed to update folder for user {0} {1}", |
200 | remoteClient.Name, remoteClient.AgentId); | 200 | remoteClient.Name, remoteClient.AgentId); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | else | 203 | else |
204 | { | 204 | { |
205 | m_log.ErrorFormat( | 205 | m_log.ErrorFormat( |
206 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 206 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
207 | remoteClient.Name, remoteClient.AgentId); | 207 | remoteClient.Name, remoteClient.AgentId); |
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | /// <summary> | 211 | /// <summary> |
@@ -223,16 +223,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
223 | if (!userProfile.MoveFolder(folderID, parentID)) | 223 | if (!userProfile.MoveFolder(folderID, parentID)) |
224 | { | 224 | { |
225 | m_log.ErrorFormat( | 225 | m_log.ErrorFormat( |
226 | "[AGENT INVENTORY]: Failed to move folder for user {0} {1}", | 226 | "[AGENT INVENTORY]: Failed to move folder for user {0} {1}", |
227 | remoteClient.Name, remoteClient.AgentId); | 227 | remoteClient.Name, remoteClient.AgentId); |
228 | } | 228 | } |
229 | } | 229 | } |
230 | else | 230 | else |
231 | { | 231 | { |
232 | m_log.ErrorFormat( | 232 | m_log.ErrorFormat( |
233 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 233 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
234 | remoteClient.Name, remoteClient.AgentId); | 234 | remoteClient.Name, remoteClient.AgentId); |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ||
238 | /// <summary> | 238 | /// <summary> |
@@ -267,14 +267,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
267 | else | 267 | else |
268 | { | 268 | { |
269 | m_log.ErrorFormat( | 269 | m_log.ErrorFormat( |
270 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 270 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
271 | remoteClient.Name, remoteClient.AgentId); | 271 | remoteClient.Name, remoteClient.AgentId); |
272 | } | 272 | } |
273 | } | 273 | } |
274 | 274 | ||
275 | /// <summary> | 275 | /// <summary> |
276 | /// Handle the caps inventory descendents fetch. | 276 | /// Handle the caps inventory descendents fetch. |
277 | /// | 277 | /// |
278 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. | 278 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. |
279 | /// </summary> | 279 | /// </summary> |
280 | /// <param name="agentID"></param> | 280 | /// <param name="agentID"></param> |
@@ -288,20 +288,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
288 | bool fetchFolders, bool fetchItems, int sortOrder) | 288 | bool fetchFolders, bool fetchItems, int sortOrder) |
289 | { | 289 | { |
290 | // m_log.DebugFormat( | 290 | // m_log.DebugFormat( |
291 | // "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", | 291 | // "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", |
292 | // fetchFolders, fetchItems, folderID, agentID); | 292 | // fetchFolders, fetchItems, folderID, agentID); |
293 | 293 | ||
294 | // FIXME MAYBE: We're not handling sortOrder! | 294 | // FIXME MAYBE: We're not handling sortOrder! |
295 | 295 | ||
296 | InventoryFolderImpl fold; | 296 | InventoryFolderImpl fold; |
297 | if ((fold = libraryRoot.FindFolder(folderID)) != null) | 297 | if ((fold = libraryRoot.FindFolder(folderID)) != null) |
298 | { | 298 | { |
299 | return fold.RequestListOfItems(); | 299 | return fold.RequestListOfItems(); |
300 | } | 300 | } |
301 | 301 | ||
302 | CachedUserInfo userProfile; | 302 | CachedUserInfo userProfile; |
303 | if (m_userProfiles.TryGetValue(agentID, out userProfile)) | 303 | if (m_userProfiles.TryGetValue(agentID, out userProfile)) |
304 | { | 304 | { |
305 | // XXX: When a client crosses into a scene, their entire inventory is fetched | 305 | // XXX: When a client crosses into a scene, their entire inventory is fetched |
306 | // asynchronously. If the client makes a request before the inventory is received, we need | 306 | // asynchronously. If the client makes a request before the inventory is received, we need |
307 | // to give the inventory a chance to come in. | 307 | // to give the inventory a chance to come in. |
@@ -315,18 +315,18 @@ namespace OpenSim.Framework.Communications.Cache | |||
315 | while (attempts++ < 30) | 315 | while (attempts++ < 30) |
316 | { | 316 | { |
317 | m_log.DebugFormat( | 317 | m_log.DebugFormat( |
318 | "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}", | 318 | "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}", |
319 | attempts, folderID, agentID); | 319 | attempts, folderID, agentID); |
320 | 320 | ||
321 | Thread.Sleep(2000); | 321 | Thread.Sleep(2000); |
322 | 322 | ||
323 | if (userProfile.HasInventory) | 323 | if (userProfile.HasInventory) |
324 | { | 324 | { |
325 | break; | 325 | break; |
326 | } | 326 | } |
327 | } | 327 | } |
328 | } | 328 | } |
329 | 329 | ||
330 | if (userProfile.HasInventory) | 330 | if (userProfile.HasInventory) |
331 | { | 331 | { |
332 | if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) | 332 | if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) |
@@ -338,9 +338,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
338 | m_log.WarnFormat( | 338 | m_log.WarnFormat( |
339 | "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}", | 339 | "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}", |
340 | folderID, agentID); | 340 | folderID, agentID); |
341 | 341 | ||
342 | return null; | 342 | return null; |
343 | } | 343 | } |
344 | } | 344 | } |
345 | else | 345 | else |
346 | { | 346 | { |
@@ -352,7 +352,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
352 | else | 352 | else |
353 | { | 353 | { |
354 | m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID); | 354 | m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID); |
355 | 355 | ||
356 | return null; | 356 | return null; |
357 | } | 357 | } |
358 | } | 358 | } |
@@ -371,16 +371,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
371 | if (!userProfile.PurgeFolder(folderID)) | 371 | if (!userProfile.PurgeFolder(folderID)) |
372 | { | 372 | { |
373 | m_log.ErrorFormat( | 373 | m_log.ErrorFormat( |
374 | "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}", | 374 | "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}", |
375 | remoteClient.Name, remoteClient.AgentId); | 375 | remoteClient.Name, remoteClient.AgentId); |
376 | } | 376 | } |
377 | } | 377 | } |
378 | else | 378 | else |
379 | { | 379 | { |
380 | m_log.ErrorFormat( | 380 | m_log.ErrorFormat( |
381 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 381 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
382 | remoteClient.Name, remoteClient.AgentId); | 382 | remoteClient.Name, remoteClient.AgentId); |
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) | 386 | public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) |
@@ -407,9 +407,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
407 | else | 407 | else |
408 | { | 408 | { |
409 | m_log.ErrorFormat( | 409 | m_log.ErrorFormat( |
410 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | 410 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", |
411 | remoteClient.Name, remoteClient.AgentId); | 411 | remoteClient.Name, remoteClient.AgentId); |
412 | } | 412 | } |
413 | } | 413 | } |
414 | } | 414 | } |
415 | } | 415 | } |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 705f369..dac2f34 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -64,16 +64,16 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
64 | 64 | ||
65 | public class Caps | 65 | public class Caps |
66 | { | 66 | { |
67 | private static readonly ILog m_log = | 67 | private static readonly ILog m_log = |
68 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 68 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
69 | 69 | ||
70 | private string m_httpListenerHostName; | 70 | private string m_httpListenerHostName; |
71 | private uint m_httpListenPort; | 71 | private uint m_httpListenPort; |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester. | 74 | /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester. |
75 | /// </summary> | 75 | /// </summary> |
76 | private string m_capsObjectPath; | 76 | private string m_capsObjectPath; |
77 | public string CapsObjectPath { get { return m_capsObjectPath; } } | 77 | public string CapsObjectPath { get { return m_capsObjectPath; } } |
78 | 78 | ||
79 | private CapsHandlers m_capsHandlers; | 79 | private CapsHandlers m_capsHandlers; |
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
88 | 88 | ||
89 | // The following two entries are in a module, however, there also here so that we don't re-assign | 89 | // The following two entries are in a module, however, there also here so that we don't re-assign |
90 | // the path to another cap by mistake. | 90 | // the path to another cap by mistake. |
91 | private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module. | 91 | private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module. |
92 | private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. | 92 | private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. |
93 | 93 | ||
94 | //private string eventQueue = "0100/"; | 94 | //private string eventQueue = "0100/"; |
@@ -100,7 +100,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
100 | private bool m_dumpAssetsToFile; | 100 | private bool m_dumpAssetsToFile; |
101 | private string m_regionName; | 101 | private string m_regionName; |
102 | 102 | ||
103 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 103 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
104 | // receive capability calls | 104 | // receive capability calls |
105 | public NewInventoryItem AddNewInventoryItem = null; | 105 | public NewInventoryItem AddNewInventoryItem = null; |
106 | public ItemUpdatedCallback ItemUpdatedCall = null; | 106 | public ItemUpdatedCallback ItemUpdatedCall = null; |
@@ -128,46 +128,46 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
128 | public void RegisterHandlers() | 128 | public void RegisterHandlers() |
129 | { | 129 | { |
130 | DeregisterHandlers(); | 130 | DeregisterHandlers(); |
131 | 131 | ||
132 | string capsBase = "/CAPS/" + m_capsObjectPath; | 132 | string capsBase = "/CAPS/" + m_capsObjectPath; |
133 | 133 | ||
134 | try | 134 | try |
135 | { | 135 | { |
136 | // the root of all evil | 136 | // the root of all evil |
137 | m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); | 137 | m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); |
138 | m_capsHandlers["MapLayer"] = | 138 | m_capsHandlers["MapLayer"] = |
139 | new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", | 139 | new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", |
140 | capsBase + m_mapLayerPath, | 140 | capsBase + m_mapLayerPath, |
141 | GetMapLayer); | 141 | GetMapLayer); |
142 | m_capsHandlers["NewFileAgentInventory"] = | 142 | m_capsHandlers["NewFileAgentInventory"] = |
143 | new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", | 143 | new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", |
144 | capsBase + m_newInventory, | 144 | capsBase + m_newInventory, |
145 | NewAgentInventoryRequest); | 145 | NewAgentInventoryRequest); |
146 | m_capsHandlers["UpdateNotecardAgentInventory"] = | 146 | m_capsHandlers["UpdateNotecardAgentInventory"] = |
147 | new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); | 147 | new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); |
148 | m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; | 148 | m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; |
149 | m_capsHandlers["UpdateScriptTaskInventory"] = | 149 | m_capsHandlers["UpdateScriptTaskInventory"] = |
150 | new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); | 150 | new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); |
151 | 151 | ||
152 | // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and | 152 | // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and |
153 | // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires | 153 | // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires |
154 | // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service, | 154 | // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service, |
155 | // but when I went on the Linden grid, the | 155 | // but when I went on the Linden grid, the |
156 | // simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead, | 156 | // simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead, |
157 | // the 1.19.1.4 client appeared to be happily flowing inventory data over UDP | 157 | // the 1.19.1.4 client appeared to be happily flowing inventory data over UDP |
158 | // | 158 | // |
159 | // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid | 159 | // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid |
160 | // we will be | 160 | // we will be |
161 | // able to get the data we need to implement the necessary part of the protocol to fix the issue above. | 161 | // able to get the data we need to implement the necessary part of the protocol to fix the issue above. |
162 | // m_capsHandlers["FetchInventoryDescendents"] = | 162 | // m_capsHandlers["FetchInventoryDescendents"] = |
163 | // new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest); | 163 | // new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest); |
164 | 164 | ||
165 | // m_capsHandlers["FetchInventoryDescendents"] = | 165 | // m_capsHandlers["FetchInventoryDescendents"] = |
166 | // new LLSDStreamhandler<LLSDFetchInventoryDescendents, LLSDInventoryDescendents>("POST", | 166 | // new LLSDStreamhandler<LLSDFetchInventoryDescendents, LLSDInventoryDescendents>("POST", |
167 | // capsBase + m_fetchInventory, | 167 | // capsBase + m_fetchInventory, |
168 | // FetchInventory)); | 168 | // FetchInventory)); |
169 | // m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST", | 169 | // m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST", |
170 | // capsBase + m_requestTexture, | 170 | // capsBase + m_requestTexture, |
171 | // RequestTexture); | 171 | // RequestTexture); |
172 | } | 172 | } |
173 | catch (Exception e) | 173 | catch (Exception e) |
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
181 | /// </summary> | 181 | /// </summary> |
182 | /// <param name="capName"></param> | 182 | /// <param name="capName"></param> |
183 | /// <param name="handler"></param> | 183 | /// <param name="handler"></param> |
184 | public void RegisterHandler(string capName, IRequestHandler handler) | 184 | public void RegisterHandler(string capName, IRequestHandler handler) |
185 | { | 185 | { |
186 | m_capsHandlers[capName] = handler; | 186 | m_capsHandlers[capName] = handler; |
187 | m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path); | 187 | m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path); |
@@ -189,14 +189,14 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
189 | 189 | ||
190 | /// <summary> | 190 | /// <summary> |
191 | /// Remove all CAPS service handlers. | 191 | /// Remove all CAPS service handlers. |
192 | /// | 192 | /// |
193 | /// </summary> | 193 | /// </summary> |
194 | /// <param name="httpListener"></param> | 194 | /// <param name="httpListener"></param> |
195 | /// <param name="path"></param> | 195 | /// <param name="path"></param> |
196 | /// <param name="restMethod"></param> | 196 | /// <param name="restMethod"></param> |
197 | public void DeregisterHandlers() | 197 | public void DeregisterHandlers() |
198 | { | 198 | { |
199 | foreach (string capsName in m_capsHandlers.Caps) | 199 | foreach (string capsName in m_capsHandlers.Caps) |
200 | { | 200 | { |
201 | m_capsHandlers.Remove(capsName); | 201 | m_capsHandlers.Remove(capsName); |
202 | } | 202 | } |
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
220 | 220 | ||
221 | // FIXME: these all should probably go into the respective region | 221 | // FIXME: these all should probably go into the respective region |
222 | // modules | 222 | // modules |
223 | 223 | ||
224 | /// <summary> | 224 | /// <summary> |
225 | /// Processes a fetch inventory request and sends the reply | 225 | /// Processes a fetch inventory request and sends the reply |
226 | 226 | ||
@@ -229,7 +229,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
229 | /// <param name="path"></param> | 229 | /// <param name="path"></param> |
230 | /// <param name="param"></param> | 230 | /// <param name="param"></param> |
231 | /// <returns></returns> | 231 | /// <returns></returns> |
232 | // Request is like: | 232 | // Request is like: |
233 | //<llsd> | 233 | //<llsd> |
234 | // <map><key>folders</key> | 234 | // <map><key>folders</key> |
235 | // <array> | 235 | // <array> |
@@ -240,14 +240,14 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
240 | // </map> | 240 | // </map> |
241 | //</llsd> | 241 | //</llsd> |
242 | // | 242 | // |
243 | // multiple fetch-folder maps are allowed within the larger folders map. | 243 | // multiple fetch-folder maps are allowed within the larger folders map. |
244 | public string FetchInventoryRequest(string request, string path, string param) | 244 | public string FetchInventoryRequest(string request, string path, string param) |
245 | { | 245 | { |
246 | string unmodifiedRequest = request.ToString(); | 246 | string unmodifiedRequest = request.ToString(); |
247 | 247 | ||
248 | //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest); | 248 | //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest); |
249 | m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName); | 249 | m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName); |
250 | 250 | ||
251 | Hashtable hash = new Hashtable(); | 251 | Hashtable hash = new Hashtable(); |
252 | try | 252 | try |
253 | { | 253 | { |
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
258 | m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message); | 258 | m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message); |
259 | m_log.Error("Request: " + request.ToString()); | 259 | m_log.Error("Request: " + request.ToString()); |
260 | } | 260 | } |
261 | 261 | ||
262 | ArrayList foldersrequested = (ArrayList)hash["folders"]; | 262 | ArrayList foldersrequested = (ArrayList)hash["folders"]; |
263 | 263 | ||
264 | string response = ""; | 264 | string response = ""; |
@@ -275,15 +275,15 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
275 | inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); | 275 | inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); |
276 | inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); | 276 | inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); |
277 | inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); | 277 | inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); |
278 | 278 | ||
279 | response += inventoryitemstr; | 279 | response += inventoryitemstr; |
280 | } | 280 | } |
281 | 281 | ||
282 | if (response.Length == 0) | 282 | if (response.Length == 0) |
283 | { | 283 | { |
284 | // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. | 284 | // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. |
285 | // Therefore, I'm concluding that the client only has so many threads available to do requests | 285 | // Therefore, I'm concluding that the client only has so many threads available to do requests |
286 | // and when a thread stalls.. is stays stalled. | 286 | // and when a thread stalls.. is stays stalled. |
287 | // Therefore we need to return something valid | 287 | // Therefore we need to return something valid |
288 | response = "<llsd><map><key>folders</key><array /></map></llsd>"; | 288 | response = "<llsd><map><key>folders</key><array /></map></llsd>"; |
289 | } | 289 | } |
@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
291 | { | 291 | { |
292 | response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; | 292 | response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; |
293 | } | 293 | } |
294 | 294 | ||
295 | //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml"); | 295 | //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml"); |
296 | //m_log.Debug(Util.GetFormattedXml(response)); | 296 | //m_log.Debug(Util.GetFormattedXml(response)); |
297 | 297 | ||
@@ -310,7 +310,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
310 | contents.agent___id = m_agentID; | 310 | contents.agent___id = m_agentID; |
311 | contents.owner___id = invFetch.owner_id; | 311 | contents.owner___id = invFetch.owner_id; |
312 | contents.folder___id = invFetch.folder_id; | 312 | contents.folder___id = invFetch.folder_id; |
313 | 313 | ||
314 | // The version number being sent back was originally 1. | 314 | // The version number being sent back was originally 1. |
315 | // Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins | 315 | // Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins |
316 | // without clearing client cache, objects in the root folder disappear until the cache is cleared, | 316 | // without clearing client cache, objects in the root folder disappear until the cache is cleared, |
@@ -318,8 +318,8 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
318 | // | 318 | // |
319 | // Seeing the version to something other than 0 may be the right thing to do, but there is | 319 | // Seeing the version to something other than 0 may be the right thing to do, but there is |
320 | // a greater subtlety of the second life protocol that needs to be understood first. | 320 | // a greater subtlety of the second life protocol that needs to be understood first. |
321 | contents.version = 0; | 321 | contents.version = 0; |
322 | 322 | ||
323 | contents.descendents = 0; | 323 | contents.descendents = 0; |
324 | reply.folders.Array.Add(contents); | 324 | reply.folders.Array.Add(contents); |
325 | List<InventoryItemBase> itemList = null; | 325 | List<InventoryItemBase> itemList = null; |
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
327 | { | 327 | { |
328 | itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order); | 328 | itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order); |
329 | } | 329 | } |
330 | 330 | ||
331 | if (itemList != null) | 331 | if (itemList != null) |
332 | { | 332 | { |
333 | foreach (InventoryItemBase invItem in itemList) | 333 | foreach (InventoryItemBase invItem in itemList) |
@@ -336,12 +336,12 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
336 | } | 336 | } |
337 | } | 337 | } |
338 | else | 338 | else |
339 | { | 339 | { |
340 | IClientAPI client = GetClient(m_agentID); | 340 | IClientAPI client = GetClient(m_agentID); |
341 | 341 | ||
342 | // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response. | 342 | // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response. |
343 | // If we don't send back the response, | 343 | // If we don't send back the response, |
344 | // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest()) | 344 | // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest()) |
345 | if (client != null) | 345 | if (client != null) |
346 | { | 346 | { |
347 | client.SendAgentAlertMessage( | 347 | client.SendAgentAlertMessage( |
@@ -351,11 +351,11 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
351 | else | 351 | else |
352 | { | 352 | { |
353 | m_log.ErrorFormat( | 353 | m_log.ErrorFormat( |
354 | "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure", | 354 | "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure", |
355 | m_agentID); | 355 | m_agentID); |
356 | } | 356 | } |
357 | } | 357 | } |
358 | 358 | ||
359 | contents.descendents = contents.items.Array.Count; | 359 | contents.descendents = contents.items.Array.Count; |
360 | return reply; | 360 | return reply; |
361 | } | 361 | } |
@@ -375,7 +375,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
375 | llsdItem.item_id = invItem.ID; | 375 | llsdItem.item_id = invItem.ID; |
376 | llsdItem.name = invItem.Name; | 376 | llsdItem.name = invItem.Name; |
377 | llsdItem.parent_id = invItem.Folder; | 377 | llsdItem.parent_id = invItem.Folder; |
378 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); | 378 | llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); |
379 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); | 379 | llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); |
380 | llsdItem.permissions = new LLSDPermissions(); | 380 | llsdItem.permissions = new LLSDPermissions(); |
381 | llsdItem.permissions.creator_id = invItem.Creator; | 381 | llsdItem.permissions.creator_id = invItem.Creator; |
@@ -395,7 +395,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /// <summary> | 397 | /// <summary> |
398 | /// | 398 | /// |
399 | /// </summary> | 399 | /// </summary> |
400 | /// <param name="mapReq"></param> | 400 | /// <param name="mapReq"></param> |
401 | /// <returns></returns> | 401 | /// <returns></returns> |
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
408 | } | 408 | } |
409 | 409 | ||
410 | /// <summary> | 410 | /// <summary> |
411 | /// | 411 | /// |
412 | /// </summary> | 412 | /// </summary> |
413 | /// <returns></returns> | 413 | /// <returns></returns> |
414 | protected static LLSDMapLayer GetLLSDMapLayerResponse() | 414 | protected static LLSDMapLayer GetLLSDMapLayerResponse() |
@@ -421,7 +421,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
421 | } | 421 | } |
422 | 422 | ||
423 | /// <summary> | 423 | /// <summary> |
424 | /// | 424 | /// |
425 | /// </summary> | 425 | /// </summary> |
426 | /// <param name="request"></param> | 426 | /// <param name="request"></param> |
427 | /// <param name="path"></param> | 427 | /// <param name="path"></param> |
@@ -437,7 +437,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
437 | #region EventQueue (Currently not enabled) | 437 | #region EventQueue (Currently not enabled) |
438 | 438 | ||
439 | /// <summary> | 439 | /// <summary> |
440 | /// | 440 | /// |
441 | /// </summary> | 441 | /// </summary> |
442 | /// <param name="request"></param> | 442 | /// <param name="request"></param> |
443 | /// <param name="path"></param> | 443 | /// <param name="path"></param> |
@@ -463,7 +463,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
463 | } | 463 | } |
464 | 464 | ||
465 | /// <summary> | 465 | /// <summary> |
466 | /// | 466 | /// |
467 | /// </summary> | 467 | /// </summary> |
468 | /// <param name="caps"></param> | 468 | /// <param name="caps"></param> |
469 | /// <param name="ipAddressPort"></param> | 469 | /// <param name="ipAddressPort"></param> |
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
482 | } | 482 | } |
483 | 483 | ||
484 | /// <summary> | 484 | /// <summary> |
485 | /// | 485 | /// |
486 | /// </summary> | 486 | /// </summary> |
487 | /// <returns></returns> | 487 | /// <returns></returns> |
488 | public string CreateEmptyEventResponse() | 488 | public string CreateEmptyEventResponse() |
@@ -590,7 +590,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
590 | } | 590 | } |
591 | 591 | ||
592 | /// <summary> | 592 | /// <summary> |
593 | /// | 593 | /// |
594 | /// </summary> | 594 | /// </summary> |
595 | /// <param name="llsdRequest"></param> | 595 | /// <param name="llsdRequest"></param> |
596 | /// <returns></returns> | 596 | /// <returns></returns> |
@@ -622,7 +622,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
622 | } | 622 | } |
623 | 623 | ||
624 | /// <summary> | 624 | /// <summary> |
625 | /// | 625 | /// |
626 | /// </summary> | 626 | /// </summary> |
627 | /// <param name="assetID"></param> | 627 | /// <param name="assetID"></param> |
628 | /// <param name="inventoryItem"></param> | 628 | /// <param name="inventoryItem"></param> |
@@ -708,7 +708,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
708 | /// <param name="itemID">Item to update</param> | 708 | /// <param name="itemID">Item to update</param> |
709 | /// <param name="primID">Prim containing item to update</param> | 709 | /// <param name="primID">Prim containing item to update</param> |
710 | /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> | 710 | /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> |
711 | /// <param name="data">New asset data</param> | 711 | /// <param name="data">New asset data</param> |
712 | public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) | 712 | public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) |
713 | { | 713 | { |
714 | if (TaskScriptUpdatedCall != null) | 714 | if (TaskScriptUpdatedCall != null) |
@@ -751,7 +751,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
751 | } | 751 | } |
752 | 752 | ||
753 | /// <summary> | 753 | /// <summary> |
754 | /// | 754 | /// |
755 | /// </summary> | 755 | /// </summary> |
756 | /// <param name="data"></param> | 756 | /// <param name="data"></param> |
757 | /// <param name="path"></param> | 757 | /// <param name="path"></param> |
@@ -807,7 +807,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
807 | } | 807 | } |
808 | 808 | ||
809 | /// <summary> | 809 | /// <summary> |
810 | /// This class is a callback invoked when a client sends asset data to | 810 | /// This class is a callback invoked when a client sends asset data to |
811 | /// an agent inventory notecard update url | 811 | /// an agent inventory notecard update url |
812 | /// </summary> | 812 | /// </summary> |
813 | public class ItemUpdater | 813 | public class ItemUpdater |
@@ -831,7 +831,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
831 | } | 831 | } |
832 | 832 | ||
833 | /// <summary> | 833 | /// <summary> |
834 | /// | 834 | /// |
835 | /// </summary> | 835 | /// </summary> |
836 | /// <param name="data"></param> | 836 | /// <param name="data"></param> |
837 | /// <param name="path"></param> | 837 | /// <param name="path"></param> |
@@ -889,7 +889,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
889 | } | 889 | } |
890 | 890 | ||
891 | /// <summary> | 891 | /// <summary> |
892 | /// This class is a callback invoked when a client sends asset data to | 892 | /// This class is a callback invoked when a client sends asset data to |
893 | /// a task inventory script update url | 893 | /// a task inventory script update url |
894 | /// </summary> | 894 | /// </summary> |
895 | public class TaskInventoryScriptUpdater | 895 | public class TaskInventoryScriptUpdater |
@@ -921,7 +921,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
921 | } | 921 | } |
922 | 922 | ||
923 | /// <summary> | 923 | /// <summary> |
924 | /// | 924 | /// |
925 | /// </summary> | 925 | /// </summary> |
926 | /// <param name="data"></param> | 926 | /// <param name="data"></param> |
927 | /// <param name="path"></param> | 927 | /// <param name="path"></param> |
@@ -931,7 +931,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
931 | { | 931 | { |
932 | try | 932 | try |
933 | { | 933 | { |
934 | // m_log.InfoFormat("[CAPS]: " + | 934 | // m_log.InfoFormat("[CAPS]: " + |
935 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", | 935 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", |
936 | // data, path, param)); | 936 | // data, path, param)); |
937 | 937 | ||
diff --git a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs index e76a5c5..4a3d00f 100644 --- a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs +++ b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs | |||
@@ -64,14 +64,14 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
64 | /// </summary> | 64 | /// </summary> |
65 | /// <param name="capsName">name of the capability of the cap | 65 | /// <param name="capsName">name of the capability of the cap |
66 | /// handler to be removed</param> | 66 | /// handler to be removed</param> |
67 | public void Remove(string capsName) | 67 | public void Remove(string capsName) |
68 | { | 68 | { |
69 | // This line must be here, or caps will break! | 69 | // This line must be here, or caps will break! |
70 | m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); | 70 | m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); |
71 | m_capsHandlers.Remove(capsName); | 71 | m_capsHandlers.Remove(capsName); |
72 | } | 72 | } |
73 | 73 | ||
74 | public bool ContainsCap(string cap) | 74 | public bool ContainsCap(string cap) |
75 | { | 75 | { |
76 | return m_capsHandlers.ContainsKey(cap); | 76 | return m_capsHandlers.ContainsKey(cap); |
77 | } | 77 | } |
@@ -85,14 +85,14 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
85 | /// retrieve a cap handler for a cap that is not contained in | 85 | /// retrieve a cap handler for a cap that is not contained in |
86 | /// CapsHandlers. | 86 | /// CapsHandlers. |
87 | /// </Remarks> | 87 | /// </Remarks> |
88 | public IRequestHandler this[string idx] | 88 | public IRequestHandler this[string idx] |
89 | { | 89 | { |
90 | get | 90 | get |
91 | { | 91 | { |
92 | return m_capsHandlers[idx]; | 92 | return m_capsHandlers[idx]; |
93 | } | 93 | } |
94 | 94 | ||
95 | set | 95 | set |
96 | { | 96 | { |
97 | if (m_capsHandlers.ContainsKey(idx)) | 97 | if (m_capsHandlers.ContainsKey(idx)) |
98 | { | 98 | { |
@@ -111,9 +111,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
111 | /// Return the list of cap names for which this CapsHandlers | 111 | /// Return the list of cap names for which this CapsHandlers |
112 | /// object contains cap handlers. | 112 | /// object contains cap handlers. |
113 | /// </summary> | 113 | /// </summary> |
114 | public string[] Caps | 114 | public string[] Caps |
115 | { | 115 | { |
116 | get | 116 | get |
117 | { | 117 | { |
118 | string[] __keys = new string[m_capsHandlers.Keys.Count]; | 118 | string[] __keys = new string[m_capsHandlers.Keys.Count]; |
119 | m_capsHandlers.Keys.CopyTo(__keys, 0); | 119 | m_capsHandlers.Keys.CopyTo(__keys, 0); |
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
125 | /// Return an LLSD-serializable Hashtable describing the | 125 | /// Return an LLSD-serializable Hashtable describing the |
126 | /// capabilities and their handler details. | 126 | /// capabilities and their handler details. |
127 | /// </summary> | 127 | /// </summary> |
128 | public Hashtable CapsDetails | 128 | public Hashtable CapsDetails |
129 | { | 129 | { |
130 | get | 130 | get |
131 | { | 131 | { |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs index e869267..bcf7a88 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs | |||
@@ -37,12 +37,12 @@ using libsecondlife; | |||
37 | namespace OpenSim.Framework.Communications.Capabilities | 37 | namespace OpenSim.Framework.Communications.Capabilities |
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code. | 40 | /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code. |
41 | /// </summary> | 41 | /// </summary> |
42 | public static class LLSD | 42 | public static class LLSD |
43 | { | 43 | { |
44 | /// <summary> | 44 | /// <summary> |
45 | /// | 45 | /// |
46 | /// </summary> | 46 | /// </summary> |
47 | public class LLSDParseException : Exception | 47 | public class LLSDParseException : Exception |
48 | { | 48 | { |
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
52 | } | 52 | } |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
55 | /// | 55 | /// |
56 | /// </summary> | 56 | /// </summary> |
57 | public class LLSDSerializeException : Exception | 57 | public class LLSDSerializeException : Exception |
58 | { | 58 | { |
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
62 | } | 62 | } |
63 | 63 | ||
64 | /// <summary> | 64 | /// <summary> |
65 | /// | 65 | /// |
66 | /// </summary> | 66 | /// </summary> |
67 | /// <param name="b"></param> | 67 | /// <param name="b"></param> |
68 | /// <returns></returns> | 68 | /// <returns></returns> |
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /// <summary> | 74 | /// <summary> |
75 | /// | 75 | /// |
76 | /// </summary> | 76 | /// </summary> |
77 | /// <param name="st"></param> | 77 | /// <param name="st"></param> |
78 | /// <returns></returns> | 78 | /// <returns></returns> |
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
96 | } | 96 | } |
97 | 97 | ||
98 | /// <summary> | 98 | /// <summary> |
99 | /// | 99 | /// |
100 | /// </summary> | 100 | /// </summary> |
101 | /// <param name="obj"></param> | 101 | /// <param name="obj"></param> |
102 | /// <returns></returns> | 102 | /// <returns></returns> |
@@ -116,7 +116,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
116 | } | 116 | } |
117 | 117 | ||
118 | /// <summary> | 118 | /// <summary> |
119 | /// | 119 | /// |
120 | /// </summary> | 120 | /// </summary> |
121 | /// <param name="writer"></param> | 121 | /// <param name="writer"></param> |
122 | /// <param name="obj"></param> | 122 | /// <param name="obj"></param> |
@@ -217,7 +217,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
217 | } | 217 | } |
218 | 218 | ||
219 | /// <summary> | 219 | /// <summary> |
220 | /// | 220 | /// |
221 | /// </summary> | 221 | /// </summary> |
222 | /// <param name="reader"></param> | 222 | /// <param name="reader"></param> |
223 | /// <returns></returns> | 223 | /// <returns></returns> |
@@ -360,7 +360,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
360 | } | 360 | } |
361 | 361 | ||
362 | /// <summary> | 362 | /// <summary> |
363 | /// | 363 | /// |
364 | /// </summary> | 364 | /// </summary> |
365 | /// <param name="reader"></param> | 365 | /// <param name="reader"></param> |
366 | /// <returns></returns> | 366 | /// <returns></returns> |
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
405 | } | 405 | } |
406 | 406 | ||
407 | /// <summary> | 407 | /// <summary> |
408 | /// | 408 | /// |
409 | /// </summary> | 409 | /// </summary> |
410 | /// <param name="reader"></param> | 410 | /// <param name="reader"></param> |
411 | /// <returns></returns> | 411 | /// <returns></returns> |
@@ -441,7 +441,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
441 | } | 441 | } |
442 | 442 | ||
443 | /// <summary> | 443 | /// <summary> |
444 | /// | 444 | /// |
445 | /// </summary> | 445 | /// </summary> |
446 | /// <param name="count"></param> | 446 | /// <param name="count"></param> |
447 | /// <returns></returns> | 447 | /// <returns></returns> |
@@ -453,7 +453,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
453 | } | 453 | } |
454 | 454 | ||
455 | /// <summary> | 455 | /// <summary> |
456 | /// | 456 | /// |
457 | /// </summary> | 457 | /// </summary> |
458 | /// <param name="obj"></param> | 458 | /// <param name="obj"></param> |
459 | /// <param name="indent"></param> | 459 | /// <param name="indent"></param> |
@@ -661,7 +661,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
661 | } | 661 | } |
662 | 662 | ||
663 | /// <summary> | 663 | /// <summary> |
664 | /// | 664 | /// |
665 | /// </summary> | 665 | /// </summary> |
666 | /// <param name="reader"></param> | 666 | /// <param name="reader"></param> |
667 | private static void SkipWS(XmlTextReader reader) | 667 | private static void SkipWS(XmlTextReader reader) |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index 409d2e0..507f12b 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs | |||
@@ -35,9 +35,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
35 | { | 35 | { |
36 | public class LLSDHelpers | 36 | public class LLSDHelpers |
37 | { | 37 | { |
38 | // private static readonly log4net.ILog m_log | 38 | // private static readonly log4net.ILog m_log |
39 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 39 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
40 | 40 | ||
41 | public static string SerialiseLLSDReply(object obj) | 41 | public static string SerialiseLLSDReply(object obj) |
42 | { | 42 | { |
43 | StringWriter sw = new StringWriter(); | 43 | StringWriter sw = new StringWriter(); |
@@ -47,9 +47,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
47 | SerializeLLSDType(writer, obj); | 47 | SerializeLLSDType(writer, obj); |
48 | writer.WriteEndElement(); | 48 | writer.WriteEndElement(); |
49 | writer.Close(); | 49 | writer.Close(); |
50 | 50 | ||
51 | //m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString()); | 51 | //m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString()); |
52 | 52 | ||
53 | return sw.ToString(); | 53 | return sw.ToString(); |
54 | } | 54 | } |
55 | 55 | ||
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
146 | fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); | 146 | fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); |
147 | //TODO | 147 | //TODO |
148 | // the LLSD map/array types in the array need to be deserialised | 148 | // the LLSD map/array types in the array need to be deserialised |
149 | // but first we need to know the right class to deserialise them into. | 149 | // but first we need to know the right class to deserialise them into. |
150 | } | 150 | } |
151 | else | 151 | else |
152 | { | 152 | { |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs index 31896c2..1a75aba 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
91 | public int descendents; | 91 | public int descendents; |
92 | public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names | 92 | public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names |
93 | public LLSDArray items = new LLSDArray(); | 93 | public LLSDArray items = new LLSDArray(); |
94 | public LLUUID owner___id; // and of course we can't have field names with "-" in | 94 | public LLUUID owner___id; // and of course we can't have field names with "-" in |
95 | public int version; | 95 | public int version; |
96 | } | 96 | } |
97 | } \ No newline at end of file | 97 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs index fb5eaa8..c045dcf 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System.Collections; | 29 | using System.Collections; |
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
41 | { | 41 | { |
42 | } | 42 | } |
43 | 43 | ||
44 | public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds) | 44 | public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds) |
45 | { | 45 | { |
46 | region_name = region; | 46 | region_name = region; |
47 | parcel_local_id = localID; | 47 | parcel_local_id = localID; |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 5e8a08f..8683cea 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
51 | //string requestBody = streamReader.ReadToEnd(); | 51 | //string requestBody = streamReader.ReadToEnd(); |
52 | //streamReader.Close(); | 52 | //streamReader.Close(); |
53 | 53 | ||
54 | // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) | 54 | // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) |
55 | // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); | 55 | // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); |
56 | 56 | ||
57 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); | 57 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs index ee9ff1b..8bfd20c 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// The task inventory item that was updated | 36 | /// The task inventory item that was updated |
37 | /// </summary> | 37 | /// </summary> |
38 | public LLUUID item_id; | 38 | public LLUUID item_id; |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs index df32d1a..e45d9de 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs | |||
@@ -34,17 +34,17 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// The item containing the script to update | 36 | /// The item containing the script to update |
37 | /// </summary> | 37 | /// </summary> |
38 | public LLUUID item_id; | 38 | public LLUUID item_id; |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
41 | /// The task containing the script | 41 | /// The task containing the script |
42 | /// </summary> | 42 | /// </summary> |
43 | public LLUUID task_id; | 43 | public LLUUID task_id; |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Signals whether the script is currently active | 46 | /// Signals whether the script is currently active |
47 | /// </summary> | 47 | /// </summary> |
48 | public int is_script_running; | 48 | public int is_script_running; |
49 | } | 49 | } |
50 | } \ No newline at end of file | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs index 67064b0..8143233 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework.Communications.Capabilities | 29 | namespace OpenSim.Framework.Communications.Capabilities |
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
38 | { | 38 | { |
39 | } | 39 | } |
40 | 40 | ||
41 | public LLSDVoiceAccountResponse(string user, string pass) | 41 | public LLSDVoiceAccountResponse(string user, string pass) |
42 | { | 42 | { |
43 | username = user; | 43 | username = user; |
44 | password = pass; | 44 | password = pass; |
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 2813aa0..37020f6 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -236,7 +236,7 @@ namespace OpenSim.Framework.Communications | |||
236 | 236 | ||
237 | public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile) | 237 | public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile) |
238 | { | 238 | { |
239 | m_userService.UpdateUserProfileProperties(UserProfile); | 239 | m_userService.UpdateUserProfileProperties(UserProfile); |
240 | return; | 240 | return; |
241 | } | 241 | } |
242 | 242 | ||
diff --git a/OpenSim/Framework/Communications/GenericAsyncResult.cs b/OpenSim/Framework/Communications/GenericAsyncResult.cs index 6c5f5f7..48f72a0 100644 --- a/OpenSim/Framework/Communications/GenericAsyncResult.cs +++ b/OpenSim/Framework/Communications/GenericAsyncResult.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications | |||
112 | 112 | ||
113 | public void EndInvoke() | 113 | public void EndInvoke() |
114 | { | 114 | { |
115 | // This method assumes that only 1 thread calls EndInvoke | 115 | // This method assumes that only 1 thread calls EndInvoke |
116 | if (!IsCompleted) | 116 | if (!IsCompleted) |
117 | { | 117 | { |
118 | // If the operation isn't done, wait for it | 118 | // If the operation isn't done, wait for it |
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Communications | |||
142 | // Save the asynchronous operation's result | 142 | // Save the asynchronous operation's result |
143 | m_result = result; | 143 | m_result = result; |
144 | 144 | ||
145 | // Tell the base class that the operation completed | 145 | // Tell the base class that the operation completed |
146 | // sucessfully (no exception) | 146 | // sucessfully (no exception) |
147 | base.SetAsCompleted(completedSynchronously); | 147 | base.SetAsCompleted(completedSynchronously); |
148 | } | 148 | } |
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index c8a3c85..f7a8857 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs | |||
@@ -43,62 +43,62 @@ namespace OpenSim.Framework.Communications | |||
43 | public interface IInventoryServices | 43 | public interface IInventoryServices |
44 | { | 44 | { |
45 | /// <summary> | 45 | /// <summary> |
46 | /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the | 46 | /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the |
47 | /// inventory has been received | 47 | /// inventory has been received |
48 | /// </summary> | 48 | /// </summary> |
49 | /// <param name="userID"></param> | 49 | /// <param name="userID"></param> |
50 | /// <param name="callback"></param> | 50 | /// <param name="callback"></param> |
51 | void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); | 51 | void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); |
52 | 52 | ||
53 | /// <summary> | 53 | /// <summary> |
54 | /// Add a new folder to the user's inventory | 54 | /// Add a new folder to the user's inventory |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="folder"></param> | 56 | /// <param name="folder"></param> |
57 | /// <returns>true if the folder was successfully added</returns> | 57 | /// <returns>true if the folder was successfully added</returns> |
58 | bool AddFolder(InventoryFolderBase folder); | 58 | bool AddFolder(InventoryFolderBase folder); |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// Move an inventory folder to a new location | 61 | /// Move an inventory folder to a new location |
62 | /// </summary> | 62 | /// </summary> |
63 | /// <param name="folder">A folder containing the details of the new location</param> | 63 | /// <param name="folder">A folder containing the details of the new location</param> |
64 | /// <returns>true if the folder was successfully moved</returns> | 64 | /// <returns>true if the folder was successfully moved</returns> |
65 | bool MoveFolder(InventoryFolderBase folder); | 65 | bool MoveFolder(InventoryFolderBase folder); |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Purge an inventory folder of all its items and subfolders. | 68 | /// Purge an inventory folder of all its items and subfolders. |
69 | /// </summary> | 69 | /// </summary> |
70 | /// <param name="folder"></param> | 70 | /// <param name="folder"></param> |
71 | /// <returns>true if the folder was successfully purged</returns> | 71 | /// <returns>true if the folder was successfully purged</returns> |
72 | bool PurgeFolder(InventoryFolderBase folder); | 72 | bool PurgeFolder(InventoryFolderBase folder); |
73 | 73 | ||
74 | /// <summary> | 74 | /// <summary> |
75 | /// Add a new item to the user's inventory | 75 | /// Add a new item to the user's inventory |
76 | /// </summary> | 76 | /// </summary> |
77 | /// <param name="item"></param> | 77 | /// <param name="item"></param> |
78 | /// <returns>true if the item was successfully added</returns> | 78 | /// <returns>true if the item was successfully added</returns> |
79 | bool AddItem(InventoryItemBase item); | 79 | bool AddItem(InventoryItemBase item); |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// Update an item in the user's inventory | 82 | /// Update an item in the user's inventory |
83 | /// </summary> | 83 | /// </summary> |
84 | /// <param name="item"></param> | 84 | /// <param name="item"></param> |
85 | /// <returns>true if the item was successfully updated</returns> | 85 | /// <returns>true if the item was successfully updated</returns> |
86 | bool UpdateItem(InventoryItemBase item); | 86 | bool UpdateItem(InventoryItemBase item); |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Delete an item from the user's inventory | 89 | /// Delete an item from the user's inventory |
90 | /// </summary> | 90 | /// </summary> |
91 | /// <param name="item"></param> | 91 | /// <param name="item"></param> |
92 | /// <returns>true if the item was successfully deleted</returns> | 92 | /// <returns>true if the item was successfully deleted</returns> |
93 | bool DeleteItem(InventoryItemBase item); | 93 | bool DeleteItem(InventoryItemBase item); |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// Create a new inventory for the given user. | 96 | /// Create a new inventory for the given user. |
97 | /// </summary> | 97 | /// </summary> |
98 | /// <param name="user"></param> | 98 | /// <param name="user"></param> |
99 | /// <returns>true if the inventory was successfully created, false otherwise</returns> | 99 | /// <returns>true if the inventory was successfully created, false otherwise</returns> |
100 | bool CreateNewUserInventory(LLUUID user); | 100 | bool CreateNewUserInventory(LLUUID user); |
101 | 101 | ||
102 | bool HasInventoryForUser(LLUUID userID); | 102 | bool HasInventoryForUser(LLUUID userID); |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
@@ -107,12 +107,12 @@ namespace OpenSim.Framework.Communications | |||
107 | /// <param name="userID"></param> | 107 | /// <param name="userID"></param> |
108 | /// <returns>null if no root folder was found</returns> | 108 | /// <returns>null if no root folder was found</returns> |
109 | InventoryFolderBase RequestRootFolder(LLUUID userID); | 109 | InventoryFolderBase RequestRootFolder(LLUUID userID); |
110 | 110 | ||
111 | /// <summary> | 111 | /// <summary> |
112 | /// Returns a list of all the folders in a given user's inventory. | 112 | /// Returns a list of all the folders in a given user's inventory. |
113 | /// </summary> | 113 | /// </summary> |
114 | /// <param name="userId"></param> | 114 | /// <param name="userId"></param> |
115 | /// <returns>A flat list of the user's inventory folder tree, | 115 | /// <returns>A flat list of the user's inventory folder tree, |
116 | /// null if there is no inventory for this user</returns> | 116 | /// null if there is no inventory for this user</returns> |
117 | List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId); | 117 | List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId); |
118 | } | 118 | } |
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs index 7d71d02..67a8c78 100644 --- a/OpenSim/Framework/Communications/IUserService.cs +++ b/OpenSim/Framework/Communications/IUserService.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Communications | |||
37 | /// </summary> | 37 | /// </summary> |
38 | /// <param name="fname">First name</param> | 38 | /// <param name="fname">First name</param> |
39 | /// <param name="lname">Last name</param> | 39 | /// <param name="lname">Last name</param> |
40 | /// <returns>A user profile. Returns null if no profile is found</returns> | 40 | /// <returns>A user profile. Returns null if no profile is found</returns> |
41 | UserProfileData GetUserProfile(string firstName, string lastName); | 41 | UserProfileData GetUserProfile(string firstName, string lastName); |
42 | 42 | ||
43 | //UserProfileData GetUserProfile(string name); | 43 | //UserProfileData GetUserProfile(string name); |
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Communications | |||
46 | /// Loads a user profile from a database by UUID | 46 | /// Loads a user profile from a database by UUID |
47 | /// </summary> | 47 | /// </summary> |
48 | /// <param name="uuid">The target UUID</param> | 48 | /// <param name="uuid">The target UUID</param> |
49 | /// <returns>A user profile. Returns null if no user profile is found.</returns> | 49 | /// <returns>A user profile. Returns null if no user profile is found.</returns> |
50 | UserProfileData GetUserProfile(LLUUID userId); | 50 | UserProfileData GetUserProfile(LLUUID userId); |
51 | 51 | ||
52 | void clearUserAgent(LLUUID avatarID); | 52 | void clearUserAgent(LLUUID avatarID); |
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications | |||
57 | UserProfileData SetupMasterUser(LLUUID userId); | 57 | UserProfileData SetupMasterUser(LLUUID userId); |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// | 60 | /// |
61 | /// </summary> | 61 | /// </summary> |
62 | /// <param name="user"></param> | 62 | /// <param name="user"></param> |
63 | LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); | 63 | LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); |
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Communications | |||
110 | List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); | 110 | List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
113 | /// Get's the User Appearance | 113 | /// Get's the User Appearance |
114 | AvatarAppearance GetUserAppearance(LLUUID user); | 114 | AvatarAppearance GetUserAppearance(LLUUID user); |
115 | 115 | ||
116 | void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); | 116 | void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index e81d8c4..dffeed3 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -40,13 +40,13 @@ namespace OpenSim.Framework.Communications | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public abstract class InventoryServiceBase : IInventoryServices | 41 | public abstract class InventoryServiceBase : IInventoryServices |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); | 46 | protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); |
47 | 47 | ||
48 | #region Plugin methods | 48 | #region Plugin methods |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Adds a new user server plugin - plugins will be requested in the order they were loaded. | 51 | /// Adds a new user server plugin - plugins will be requested in the order they were loaded. |
52 | /// </summary> | 52 | /// </summary> |
@@ -76,42 +76,42 @@ namespace OpenSim.Framework.Communications | |||
76 | } | 76 | } |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | #endregion | 80 | #endregion |
81 | 81 | ||
82 | #region IInventoryServices methods | 82 | #region IInventoryServices methods |
83 | 83 | ||
84 | // See IInventoryServices | 84 | // See IInventoryServices |
85 | public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) | 85 | public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) |
86 | { | 86 | { |
87 | // m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); | 87 | // m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); |
88 | 88 | ||
89 | InventoryFolderBase rootFolder = RequestRootFolder(userId); | 89 | InventoryFolderBase rootFolder = RequestRootFolder(userId); |
90 | 90 | ||
91 | // Agent has no inventory structure yet. | 91 | // Agent has no inventory structure yet. |
92 | if (null == rootFolder) | 92 | if (null == rootFolder) |
93 | { | 93 | { |
94 | return null; | 94 | return null; |
95 | } | 95 | } |
96 | 96 | ||
97 | List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>(); | 97 | List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>(); |
98 | 98 | ||
99 | userFolders.Add(rootFolder); | 99 | userFolders.Add(rootFolder); |
100 | 100 | ||
101 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 101 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
102 | { | 102 | { |
103 | IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID); | 103 | IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID); |
104 | userFolders.AddRange(folders); | 104 | userFolders.AddRange(folders); |
105 | } | 105 | } |
106 | 106 | ||
107 | // foreach (InventoryFolderBase folder in userFolders) | 107 | // foreach (InventoryFolderBase folder in userFolders) |
108 | // { | 108 | // { |
109 | // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); | 109 | // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); |
110 | // } | 110 | // } |
111 | 111 | ||
112 | return userFolders; | 112 | return userFolders; |
113 | } | 113 | } |
114 | 114 | ||
115 | // See IInventoryServices | 115 | // See IInventoryServices |
116 | public virtual bool HasInventoryForUser(LLUUID userID) | 116 | public virtual bool HasInventoryForUser(LLUUID userID) |
117 | { | 117 | { |
@@ -133,31 +133,31 @@ namespace OpenSim.Framework.Communications | |||
133 | public bool CreateNewUserInventory(LLUUID user) | 133 | public bool CreateNewUserInventory(LLUUID user) |
134 | { | 134 | { |
135 | InventoryFolderBase existingRootFolder = RequestRootFolder(user); | 135 | InventoryFolderBase existingRootFolder = RequestRootFolder(user); |
136 | 136 | ||
137 | if (null != existingRootFolder) | 137 | if (null != existingRootFolder) |
138 | { | 138 | { |
139 | m_log.WarnFormat( | 139 | m_log.WarnFormat( |
140 | "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have " | 140 | "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have " |
141 | + "a root inventory folder with id {1}", | 141 | + "a root inventory folder with id {1}", |
142 | user, existingRootFolder.ID); | 142 | user, existingRootFolder.ID); |
143 | } | 143 | } |
144 | else | 144 | else |
145 | { | 145 | { |
146 | UsersInventory inven = new UsersInventory(); | 146 | UsersInventory inven = new UsersInventory(); |
147 | inven.CreateNewInventorySet(user); | 147 | inven.CreateNewInventorySet(user); |
148 | AddNewInventorySet(inven); | 148 | AddNewInventorySet(inven); |
149 | 149 | ||
150 | return true; | 150 | return true; |
151 | } | 151 | } |
152 | 152 | ||
153 | return false; | 153 | return false; |
154 | } | 154 | } |
155 | 155 | ||
156 | // See IInventoryServices | 156 | // See IInventoryServices |
157 | public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); | 157 | public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); |
158 | 158 | ||
159 | #endregion | 159 | #endregion |
160 | 160 | ||
161 | #region Methods used by GridInventoryService | 161 | #region Methods used by GridInventoryService |
162 | 162 | ||
163 | public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID) | 163 | public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID) |
@@ -180,21 +180,21 @@ namespace OpenSim.Framework.Communications | |||
180 | } | 180 | } |
181 | return itemsList; | 181 | return itemsList; |
182 | } | 182 | } |
183 | 183 | ||
184 | #endregion | 184 | #endregion |
185 | 185 | ||
186 | // See IInventoryServices | 186 | // See IInventoryServices |
187 | public bool AddFolder(InventoryFolderBase folder) | 187 | public bool AddFolder(InventoryFolderBase folder) |
188 | { | 188 | { |
189 | m_log.DebugFormat( | 189 | m_log.DebugFormat( |
190 | "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | 190 | "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); |
191 | 191 | ||
192 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 192 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
193 | { | 193 | { |
194 | plugin.Value.addInventoryFolder(folder); | 194 | plugin.Value.addInventoryFolder(folder); |
195 | } | 195 | } |
196 | 196 | ||
197 | // FIXME: Should return false on failure | 197 | // FIXME: Should return false on failure |
198 | return true; | 198 | return true; |
199 | } | 199 | } |
200 | 200 | ||
@@ -203,14 +203,14 @@ namespace OpenSim.Framework.Communications | |||
203 | { | 203 | { |
204 | m_log.DebugFormat( | 204 | m_log.DebugFormat( |
205 | "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | 205 | "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); |
206 | 206 | ||
207 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 207 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
208 | { | 208 | { |
209 | plugin.Value.moveInventoryFolder(folder); | 209 | plugin.Value.moveInventoryFolder(folder); |
210 | } | 210 | } |
211 | 211 | ||
212 | // FIXME: Should return false on failure | 212 | // FIXME: Should return false on failure |
213 | return true; | 213 | return true; |
214 | } | 214 | } |
215 | 215 | ||
216 | // See IInventoryServices | 216 | // See IInventoryServices |
@@ -218,14 +218,14 @@ namespace OpenSim.Framework.Communications | |||
218 | { | 218 | { |
219 | m_log.DebugFormat( | 219 | m_log.DebugFormat( |
220 | "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); | 220 | "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); |
221 | 221 | ||
222 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 222 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
223 | { | 223 | { |
224 | plugin.Value.addInventoryItem(item); | 224 | plugin.Value.addInventoryItem(item); |
225 | } | 225 | } |
226 | 226 | ||
227 | // FIXME: Should return false on failure | 227 | // FIXME: Should return false on failure |
228 | return true; | 228 | return true; |
229 | } | 229 | } |
230 | 230 | ||
231 | // See IInventoryServices | 231 | // See IInventoryServices |
@@ -233,14 +233,14 @@ namespace OpenSim.Framework.Communications | |||
233 | { | 233 | { |
234 | m_log.InfoFormat( | 234 | m_log.InfoFormat( |
235 | "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); | 235 | "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); |
236 | 236 | ||
237 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 237 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
238 | { | 238 | { |
239 | plugin.Value.updateInventoryItem(item); | 239 | plugin.Value.updateInventoryItem(item); |
240 | } | 240 | } |
241 | 241 | ||
242 | // FIXME: Should return false on failure | 242 | // FIXME: Should return false on failure |
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | 245 | ||
246 | // See IInventoryServices | 246 | // See IInventoryServices |
@@ -248,19 +248,19 @@ namespace OpenSim.Framework.Communications | |||
248 | { | 248 | { |
249 | m_log.InfoFormat( | 249 | m_log.InfoFormat( |
250 | "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); | 250 | "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); |
251 | 251 | ||
252 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 252 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
253 | { | 253 | { |
254 | plugin.Value.deleteInventoryItem(item.ID); | 254 | plugin.Value.deleteInventoryItem(item.ID); |
255 | } | 255 | } |
256 | 256 | ||
257 | // FIXME: Should return false on failure | 257 | // FIXME: Should return false on failure |
258 | return true; | 258 | return true; |
259 | } | 259 | } |
260 | 260 | ||
261 | /// <summary> | 261 | /// <summary> |
262 | /// Purge a folder of all items items and subfolders. | 262 | /// Purge a folder of all items items and subfolders. |
263 | /// | 263 | /// |
264 | /// FIXME: Really nasty in a sense, because we have to query the database to get information we may | 264 | /// FIXME: Really nasty in a sense, because we have to query the database to get information we may |
265 | /// already know... Needs heavy refactoring. | 265 | /// already know... Needs heavy refactoring. |
266 | /// </summary> | 266 | /// </summary> |
@@ -269,13 +269,13 @@ namespace OpenSim.Framework.Communications | |||
269 | { | 269 | { |
270 | m_log.DebugFormat( | 270 | m_log.DebugFormat( |
271 | "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); | 271 | "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); |
272 | 272 | ||
273 | List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID); | 273 | List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID); |
274 | 274 | ||
275 | foreach (InventoryFolderBase subFolder in subFolders) | 275 | foreach (InventoryFolderBase subFolder in subFolders) |
276 | { | 276 | { |
277 | // m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); | 277 | // m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); |
278 | 278 | ||
279 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 279 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
280 | { | 280 | { |
281 | plugin.Value.deleteInventoryFolder(subFolder.ID); | 281 | plugin.Value.deleteInventoryFolder(subFolder.ID); |
@@ -288,17 +288,17 @@ namespace OpenSim.Framework.Communications | |||
288 | { | 288 | { |
289 | DeleteItem(item); | 289 | DeleteItem(item); |
290 | } | 290 | } |
291 | 291 | ||
292 | // FIXME: Should return false on failure | 292 | // FIXME: Should return false on failure |
293 | return true; | 293 | return true; |
294 | } | 294 | } |
295 | 295 | ||
296 | private void AddNewInventorySet(UsersInventory inventory) | 296 | private void AddNewInventorySet(UsersInventory inventory) |
297 | { | 297 | { |
298 | foreach (InventoryFolderBase folder in inventory.Folders.Values) | 298 | foreach (InventoryFolderBase folder in inventory.Folders.Values) |
299 | { | 299 | { |
300 | AddFolder(folder); | 300 | AddFolder(folder); |
301 | } | 301 | } |
302 | } | 302 | } |
303 | 303 | ||
304 | /// <summary> | 304 | /// <summary> |
@@ -340,7 +340,7 @@ namespace OpenSim.Framework.Communications | |||
340 | folder.Type = (short)AssetType.Bodypart; | 340 | folder.Type = (short)AssetType.Bodypart; |
341 | folder.Version = 1; | 341 | folder.Version = 1; |
342 | Folders.Add(folder.ID, folder); | 342 | Folders.Add(folder.ID, folder); |
343 | 343 | ||
344 | folder = new InventoryFolderBase(); | 344 | folder = new InventoryFolderBase(); |
345 | folder.ParentID = rootFolder; | 345 | folder.ParentID = rootFolder; |
346 | folder.Owner = user; | 346 | folder.Owner = user; |
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Communications | |||
348 | folder.Name = "Calling Cards"; | 348 | folder.Name = "Calling Cards"; |
349 | folder.Type = (short)AssetType.CallingCard; | 349 | folder.Type = (short)AssetType.CallingCard; |
350 | folder.Version = 1; | 350 | folder.Version = 1; |
351 | Folders.Add(folder.ID, folder); | 351 | Folders.Add(folder.ID, folder); |
352 | 352 | ||
353 | folder = new InventoryFolderBase(); | 353 | folder = new InventoryFolderBase(); |
354 | folder.ParentID = rootFolder; | 354 | folder.ParentID = rootFolder; |
diff --git a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs index 6ec21d9..1a9cc24 100644 --- a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs +++ b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs | |||
@@ -31,9 +31,9 @@ namespace OpenSim.Framework.Communications.Limit | |||
31 | /// Interface for strategies that can limit requests from the client. Currently only used in the | 31 | /// Interface for strategies that can limit requests from the client. Currently only used in the |
32 | /// texture modules to deal with repeated requests for certain textures. However, limiting strategies | 32 | /// texture modules to deal with repeated requests for certain textures. However, limiting strategies |
33 | /// could be used with other requests. | 33 | /// could be used with other requests. |
34 | /// </summary> | 34 | /// </summary> |
35 | public interface IRequestLimitStrategy<TId> | 35 | public interface IRequestLimitStrategy<TId> |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Should the request be allowed? If the id is not monitored, then the request is always allowed. | 38 | /// Should the request be allowed? If the id is not monitored, then the request is always allowed. |
39 | /// Otherwise, the strategy criteria will be applied. | 39 | /// Otherwise, the strategy criteria will be applied. |
@@ -41,21 +41,21 @@ namespace OpenSim.Framework.Communications.Limit | |||
41 | /// <param name="id"></param> | 41 | /// <param name="id"></param> |
42 | /// <returns></returns> | 42 | /// <returns></returns> |
43 | bool AllowRequest(TId id); | 43 | bool AllowRequest(TId id); |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Has the request been refused just once? | 46 | /// Has the request been refused just once? |
47 | /// </summary> | 47 | /// </summary> |
48 | /// <returns>False if the request has not yet been refused, or if the request has been refused more | 48 | /// <returns>False if the request has not yet been refused, or if the request has been refused more |
49 | /// than once.</returns> | 49 | /// than once.</returns> |
50 | bool IsFirstRefusal(TId id); | 50 | bool IsFirstRefusal(TId id); |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring | 53 | /// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring |
54 | /// continues. | 54 | /// continues. |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="id"></param> | 56 | /// <param name="id"></param> |
57 | void MonitorRequests(TId id); | 57 | void MonitorRequests(TId id); |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// Is the id being monitored? | 60 | /// Is the id being monitored? |
61 | /// </summary> | 61 | /// </summary> |
diff --git a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs index 72d0586..932f780 100644 --- a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs +++ b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs | |||
@@ -26,15 +26,15 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | namespace OpenSim.Framework.Communications.Limit | 28 | namespace OpenSim.Framework.Communications.Limit |
29 | { | 29 | { |
30 | /// <summary> | 30 | /// <summary> |
31 | /// Strategy which polices no limits | 31 | /// Strategy which polices no limits |
32 | /// </summary> | 32 | /// </summary> |
33 | public class NullLimitStrategy<TId> : IRequestLimitStrategy<TId> | 33 | public class NullLimitStrategy<TId> : IRequestLimitStrategy<TId> |
34 | { | 34 | { |
35 | public bool AllowRequest(TId id) { return true; } | 35 | public bool AllowRequest(TId id) { return true; } |
36 | public bool IsFirstRefusal(TId id) { return false; } | 36 | public bool IsFirstRefusal(TId id) { return false; } |
37 | public void MonitorRequests(TId id) { /* intentionally blank */ } | 37 | public void MonitorRequests(TId id) { /* intentionally blank */ } |
38 | public bool IsMonitoringRequests(TId id) { return false; } | 38 | public bool IsMonitoringRequests(TId id) { return false; } |
39 | } | 39 | } |
40 | } | 40 | } |
diff --git a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs index dfa05fa..bb72029 100644 --- a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs +++ b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs | |||
@@ -31,14 +31,14 @@ namespace OpenSim.Framework.Communications.Limit | |||
31 | { | 31 | { |
32 | /// <summary> | 32 | /// <summary> |
33 | /// Limit requests by discarding them after they've been repeated a certain number of times. | 33 | /// Limit requests by discarding them after they've been repeated a certain number of times. |
34 | /// </summary> | 34 | /// </summary> |
35 | public class RepeatLimitStrategy<TId> : IRequestLimitStrategy<TId> | 35 | public class RepeatLimitStrategy<TId> : IRequestLimitStrategy<TId> |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Record each asset request that we're notified about. | 38 | /// Record each asset request that we're notified about. |
39 | /// </summary> | 39 | /// </summary> |
40 | private readonly Dictionary<TId, int> requestCounts = new Dictionary<TId, int>(); | 40 | private readonly Dictionary<TId, int> requestCounts = new Dictionary<TId, int>(); |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// The maximum number of requests that can be made before we drop subsequent requests. | 43 | /// The maximum number of requests that can be made before we drop subsequent requests. |
44 | /// </summary> | 44 | /// </summary> |
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Limit | |||
47 | { | 47 | { |
48 | get { return m_maxRequests; } | 48 | get { return m_maxRequests; } |
49 | } | 49 | } |
50 | 50 | ||
51 | /// <summary></summary> | 51 | /// <summary></summary> |
52 | /// <param name="maxRequests">The maximum number of requests that may be served before all further | 52 | /// <param name="maxRequests">The maximum number of requests that may be served before all further |
53 | /// requests are dropped.</param> | 53 | /// requests are dropped.</param> |
@@ -55,52 +55,52 @@ namespace OpenSim.Framework.Communications.Limit | |||
55 | { | 55 | { |
56 | m_maxRequests = maxRequests; | 56 | m_maxRequests = maxRequests; |
57 | } | 57 | } |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// <see cref="IRequestLimitStrategy"/> | 60 | /// <see cref="IRequestLimitStrategy"/> |
61 | /// </summary> | 61 | /// </summary> |
62 | public bool AllowRequest(TId id) | 62 | public bool AllowRequest(TId id) |
63 | { | 63 | { |
64 | if (requestCounts.ContainsKey(id)) | 64 | if (requestCounts.ContainsKey(id)) |
65 | { | 65 | { |
66 | requestCounts[id] += 1; | 66 | requestCounts[id] += 1; |
67 | 67 | ||
68 | if (requestCounts[id] > m_maxRequests) | 68 | if (requestCounts[id] > m_maxRequests) |
69 | { | 69 | { |
70 | return false; | 70 | return false; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
74 | return true; | 74 | return true; |
75 | } | 75 | } |
76 | 76 | ||
77 | /// <summary> | 77 | /// <summary> |
78 | /// <see cref="IRequestLimitStrategy"/> | 78 | /// <see cref="IRequestLimitStrategy"/> |
79 | /// </summary> | 79 | /// </summary> |
80 | public bool IsFirstRefusal(TId id) | 80 | public bool IsFirstRefusal(TId id) |
81 | { | 81 | { |
82 | if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id]) | 82 | if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id]) |
83 | { | 83 | { |
84 | return true; | 84 | return true; |
85 | } | 85 | } |
86 | 86 | ||
87 | return false; | 87 | return false; |
88 | } | 88 | } |
89 | 89 | ||
90 | /// <summary> | 90 | /// <summary> |
91 | /// <see cref="IRequestLimitStrategy"/> | 91 | /// <see cref="IRequestLimitStrategy"/> |
92 | /// </summary> | 92 | /// </summary> |
93 | public void MonitorRequests(TId id) | 93 | public void MonitorRequests(TId id) |
94 | { | 94 | { |
95 | if (!IsMonitoringRequests(id)) | 95 | if (!IsMonitoringRequests(id)) |
96 | { | 96 | { |
97 | requestCounts.Add(id, 1); | 97 | requestCounts.Add(id, 1); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// <see cref="IRequestLimitStrategy"/> | 102 | /// <see cref="IRequestLimitStrategy"/> |
103 | /// </summary> | 103 | /// </summary> |
104 | public bool IsMonitoringRequests(TId id) | 104 | public bool IsMonitoringRequests(TId id) |
105 | { | 105 | { |
106 | return requestCounts.ContainsKey(id); | 106 | return requestCounts.ContainsKey(id); |
diff --git a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs index 34b01ff..b5b925e 100644 --- a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs +++ b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs | |||
@@ -32,17 +32,17 @@ namespace OpenSim.Framework.Communications.Limit | |||
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Limit requests by discarding repeat attempts that occur within a given time period | 34 | /// Limit requests by discarding repeat attempts that occur within a given time period |
35 | /// | 35 | /// |
36 | /// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests | 36 | /// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests |
37 | /// for the same texture at different resolutions. | 37 | /// for the same texture at different resolutions. |
38 | /// </summary> | 38 | /// </summary> |
39 | public class TimeLimitStrategy<TId> : IRequestLimitStrategy<TId> | 39 | public class TimeLimitStrategy<TId> : IRequestLimitStrategy<TId> |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// Record the time at which an asset request occurs. | 42 | /// Record the time at which an asset request occurs. |
43 | /// </summary> | 43 | /// </summary> |
44 | private readonly Dictionary<TId, Request> requests = new Dictionary<TId, Request>(); | 44 | private readonly Dictionary<TId, Request> requests = new Dictionary<TId, Request>(); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// The minimum time period between which requests for the same data will be serviced. | 47 | /// The minimum time period between which requests for the same data will be serviced. |
48 | /// </summary> | 48 | /// </summary> |
@@ -53,37 +53,37 @@ namespace OpenSim.Framework.Communications.Limit | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary></summary> | 55 | /// <summary></summary> |
56 | /// <param name="repeatPeriod"></param> | 56 | /// <param name="repeatPeriod"></param> |
57 | public TimeLimitStrategy(TimeSpan repeatPeriod) | 57 | public TimeLimitStrategy(TimeSpan repeatPeriod) |
58 | { | 58 | { |
59 | m_repeatPeriod = repeatPeriod; | 59 | m_repeatPeriod = repeatPeriod; |
60 | } | 60 | } |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// <see cref="IRequestLimitStrategy"/> | 63 | /// <see cref="IRequestLimitStrategy"/> |
64 | /// </summary> | 64 | /// </summary> |
65 | public bool AllowRequest(TId id) | 65 | public bool AllowRequest(TId id) |
66 | { | 66 | { |
67 | if (IsMonitoringRequests(id)) | 67 | if (IsMonitoringRequests(id)) |
68 | { | 68 | { |
69 | DateTime now = DateTime.Now; | 69 | DateTime now = DateTime.Now; |
70 | TimeSpan elapsed = now - requests[id].Time; | 70 | TimeSpan elapsed = now - requests[id].Time; |
71 | 71 | ||
72 | if (elapsed < RepeatPeriod) | 72 | if (elapsed < RepeatPeriod) |
73 | { | 73 | { |
74 | requests[id].Refusals += 1; | 74 | requests[id].Refusals += 1; |
75 | return false; | 75 | return false; |
76 | } | 76 | } |
77 | 77 | ||
78 | requests[id].Time = now; | 78 | requests[id].Time = now; |
79 | } | 79 | } |
80 | 80 | ||
81 | return true; | 81 | return true; |
82 | } | 82 | } |
83 | 83 | ||
84 | /// <summary> | 84 | /// <summary> |
85 | /// <see cref="IRequestLimitStrategy"/> | 85 | /// <see cref="IRequestLimitStrategy"/> |
86 | /// </summary> | 86 | /// </summary> |
87 | public bool IsFirstRefusal(TId id) | 87 | public bool IsFirstRefusal(TId id) |
88 | { | 88 | { |
89 | if (IsMonitoringRequests(id)) | 89 | if (IsMonitoringRequests(id)) |
@@ -92,31 +92,31 @@ namespace OpenSim.Framework.Communications.Limit | |||
92 | { | 92 | { |
93 | return true; | 93 | return true; |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | return false; | 97 | return false; |
98 | } | 98 | } |
99 | 99 | ||
100 | /// <summary> | 100 | /// <summary> |
101 | /// <see cref="IRequestLimitStrategy"/> | 101 | /// <see cref="IRequestLimitStrategy"/> |
102 | /// </summary> | 102 | /// </summary> |
103 | public void MonitorRequests(TId id) | 103 | public void MonitorRequests(TId id) |
104 | { | 104 | { |
105 | if (!IsMonitoringRequests(id)) | 105 | if (!IsMonitoringRequests(id)) |
106 | { | 106 | { |
107 | requests.Add(id, new Request(DateTime.Now)); | 107 | requests.Add(id, new Request(DateTime.Now)); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
111 | /// <summary> | 111 | /// <summary> |
112 | /// <see cref="IRequestLimitStrategy"/> | 112 | /// <see cref="IRequestLimitStrategy"/> |
113 | /// </summary> | 113 | /// </summary> |
114 | public bool IsMonitoringRequests(TId id) | 114 | public bool IsMonitoringRequests(TId id) |
115 | { | 115 | { |
116 | return requests.ContainsKey(id); | 116 | return requests.ContainsKey(id); |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | /// <summary> | 120 | /// <summary> |
121 | /// Private request details. | 121 | /// Private request details. |
122 | /// </summary> | 122 | /// </summary> |
@@ -126,12 +126,12 @@ namespace OpenSim.Framework.Communications.Limit | |||
126 | /// Time of last request | 126 | /// Time of last request |
127 | /// </summary> | 127 | /// </summary> |
128 | public DateTime Time; | 128 | public DateTime Time; |
129 | 129 | ||
130 | /// <summary> | 130 | /// <summary> |
131 | /// Number of refusals associated with this request | 131 | /// Number of refusals associated with this request |
132 | /// </summary> | 132 | /// </summary> |
133 | public int Refusals; | 133 | public int Refusals; |
134 | 134 | ||
135 | public Request(DateTime time) | 135 | public Request(DateTime time) |
136 | { | 136 | { |
137 | Time = time; | 137 | Time = time; |
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index bccac74..6fdd06a 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs | |||
@@ -239,7 +239,7 @@ namespace OpenSim.Framework.Communications | |||
239 | "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", | 239 | "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", |
240 | "false"); | 240 | "false"); |
241 | } | 241 | } |
242 | 242 | ||
243 | /// <summary> | 243 | /// <summary> |
244 | /// Response to indicate that login failed because the agent's inventory was not available. | 244 | /// Response to indicate that login failed because the agent's inventory was not available. |
245 | /// </summary> | 245 | /// </summary> |
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Communications | |||
249 | return GenerateFailureResponse( | 249 | return GenerateFailureResponse( |
250 | "key", | 250 | "key", |
251 | "The avatar inventory service is not responding. Please notify your login region operator.", | 251 | "The avatar inventory service is not responding. Please notify your login region operator.", |
252 | "false"); | 252 | "false"); |
253 | } | 253 | } |
254 | 254 | ||
255 | public XmlRpcResponse CreateAlreadyLoggedInResponse() | 255 | public XmlRpcResponse CreateAlreadyLoggedInResponse() |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index fa78a30..bd0fa53 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -48,8 +48,8 @@ namespace OpenSim.Framework.Communications | |||
48 | 48 | ||
49 | protected string m_welcomeMessage = "Welcome to OpenSim"; | 49 | protected string m_welcomeMessage = "Welcome to OpenSim"; |
50 | protected UserManagerBase m_userManager = null; | 50 | protected UserManagerBase m_userManager = null; |
51 | protected Mutex m_loginMutex = new Mutex(false); | 51 | protected Mutex m_loginMutex = new Mutex(false); |
52 | 52 | ||
53 | /// <summary> | 53 | /// <summary> |
54 | /// Used during login to send the skeleton of the OpenSim Library to the client. | 54 | /// Used during login to send the skeleton of the OpenSim Library to the client. |
55 | /// </summary> | 55 | /// </summary> |
@@ -61,12 +61,12 @@ namespace OpenSim.Framework.Communications | |||
61 | /// <param name="userManager"></param> | 61 | /// <param name="userManager"></param> |
62 | /// <param name="libraryRootFolder"></param> | 62 | /// <param name="libraryRootFolder"></param> |
63 | /// <param name="welcomeMess"></param> | 63 | /// <param name="welcomeMess"></param> |
64 | public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder, | 64 | public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder, |
65 | string welcomeMess) | 65 | string welcomeMess) |
66 | { | 66 | { |
67 | m_userManager = userManager; | 67 | m_userManager = userManager; |
68 | m_libraryRootFolder = libraryRootFolder; | 68 | m_libraryRootFolder = libraryRootFolder; |
69 | 69 | ||
70 | if (welcomeMess != String.Empty) | 70 | if (welcomeMess != String.Empty) |
71 | { | 71 | { |
72 | m_welcomeMessage = welcomeMess; | 72 | m_welcomeMessage = welcomeMess; |
@@ -79,15 +79,15 @@ namespace OpenSim.Framework.Communications | |||
79 | /// <param name="response">The existing response</param> | 79 | /// <param name="response">The existing response</param> |
80 | /// <param name="theUser">The user profile</param> | 80 | /// <param name="theUser">The user profile</param> |
81 | public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest); | 81 | public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user. | 84 | /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user. |
85 | /// </summary> | 85 | /// </summary> |
86 | /// <param name="userID"></param> | 86 | /// <param name="userID"></param> |
87 | /// <returns></returns> | 87 | /// <returns></returns> |
88 | /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> | 88 | /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> |
89 | protected abstract InventoryData GetInventorySkeleton(LLUUID userID); | 89 | protected abstract InventoryData GetInventorySkeleton(LLUUID userID); |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
92 | /// Called when we receive the client's initial XMLRPC login_to_simulator request message | 92 | /// Called when we receive the client's initial XMLRPC login_to_simulator request message |
93 | /// </summary> | 93 | /// </summary> |
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications | |||
112 | 112 | ||
113 | UserProfileData userProfile; | 113 | UserProfileData userProfile; |
114 | LoginResponse logResponse = new LoginResponse(); | 114 | LoginResponse logResponse = new LoginResponse(); |
115 | 115 | ||
116 | string firstname = String.Empty; | 116 | string firstname = String.Empty; |
117 | string lastname = String.Empty; | 117 | string lastname = String.Empty; |
118 | 118 | ||
@@ -120,23 +120,23 @@ namespace OpenSim.Framework.Communications | |||
120 | { | 120 | { |
121 | firstname = (string) requestData["first"]; | 121 | firstname = (string) requestData["first"]; |
122 | lastname = (string) requestData["last"]; | 122 | lastname = (string) requestData["last"]; |
123 | 123 | ||
124 | m_log.InfoFormat( | 124 | m_log.InfoFormat( |
125 | "[LOGIN BEGIN]: Received login request message from user {0} {1}", | 125 | "[LOGIN BEGIN]: Received login request message from user {0} {1}", |
126 | firstname, lastname); | 126 | firstname, lastname); |
127 | 127 | ||
128 | string clientVersion = "Unknown"; | 128 | string clientVersion = "Unknown"; |
129 | 129 | ||
130 | if (requestData.Contains("version")) | 130 | if (requestData.Contains("version")) |
131 | { | 131 | { |
132 | clientVersion = (string)requestData["version"]; | 132 | clientVersion = (string)requestData["version"]; |
133 | } | 133 | } |
134 | 134 | ||
135 | if (requestData.Contains("start")) | 135 | if (requestData.Contains("start")) |
136 | { | 136 | { |
137 | startLocationRequest = (string)requestData["start"]; | 137 | startLocationRequest = (string)requestData["start"]; |
138 | } | 138 | } |
139 | 139 | ||
140 | m_log.DebugFormat( | 140 | m_log.DebugFormat( |
141 | "[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest); | 141 | "[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest); |
142 | 142 | ||
@@ -163,9 +163,9 @@ namespace OpenSim.Framework.Communications | |||
163 | catch (Exception e) | 163 | catch (Exception e) |
164 | { | 164 | { |
165 | m_log.InfoFormat( | 165 | m_log.InfoFormat( |
166 | "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}", | 166 | "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}", |
167 | requestData["web_login_key"], firstname, lastname, e); | 167 | requestData["web_login_key"], firstname, lastname, e); |
168 | 168 | ||
169 | return logResponse.CreateFailedResponse(); | 169 | return logResponse.CreateFailedResponse(); |
170 | } | 170 | } |
171 | GoodLogin = AuthenticateUser(userProfile, webloginkey); | 171 | GoodLogin = AuthenticateUser(userProfile, webloginkey); |
@@ -176,14 +176,14 @@ namespace OpenSim.Framework.Communications | |||
176 | { | 176 | { |
177 | m_log.Info( | 177 | m_log.Info( |
178 | "[LOGIN END]: login_to_simulator login message did not contain all the required data"); | 178 | "[LOGIN END]: login_to_simulator login message did not contain all the required data"); |
179 | 179 | ||
180 | return logResponse.CreateGridErrorResponse(); | 180 | return logResponse.CreateGridErrorResponse(); |
181 | } | 181 | } |
182 | 182 | ||
183 | if (!GoodLogin) | 183 | if (!GoodLogin) |
184 | { | 184 | { |
185 | m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname); | 185 | m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname); |
186 | 186 | ||
187 | return logResponse.CreateLoginFailedResponse(); | 187 | return logResponse.CreateLoginFailedResponse(); |
188 | } | 188 | } |
189 | else | 189 | else |
@@ -199,11 +199,11 @@ namespace OpenSim.Framework.Communications | |||
199 | m_userManager.CommitAgent(ref userProfile); | 199 | m_userManager.CommitAgent(ref userProfile); |
200 | 200 | ||
201 | // Reject the login | 201 | // Reject the login |
202 | 202 | ||
203 | m_log.InfoFormat( | 203 | m_log.InfoFormat( |
204 | "[LOGIN END]: Notifying user {0} {1} that they are already logged in", | 204 | "[LOGIN END]: Notifying user {0} {1} that they are already logged in", |
205 | firstname, lastname); | 205 | firstname, lastname); |
206 | 206 | ||
207 | return logResponse.CreateAlreadyLoggedInResponse(); | 207 | return logResponse.CreateAlreadyLoggedInResponse(); |
208 | } | 208 | } |
209 | // Otherwise... | 209 | // Otherwise... |
@@ -214,9 +214,9 @@ namespace OpenSim.Framework.Communications | |||
214 | { | 214 | { |
215 | LLUUID agentID = userProfile.ID; | 215 | LLUUID agentID = userProfile.ID; |
216 | InventoryData inventData = null; | 216 | InventoryData inventData = null; |
217 | 217 | ||
218 | try | 218 | try |
219 | { | 219 | { |
220 | inventData = GetInventorySkeleton(agentID); | 220 | inventData = GetInventorySkeleton(agentID); |
221 | } | 221 | } |
222 | catch (Exception e) | 222 | catch (Exception e) |
@@ -224,10 +224,10 @@ namespace OpenSim.Framework.Communications | |||
224 | m_log.ErrorFormat( | 224 | m_log.ErrorFormat( |
225 | "[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}", | 225 | "[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}", |
226 | agentID, e.GetType(), e.Message); | 226 | agentID, e.GetType(), e.Message); |
227 | 227 | ||
228 | return logResponse.CreateLoginInventoryFailedResponse(); | 228 | return logResponse.CreateLoginInventoryFailedResponse(); |
229 | } | 229 | } |
230 | 230 | ||
231 | ArrayList AgentInventoryArray = inventData.InventoryArray; | 231 | ArrayList AgentInventoryArray = inventData.InventoryArray; |
232 | 232 | ||
233 | Hashtable InventoryRootHash = new Hashtable(); | 233 | Hashtable InventoryRootHash = new Hashtable(); |
@@ -235,7 +235,7 @@ namespace OpenSim.Framework.Communications | |||
235 | ArrayList InventoryRoot = new ArrayList(); | 235 | ArrayList InventoryRoot = new ArrayList(); |
236 | InventoryRoot.Add(InventoryRootHash); | 236 | InventoryRoot.Add(InventoryRootHash); |
237 | userProfile.RootInventoryFolderID = inventData.RootFolderID; | 237 | userProfile.RootInventoryFolderID = inventData.RootFolderID; |
238 | 238 | ||
239 | // Inventory Library Section | 239 | // Inventory Library Section |
240 | Hashtable InventoryLibRootHash = new Hashtable(); | 240 | Hashtable InventoryLibRootHash = new Hashtable(); |
241 | InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; | 241 | InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; |
@@ -244,10 +244,10 @@ namespace OpenSim.Framework.Communications | |||
244 | logResponse.InventoryLibRoot = InventoryLibRoot; | 244 | logResponse.InventoryLibRoot = InventoryLibRoot; |
245 | 245 | ||
246 | logResponse.InventoryLibraryOwner = GetLibraryOwner(); | 246 | logResponse.InventoryLibraryOwner = GetLibraryOwner(); |
247 | 247 | ||
248 | logResponse.InventoryRoot = InventoryRoot; | 248 | logResponse.InventoryRoot = InventoryRoot; |
249 | logResponse.InventorySkeleton = AgentInventoryArray; | 249 | logResponse.InventorySkeleton = AgentInventoryArray; |
250 | logResponse.InventoryLibrary = GetInventoryLibrary(); | 250 | logResponse.InventoryLibrary = GetInventoryLibrary(); |
251 | 251 | ||
252 | // Circuit Code | 252 | // Circuit Code |
253 | uint circode = (uint) (Util.RandomClass.Next()); | 253 | uint circode = (uint) (Util.RandomClass.Next()); |
@@ -280,15 +280,15 @@ namespace OpenSim.Framework.Communications | |||
280 | //return logResponse.ToXmlRpcResponse(); | 280 | //return logResponse.ToXmlRpcResponse(); |
281 | } | 281 | } |
282 | CommitAgent(ref userProfile); | 282 | CommitAgent(ref userProfile); |
283 | 283 | ||
284 | // If we reach this point, then the login has successfully logged onto the grid | 284 | // If we reach this point, then the login has successfully logged onto the grid |
285 | if (StatsManager.UserStats != null) | 285 | if (StatsManager.UserStats != null) |
286 | StatsManager.UserStats.AddSuccessfulLogin(); | 286 | StatsManager.UserStats.AddSuccessfulLogin(); |
287 | 287 | ||
288 | m_log.DebugFormat( | 288 | m_log.DebugFormat( |
289 | "[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.", | 289 | "[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.", |
290 | firstname, lastname); | 290 | firstname, lastname); |
291 | 291 | ||
292 | return logResponse.ToXmlRpcResponse(); | 292 | return logResponse.ToXmlRpcResponse(); |
293 | } | 293 | } |
294 | catch (Exception e) | 294 | catch (Exception e) |
@@ -422,10 +422,10 @@ namespace OpenSim.Framework.Communications | |||
422 | } | 422 | } |
423 | 423 | ||
424 | CommitAgent(ref userProfile); | 424 | CommitAgent(ref userProfile); |
425 | 425 | ||
426 | // If we reach this point, then the login has successfully logged onto the grid | 426 | // If we reach this point, then the login has successfully logged onto the grid |
427 | if (StatsManager.UserStats != null) | 427 | if (StatsManager.UserStats != null) |
428 | StatsManager.UserStats.AddSuccessfulLogin(); | 428 | StatsManager.UserStats.AddSuccessfulLogin(); |
429 | 429 | ||
430 | return logResponse.ToLLSDResponse(); | 430 | return logResponse.ToLLSDResponse(); |
431 | } | 431 | } |
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications | |||
449 | // period, space, parens, and dash. | 449 | // period, space, parens, and dash. |
450 | 450 | ||
451 | Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]"); | 451 | Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]"); |
452 | 452 | ||
453 | Hashtable returnactions = new Hashtable(); | 453 | Hashtable returnactions = new Hashtable(); |
454 | int statuscode = 200; | 454 | int statuscode = 200; |
455 | 455 | ||
@@ -467,7 +467,7 @@ namespace OpenSim.Framework.Communications | |||
467 | // the client requires the HTML form field be named 'username' | 467 | // the client requires the HTML form field be named 'username' |
468 | // however, the data it sends when it loads the first time is 'firstname' | 468 | // however, the data it sends when it loads the first time is 'firstname' |
469 | // another one of those little nuances. | 469 | // another one of those little nuances. |
470 | 470 | ||
471 | if (keysvals.Contains("firstname")) | 471 | if (keysvals.Contains("firstname")) |
472 | firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999); | 472 | firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999); |
473 | 473 | ||
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications | |||
494 | 494 | ||
495 | if (keysvals.Contains("lang")) | 495 | if (keysvals.Contains("lang")) |
496 | lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999); | 496 | lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999); |
497 | 497 | ||
498 | if (keysvals.Contains("password")) | 498 | if (keysvals.Contains("password")) |
499 | password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999); | 499 | password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999); |
500 | 500 | ||
@@ -541,8 +541,8 @@ namespace OpenSim.Framework.Communications | |||
541 | return returnactions; | 541 | return returnactions; |
542 | } | 542 | } |
543 | 543 | ||
544 | public string GetLoginForm(string firstname, string lastname, string location, string region, | 544 | public string GetLoginForm(string firstname, string lastname, string location, string region, |
545 | string grid, string channel, string version, string lang, | 545 | string grid, string channel, string version, string lang, |
546 | string password, string errormessages) | 546 | string password, string errormessages) |
547 | { | 547 | { |
548 | // inject our values in the form at the markers | 548 | // inject our values in the form at the markers |
@@ -559,7 +559,7 @@ namespace OpenSim.Framework.Communications | |||
559 | loginform = sr.ReadToEnd(); | 559 | loginform = sr.ReadToEnd(); |
560 | sr.Close(); | 560 | sr.Close(); |
561 | } | 561 | } |
562 | 562 | ||
563 | loginform = loginform.Replace("[$firstname]", firstname); | 563 | loginform = loginform.Replace("[$firstname]", firstname); |
564 | loginform = loginform.Replace("[$lastname]", lastname); | 564 | loginform = loginform.Replace("[$lastname]", lastname); |
565 | loginform = loginform.Replace("[$location]", location); | 565 | loginform = loginform.Replace("[$location]", location); |
@@ -586,7 +586,7 @@ namespace OpenSim.Framework.Communications | |||
586 | responseString += "<title>OpenSim Login</title>"; | 586 | responseString += "<title>OpenSim Login</title>"; |
587 | responseString += "<body><br />"; | 587 | responseString += "<body><br />"; |
588 | responseString += "<div id=\"login_box\">"; | 588 | responseString += "<div id=\"login_box\">"; |
589 | 589 | ||
590 | responseString += "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">"; | 590 | responseString += "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">"; |
591 | 591 | ||
592 | responseString += "<div id=\"message\">[$errors]</div>"; | 592 | responseString += "<div id=\"message\">[$errors]</div>"; |
@@ -670,13 +670,13 @@ namespace OpenSim.Framework.Communications | |||
670 | password = "$1$" + Util.Md5Hash(password); | 670 | password = "$1$" + Util.Md5Hash(password); |
671 | 671 | ||
672 | password = password.Remove(0, 3); //remove $1$ | 672 | password = password.Remove(0, 3); //remove $1$ |
673 | 673 | ||
674 | string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); | 674 | string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); |
675 | // Testing... | 675 | // Testing... |
676 | //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); | 676 | //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); |
677 | //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); | 677 | //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); |
678 | 678 | ||
679 | passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) | 679 | passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) |
680 | || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); | 680 | || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); |
681 | 681 | ||
682 | return passwordSuccess; | 682 | return passwordSuccess; |
@@ -694,7 +694,7 @@ namespace OpenSim.Framework.Communications | |||
694 | } | 694 | } |
695 | 695 | ||
696 | /// <summary> | 696 | /// <summary> |
697 | /// | 697 | /// |
698 | /// </summary> | 698 | /// </summary> |
699 | /// <param name="profile"></param> | 699 | /// <param name="profile"></param> |
700 | /// <param name="request"></param> | 700 | /// <param name="request"></param> |
@@ -709,7 +709,7 @@ namespace OpenSim.Framework.Communications | |||
709 | } | 709 | } |
710 | 710 | ||
711 | /// <summary> | 711 | /// <summary> |
712 | /// | 712 | /// |
713 | /// </summary> | 713 | /// </summary> |
714 | /// <param name="firstname"></param> | 714 | /// <param name="firstname"></param> |
715 | /// <param name="lastname"></param> | 715 | /// <param name="lastname"></param> |
@@ -720,7 +720,7 @@ namespace OpenSim.Framework.Communications | |||
720 | } | 720 | } |
721 | 721 | ||
722 | /// <summary> | 722 | /// <summary> |
723 | /// | 723 | /// |
724 | /// </summary> | 724 | /// </summary> |
725 | /// <returns></returns> | 725 | /// <returns></returns> |
726 | public virtual string GetMessage() | 726 | public virtual string GetMessage() |
@@ -741,17 +741,17 @@ namespace OpenSim.Framework.Communications | |||
741 | } | 741 | } |
742 | return buddylistreturn; | 742 | return buddylistreturn; |
743 | } | 743 | } |
744 | 744 | ||
745 | /// <summary> | 745 | /// <summary> |
746 | /// Converts the inventory library skeleton into the form required by the rpc request. | 746 | /// Converts the inventory library skeleton into the form required by the rpc request. |
747 | /// </summary> | 747 | /// </summary> |
748 | /// <returns></returns> | 748 | /// <returns></returns> |
749 | protected virtual ArrayList GetInventoryLibrary() | 749 | protected virtual ArrayList GetInventoryLibrary() |
750 | { | 750 | { |
751 | Dictionary<LLUUID, InventoryFolderImpl> rootFolders | 751 | Dictionary<LLUUID, InventoryFolderImpl> rootFolders |
752 | = m_libraryRootFolder.RequestSelfAndDescendentFolders(); | 752 | = m_libraryRootFolder.RequestSelfAndDescendentFolders(); |
753 | ArrayList folderHashes = new ArrayList(); | 753 | ArrayList folderHashes = new ArrayList(); |
754 | 754 | ||
755 | foreach (InventoryFolderBase folder in rootFolders.Values) | 755 | foreach (InventoryFolderBase folder in rootFolders.Values) |
756 | { | 756 | { |
757 | Hashtable TempHash = new Hashtable(); | 757 | Hashtable TempHash = new Hashtable(); |
@@ -762,12 +762,12 @@ namespace OpenSim.Framework.Communications | |||
762 | TempHash["folder_id"] = folder.ID.ToString(); | 762 | TempHash["folder_id"] = folder.ID.ToString(); |
763 | folderHashes.Add(TempHash); | 763 | folderHashes.Add(TempHash); |
764 | } | 764 | } |
765 | 765 | ||
766 | return folderHashes; | 766 | return folderHashes; |
767 | } | 767 | } |
768 | 768 | ||
769 | /// <summary> | 769 | /// <summary> |
770 | /// | 770 | /// |
771 | /// </summary> | 771 | /// </summary> |
772 | /// <returns></returns> | 772 | /// <returns></returns> |
773 | protected virtual ArrayList GetLibraryOwner() | 773 | protected virtual ArrayList GetLibraryOwner() |
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs index 9a53499..2df5fbc 100644 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 4ed62bf..7c8876a 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs | |||
@@ -16,14 +16,14 @@ namespace OpenSim.Framework.Communications | |||
16 | /// <remarks> | 16 | /// <remarks> |
17 | /// This class is a generic implementation of a REST (Representational State Transfer) web service. This | 17 | /// This class is a generic implementation of a REST (Representational State Transfer) web service. This |
18 | /// class is designed to execute both synchronously and asynchronously. | 18 | /// class is designed to execute both synchronously and asynchronously. |
19 | /// | 19 | /// |
20 | /// Internally the implementation works as a two stage asynchronous web-client. | 20 | /// Internally the implementation works as a two stage asynchronous web-client. |
21 | /// When the request is initiated, RestClient will query asynchronously for for a web-response, | 21 | /// When the request is initiated, RestClient will query asynchronously for for a web-response, |
22 | /// sleeping until the initial response is returned by the server. Once the initial response is retrieved | 22 | /// sleeping until the initial response is returned by the server. Once the initial response is retrieved |
23 | /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response | 23 | /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response |
24 | /// object into a memorystream as a sequence of asynchronous reads. | 24 | /// object into a memorystream as a sequence of asynchronous reads. |
25 | /// | 25 | /// |
26 | /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing | 26 | /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing |
27 | /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be | 27 | /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be |
28 | /// invoked by the caller in either synchronous mode or asynchronous modes. | 28 | /// invoked by the caller in either synchronous mode or asynchronous modes. |
29 | /// </remarks> | 29 | /// </remarks> |
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications | |||
36 | #region member variables | 36 | #region member variables |
37 | 37 | ||
38 | /// <summary> | 38 | /// <summary> |
39 | /// The base Uri of the web-service e.g. http://www.google.com | 39 | /// The base Uri of the web-service e.g. http://www.google.com |
40 | /// </summary> | 40 | /// </summary> |
41 | private string _url; | 41 | private string _url; |
42 | 42 | ||
@@ -92,7 +92,7 @@ namespace OpenSim.Framework.Communications | |||
92 | 92 | ||
93 | 93 | ||
94 | /// <summary> | 94 | /// <summary> |
95 | /// if an exception occours during async processing, we need to save it, so it can be | 95 | /// if an exception occours during async processing, we need to save it, so it can be |
96 | /// rethrown on the primary thread; | 96 | /// rethrown on the primary thread; |
97 | /// </summary> | 97 | /// </summary> |
98 | private Exception _asyncException; | 98 | private Exception _asyncException; |
@@ -341,7 +341,7 @@ namespace OpenSim.Framework.Communications | |||
341 | { | 341 | { |
342 | AsyncResult<Stream> ar = (AsyncResult<Stream>) asyncResult; | 342 | AsyncResult<Stream> ar = (AsyncResult<Stream>) asyncResult; |
343 | 343 | ||
344 | // Wait for operation to complete, then return result or | 344 | // Wait for operation to complete, then return result or |
345 | // throw exception | 345 | // throw exception |
346 | return ar.EndInvoke(); | 346 | return ar.EndInvoke(); |
347 | } | 347 | } |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 8e0b75c..5a62682 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications | |||
43 | /// </summary> | 43 | /// </summary> |
44 | public abstract class UserManagerBase : IUserService | 44 | public abstract class UserManagerBase : IUserService |
45 | { | 45 | { |
46 | private static readonly ILog m_log | 46 | private static readonly ILog m_log |
47 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | public UserConfig _config; | 49 | public UserConfig _config; |
50 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); | 50 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Adds a new user server plugin - user servers will be requested in the order they were loaded. | 53 | /// Adds a new user server plugin - user servers will be requested in the order they were loaded. |
54 | /// </summary> | 54 | /// </summary> |
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Communications | |||
85 | m_log.Info("[USERSTORAGE]: Added IUserData Interface"); | 85 | m_log.Info("[USERSTORAGE]: Added IUserData Interface"); |
86 | } | 86 | } |
87 | 87 | ||
88 | #region Get UserProfile | 88 | #region Get UserProfile |
89 | 89 | ||
90 | // see IUserService | 90 | // see IUserService |
91 | public UserProfileData GetUserProfile(string fname, string lname) | 91 | public UserProfileData GetUserProfile(string fname, string lname) |
@@ -103,8 +103,8 @@ namespace OpenSim.Framework.Communications | |||
103 | 103 | ||
104 | return null; | 104 | return null; |
105 | } | 105 | } |
106 | 106 | ||
107 | // see IUserService | 107 | // see IUserService |
108 | public UserProfileData GetUserProfile(LLUUID uuid) | 108 | public UserProfileData GetUserProfile(LLUUID uuid) |
109 | { | 109 | { |
110 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 110 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications | |||
408 | 408 | ||
409 | profile.CurrentAgent = agent; | 409 | profile.CurrentAgent = agent; |
410 | } | 410 | } |
411 | 411 | ||
412 | /// <summary> | 412 | /// <summary> |
413 | /// Process a user logoff from OpenSim. | 413 | /// Process a user logoff from OpenSim. |
414 | /// </summary> | 414 | /// </summary> |
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications | |||
422 | { | 422 | { |
423 | if (StatsManager.UserStats != null) | 423 | if (StatsManager.UserStats != null) |
424 | StatsManager.UserStats.AddLogout(); | 424 | StatsManager.UserStats.AddLogout(); |
425 | 425 | ||
426 | UserProfileData userProfile; | 426 | UserProfileData userProfile; |
427 | UserAgentData userAgent; | 427 | UserAgentData userAgent; |
428 | LLVector3 currentPos = new LLVector3(posx, posy, posz); | 428 | LLVector3 currentPos = new LLVector3(posx, posy, posz); |
@@ -433,7 +433,7 @@ namespace OpenSim.Framework.Communications | |||
433 | { | 433 | { |
434 | // This line needs to be in side the above if statement or the UserServer will crash on some logouts. | 434 | // This line needs to be in side the above if statement or the UserServer will crash on some logouts. |
435 | m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); | 435 | m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); |
436 | 436 | ||
437 | userAgent = userProfile.CurrentAgent; | 437 | userAgent = userProfile.CurrentAgent; |
438 | if (userAgent != null) | 438 | if (userAgent != null) |
439 | { | 439 | { |
@@ -462,7 +462,7 @@ namespace OpenSim.Framework.Communications | |||
462 | m_log.Warn("[LOGOUT]: Unknown User logged out"); | 462 | m_log.Warn("[LOGOUT]: Unknown User logged out"); |
463 | } | 463 | } |
464 | } | 464 | } |
465 | 465 | ||
466 | public void CreateAgent(UserProfileData profile, LLSD request) | 466 | public void CreateAgent(UserProfileData profile, LLSD request) |
467 | { | 467 | { |
468 | UserAgentData agent = new UserAgentData(); | 468 | UserAgentData agent = new UserAgentData(); |
@@ -516,7 +516,7 @@ namespace OpenSim.Framework.Communications | |||
516 | #endregion | 516 | #endregion |
517 | 517 | ||
518 | /// <summary> | 518 | /// <summary> |
519 | /// | 519 | /// |
520 | /// </summary> | 520 | /// </summary> |
521 | /// <param name="user"></param> | 521 | /// <param name="user"></param> |
522 | public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) | 522 | public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) |
@@ -598,7 +598,7 @@ namespace OpenSim.Framework.Communications | |||
598 | 598 | ||
599 | /// Appearance | 599 | /// Appearance |
600 | /// TODO: stubs for now to get us to a compiling state gently | 600 | /// TODO: stubs for now to get us to a compiling state gently |
601 | public AvatarAppearance GetUserAppearance(LLUUID user) | 601 | public AvatarAppearance GetUserAppearance(LLUUID user) |
602 | { | 602 | { |
603 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 603 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
604 | { | 604 | { |
@@ -643,7 +643,7 @@ namespace OpenSim.Framework.Communications | |||
643 | } | 643 | } |
644 | } | 644 | } |
645 | } | 645 | } |
646 | 646 | ||
647 | public void RemoveAttachment(LLUUID user, LLUUID item) | 647 | public void RemoveAttachment(LLUUID user, LLUUID item) |
648 | { | 648 | { |
649 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 649 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -658,7 +658,7 @@ namespace OpenSim.Framework.Communications | |||
658 | } | 658 | } |
659 | } | 659 | } |
660 | } | 660 | } |
661 | 661 | ||
662 | public List<LLUUID> GetAttachments(LLUUID user) | 662 | public List<LLUUID> GetAttachments(LLUUID user) |
663 | { | 663 | { |
664 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 664 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 79fe1d4..74e64e3 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Console | |||
58 | } | 58 | } |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// derive an ansi color from a string, ignoring the darker colors. | 61 | /// derive an ansi color from a string, ignoring the darker colors. |
62 | /// This is used to help automatically bin component tags with colors | 62 | /// This is used to help automatically bin component tags with colors |
63 | /// in various print functions. | 63 | /// in various print functions. |
64 | /// </summary> | 64 | /// </summary> |
@@ -195,7 +195,7 @@ namespace OpenSim.Framework.Console | |||
195 | System.Console.WriteLine(args); | 195 | System.Console.WriteLine(args); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | } | 198 | } |
199 | catch (ObjectDisposedException) | 199 | catch (ObjectDisposedException) |
200 | { | 200 | { |
201 | } | 201 | } |
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Console | |||
232 | { | 232 | { |
233 | } | 233 | } |
234 | } | 234 | } |
235 | 235 | ||
236 | public string ReadLine() | 236 | public string ReadLine() |
237 | { | 237 | { |
238 | try | 238 | try |
@@ -245,7 +245,7 @@ namespace OpenSim.Framework.Console | |||
245 | return String.Empty; | 245 | return String.Empty; |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | public int Read() | 249 | public int Read() |
250 | { | 250 | { |
251 | return System.Console.Read(); | 251 | return System.Console.Read(); |
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs index d381179..ddd6d9a 100644 --- a/OpenSim/Framework/Console/OpenSimAppender.cs +++ b/OpenSim/Framework/Console/OpenSimAppender.cs | |||
@@ -40,32 +40,32 @@ namespace OpenSim.Framework.Console | |||
40 | string loggingMessage = RenderLoggingEvent(le); | 40 | string loggingMessage = RenderLoggingEvent(le); |
41 | 41 | ||
42 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; | 42 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; |
43 | 43 | ||
44 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 44 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
45 | MatchCollection matches = RE.Matches(loggingMessage); | 45 | MatchCollection matches = RE.Matches(loggingMessage); |
46 | // Get some direct matches $1 $4 is a | 46 | // Get some direct matches $1 $4 is a |
47 | if (matches.Count == 1) | 47 | if (matches.Count == 1) |
48 | { | 48 | { |
49 | System.Console.Write(matches[0].Groups["Front"].Value); | 49 | System.Console.Write(matches[0].Groups["Front"].Value); |
50 | System.Console.Write("["); | 50 | System.Console.Write("["); |
51 | 51 | ||
52 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); | 52 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); |
53 | System.Console.Write("]:"); | 53 | System.Console.Write("]:"); |
54 | 54 | ||
55 | if (le.Level == Level.Error) | 55 | if (le.Level == Level.Error) |
56 | { | 56 | { |
57 | WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value); | 57 | WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value); |
58 | } | 58 | } |
59 | else if (le.Level == Level.Warn) | 59 | else if (le.Level == Level.Warn) |
60 | { | 60 | { |
61 | WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value); | 61 | WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value); |
62 | } | 62 | } |
63 | else | 63 | else |
64 | { | 64 | { |
65 | System.Console.Write(matches[0].Groups["End"].Value); | 65 | System.Console.Write(matches[0].Groups["End"].Value); |
66 | } | 66 | } |
67 | System.Console.WriteLine(); | 67 | System.Console.WriteLine(); |
68 | } | 68 | } |
69 | else | 69 | else |
70 | { | 70 | { |
71 | System.Console.Write(loggingMessage); | 71 | System.Console.Write(loggingMessage); |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 098e721..343b5a6 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Framework | |||
156 | } | 156 | } |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// | 159 | /// |
160 | /// </summary> | 160 | /// </summary> |
161 | public IScene Scene | 161 | public IScene Scene |
162 | { | 162 | { |
@@ -181,7 +181,7 @@ namespace OpenSim.Framework | |||
181 | } | 181 | } |
182 | 182 | ||
183 | /// <summary> | 183 | /// <summary> |
184 | /// | 184 | /// |
185 | /// </summary> | 185 | /// </summary> |
186 | public uint PacketNumber | 186 | public uint PacketNumber |
187 | { | 187 | { |
@@ -190,7 +190,7 @@ namespace OpenSim.Framework | |||
190 | } | 190 | } |
191 | 191 | ||
192 | /// <summary> | 192 | /// <summary> |
193 | /// | 193 | /// |
194 | /// </summary> | 194 | /// </summary> |
195 | public sbyte DiscardLevel | 195 | public sbyte DiscardLevel |
196 | { | 196 | { |
@@ -199,7 +199,7 @@ namespace OpenSim.Framework | |||
199 | } | 199 | } |
200 | 200 | ||
201 | /// <summary> | 201 | /// <summary> |
202 | /// | 202 | /// |
203 | /// </summary> | 203 | /// </summary> |
204 | public LLUUID RequestedAssetID | 204 | public LLUUID RequestedAssetID |
205 | { | 205 | { |
@@ -213,7 +213,7 @@ namespace OpenSim.Framework | |||
213 | private List<Wearable> m_nowWearing = new List<Wearable>(); | 213 | private List<Wearable> m_nowWearing = new List<Wearable>(); |
214 | 214 | ||
215 | /// <summary> | 215 | /// <summary> |
216 | /// | 216 | /// |
217 | /// </summary> | 217 | /// </summary> |
218 | public List<Wearable> NowWearing | 218 | public List<Wearable> NowWearing |
219 | { | 219 | { |
@@ -381,7 +381,7 @@ namespace OpenSim.Framework | |||
381 | public delegate void ImprovedInstantMessage(IClientAPI remoteclient, | 381 | public delegate void ImprovedInstantMessage(IClientAPI remoteclient, |
382 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, | 382 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, |
383 | string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, | 383 | string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, |
384 | LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... | 384 | LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... |
385 | // especially if we're ever going to implement groups, presence, estate message dialogs... | 385 | // especially if we're ever going to implement groups, presence, estate message dialogs... |
386 | 386 | ||
387 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, | 387 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, |
@@ -607,7 +607,7 @@ namespace OpenSim.Framework | |||
607 | public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); | 607 | public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); |
608 | 608 | ||
609 | public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID); | 609 | public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID); |
610 | 610 | ||
611 | //Estate Requests | 611 | //Estate Requests |
612 | public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice); | 612 | public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice); |
613 | public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges); | 613 | public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges); |
@@ -764,7 +764,7 @@ namespace OpenSim.Framework | |||
764 | event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 764 | event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
765 | event ParcelSelectObjects OnParcelSelectObjects; | 765 | event ParcelSelectObjects OnParcelSelectObjects; |
766 | event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; | 766 | event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; |
767 | event ParcelAbandonRequest OnParcelAbandonRequest; | 767 | event ParcelAbandonRequest OnParcelAbandonRequest; |
768 | event RegionInfoRequest OnRegionInfoRequest; | 768 | event RegionInfoRequest OnRegionInfoRequest; |
769 | event EstateCovenantRequest OnEstateCovenantRequest; | 769 | event EstateCovenantRequest OnEstateCovenantRequest; |
770 | 770 | ||
@@ -808,7 +808,7 @@ namespace OpenSim.Framework | |||
808 | event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; | 808 | event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; |
809 | 809 | ||
810 | 810 | ||
811 | 811 | ||
812 | [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] | 812 | [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] |
813 | void OutPacket(Packet newPack, ThrottleOutPacketType packType); | 813 | void OutPacket(Packet newPack, ThrottleOutPacketType packType); |
814 | void SendWearables(AvatarWearable[] wearables, int serial); | 814 | void SendWearables(AvatarWearable[] wearables, int serial); |
@@ -858,16 +858,16 @@ namespace OpenSim.Framework | |||
858 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); | 858 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); |
859 | void SetChildAgentThrottle(byte[] throttle); | 859 | void SetChildAgentThrottle(byte[] throttle); |
860 | 860 | ||
861 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 861 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
862 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, | 862 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, |
863 | uint flags, | 863 | uint flags, |
864 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, | 864 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, |
865 | byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId); | 865 | byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId); |
866 | |||
867 | 866 | ||
868 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 867 | |
868 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
869 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, | 869 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, |
870 | uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 870 | uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
871 | uint parentID, byte[] particleSystem, byte clickAction); | 871 | uint parentID, byte[] particleSystem, byte clickAction); |
872 | 872 | ||
873 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 873 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
@@ -889,7 +889,7 @@ namespace OpenSim.Framework | |||
889 | void SendInventoryItemCreateUpdate(InventoryItemBase Item); | 889 | void SendInventoryItemCreateUpdate(InventoryItemBase Item); |
890 | 890 | ||
891 | void SendRemoveInventoryItem(LLUUID itemID); | 891 | void SendRemoveInventoryItem(LLUUID itemID); |
892 | 892 | ||
893 | void SendTakeControls(int controls, bool passToAgent, bool TakeControls); | 893 | void SendTakeControls(int controls, bool passToAgent, bool TakeControls); |
894 | 894 | ||
895 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); | 895 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); |
@@ -950,7 +950,7 @@ namespace OpenSim.Framework | |||
950 | void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); | 950 | void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); |
951 | void SendConfirmXfer(ulong xferID, uint PacketID); | 951 | void SendConfirmXfer(ulong xferID, uint PacketID); |
952 | void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); | 952 | void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); |
953 | 953 | ||
954 | void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); | 954 | void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); |
955 | 955 | ||
956 | void SendShutdownConnectionNotice(); | 956 | void SendShutdownConnectionNotice(); |
@@ -973,9 +973,9 @@ namespace OpenSim.Framework | |||
973 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); | 973 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); |
974 | 974 | ||
975 | void SendAdminResponse(LLUUID Token, uint AdminLevel); | 975 | void SendAdminResponse(LLUUID Token, uint AdminLevel); |
976 | 976 | ||
977 | void SendGroupMembership(GroupData[] GroupMembership); | 977 | void SendGroupMembership(GroupData[] GroupMembership); |
978 | 978 | ||
979 | 979 | ||
980 | byte[] GetThrottlesPacked(float multiplier); | 980 | byte[] GetThrottlesPacked(float multiplier); |
981 | 981 | ||
diff --git a/OpenSim/Framework/IClientAPI2.cs b/OpenSim/Framework/IClientAPI2.cs index 684f3e8..aa70dc3 100644 --- a/OpenSim/Framework/IClientAPI2.cs +++ b/OpenSim/Framework/IClientAPI2.cs | |||
@@ -5,14 +5,14 @@ namespace OpenSim.Framework | |||
5 | #region Args Classes | 5 | #region Args Classes |
6 | public class ICA2_ConnectionArgs : EventArgs | 6 | public class ICA2_ConnectionArgs : EventArgs |
7 | { | 7 | { |
8 | 8 | ||
9 | } | 9 | } |
10 | 10 | ||
11 | public class ICA2_DisconnectionArgs : EventArgs | 11 | public class ICA2_DisconnectionArgs : EventArgs |
12 | { | 12 | { |
13 | public bool Forced; | 13 | public bool Forced; |
14 | 14 | ||
15 | // Static Constructor | 15 | // Static Constructor |
16 | // Allows us to recycle these classes later more easily from a pool. | 16 | // Allows us to recycle these classes later more easily from a pool. |
17 | public static ICA2_DisconnectionArgs Create(bool forced) | 17 | public static ICA2_DisconnectionArgs Create(bool forced) |
18 | { | 18 | { |
diff --git a/OpenSim/Framework/IInventoryData.cs b/OpenSim/Framework/IInventoryData.cs index f283085..fabcbe2 100644 --- a/OpenSim/Framework/IInventoryData.cs +++ b/OpenSim/Framework/IInventoryData.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Framework | |||
120 | void updateInventoryItem(InventoryItemBase item); | 120 | void updateInventoryItem(InventoryItemBase item); |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// | 123 | /// |
124 | /// </summary> | 124 | /// </summary> |
125 | /// <param name="item"></param> | 125 | /// <param name="item"></param> |
126 | void deleteInventoryItem(LLUUID item); | 126 | void deleteInventoryItem(LLUUID item); |
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs index be05094..0b25f7e 100644 --- a/OpenSim/Framework/IUserData.cs +++ b/OpenSim/Framework/IUserData.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Framework | |||
87 | void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); | 87 | void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); |
88 | 88 | ||
89 | /// <summary> | 89 | /// <summary> |
90 | /// Adds a new User profile to the database | 90 | /// Adds a new User profile to the database |
91 | /// </summary> | 91 | /// </summary> |
92 | /// <param name="user">UserProfile to add</param> | 92 | /// <param name="user">UserProfile to add</param> |
93 | void AddNewUserProfile(UserProfileData user); | 93 | void AddNewUserProfile(UserProfileData user); |
@@ -181,8 +181,8 @@ namespace OpenSim.Framework | |||
181 | AvatarAppearance GetUserAppearance(LLUUID user); | 181 | AvatarAppearance GetUserAppearance(LLUUID user); |
182 | 182 | ||
183 | void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); | 183 | void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); |
184 | 184 | ||
185 | 185 | ||
186 | void AddAttachment(LLUUID user, LLUUID item); | 186 | void AddAttachment(LLUUID user, LLUUID item); |
187 | void RemoveAttachment(LLUUID user, LLUUID item); | 187 | void RemoveAttachment(LLUUID user, LLUUID item); |
188 | List<LLUUID> GetAttachments(LLUUID user); | 188 | List<LLUUID> GetAttachments(LLUUID user); |
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs index 910f7da..31bb02f 100644 --- a/OpenSim/Framework/InventoryFolderBase.cs +++ b/OpenSim/Framework/InventoryFolderBase.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Framework | |||
50 | private LLUUID _owner; | 50 | private LLUUID _owner; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// The folder this folder is contained in | 53 | /// The folder this folder is contained in |
54 | /// </summary> | 54 | /// </summary> |
55 | private LLUUID _parentID; | 55 | private LLUUID _parentID; |
56 | 56 | ||
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index dbf2085..8d873db 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Framework | |||
45 | private int _assetType; | 45 | private int _assetType; |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// | 48 | /// |
49 | /// </summary> | 49 | /// </summary> |
50 | private uint _basePermissions; | 50 | private uint _basePermissions; |
51 | 51 | ||
@@ -69,12 +69,12 @@ namespace OpenSim.Framework | |||
69 | private string _description; | 69 | private string _description; |
70 | 70 | ||
71 | /// <summary> | 71 | /// <summary> |
72 | /// | 72 | /// |
73 | /// </summary> | 73 | /// </summary> |
74 | private uint _everyOnePermissions; | 74 | private uint _everyOnePermissions; |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// The folder this item is contained in | 77 | /// The folder this item is contained in |
78 | /// </summary> | 78 | /// </summary> |
79 | private LLUUID _folder; | 79 | private LLUUID _folder; |
80 | 80 | ||
@@ -93,34 +93,34 @@ namespace OpenSim.Framework | |||
93 | /// </summary> | 93 | /// </summary> |
94 | private string _name; | 94 | private string _name; |
95 | 95 | ||
96 | 96 | ||
97 | /// <summary> | 97 | /// <summary> |
98 | /// | 98 | /// |
99 | /// </summary> | 99 | /// </summary> |
100 | private LLUUID _groupID; | 100 | private LLUUID _groupID; |
101 | 101 | ||
102 | /// <summary> | 102 | /// <summary> |
103 | /// | 103 | /// |
104 | /// </summary> | 104 | /// </summary> |
105 | private bool _groupOwned; | 105 | private bool _groupOwned; |
106 | 106 | ||
107 | /// <summary> | 107 | /// <summary> |
108 | /// | 108 | /// |
109 | /// </summary> | 109 | /// </summary> |
110 | private int _salePrice; | 110 | private int _salePrice; |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
113 | /// | 113 | /// |
114 | /// </summary> | 114 | /// </summary> |
115 | private byte _saleType; | 115 | private byte _saleType; |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// | 118 | /// |
119 | /// </summary> | 119 | /// </summary> |
120 | private uint _flags; | 120 | private uint _flags; |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// | 123 | /// |
124 | /// </summary> | 124 | /// </summary> |
125 | public int _creationDate; | 125 | public int _creationDate; |
126 | 126 | ||
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index 422c939..c4c5813 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Framework | |||
63 | #endregion | 63 | #endregion |
64 | 64 | ||
65 | /// <summary> | 65 | /// <summary> |
66 | /// | 66 | /// |
67 | /// </summary> | 67 | /// </summary> |
68 | /// <param name="agent"></param> | 68 | /// <param name="agent"></param> |
69 | /// <returns></returns> | 69 | /// <returns></returns> |
@@ -171,7 +171,7 @@ namespace OpenSim.Framework | |||
171 | } | 171 | } |
172 | 172 | ||
173 | /// <summary> | 173 | /// <summary> |
174 | /// | 174 | /// |
175 | /// </summary> | 175 | /// </summary> |
176 | /// <remarks>TODO: Doesnt take any args??</remarks> | 176 | /// <remarks>TODO: Doesnt take any args??</remarks> |
177 | /// <returns></returns> | 177 | /// <returns></returns> |
@@ -188,7 +188,7 @@ namespace OpenSim.Framework | |||
188 | } | 188 | } |
189 | 189 | ||
190 | /// <summary> | 190 | /// <summary> |
191 | /// | 191 | /// |
192 | /// </summary> | 192 | /// </summary> |
193 | /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks> | 193 | /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks> |
194 | /// <param name="neighbours"></param> | 194 | /// <param name="neighbours"></param> |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 158ddde..d9d41d6 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Framework | |||
37 | [Serializable] | 37 | [Serializable] |
38 | public class SimpleRegionInfo | 38 | public class SimpleRegionInfo |
39 | { | 39 | { |
40 | // private static readonly log4net.ILog m_log | 40 | // private static readonly log4net.ILog m_log |
41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | protected bool Allow_Alternate_Ports; | 43 | protected bool Allow_Alternate_Ports; |
@@ -114,7 +114,7 @@ namespace OpenSim.Framework | |||
114 | 114 | ||
115 | /// <value> | 115 | /// <value> |
116 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. | 116 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. |
117 | /// | 117 | /// |
118 | /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method? | 118 | /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method? |
119 | /// </value> | 119 | /// </value> |
120 | public IPEndPoint ExternalEndPoint | 120 | public IPEndPoint ExternalEndPoint |
@@ -187,7 +187,7 @@ namespace OpenSim.Framework | |||
187 | 187 | ||
188 | public class RegionInfo : SimpleRegionInfo | 188 | public class RegionInfo : SimpleRegionInfo |
189 | { | 189 | { |
190 | // private static readonly log4net.ILog m_log | 190 | // private static readonly log4net.ILog m_log |
191 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 191 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
192 | 192 | ||
193 | public bool commFailTF = false; | 193 | public bool commFailTF = false; |
@@ -327,7 +327,7 @@ namespace OpenSim.Framework | |||
327 | 327 | ||
328 | if (errorMessage != String.Empty) | 328 | if (errorMessage != String.Empty) |
329 | { | 329 | { |
330 | // a error | 330 | // a error |
331 | } | 331 | } |
332 | } | 332 | } |
333 | 333 | ||
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs index cb0911e..4f56d52 100644 --- a/OpenSim/Framework/Remoting.cs +++ b/OpenSim/Framework/Remoting.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Framework | |||
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. | 89 | /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. |
90 | /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the | 90 | /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the |
91 | /// hashes will get out of sync and throw an exception when validation is attempted. | 91 | /// hashes will get out of sync and throw an exception when validation is attempted. |
92 | /// </summary> | 92 | /// </summary> |
93 | /// <param name="data">The outgoing data</param> | 93 | /// <param name="data">The outgoing data</param> |
diff --git a/OpenSim/Framework/SerializableInventory.cs b/OpenSim/Framework/SerializableInventory.cs index 81f993c..fcf13a8 100644 --- a/OpenSim/Framework/SerializableInventory.cs +++ b/OpenSim/Framework/SerializableInventory.cs | |||
@@ -30,7 +30,7 @@ using System.Xml.Serialization; | |||
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | /* | 33 | /* |
34 | * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder | 34 | * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder |
35 | * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize | 35 | * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize |
36 | * into this simpler class, and then use that. | 36 | * into this simpler class, and then use that. |
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs index 44081b2..4965a43 100644 --- a/OpenSim/Framework/SerializableRegionInfo.cs +++ b/OpenSim/Framework/SerializableRegionInfo.cs | |||
@@ -40,8 +40,8 @@ namespace OpenSim.Framework | |||
40 | 40 | ||
41 | /// <value> | 41 | /// <value> |
42 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) | 42 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) |
43 | /// | 43 | /// |
44 | /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region | 44 | /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region |
45 | /// servers are running) until the revision in which this change is made propogates around grids. | 45 | /// servers are running) until the revision in which this change is made propogates around grids. |
46 | /// </value> | 46 | /// </value> |
47 | protected uint m_httpPort = 9000; | 47 | protected uint m_httpPort = 9000; |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 50f4e23..1eb1da9 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -82,10 +82,10 @@ namespace OpenSim.Framework.Servers | |||
82 | string path = handler.Path; | 82 | string path = handler.Path; |
83 | 83 | ||
84 | string handlerKey = GetHandlerKey(httpMethod, path); | 84 | string handlerKey = GetHandlerKey(httpMethod, path); |
85 | 85 | ||
86 | if (!m_streamHandlers.ContainsKey(handlerKey)) | 86 | if (!m_streamHandlers.ContainsKey(handlerKey)) |
87 | { | 87 | { |
88 | //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); | 88 | //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); |
89 | m_streamHandlers.Add(handlerKey, handler); | 89 | m_streamHandlers.Add(handlerKey, handler); |
90 | } | 90 | } |
91 | } | 91 | } |
@@ -135,20 +135,20 @@ namespace OpenSim.Framework.Servers | |||
135 | try | 135 | try |
136 | { | 136 | { |
137 | HttpListenerContext context = (HttpListenerContext) stateinfo; | 137 | HttpListenerContext context = (HttpListenerContext) stateinfo; |
138 | 138 | ||
139 | HttpListenerRequest request = context.Request; | 139 | HttpListenerRequest request = context.Request; |
140 | HttpListenerResponse response = context.Response; | 140 | HttpListenerResponse response = context.Response; |
141 | 141 | ||
142 | response.KeepAlive = false; | 142 | response.KeepAlive = false; |
143 | response.SendChunked = false; | 143 | response.SendChunked = false; |
144 | 144 | ||
145 | string path = request.RawUrl; | 145 | string path = request.RawUrl; |
146 | string handlerKey = GetHandlerKey(request.HttpMethod, path); | 146 | string handlerKey = GetHandlerKey(request.HttpMethod, path); |
147 | 147 | ||
148 | //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); | 148 | //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); |
149 | 149 | ||
150 | IRequestHandler requestHandler; | 150 | IRequestHandler requestHandler; |
151 | 151 | ||
152 | if (TryGetStreamHandler(handlerKey, out requestHandler)) | 152 | if (TryGetStreamHandler(handlerKey, out requestHandler)) |
153 | { | 153 | { |
154 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. | 154 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. |
@@ -156,13 +156,13 @@ namespace OpenSim.Framework.Servers | |||
156 | if (requestHandler is IStreamedRequestHandler) | 156 | if (requestHandler is IStreamedRequestHandler) |
157 | { | 157 | { |
158 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; | 158 | IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; |
159 | 159 | ||
160 | buffer = streamedRequestHandler.Handle(path, request.InputStream); | 160 | buffer = streamedRequestHandler.Handle(path, request.InputStream); |
161 | } | 161 | } |
162 | else | 162 | else |
163 | { | 163 | { |
164 | IStreamHandler streamHandler = (IStreamHandler) requestHandler; | 164 | IStreamHandler streamHandler = (IStreamHandler) requestHandler; |
165 | 165 | ||
166 | using (MemoryStream memoryStream = new MemoryStream()) | 166 | using (MemoryStream memoryStream = new MemoryStream()) |
167 | { | 167 | { |
168 | streamHandler.Handle(path, request.InputStream, memoryStream); | 168 | streamHandler.Handle(path, request.InputStream, memoryStream); |
@@ -170,11 +170,11 @@ namespace OpenSim.Framework.Servers | |||
170 | buffer = memoryStream.ToArray(); | 170 | buffer = memoryStream.ToArray(); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | request.InputStream.Close(); | 174 | request.InputStream.Close(); |
175 | response.ContentType = requestHandler.ContentType; | 175 | response.ContentType = requestHandler.ContentType; |
176 | response.ContentLength64 = buffer.LongLength; | 176 | response.ContentLength64 = buffer.LongLength; |
177 | 177 | ||
178 | try | 178 | try |
179 | { | 179 | { |
180 | response.OutputStream.Write(buffer, 0, buffer.Length); | 180 | response.OutputStream.Write(buffer, 0, buffer.Length); |
@@ -273,7 +273,7 @@ namespace OpenSim.Framework.Servers | |||
273 | return true; | 273 | return true; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | /// <summary> | 277 | /// <summary> |
278 | /// Try all the registered xmlrpc handlers when an xmlrpc request is received. | 278 | /// Try all the registered xmlrpc handlers when an xmlrpc request is received. |
279 | /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method. | 279 | /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method. |
@@ -434,7 +434,7 @@ namespace OpenSim.Framework.Servers | |||
434 | { | 434 | { |
435 | // This is a test. There's a workable alternative.. as this way sucks. | 435 | // This is a test. There's a workable alternative.. as this way sucks. |
436 | // We'd like to put this into a text file parhaps that's easily editable. | 436 | // We'd like to put this into a text file parhaps that's easily editable. |
437 | // | 437 | // |
438 | // For this test to work, I used the following secondlife.exe parameters | 438 | // For this test to work, I used the following secondlife.exe parameters |
439 | // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 | 439 | // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 |
440 | // | 440 | // |
@@ -461,7 +461,7 @@ namespace OpenSim.Framework.Servers | |||
461 | string[] querystringkeys = request.QueryString.AllKeys; | 461 | string[] querystringkeys = request.QueryString.AllKeys; |
462 | string[] rHeaders = request.Headers.AllKeys; | 462 | string[] rHeaders = request.Headers.AllKeys; |
463 | 463 | ||
464 | 464 | ||
465 | foreach (string queryname in querystringkeys) | 465 | foreach (string queryname in querystringkeys) |
466 | { | 466 | { |
467 | keysvals.Add(queryname, request.QueryString[queryname]); | 467 | keysvals.Add(queryname, request.QueryString[queryname]); |
@@ -489,7 +489,7 @@ namespace OpenSim.Framework.Servers | |||
489 | { | 489 | { |
490 | Hashtable responsedata = requestprocessor(keysvals); | 490 | Hashtable responsedata = requestprocessor(keysvals); |
491 | DoHTTPGruntWork(responsedata,response); | 491 | DoHTTPGruntWork(responsedata,response); |
492 | 492 | ||
493 | //SendHTML500(response); | 493 | //SendHTML500(response); |
494 | } | 494 | } |
495 | else | 495 | else |
@@ -519,7 +519,7 @@ namespace OpenSim.Framework.Servers | |||
519 | contentType = "text/html"; | 519 | contentType = "text/html"; |
520 | } | 520 | } |
521 | 521 | ||
522 | // We're forgoing the usual error status codes here because the client | 522 | // We're forgoing the usual error status codes here because the client |
523 | // ignores anything but 200 and 301 | 523 | // ignores anything but 200 and 301 |
524 | 524 | ||
525 | response.StatusCode = 200; | 525 | response.StatusCode = 200; |
@@ -649,10 +649,10 @@ namespace OpenSim.Framework.Servers | |||
649 | 649 | ||
650 | public void RemoveStreamHandler(string httpMethod, string path) | 650 | public void RemoveStreamHandler(string httpMethod, string path) |
651 | { | 651 | { |
652 | string handlerKey = GetHandlerKey(httpMethod, path); | 652 | string handlerKey = GetHandlerKey(httpMethod, path); |
653 | 653 | ||
654 | //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); | 654 | //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); |
655 | 655 | ||
656 | m_streamHandlers.Remove(handlerKey); | 656 | m_streamHandlers.Remove(handlerKey); |
657 | } | 657 | } |
658 | 658 | ||
@@ -660,7 +660,7 @@ namespace OpenSim.Framework.Servers | |||
660 | { | 660 | { |
661 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); | 661 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); |
662 | } | 662 | } |
663 | 663 | ||
664 | public string GetHTTP404(string host) | 664 | public string GetHTTP404(string host) |
665 | { | 665 | { |
666 | string file = Path.Combine(Util.configDir(), "http_404.html"); | 666 | string file = Path.Combine(Util.configDir(), "http_404.html"); |
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 811a0db..fcbc5a1 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -44,16 +44,16 @@ namespace OpenSim.Framework.Servers | |||
44 | { | 44 | { |
45 | get { return m_httpServer; } | 45 | get { return m_httpServer; } |
46 | } | 46 | } |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Holds the non-viewer statistics collection object for this service/server | 49 | /// Holds the non-viewer statistics collection object for this service/server |
50 | /// </summary> | 50 | /// </summary> |
51 | protected IStatsCollector m_stats; | 51 | protected IStatsCollector m_stats; |
52 | 52 | ||
53 | public BaseOpenSimServer() | 53 | public BaseOpenSimServer() |
54 | { | 54 | { |
55 | m_startuptime = DateTime.Now; | 55 | m_startuptime = DateTime.Now; |
56 | } | 56 | } |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Should be overriden by descendents if they need to perform extra shutdown processing | 59 | /// Should be overriden by descendents if they need to perform extra shutdown processing |
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Servers | |||
66 | } | 66 | } |
67 | Environment.Exit(0); | 67 | Environment.Exit(0); |
68 | } | 68 | } |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// Runs commands issued by the server console from the operator | 71 | /// Runs commands issued by the server console from the operator |
72 | /// </summary> | 72 | /// </summary> |
@@ -75,17 +75,17 @@ namespace OpenSim.Framework.Servers | |||
75 | public virtual void RunCmd(string command, string[] cmdparams) | 75 | public virtual void RunCmd(string command, string[] cmdparams) |
76 | { | 76 | { |
77 | switch (command) | 77 | switch (command) |
78 | { | 78 | { |
79 | case "help": | 79 | case "help": |
80 | Notice("quit - equivalent to shutdown."); | 80 | Notice("quit - equivalent to shutdown."); |
81 | 81 | ||
82 | if (m_stats != null) | 82 | if (m_stats != null) |
83 | Notice("show stats - statistical information for this server"); | 83 | Notice("show stats - statistical information for this server"); |
84 | 84 | ||
85 | Notice("show uptime - show server startup and uptime."); | 85 | Notice("show uptime - show server startup and uptime."); |
86 | Notice("shutdown - shutdown the server.\n"); | 86 | Notice("shutdown - shutdown the server.\n"); |
87 | break; | 87 | break; |
88 | 88 | ||
89 | case "show": | 89 | case "show": |
90 | if (cmdparams.Length > 0) | 90 | if (cmdparams.Length > 0) |
91 | { | 91 | { |
@@ -96,10 +96,10 @@ namespace OpenSim.Framework.Servers | |||
96 | case "quit": | 96 | case "quit": |
97 | case "shutdown": | 97 | case "shutdown": |
98 | Shutdown(); | 98 | Shutdown(); |
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | /// <summary> | 103 | /// <summary> |
104 | /// Outputs to the console information about the region | 104 | /// Outputs to the console information about the region |
105 | /// </summary> | 105 | /// </summary> |
@@ -107,18 +107,18 @@ namespace OpenSim.Framework.Servers | |||
107 | public virtual void Show(string ShowWhat) | 107 | public virtual void Show(string ShowWhat) |
108 | { | 108 | { |
109 | switch (ShowWhat) | 109 | switch (ShowWhat) |
110 | { | 110 | { |
111 | case "stats": | 111 | case "stats": |
112 | if (m_stats != null) | 112 | if (m_stats != null) |
113 | { | 113 | { |
114 | Notice(m_stats.Report()); | 114 | Notice(m_stats.Report()); |
115 | } | 115 | } |
116 | break; | 116 | break; |
117 | 117 | ||
118 | case "uptime": | 118 | case "uptime": |
119 | Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); | 119 | Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); |
120 | Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); | 120 | Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); |
121 | break; | 121 | break; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs index 1410afd..05bfaa1 100644 --- a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs +++ b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs | |||
@@ -38,12 +38,12 @@ namespace OpenSim.Framework.Servers | |||
38 | 38 | ||
39 | /// <summary> | 39 | /// <summary> |
40 | /// Makes an asynchronous REST request with a callback to invoke with the response. | 40 | /// Makes an asynchronous REST request with a callback to invoke with the response. |
41 | /// </summary> | 41 | /// </summary> |
42 | public class RestObjectPosterResponse<TResponse> | 42 | public class RestObjectPosterResponse<TResponse> |
43 | { | 43 | { |
44 | // private static readonly log4net.ILog m_log | 44 | // private static readonly log4net.ILog m_log |
45 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | public ReturnResponse<TResponse> ResponseCallback; | 47 | public ReturnResponse<TResponse> ResponseCallback; |
48 | 48 | ||
49 | public void BeginPostObject<TRequest>(string requestUrl, TRequest obj) | 49 | public void BeginPostObject<TRequest>(string requestUrl, TRequest obj) |
@@ -87,11 +87,11 @@ namespace OpenSim.Framework.Servers | |||
87 | TResponse deserial; | 87 | TResponse deserial; |
88 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); | 88 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); |
89 | Stream stream = resp.GetResponseStream(); | 89 | Stream stream = resp.GetResponseStream(); |
90 | 90 | ||
91 | // This is currently a bad debug stanza since it gobbles us the response... | 91 | // This is currently a bad debug stanza since it gobbles us the response... |
92 | // StreamReader reader = new StreamReader(stream); | 92 | // StreamReader reader = new StreamReader(stream); |
93 | // m_log.DebugFormat("[REST OBJECT POSTER RESPONSE]: Received {0}", reader.ReadToEnd()); | 93 | // m_log.DebugFormat("[REST OBJECT POSTER RESPONSE]: Received {0}", reader.ReadToEnd()); |
94 | 94 | ||
95 | deserial = (TResponse) deserializer.Deserialize(stream); | 95 | deserial = (TResponse) deserializer.Deserialize(stream); |
96 | 96 | ||
97 | if (deserial != null && ResponseCallback != null) | 97 | if (deserial != null && ResponseCallback != null) |
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs index cab5208..76dbd73 100644 --- a/OpenSim/Framework/Servers/RestStreamHandler.cs +++ b/OpenSim/Framework/Servers/RestStreamHandler.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers | |||
34 | { | 34 | { |
35 | private RestMethod m_restMethod; | 35 | private RestMethod m_restMethod; |
36 | 36 | ||
37 | public RestMethod Method | 37 | public RestMethod Method |
38 | { | 38 | { |
39 | get { return m_restMethod; } | 39 | get { return m_restMethod; } |
40 | } | 40 | } |
diff --git a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs index 103fbe5..1b8e4ea 100644 --- a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs +++ b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs | |||
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Servers | |||
75 | using (WebResponse resp = request.GetResponse()) | 75 | using (WebResponse resp = request.GetResponse()) |
76 | { | 76 | { |
77 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); | 77 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); |
78 | deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); | 78 | deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); |
79 | } | 79 | } |
80 | return deserial; | 80 | return deserial; |
81 | } | 81 | } |
diff --git a/OpenSim/Framework/Statistics/AssetStatsCollector.cs b/OpenSim/Framework/Statistics/AssetStatsCollector.cs index bd36c3f..ed6779d 100644 --- a/OpenSim/Framework/Statistics/AssetStatsCollector.cs +++ b/OpenSim/Framework/Statistics/AssetStatsCollector.cs | |||
@@ -37,35 +37,35 @@ namespace OpenSim.Framework.Statistics | |||
37 | { | 37 | { |
38 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); | 38 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); |
39 | private DateTime startTime = DateTime.Now; | 39 | private DateTime startTime = DateTime.Now; |
40 | 40 | ||
41 | private long assetRequestsToday; | 41 | private long assetRequestsToday; |
42 | private long assetRequestsNotFoundToday; | 42 | private long assetRequestsNotFoundToday; |
43 | private long assetRequestsYesterday; | 43 | private long assetRequestsYesterday; |
44 | private long assetRequestsNotFoundYesterday; | 44 | private long assetRequestsNotFoundYesterday; |
45 | 45 | ||
46 | public long AssetRequestsToday { get { return assetRequestsToday; } } | 46 | public long AssetRequestsToday { get { return assetRequestsToday; } } |
47 | public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } } | 47 | public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } } |
48 | public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } | 48 | public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } |
49 | public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } | 49 | public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } |
50 | 50 | ||
51 | public AssetStatsCollector() | 51 | public AssetStatsCollector() |
52 | { | 52 | { |
53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); | 53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); |
54 | ageStatsTimer.Enabled = true; | 54 | ageStatsTimer.Enabled = true; |
55 | } | 55 | } |
56 | 56 | ||
57 | private void OnAgeing(object source, ElapsedEventArgs e) | 57 | private void OnAgeing(object source, ElapsedEventArgs e) |
58 | { | 58 | { |
59 | assetRequestsYesterday = assetRequestsToday; | 59 | assetRequestsYesterday = assetRequestsToday; |
60 | 60 | ||
61 | // There is a possibility that an asset request could occur between the execution of these | 61 | // There is a possibility that an asset request could occur between the execution of these |
62 | // two statements. But we're better off without the synchronization overhead. | 62 | // two statements. But we're better off without the synchronization overhead. |
63 | assetRequestsToday = 0; | 63 | assetRequestsToday = 0; |
64 | 64 | ||
65 | assetRequestsNotFoundYesterday = assetRequestsNotFoundToday; | 65 | assetRequestsNotFoundYesterday = assetRequestsNotFoundToday; |
66 | assetRequestsNotFoundToday = 0; | 66 | assetRequestsNotFoundToday = 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | /// <summary> | 69 | /// <summary> |
70 | /// Record that an asset request failed to find an asset | 70 | /// Record that an asset request failed to find an asset |
71 | /// </summary> | 71 | /// </summary> |
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Statistics | |||
73 | { | 73 | { |
74 | assetRequestsNotFoundToday++; | 74 | assetRequestsNotFoundToday++; |
75 | } | 75 | } |
76 | 76 | ||
77 | /// <summary> | 77 | /// <summary> |
78 | /// Record that a request was made to the asset server | 78 | /// Record that a request was made to the asset server |
79 | /// </summary> | 79 | /// </summary> |
@@ -90,10 +90,10 @@ namespace OpenSim.Framework.Statistics | |||
90 | { | 90 | { |
91 | double elapsedHours = (DateTime.Now - startTime).TotalHours; | 91 | double elapsedHours = (DateTime.Now - startTime).TotalHours; |
92 | if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero | 92 | if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero |
93 | 93 | ||
94 | long assetRequestsTodayPerHour = (long)Math.Round(AssetRequestsToday / elapsedHours); | 94 | long assetRequestsTodayPerHour = (long)Math.Round(AssetRequestsToday / elapsedHours); |
95 | long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0); | 95 | long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0); |
96 | 96 | ||
97 | return string.Format( | 97 | return string.Format( |
98 | @"Asset requests today : {0} ({1} per hour) of which {2} were not found | 98 | @"Asset requests today : {0} ({1} per hour) of which {2} were not found |
99 | Asset requests yesterday : {3} ({4} per hour) of which {5} were not found", | 99 | Asset requests yesterday : {3} ({4} per hour) of which {5} were not found", |
diff --git a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs index 768cd22..e468fb2 100644 --- a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs +++ b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | namespace OpenSim.Framework.Statistics | 28 | namespace OpenSim.Framework.Statistics |
29 | { | 29 | { |
30 | /// <summary> | 30 | /// <summary> |
31 | /// Implemented by classes which collect up non-viewer statistical information | 31 | /// Implemented by classes which collect up non-viewer statistical information |
32 | /// </summary> | 32 | /// </summary> |
@@ -36,6 +36,6 @@ namespace OpenSim.Framework.Statistics | |||
36 | /// Report back collected statistical information. | 36 | /// Report back collected statistical information. |
37 | /// </summary> | 37 | /// </summary> |
38 | /// <returns></returns> | 38 | /// <returns></returns> |
39 | string Report(); | 39 | string Report(); |
40 | } | 40 | } |
41 | } | 41 | } |
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index fd021bc..2e7278b 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | |||
@@ -32,20 +32,20 @@ using libsecondlife; | |||
32 | using OpenSim.Framework.Statistics.Interfaces; | 32 | using OpenSim.Framework.Statistics.Interfaces; |
33 | 33 | ||
34 | namespace OpenSim.Framework.Statistics | 34 | namespace OpenSim.Framework.Statistics |
35 | { | 35 | { |
36 | /// <summary> | 36 | /// <summary> |
37 | /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane | 37 | /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane |
38 | /// </summary> | 38 | /// </summary> |
39 | public class SimExtraStatsCollector : IStatsCollector | 39 | public class SimExtraStatsCollector : IStatsCollector |
40 | { | 40 | { |
41 | private long assetsInCache; | 41 | private long assetsInCache; |
42 | private long texturesInCache; | 42 | private long texturesInCache; |
43 | private long assetCacheMemoryUsage; | 43 | private long assetCacheMemoryUsage; |
44 | private long textureCacheMemoryUsage; | 44 | private long textureCacheMemoryUsage; |
45 | private long blockedMissingTextureRequests; | 45 | private long blockedMissingTextureRequests; |
46 | 46 | ||
47 | private long inventoryServiceRetrievalFailures; | 47 | private long inventoryServiceRetrievalFailures; |
48 | 48 | ||
49 | public long AssetsInCache { get { return assetsInCache; } } | 49 | public long AssetsInCache { get { return assetsInCache; } } |
50 | public long TexturesInCache { get { return texturesInCache; } } | 50 | public long TexturesInCache { get { return texturesInCache; } } |
51 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } | 51 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } |
@@ -58,47 +58,47 @@ namespace OpenSim.Framework.Statistics | |||
58 | /// driver bugs on clients (though this seems less likely). | 58 | /// driver bugs on clients (though this seems less likely). |
59 | /// </summary> | 59 | /// </summary> |
60 | public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } | 60 | public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not | 63 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not |
64 | /// cover situations where the inventory service accepts the request but never returns any data, since | 64 | /// cover situations where the inventory service accepts the request but never returns any data, since |
65 | /// we do not yet timeout this situation. | 65 | /// we do not yet timeout this situation. |
66 | /// </summary> | 66 | /// </summary> |
67 | public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } | 67 | public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } |
68 | 68 | ||
69 | /// <summary> | 69 | /// <summary> |
70 | /// Retain a dictionary of all packet queues stats reporters | 70 | /// Retain a dictionary of all packet queues stats reporters |
71 | /// </summary> | 71 | /// </summary> |
72 | private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors | 72 | private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors |
73 | = new Dictionary<LLUUID, PacketQueueStatsCollector>(); | 73 | = new Dictionary<LLUUID, PacketQueueStatsCollector>(); |
74 | 74 | ||
75 | public void AddAsset(AssetBase asset) | 75 | public void AddAsset(AssetBase asset) |
76 | { | 76 | { |
77 | assetsInCache++; | 77 | assetsInCache++; |
78 | assetCacheMemoryUsage += asset.Data.Length; | 78 | assetCacheMemoryUsage += asset.Data.Length; |
79 | } | 79 | } |
80 | 80 | ||
81 | public void AddTexture(AssetBase image) | 81 | public void AddTexture(AssetBase image) |
82 | { | 82 | { |
83 | if (image.Data != null) | 83 | if (image.Data != null) |
84 | { | 84 | { |
85 | texturesInCache++; | 85 | texturesInCache++; |
86 | 86 | ||
87 | // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates | 87 | // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates |
88 | textureCacheMemoryUsage += image.Data.Length; | 88 | textureCacheMemoryUsage += image.Data.Length; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | public void AddBlockedMissingTextureRequest() | 92 | public void AddBlockedMissingTextureRequest() |
93 | { | 93 | { |
94 | blockedMissingTextureRequests++; | 94 | blockedMissingTextureRequests++; |
95 | } | 95 | } |
96 | 96 | ||
97 | public void AddInventoryServiceRetrievalFailure() | 97 | public void AddInventoryServiceRetrievalFailure() |
98 | { | 98 | { |
99 | inventoryServiceRetrievalFailures++; | 99 | inventoryServiceRetrievalFailures++; |
100 | } | 100 | } |
101 | 101 | ||
102 | /// <summary> | 102 | /// <summary> |
103 | /// Register as a packet queue stats provider | 103 | /// Register as a packet queue stats provider |
104 | /// </summary> | 104 | /// </summary> |
@@ -111,7 +111,7 @@ namespace OpenSim.Framework.Statistics | |||
111 | packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider); | 111 | packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider); |
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | /// <summary> | 115 | /// <summary> |
116 | /// Deregister a packet queue stats provider | 116 | /// Deregister a packet queue stats provider |
117 | /// </summary> | 117 | /// </summary> |
@@ -129,25 +129,25 @@ namespace OpenSim.Framework.Statistics | |||
129 | /// </summary> | 129 | /// </summary> |
130 | /// <returns></returns> | 130 | /// <returns></returns> |
131 | public string Report() | 131 | public string Report() |
132 | { | 132 | { |
133 | StringBuilder sb = new StringBuilder(Environment.NewLine); | 133 | StringBuilder sb = new StringBuilder(Environment.NewLine); |
134 | sb.Append("ASSET STATISTICS"); | 134 | sb.Append("ASSET STATISTICS"); |
135 | sb.Append(Environment.NewLine); | 135 | sb.Append(Environment.NewLine); |
136 | sb.Append( | 136 | sb.Append( |
137 | string.Format( | 137 | string.Format( |
138 | @"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine, | 138 | @"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine, |
139 | AssetsInCache, AssetCacheMemoryUsage / 1024.0)); | 139 | AssetsInCache, AssetCacheMemoryUsage / 1024.0)); |
140 | 140 | ||
141 | sb.Append(Environment.NewLine); | 141 | sb.Append(Environment.NewLine); |
142 | sb.Append("TEXTURE STATISTICS"); | 142 | sb.Append("TEXTURE STATISTICS"); |
143 | sb.Append(Environment.NewLine); | 143 | sb.Append(Environment.NewLine); |
144 | sb.Append( | 144 | sb.Append( |
145 | string.Format( | 145 | string.Format( |
146 | @"Texture cache contains {0,6} textures using {1,10:0.000}K | 146 | @"Texture cache contains {0,6} textures using {1,10:0.000}K |
147 | Blocked requests for missing textures: {2}" + Environment.NewLine, | 147 | Blocked requests for missing textures: {2}" + Environment.NewLine, |
148 | TexturesInCache, TextureCacheMemoryUsage / 1024.0, | 148 | TexturesInCache, TextureCacheMemoryUsage / 1024.0, |
149 | BlockedMissingTextureRequests)); | 149 | BlockedMissingTextureRequests)); |
150 | 150 | ||
151 | sb.Append(Environment.NewLine); | 151 | sb.Append(Environment.NewLine); |
152 | sb.Append("INVENTORY STATISTICS"); | 152 | sb.Append("INVENTORY STATISTICS"); |
153 | sb.Append(Environment.NewLine); | 153 | sb.Append(Environment.NewLine); |
@@ -155,26 +155,26 @@ Blocked requests for missing textures: {2}" + Environment.NewLine, | |||
155 | string.Format( | 155 | string.Format( |
156 | "Initial inventory caching failures: {0}" + Environment.NewLine, | 156 | "Initial inventory caching failures: {0}" + Environment.NewLine, |
157 | InventoryServiceRetrievalFailures)); | 157 | InventoryServiceRetrievalFailures)); |
158 | 158 | ||
159 | sb.Append(Environment.NewLine); | 159 | sb.Append(Environment.NewLine); |
160 | sb.Append("PACKET QUEUE STATISTICS"); | 160 | sb.Append("PACKET QUEUE STATISTICS"); |
161 | sb.Append(Environment.NewLine); | 161 | sb.Append(Environment.NewLine); |
162 | sb.Append("Agent UUID "); | 162 | sb.Append("Agent UUID "); |
163 | sb.Append( | 163 | sb.Append( |
164 | string.Format( | 164 | string.Format( |
165 | " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", | 165 | " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", |
166 | "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); | 166 | "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); |
167 | sb.Append(Environment.NewLine); | 167 | sb.Append(Environment.NewLine); |
168 | 168 | ||
169 | foreach (LLUUID key in packetQueueStatsCollectors.Keys) | 169 | foreach (LLUUID key in packetQueueStatsCollectors.Keys) |
170 | { | 170 | { |
171 | sb.Append(string.Format("{0}: ", key)); | 171 | sb.Append(string.Format("{0}: ", key)); |
172 | sb.Append(packetQueueStatsCollectors[key].Report()); | 172 | sb.Append(packetQueueStatsCollectors[key].Report()); |
173 | sb.Append(Environment.NewLine); | 173 | sb.Append(Environment.NewLine); |
174 | } | 174 | } |
175 | 175 | ||
176 | return sb.ToString(); | 176 | return sb.ToString(); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | /// <summary> | 180 | /// <summary> |
@@ -183,16 +183,16 @@ Blocked requests for missing textures: {2}" + Environment.NewLine, | |||
183 | public class PacketQueueStatsCollector : IStatsCollector | 183 | public class PacketQueueStatsCollector : IStatsCollector |
184 | { | 184 | { |
185 | private IPullStatsProvider m_statsProvider; | 185 | private IPullStatsProvider m_statsProvider; |
186 | 186 | ||
187 | public PacketQueueStatsCollector(IPullStatsProvider provider) | 187 | public PacketQueueStatsCollector(IPullStatsProvider provider) |
188 | { | 188 | { |
189 | m_statsProvider = provider; | 189 | m_statsProvider = provider; |
190 | } | 190 | } |
191 | 191 | ||
192 | /// <summary> | 192 | /// <summary> |
193 | /// Report back collected statistical information. | 193 | /// Report back collected statistical information. |
194 | /// </summary> | 194 | /// </summary> |
195 | /// <returns></returns> | 195 | /// <returns></returns> |
196 | public string Report() | 196 | public string Report() |
197 | { | 197 | { |
198 | return m_statsProvider.GetStats(); | 198 | return m_statsProvider.GetStats(); |
diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs index 3c97dde..41de3f3 100644 --- a/OpenSim/Framework/Statistics/StatsManager.cs +++ b/OpenSim/Framework/Statistics/StatsManager.cs | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | namespace OpenSim.Framework.Statistics | 28 | namespace OpenSim.Framework.Statistics |
29 | { | 29 | { |
30 | /// <summary> | 30 | /// <summary> |
31 | /// Singleton used to provide access to statistics reporters | 31 | /// Singleton used to provide access to statistics reporters |
32 | /// </summary> | 32 | /// </summary> |
@@ -34,44 +34,44 @@ namespace OpenSim.Framework.Statistics | |||
34 | { | 34 | { |
35 | private static AssetStatsCollector assetStats; | 35 | private static AssetStatsCollector assetStats; |
36 | private static UserStatsCollector userStats; | 36 | private static UserStatsCollector userStats; |
37 | private static SimExtraStatsCollector simExtraStats; | 37 | private static SimExtraStatsCollector simExtraStats; |
38 | 38 | ||
39 | public static AssetStatsCollector AssetStats { get { return assetStats; } } | 39 | public static AssetStatsCollector AssetStats { get { return assetStats; } } |
40 | public static UserStatsCollector UserStats { get { return userStats; } } | 40 | public static UserStatsCollector UserStats { get { return userStats; } } |
41 | public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } | 41 | public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } |
42 | 42 | ||
43 | private StatsManager() {} | 43 | private StatsManager() {} |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Start collecting statistics related to assets. | 46 | /// Start collecting statistics related to assets. |
47 | /// Should only be called once. | 47 | /// Should only be called once. |
48 | /// </summary> | 48 | /// </summary> |
49 | public static AssetStatsCollector StartCollectingAssetStats() | 49 | public static AssetStatsCollector StartCollectingAssetStats() |
50 | { | 50 | { |
51 | assetStats = new AssetStatsCollector(); | 51 | assetStats = new AssetStatsCollector(); |
52 | 52 | ||
53 | return assetStats; | 53 | return assetStats; |
54 | } | 54 | } |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Start collecting statistics related to users. | 57 | /// Start collecting statistics related to users. |
58 | /// Should only be called once. | 58 | /// Should only be called once. |
59 | /// </summary> | 59 | /// </summary> |
60 | public static UserStatsCollector StartCollectingUserStats() | 60 | public static UserStatsCollector StartCollectingUserStats() |
61 | { | 61 | { |
62 | userStats = new UserStatsCollector(); | 62 | userStats = new UserStatsCollector(); |
63 | 63 | ||
64 | return userStats; | 64 | return userStats; |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Start collecting extra sim statistics apart from those collected for the client. | 68 | /// Start collecting extra sim statistics apart from those collected for the client. |
69 | /// Should only be called once. | 69 | /// Should only be called once. |
70 | /// </summary> | 70 | /// </summary> |
71 | public static SimExtraStatsCollector StartCollectingSimExtraStats() | 71 | public static SimExtraStatsCollector StartCollectingSimExtraStats() |
72 | { | 72 | { |
73 | simExtraStats = new SimExtraStatsCollector(); | 73 | simExtraStats = new SimExtraStatsCollector(); |
74 | 74 | ||
75 | return simExtraStats; | 75 | return simExtraStats; |
76 | } | 76 | } |
77 | } | 77 | } |
diff --git a/OpenSim/Framework/Statistics/UserStatsCollector.cs b/OpenSim/Framework/Statistics/UserStatsCollector.cs index f0f0417..c7fe7c2 100644 --- a/OpenSim/Framework/Statistics/UserStatsCollector.cs +++ b/OpenSim/Framework/Statistics/UserStatsCollector.cs | |||
@@ -35,43 +35,43 @@ namespace OpenSim.Framework.Statistics | |||
35 | public class UserStatsCollector : IStatsCollector | 35 | public class UserStatsCollector : IStatsCollector |
36 | { | 36 | { |
37 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); | 37 | private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); |
38 | 38 | ||
39 | private int successfulLoginsToday; | 39 | private int successfulLoginsToday; |
40 | public int SuccessfulLoginsToday { get { return successfulLoginsToday; } } | 40 | public int SuccessfulLoginsToday { get { return successfulLoginsToday; } } |
41 | 41 | ||
42 | private int successfulLoginsYesterday; | 42 | private int successfulLoginsYesterday; |
43 | public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } | 43 | public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } |
44 | 44 | ||
45 | private int successfulLogins; | 45 | private int successfulLogins; |
46 | public int SuccessfulLogins { get { return successfulLogins; } } | 46 | public int SuccessfulLogins { get { return successfulLogins; } } |
47 | 47 | ||
48 | private int logouts; | 48 | private int logouts; |
49 | public int Logouts { get { return logouts; } } | 49 | public int Logouts { get { return logouts; } } |
50 | 50 | ||
51 | public UserStatsCollector() | 51 | public UserStatsCollector() |
52 | { | 52 | { |
53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); | 53 | ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); |
54 | ageStatsTimer.Enabled = true; | 54 | ageStatsTimer.Enabled = true; |
55 | } | 55 | } |
56 | 56 | ||
57 | private void OnAgeing(object source, ElapsedEventArgs e) | 57 | private void OnAgeing(object source, ElapsedEventArgs e) |
58 | { | 58 | { |
59 | successfulLoginsYesterday = successfulLoginsToday; | 59 | successfulLoginsYesterday = successfulLoginsToday; |
60 | 60 | ||
61 | // There is a possibility that an asset request could occur between the execution of these | 61 | // There is a possibility that an asset request could occur between the execution of these |
62 | // two statements. But we're better off without the synchronization overhead. | 62 | // two statements. But we're better off without the synchronization overhead. |
63 | successfulLoginsToday = 0; | 63 | successfulLoginsToday = 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// Record a successful login | 67 | /// Record a successful login |
68 | /// </summary> | 68 | /// </summary> |
69 | public void AddSuccessfulLogin() | 69 | public void AddSuccessfulLogin() |
70 | { | 70 | { |
71 | successfulLogins++; | 71 | successfulLogins++; |
72 | successfulLoginsToday++; | 72 | successfulLoginsToday++; |
73 | } | 73 | } |
74 | 74 | ||
75 | public void AddLogout() | 75 | public void AddLogout() |
76 | { | 76 | { |
77 | logouts++; | 77 | logouts++; |
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index d01c4c1..f92d150 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework | |||
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// A dictionary for task inventory. | 40 | /// A dictionary for task inventory. |
41 | /// | 41 | /// |
42 | /// This class is not thread safe. Callers must synchronize on Dictionary methods. | 42 | /// This class is not thread safe. Callers must synchronize on Dictionary methods. |
43 | /// </summary> | 43 | /// </summary> |
44 | public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>, | 44 | public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>, |
@@ -72,10 +72,10 @@ namespace OpenSim.Framework | |||
72 | // | 72 | // |
73 | // System.TypeInitializationException: An exception was thrown by the type initializer for OpenSim.Framework.TaskInventoryDictionary ---> System.ArgumentOutOfRangeException: < 0 | 73 | // System.TypeInitializationException: An exception was thrown by the type initializer for OpenSim.Framework.TaskInventoryDictionary ---> System.ArgumentOutOfRangeException: < 0 |
74 | // Parameter name: length | 74 | // Parameter name: length |
75 | // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381 | 75 | // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381 |
76 | // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 | 76 | // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 |
77 | // ... | 77 | // ... |
78 | // private static XmlSerializer tiiSerializer | 78 | // private static XmlSerializer tiiSerializer |
79 | // = new XmlSerializer(typeof(Dictionary<LLUUID, TaskInventoryItem>.ValueCollection)); | 79 | // = new XmlSerializer(typeof(Dictionary<LLUUID, TaskInventoryItem>.ValueCollection)); |
80 | 80 | ||
81 | // see IXmlSerializable | 81 | // see IXmlSerializable |
@@ -110,7 +110,7 @@ namespace OpenSim.Framework | |||
110 | m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); | 110 | m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); |
111 | } | 111 | } |
112 | 112 | ||
113 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag | 113 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag |
114 | // of the element wrapping this object so that the rest of the serialization can complete normally. | 114 | // of the element wrapping this object so that the rest of the serialization can complete normally. |
115 | reader.Read(); | 115 | reader.Read(); |
116 | 116 | ||
@@ -221,7 +221,7 @@ namespace OpenSim.Framework | |||
221 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; | 221 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; |
222 | public LLUUID OwnerID = LLUUID.Zero; | 222 | public LLUUID OwnerID = LLUUID.Zero; |
223 | public uint OwnerMask = FULL_MASK_PERMISSIONS_GENERAL; | 223 | public uint OwnerMask = FULL_MASK_PERMISSIONS_GENERAL; |
224 | public LLUUID ParentID = LLUUID.Zero; //parent folder id | 224 | public LLUUID ParentID = LLUUID.Zero; //parent folder id |
225 | public LLUUID ParentPartID = LLUUID.Zero; | 225 | public LLUUID ParentPartID = LLUUID.Zero; |
226 | public LLUUID PermsGranter; | 226 | public LLUUID PermsGranter; |
227 | public int PermsMask; | 227 | public int PermsMask; |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 5577140..8e5b02d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -165,10 +165,10 @@ namespace OpenSim.Framework | |||
165 | // (but those probably wont work anyway) | 165 | // (but those probably wont work anyway) |
166 | return file; | 166 | return file; |
167 | } | 167 | } |
168 | 168 | ||
169 | /// <summary> | 169 | /// <summary> |
170 | /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. | 170 | /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. |
171 | /// | 171 | /// |
172 | /// Please don't delete me even if I appear currently unused! | 172 | /// Please don't delete me even if I appear currently unused! |
173 | /// </summary> | 173 | /// </summary> |
174 | /// <param name="rawXml"></param> | 174 | /// <param name="rawXml"></param> |
@@ -177,22 +177,22 @@ namespace OpenSim.Framework | |||
177 | { | 177 | { |
178 | XmlDocument xd = new XmlDocument(); | 178 | XmlDocument xd = new XmlDocument(); |
179 | xd.LoadXml(rawXml); | 179 | xd.LoadXml(rawXml); |
180 | 180 | ||
181 | StringBuilder sb = new StringBuilder(); | 181 | StringBuilder sb = new StringBuilder(); |
182 | StringWriter sw = new StringWriter(sb); | 182 | StringWriter sw = new StringWriter(sb); |
183 | 183 | ||
184 | XmlTextWriter xtw = new XmlTextWriter(sw); | 184 | XmlTextWriter xtw = new XmlTextWriter(sw); |
185 | xtw.Formatting = Formatting.Indented; | 185 | xtw.Formatting = Formatting.Indented; |
186 | 186 | ||
187 | try | 187 | try |
188 | { | 188 | { |
189 | xd.WriteTo(xtw); | 189 | xd.WriteTo(xtw); |
190 | } | 190 | } |
191 | finally | 191 | finally |
192 | { | 192 | { |
193 | xtw.Close(); | 193 | xtw.Close(); |
194 | } | 194 | } |
195 | 195 | ||
196 | return sb.ToString(); | 196 | return sb.ToString(); |
197 | } | 197 | } |
198 | 198 | ||
@@ -284,11 +284,11 @@ namespace OpenSim.Framework | |||
284 | /// Convert a variable length field (byte array) to a string, with a | 284 | /// Convert a variable length field (byte array) to a string, with a |
285 | /// field name prepended to each line of the output | 285 | /// field name prepended to each line of the output |
286 | /// </summary> | 286 | /// </summary> |
287 | /// <remarks>If the byte array has unprintable characters in it, a | 287 | /// <remarks>If the byte array has unprintable characters in it, a |
288 | /// hex dump will be put in the string instead</remarks> | 288 | /// hex dump will be put in the string instead</remarks> |
289 | /// <param name="bytes">The byte array to convert to a string</param> | 289 | /// <param name="bytes">The byte array to convert to a string</param> |
290 | /// <param name="fieldName">A field name to prepend to each line of output</param> | 290 | /// <param name="fieldName">A field name to prepend to each line of output</param> |
291 | /// <returns>An ASCII string or a string containing a hex dump, minus | 291 | /// <returns>An ASCII string or a string containing a hex dump, minus |
292 | /// the null terminator</returns> | 292 | /// the null terminator</returns> |
293 | public static string FieldToString(byte[] bytes, string fieldName) | 293 | public static string FieldToString(byte[] bytes, string fieldName) |
294 | { | 294 | { |
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 1b1f9c7..2aca8ff 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -48,11 +48,11 @@ namespace OpenSim.Grid.AssetServer | |||
48 | 48 | ||
49 | public AssetConfig m_config; | 49 | public AssetConfig m_config; |
50 | 50 | ||
51 | public static OpenAsset_Main assetserver; | 51 | public static OpenAsset_Main assetserver; |
52 | 52 | ||
53 | // Temporarily hardcoded - should be a plugin | 53 | // Temporarily hardcoded - should be a plugin |
54 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); | 54 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); |
55 | 55 | ||
56 | private IAssetProvider m_assetProvider; | 56 | private IAssetProvider m_assetProvider; |
57 | 57 | ||
58 | [STAThread] | 58 | [STAThread] |
@@ -81,7 +81,7 @@ namespace OpenSim.Grid.AssetServer | |||
81 | public OpenAsset_Main() | 81 | public OpenAsset_Main() |
82 | { | 82 | { |
83 | m_console = new ConsoleBase("OpenAsset", this); | 83 | m_console = new ConsoleBase("OpenAsset", this); |
84 | 84 | ||
85 | MainConsole.Instance = m_console; | 85 | MainConsole.Instance = m_console; |
86 | } | 86 | } |
87 | 87 | ||
@@ -166,7 +166,7 @@ namespace OpenSim.Grid.AssetServer | |||
166 | 166 | ||
167 | public void LoadDefaultAssets() | 167 | public void LoadDefaultAssets() |
168 | { | 168 | { |
169 | assetLoader.ForEachDefaultXmlAsset(StoreAsset); | 169 | assetLoader.ForEachDefaultXmlAsset(StoreAsset); |
170 | } | 170 | } |
171 | 171 | ||
172 | protected void StoreAsset(AssetBase asset) | 172 | protected void StoreAsset(AssetBase asset) |
@@ -177,9 +177,9 @@ namespace OpenSim.Grid.AssetServer | |||
177 | public override void RunCmd(string cmd, string[] cmdparams) | 177 | public override void RunCmd(string cmd, string[] cmdparams) |
178 | { | 178 | { |
179 | base.RunCmd(cmd, cmdparams); | 179 | base.RunCmd(cmd, cmdparams); |
180 | 180 | ||
181 | switch (cmd) | 181 | switch (cmd) |
182 | { | 182 | { |
183 | case "shutdown": | 183 | case "shutdown": |
184 | m_console.Close(); | 184 | m_console.Close(); |
185 | Environment.Exit(0); | 185 | Environment.Exit(0); |
diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs index 6f219a6..52c6e8e 100644 --- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index ece826e..fcf99cd 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Grid.AssetServer | |||
58 | m_assetManager = assetManager; | 58 | m_assetManager = assetManager; |
59 | m_assetProvider = assetProvider; | 59 | m_assetProvider = assetProvider; |
60 | } | 60 | } |
61 | 61 | ||
62 | public override byte[] Handle(string path, Stream request) | 62 | public override byte[] Handle(string path, Stream request) |
63 | { | 63 | { |
64 | string param = GetParam(path); | 64 | string param = GetParam(path); |
@@ -68,18 +68,18 @@ namespace OpenSim.Grid.AssetServer | |||
68 | 68 | ||
69 | if (p.Length > 0) | 69 | if (p.Length > 0) |
70 | { | 70 | { |
71 | LLUUID assetID = null; | 71 | LLUUID assetID = null; |
72 | 72 | ||
73 | if (!LLUUID.TryParse(p[0], out assetID)) | 73 | if (!LLUUID.TryParse(p[0], out assetID)) |
74 | { | 74 | { |
75 | m_log.InfoFormat( | 75 | m_log.InfoFormat( |
76 | "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]); | 76 | "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]); |
77 | return result; | 77 | return result; |
78 | } | 78 | } |
79 | 79 | ||
80 | if (StatsManager.AssetStats != null) | 80 | if (StatsManager.AssetStats != null) |
81 | StatsManager.AssetStats.AddRequest(); | 81 | StatsManager.AssetStats.AddRequest(); |
82 | 82 | ||
83 | AssetBase asset = m_assetProvider.FetchAsset(assetID); | 83 | AssetBase asset = m_assetProvider.FetchAsset(assetID); |
84 | if (asset != null) | 84 | if (asset != null) |
85 | { | 85 | { |
@@ -94,7 +94,7 @@ namespace OpenSim.Grid.AssetServer | |||
94 | //StreamReader sr = new StreamReader(ms); | 94 | //StreamReader sr = new StreamReader(ms); |
95 | 95 | ||
96 | result = ms.GetBuffer(); | 96 | result = ms.GetBuffer(); |
97 | 97 | ||
98 | m_log.InfoFormat( | 98 | m_log.InfoFormat( |
99 | "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", | 99 | "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", |
100 | assetID, asset.Name, result.Length); | 100 | assetID, asset.Name, result.Length); |
@@ -105,13 +105,13 @@ namespace OpenSim.Grid.AssetServer | |||
105 | { | 105 | { |
106 | if (StatsManager.AssetStats != null) | 106 | if (StatsManager.AssetStats != null) |
107 | StatsManager.AssetStats.AddNotFoundRequest(); | 107 | StatsManager.AssetStats.AddNotFoundRequest(); |
108 | 108 | ||
109 | m_log.InfoFormat("[REST]: GET:/asset failed to find {0}", assetID); | 109 | m_log.InfoFormat("[REST]: GET:/asset failed to find {0}", assetID); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
113 | return result; | 113 | return result; |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | public class PostAssetStreamHandler : BaseStreamHandler | 117 | public class PostAssetStreamHandler : BaseStreamHandler |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index c2c212c..83b5319 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -243,22 +243,22 @@ namespace OpenSim.Grid.GridServer | |||
243 | 243 | ||
244 | /// <summary> | 244 | /// <summary> |
245 | /// Checks that it's valid to replace the existing region data with new data | 245 | /// Checks that it's valid to replace the existing region data with new data |
246 | /// | 246 | /// |
247 | /// Currently, this means ensure that the keys passed in by the new region | 247 | /// Currently, this means ensure that the keys passed in by the new region |
248 | /// match those in the original region. (XXX Is this correct? Shouldn't we simply check | 248 | /// match those in the original region. (XXX Is this correct? Shouldn't we simply check |
249 | /// against the keys in the current configuration?) | 249 | /// against the keys in the current configuration?) |
250 | /// </summary> | 250 | /// </summary> |
251 | /// <param name="sim"></param> | 251 | /// <param name="sim"></param> |
252 | /// <returns></returns> | 252 | /// <returns></returns> |
253 | protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim) | 253 | protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim) |
254 | { | 254 | { |
255 | if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey)) | 255 | if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey)) |
256 | { | 256 | { |
257 | throw new LoginException( | 257 | throw new LoginException( |
258 | String.Format( | 258 | String.Format( |
259 | "Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}" | 259 | "Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}" |
260 | + " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})", | 260 | + " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})", |
261 | sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName, | 261 | sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName, |
262 | sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey), | 262 | sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey), |
263 | "The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys."); | 263 | "The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys."); |
264 | } | 264 | } |
@@ -266,25 +266,25 @@ namespace OpenSim.Grid.GridServer | |||
266 | 266 | ||
267 | /// <summary> | 267 | /// <summary> |
268 | /// Checks that the new region data is valid. | 268 | /// Checks that the new region data is valid. |
269 | /// | 269 | /// |
270 | /// Currently, this means checking that the keys passed in by the new region | 270 | /// Currently, this means checking that the keys passed in by the new region |
271 | /// match those in the grid server's configuration. | 271 | /// match those in the grid server's configuration. |
272 | /// </summary> | 272 | /// </summary> |
273 | /// | 273 | /// |
274 | /// <param name="sim"></param> | 274 | /// <param name="sim"></param> |
275 | /// <exception cref="LoginException">Thrown if region login failed</exception> | 275 | /// <exception cref="LoginException">Thrown if region login failed</exception> |
276 | protected virtual void ValidateNewRegionKeys(RegionProfileData sim) | 276 | protected virtual void ValidateNewRegionKeys(RegionProfileData sim) |
277 | { | 277 | { |
278 | if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey)) | 278 | if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey)) |
279 | { | 279 | { |
280 | throw new LoginException( | 280 | throw new LoginException( |
281 | String.Format( | 281 | String.Format( |
282 | "Authentication failed when trying to login new region {0} at location {1} {2}" | 282 | "Authentication failed when trying to login new region {0} at location {1} {2}" |
283 | + " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})", | 283 | + " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})", |
284 | sim.regionName, sim.regionLocX, sim.regionLocY, | 284 | sim.regionName, sim.regionLocX, sim.regionLocY, |
285 | sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey), | 285 | sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey), |
286 | "The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys."); | 286 | "The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys."); |
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | /// <summary> | 290 | /// <summary> |
@@ -295,13 +295,13 @@ namespace OpenSim.Grid.GridServer | |||
295 | protected virtual void ValidateRegionContactable(RegionProfileData sim) | 295 | protected virtual void ValidateRegionContactable(RegionProfileData sim) |
296 | { | 296 | { |
297 | string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/"); | 297 | string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/"); |
298 | string regionStatusResponse; | 298 | string regionStatusResponse; |
299 | 299 | ||
300 | RestClient rc = new RestClient(regionStatusUrl); | 300 | RestClient rc = new RestClient(regionStatusUrl); |
301 | rc.RequestMethod = "GET"; | 301 | rc.RequestMethod = "GET"; |
302 | 302 | ||
303 | m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName); | 303 | m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName); |
304 | 304 | ||
305 | try | 305 | try |
306 | { | 306 | { |
307 | Stream rs = rc.Request(); | 307 | Stream rs = rc.Request(); |
@@ -314,21 +314,21 @@ namespace OpenSim.Grid.GridServer | |||
314 | throw new LoginException( | 314 | throw new LoginException( |
315 | String.Format("Region status request to {0} failed", regionStatusUrl), | 315 | String.Format("Region status request to {0} failed", regionStatusUrl), |
316 | String.Format( | 316 | String.Format( |
317 | "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service", | 317 | "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service", |
318 | regionStatusUrl), | 318 | regionStatusUrl), |
319 | e); | 319 | e); |
320 | } | 320 | } |
321 | 321 | ||
322 | if (!regionStatusResponse.Equals("OK")) | 322 | if (!regionStatusResponse.Equals("OK")) |
323 | { | 323 | { |
324 | throw new LoginException( | 324 | throw new LoginException( |
325 | String.Format( | 325 | String.Format( |
326 | "Region {0} at {1} returned status response {2} rather than {3}", | 326 | "Region {0} at {1} returned status response {2} rather than {3}", |
327 | sim.regionName, regionStatusUrl, regionStatusResponse, "OK"), | 327 | sim.regionName, regionStatusUrl, regionStatusResponse, "OK"), |
328 | String.Format( | 328 | String.Format( |
329 | "When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status", | 329 | "When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status", |
330 | regionStatusResponse, "OK")); | 330 | regionStatusResponse, "OK")); |
331 | } | 331 | } |
332 | } | 332 | } |
333 | 333 | ||
334 | /// <summary> | 334 | /// <summary> |
@@ -373,11 +373,11 @@ namespace OpenSim.Grid.GridServer | |||
373 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); | 373 | m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); |
374 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); | 374 | return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); |
375 | } | 375 | } |
376 | 376 | ||
377 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); | 377 | m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); |
378 | 378 | ||
379 | existingSim = GetRegion(sim.regionHandle); | 379 | existingSim = GetRegion(sim.regionHandle); |
380 | 380 | ||
381 | if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID) | 381 | if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID) |
382 | { | 382 | { |
383 | try | 383 | try |
@@ -390,13 +390,13 @@ namespace OpenSim.Grid.GridServer | |||
390 | { | 390 | { |
391 | ValidateOverwriteKeys(sim, existingSim); | 391 | ValidateOverwriteKeys(sim, existingSim); |
392 | } | 392 | } |
393 | 393 | ||
394 | ValidateRegionContactable(sim); | 394 | ValidateRegionContactable(sim); |
395 | } | 395 | } |
396 | catch (LoginException e) | 396 | catch (LoginException e) |
397 | { | 397 | { |
398 | m_log.WarnFormat("[LOGIN END]: {0}", e.Message); | 398 | m_log.WarnFormat("[LOGIN END]: {0}", e.Message); |
399 | 399 | ||
400 | return e.XmlRpcErrorResponse; | 400 | return e.XmlRpcErrorResponse; |
401 | } | 401 | } |
402 | 402 | ||
@@ -489,7 +489,7 @@ namespace OpenSim.Grid.GridServer | |||
489 | responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines; | 489 | responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines; |
490 | 490 | ||
491 | // Instead of sending a multitude of message servers to the registering sim | 491 | // Instead of sending a multitude of message servers to the registering sim |
492 | // we should probably be sending a single one and parhaps it's backup | 492 | // we should probably be sending a single one and parhaps it's backup |
493 | // that has responsibility over routing it's messages. | 493 | // that has responsibility over routing it's messages. |
494 | 494 | ||
495 | // The Sim won't be contacting us again about any of the message server stuff during it's time up. | 495 | // The Sim won't be contacting us again about any of the message server stuff during it's time up. |
@@ -583,7 +583,7 @@ namespace OpenSim.Grid.GridServer | |||
583 | 583 | ||
584 | sim.regionRecvKey = String.Empty; | 584 | sim.regionRecvKey = String.Empty; |
585 | sim.regionSendKey = String.Empty; | 585 | sim.regionSendKey = String.Empty; |
586 | 586 | ||
587 | if (requestData.ContainsKey("region_secret")) | 587 | if (requestData.ContainsKey("region_secret")) |
588 | { | 588 | { |
589 | string regionsecret = (string)requestData["region_secret"]; | 589 | string regionsecret = (string)requestData["region_secret"]; |
@@ -596,8 +596,8 @@ namespace OpenSim.Grid.GridServer | |||
596 | else | 596 | else |
597 | { | 597 | { |
598 | sim.regionSecret = Config.SimRecvKey; | 598 | sim.regionSecret = Config.SimRecvKey; |
599 | } | 599 | } |
600 | 600 | ||
601 | sim.regionDataURI = String.Empty; | 601 | sim.regionDataURI = String.Empty; |
602 | sim.regionAssetURI = Config.DefaultAssetServer; | 602 | sim.regionAssetURI = Config.DefaultAssetServer; |
603 | sim.regionAssetRecvKey = Config.AssetRecvKey; | 603 | sim.regionAssetRecvKey = Config.AssetRecvKey; |
@@ -626,7 +626,7 @@ namespace OpenSim.Grid.GridServer | |||
626 | // not at all. Current strategy is to put the code in place to support the validity of this information | 626 | // not at all. Current strategy is to put the code in place to support the validity of this information |
627 | // and to roll forward debugging any issues from that point | 627 | // and to roll forward debugging any issues from that point |
628 | // | 628 | // |
629 | // this particular section of the mod attempts to receive a value from the region's xml file by way of | 629 | // this particular section of the mod attempts to receive a value from the region's xml file by way of |
630 | // OSG1GridServices for the region's owner | 630 | // OSG1GridServices for the region's owner |
631 | sim.owner_uuid = (string)requestData["master_avatar_uuid"]; | 631 | sim.owner_uuid = (string)requestData["master_avatar_uuid"]; |
632 | 632 | ||
@@ -1120,7 +1120,7 @@ namespace OpenSim.Grid.GridServer | |||
1120 | return response; | 1120 | return response; |
1121 | } | 1121 | } |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | /// <summary> | 1124 | /// <summary> |
1125 | /// Exception generated when a simulator fails to login to the grid | 1125 | /// Exception generated when a simulator fails to login to the grid |
1126 | /// </summary> | 1126 | /// </summary> |
@@ -1147,6 +1147,6 @@ namespace OpenSim.Grid.GridServer | |||
1147 | { | 1147 | { |
1148 | // FIXME: Might be neater to refactor and put the method inside here | 1148 | // FIXME: Might be neater to refactor and put the method inside here |
1149 | m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage); | 1149 | m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage); |
1150 | } | 1150 | } |
1151 | } | 1151 | } |
1152 | } | 1152 | } |
diff --git a/OpenSim/Grid/GridServer/IGridPlugin.cs b/OpenSim/Grid/GridServer/IGridPlugin.cs index fbadfce..47273a2 100644 --- a/OpenSim/Grid/GridServer/IGridPlugin.cs +++ b/OpenSim/Grid/GridServer/IGridPlugin.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using Mono.Addins; | 29 | using Mono.Addins; |
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs index 1468edd..67cff8f 100644 --- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index 80f0c5e..5388263 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Grid.InventoryServer | |||
43 | /// </summary> | 43 | /// </summary> |
44 | public class GridInventoryService : InventoryServiceBase | 44 | public class GridInventoryService : InventoryServiceBase |
45 | { | 45 | { |
46 | private static readonly ILog m_log | 46 | private static readonly ILog m_log |
47 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) | 49 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) |
@@ -56,31 +56,31 @@ namespace OpenSim.Grid.InventoryServer | |||
56 | /// <param name="rawUserID"></param> | 56 | /// <param name="rawUserID"></param> |
57 | /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> | 57 | /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> |
58 | public InventoryCollection GetUserInventory(Guid rawUserID) | 58 | public InventoryCollection GetUserInventory(Guid rawUserID) |
59 | { | 59 | { |
60 | LLUUID userID = new LLUUID(rawUserID); | 60 | LLUUID userID = new LLUUID(rawUserID); |
61 | 61 | ||
62 | m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); | 62 | m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); |
63 | 63 | ||
64 | // Uncomment me to simulate a slow responding inventory server | 64 | // Uncomment me to simulate a slow responding inventory server |
65 | //Thread.Sleep(16000); | 65 | //Thread.Sleep(16000); |
66 | 66 | ||
67 | InventoryCollection invCollection = new InventoryCollection(); | 67 | InventoryCollection invCollection = new InventoryCollection(); |
68 | 68 | ||
69 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); | 69 | List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); |
70 | 70 | ||
71 | if (null == allFolders) | 71 | if (null == allFolders) |
72 | { | 72 | { |
73 | m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); | 73 | m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); |
74 | 74 | ||
75 | return invCollection; | 75 | return invCollection; |
76 | } | 76 | } |
77 | 77 | ||
78 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); | 78 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); |
79 | 79 | ||
80 | foreach (InventoryFolderBase folder in allFolders) | 80 | foreach (InventoryFolderBase folder in allFolders) |
81 | { | 81 | { |
82 | List<InventoryItemBase> items = RequestFolderItems(folder.ID); | 82 | List<InventoryItemBase> items = RequestFolderItems(folder.ID); |
83 | 83 | ||
84 | if (items != null) | 84 | if (items != null) |
85 | { | 85 | { |
86 | allItems.InsertRange(0, items); | 86 | allItems.InsertRange(0, items); |
@@ -88,36 +88,36 @@ namespace OpenSim.Grid.InventoryServer | |||
88 | } | 88 | } |
89 | 89 | ||
90 | invCollection.UserID = userID; | 90 | invCollection.UserID = userID; |
91 | invCollection.Folders = allFolders; | 91 | invCollection.Folders = allFolders; |
92 | invCollection.Items = allItems; | 92 | invCollection.Items = allItems; |
93 | 93 | ||
94 | // foreach (InventoryFolderBase folder in invCollection.Folders) | 94 | // foreach (InventoryFolderBase folder in invCollection.Folders) |
95 | // { | 95 | // { |
96 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); | 96 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); |
97 | // } | 97 | // } |
98 | // | 98 | // |
99 | // foreach (InventoryItemBase item in invCollection.Items) | 99 | // foreach (InventoryItemBase item in invCollection.Items) |
100 | // { | 100 | // { |
101 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); | 101 | // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); |
102 | // } | 102 | // } |
103 | 103 | ||
104 | m_log.InfoFormat( | 104 | m_log.InfoFormat( |
105 | "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", | 105 | "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", |
106 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); | 106 | invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); |
107 | 107 | ||
108 | return invCollection; | 108 | return invCollection; |
109 | } | 109 | } |
110 | 110 | ||
111 | /// <summary> | 111 | /// <summary> |
112 | /// Guid to UUID wrapper for same name IInventoryServices method | 112 | /// Guid to UUID wrapper for same name IInventoryServices method |
113 | /// </summary> | 113 | /// </summary> |
114 | /// <param name="rawUserID"></param> | 114 | /// <param name="rawUserID"></param> |
115 | /// <returns></returns> | 115 | /// <returns></returns> |
116 | public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) | 116 | public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) |
117 | { | 117 | { |
118 | LLUUID userID = new LLUUID(rawUserID); | 118 | LLUUID userID = new LLUUID(rawUserID); |
119 | return GetInventorySkeleton(userID); | 119 | return GetInventorySkeleton(userID); |
120 | } | 120 | } |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// Create an inventory for the given user. | 123 | /// Create an inventory for the given user. |
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 2279191..b7c46c2 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Grid.InventoryServer | |||
41 | public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback | 41 | public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback |
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 | private InventoryConfig m_config; | 45 | private InventoryConfig m_config; |
46 | private GridInventoryService m_inventoryService; | 46 | private GridInventoryService m_inventoryService; |
47 | 47 | ||
@@ -73,7 +73,7 @@ namespace OpenSim.Grid.InventoryServer | |||
73 | m_inventoryService.AddPlugin(m_config.DatabaseProvider, m_config.DatabaseConnect); | 73 | m_inventoryService.AddPlugin(m_config.DatabaseProvider, m_config.DatabaseConnect); |
74 | 74 | ||
75 | m_log.Info("[" + LogName + "]: Starting HTTP server ..."); | 75 | m_log.Info("[" + LogName + "]: Starting HTTP server ..."); |
76 | 76 | ||
77 | m_httpServer = new BaseHttpServer(m_config.HttpPort); | 77 | m_httpServer = new BaseHttpServer(m_config.HttpPort); |
78 | AddHttpHandlers(); | 78 | AddHttpHandlers(); |
79 | m_httpServer.Start(); | 79 | m_httpServer.Start(); |
@@ -86,11 +86,11 @@ namespace OpenSim.Grid.InventoryServer | |||
86 | m_httpServer.AddStreamHandler( | 86 | m_httpServer.AddStreamHandler( |
87 | new RestDeserialisehandler<Guid, InventoryCollection>( | 87 | new RestDeserialisehandler<Guid, InventoryCollection>( |
88 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory)); | 88 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory)); |
89 | 89 | ||
90 | m_httpServer.AddStreamHandler( | 90 | m_httpServer.AddStreamHandler( |
91 | new RestDeserialisehandler<Guid, bool>( | 91 | new RestDeserialisehandler<Guid, bool>( |
92 | "POST", "/CreateInventory/", m_inventoryService.CreateUsersInventory)); | 92 | "POST", "/CreateInventory/", m_inventoryService.CreateUsersInventory)); |
93 | 93 | ||
94 | m_httpServer.AddStreamHandler( | 94 | m_httpServer.AddStreamHandler( |
95 | new RestDeserialisehandler<InventoryFolderBase, bool>( | 95 | new RestDeserialisehandler<InventoryFolderBase, bool>( |
96 | "POST", "/NewFolder/", m_inventoryService.AddFolder)); | 96 | "POST", "/NewFolder/", m_inventoryService.AddFolder)); |
@@ -98,15 +98,15 @@ namespace OpenSim.Grid.InventoryServer | |||
98 | m_httpServer.AddStreamHandler( | 98 | m_httpServer.AddStreamHandler( |
99 | new RestDeserialisehandler<InventoryFolderBase, bool>( | 99 | new RestDeserialisehandler<InventoryFolderBase, bool>( |
100 | "POST", "/MoveFolder/", m_inventoryService.MoveFolder)); | 100 | "POST", "/MoveFolder/", m_inventoryService.MoveFolder)); |
101 | 101 | ||
102 | m_httpServer.AddStreamHandler( | 102 | m_httpServer.AddStreamHandler( |
103 | new RestDeserialisehandler<InventoryFolderBase, bool>( | 103 | new RestDeserialisehandler<InventoryFolderBase, bool>( |
104 | "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder)); | 104 | "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder)); |
105 | 105 | ||
106 | m_httpServer.AddStreamHandler( | 106 | m_httpServer.AddStreamHandler( |
107 | new RestDeserialisehandler<InventoryItemBase, bool>( | 107 | new RestDeserialisehandler<InventoryItemBase, bool>( |
108 | "POST", "/NewItem/", m_inventoryService.AddItem)); | 108 | "POST", "/NewItem/", m_inventoryService.AddItem)); |
109 | 109 | ||
110 | m_httpServer.AddStreamHandler( | 110 | m_httpServer.AddStreamHandler( |
111 | new RestDeserialisehandler<InventoryItemBase, bool>( | 111 | new RestDeserialisehandler<InventoryItemBase, bool>( |
112 | "POST", "/DeleteItem/", m_inventoryService.DeleteItem)); | 112 | "POST", "/DeleteItem/", m_inventoryService.DeleteItem)); |
@@ -134,7 +134,7 @@ namespace OpenSim.Grid.InventoryServer | |||
134 | public override void RunCmd(string cmd, string[] cmdparams) | 134 | public override void RunCmd(string cmd, string[] cmdparams) |
135 | { | 135 | { |
136 | base.RunCmd(cmd, cmdparams); | 136 | base.RunCmd(cmd, cmdparams); |
137 | 137 | ||
138 | switch (cmd) | 138 | switch (cmd) |
139 | { | 139 | { |
140 | case "add-user": | 140 | case "add-user": |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs index aff4719..06e2f8a 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs | |||
@@ -82,11 +82,11 @@ namespace OpenSim.Framework.Utilities | |||
82 | /// Convert a variable length field (byte array) to a string, with a | 82 | /// Convert a variable length field (byte array) to a string, with a |
83 | /// field name prepended to each line of the output | 83 | /// field name prepended to each line of the output |
84 | /// </summary> | 84 | /// </summary> |
85 | /// <remarks>If the byte array has unprintable characters in it, a | 85 | /// <remarks>If the byte array has unprintable characters in it, a |
86 | /// hex dump will be put in the string instead</remarks> | 86 | /// hex dump will be put in the string instead</remarks> |
87 | /// <param name="bytes">The byte array to convert to a string</param> | 87 | /// <param name="bytes">The byte array to convert to a string</param> |
88 | /// <param name="fieldName">A field name to prepend to each line of output</param> | 88 | /// <param name="fieldName">A field name to prepend to each line of output</param> |
89 | /// <returns>An ASCII string or a string containing a hex dump, minus | 89 | /// <returns>An ASCII string or a string containing a hex dump, minus |
90 | /// the null terminator</returns> | 90 | /// the null terminator</returns> |
91 | public static string FieldToString(byte[] bytes, string fieldName) | 91 | public static string FieldToString(byte[] bytes, string fieldName) |
92 | { | 92 | { |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs index a5a4ec8..27f0d8a 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs | |||
@@ -29,8 +29,8 @@ | |||
29 | // <autogenerated> | 29 | // <autogenerated> |
30 | // This code was generated by a tool. | 30 | // This code was generated by a tool. |
31 | // Mono Runtime Version: 2.0.50727.42 | 31 | // Mono Runtime Version: 2.0.50727.42 |
32 | // | 32 | // |
33 | // Changes to this file may cause incorrect behavior and will be lost if | 33 | // Changes to this file may cause incorrect behavior and will be lost if |
34 | // the code is regenerated. | 34 | // the code is regenerated. |
35 | // </autogenerated> | 35 | // </autogenerated> |
36 | // ------------------------------------------------------------------------------ | 36 | // ------------------------------------------------------------------------------ |
@@ -52,7 +52,7 @@ namespace OpenGridServices.Manager | |||
52 | private Gtk.Entry entry3; | 52 | private Gtk.Entry entry3; |
53 | private Gtk.Button button2; | 53 | private Gtk.Button button2; |
54 | private Gtk.Button button8; | 54 | private Gtk.Button button8; |
55 | 55 | ||
56 | protected virtual void Build() | 56 | protected virtual void Build() |
57 | { | 57 | { |
58 | Stetic.Gui.Initialize(); | 58 | Stetic.Gui.Initialize(); |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs index 9707aee..068b9c6 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs | |||
@@ -29,8 +29,8 @@ | |||
29 | // <autogenerated> | 29 | // <autogenerated> |
30 | // This code was generated by a tool. | 30 | // This code was generated by a tool. |
31 | // Mono Runtime Version: 2.0.50727.42 | 31 | // Mono Runtime Version: 2.0.50727.42 |
32 | // | 32 | // |
33 | // Changes to this file may cause incorrect behavior and will be lost if | 33 | // Changes to this file may cause incorrect behavior and will be lost if |
34 | // the code is regenerated. | 34 | // the code is regenerated. |
35 | // </autogenerated> | 35 | // </autogenerated> |
36 | // ------------------------------------------------------------------------------ | 36 | // ------------------------------------------------------------------------------ |
@@ -74,7 +74,7 @@ namespace OpenGridServices.Manager | |||
74 | private Gtk.DrawingArea drawingarea1; | 74 | private Gtk.DrawingArea drawingarea1; |
75 | private Gtk.TreeView treeview1; | 75 | private Gtk.TreeView treeview1; |
76 | private Gtk.Statusbar statusbar1; | 76 | private Gtk.Statusbar statusbar1; |
77 | 77 | ||
78 | protected virtual void Build() | 78 | protected virtual void Build() |
79 | { | 79 | { |
80 | Stetic.Gui.Initialize(); | 80 | Stetic.Gui.Initialize(); |
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs index 46dec05..b5fd3f7 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs | |||
@@ -29,8 +29,8 @@ | |||
29 | // <autogenerated> | 29 | // <autogenerated> |
30 | // This code was generated by a tool. | 30 | // This code was generated by a tool. |
31 | // Mono Runtime Version: 2.0.50727.42 | 31 | // Mono Runtime Version: 2.0.50727.42 |
32 | // | 32 | // |
33 | // Changes to this file may cause incorrect behavior and will be lost if | 33 | // Changes to this file may cause incorrect behavior and will be lost if |
34 | // the code is regenerated. | 34 | // the code is regenerated. |
35 | // </autogenerated> | 35 | // </autogenerated> |
36 | // ------------------------------------------------------------------------------ | 36 | // ------------------------------------------------------------------------------ |
@@ -40,20 +40,20 @@ namespace Stetic | |||
40 | internal class Gui | 40 | internal class Gui |
41 | { | 41 | { |
42 | private static bool initialized; | 42 | private static bool initialized; |
43 | 43 | ||
44 | internal static void Initialize() | 44 | internal static void Initialize() |
45 | { | 45 | { |
46 | Stetic.Gui.initialized = true; | 46 | Stetic.Gui.initialized = true; |
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | internal class ActionGroups | 50 | internal class ActionGroups |
51 | { | 51 | { |
52 | public static Gtk.ActionGroup GetActionGroup(System.Type type) | 52 | public static Gtk.ActionGroup GetActionGroup(System.Type type) |
53 | { | 53 | { |
54 | return Stetic.ActionGroups.GetActionGroup(type.FullName); | 54 | return Stetic.ActionGroups.GetActionGroup(type.FullName); |
55 | } | 55 | } |
56 | 56 | ||
57 | public static Gtk.ActionGroup GetActionGroup(string name) | 57 | public static Gtk.ActionGroup GetActionGroup(string name) |
58 | { | 58 | { |
59 | return null; | 59 | return null; |
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 9020ca4..7e9456d 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Grid.MessagingServer | |||
45 | 45 | ||
46 | private MessageServerConfig Cfg; | 46 | private MessageServerConfig Cfg; |
47 | private MessageService msgsvc; | 47 | private MessageService msgsvc; |
48 | 48 | ||
49 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 49 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
50 | 50 | ||
51 | [STAThread] | 51 | [STAThread] |
@@ -55,7 +55,7 @@ namespace OpenSim.Grid.MessagingServer | |||
55 | 55 | ||
56 | m_log.Info("Launching MessagingServer..."); | 56 | m_log.Info("Launching MessagingServer..."); |
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | OpenMessage_Main messageserver = new OpenMessage_Main(); | 60 | OpenMessage_Main messageserver = new OpenMessage_Main(); |
61 | 61 | ||
@@ -118,7 +118,7 @@ namespace OpenSim.Grid.MessagingServer | |||
118 | switch (what) | 118 | switch (what) |
119 | { | 119 | { |
120 | case "user": | 120 | case "user": |
121 | 121 | ||
122 | try | 122 | try |
123 | { | 123 | { |
124 | //userID = | 124 | //userID = |
@@ -140,12 +140,12 @@ namespace OpenSim.Grid.MessagingServer | |||
140 | // m_lastCreatedUser = userID; | 140 | // m_lastCreatedUser = userID; |
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | } | 143 | } |
144 | 144 | ||
145 | public override void Shutdown() | 145 | public override void Shutdown() |
146 | { | 146 | { |
147 | msgsvc.deregisterWithUserServer(); | 147 | msgsvc.deregisterWithUserServer(); |
148 | 148 | ||
149 | base.Shutdown(); | 149 | base.Shutdown(); |
150 | } | 150 | } |
151 | } | 151 | } |
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index f9f3669..e1beef1 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -63,13 +63,13 @@ namespace OpenSim.Grid.MessagingServer | |||
63 | { | 63 | { |
64 | m_cfg = cfg; | 64 | m_cfg = cfg; |
65 | } | 65 | } |
66 | 66 | ||
67 | #region RegionComms Methods | 67 | #region RegionComms Methods |
68 | 68 | ||
69 | #endregion | 69 | #endregion |
70 | 70 | ||
71 | #region FriendList Methods | 71 | #region FriendList Methods |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Process Friendlist subscriptions for a user | 74 | /// Process Friendlist subscriptions for a user |
75 | /// The login method calls this for a User | 75 | /// The login method calls this for a User |
@@ -93,7 +93,7 @@ namespace OpenSim.Grid.MessagingServer | |||
93 | { | 93 | { |
94 | UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend]; | 94 | UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend]; |
95 | // Add backreference | 95 | // Add backreference |
96 | 96 | ||
97 | SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); | 97 | SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); |
98 | } | 98 | } |
99 | } | 99 | } |
@@ -101,14 +101,14 @@ namespace OpenSim.Grid.MessagingServer | |||
101 | 101 | ||
102 | /// <summary> | 102 | /// <summary> |
103 | /// Does the necessary work to subscribe one agent to another's presence notifications | 103 | /// Does the necessary work to subscribe one agent to another's presence notifications |
104 | /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly | 104 | /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly |
105 | /// unless you know what you're doing | 105 | /// unless you know what you're doing |
106 | /// </summary> | 106 | /// </summary> |
107 | /// <param name="userpresence">P1</param> | 107 | /// <param name="userpresence">P1</param> |
108 | /// <param name="friendpresence">P2</param> | 108 | /// <param name="friendpresence">P2</param> |
109 | /// <param name="uFriendListItem"></param> | 109 | /// <param name="uFriendListItem"></param> |
110 | /// <param name="uFriendListIndex"></param> | 110 | /// <param name="uFriendListIndex"></param> |
111 | public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence, | 111 | public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence, |
112 | FriendListItem uFriendListItem, int uFriendListIndex) | 112 | FriendListItem uFriendListItem, int uFriendListIndex) |
113 | { | 113 | { |
114 | if ((uFriendListItem.FriendListOwnerPerms & (uint)FriendRights.CanSeeOnline) != 0) | 114 | if ((uFriendListItem.FriendListOwnerPerms & (uint)FriendRights.CanSeeOnline) != 0) |
@@ -117,7 +117,7 @@ namespace OpenSim.Grid.MessagingServer | |||
117 | if (!friendpresence.subscriptionData.Contains(friendpresence.agentData.AgentID)) | 117 | if (!friendpresence.subscriptionData.Contains(friendpresence.agentData.AgentID)) |
118 | { | 118 | { |
119 | userpresence.subscriptionData.Add(friendpresence.agentData.AgentID); | 119 | userpresence.subscriptionData.Add(friendpresence.agentData.AgentID); |
120 | //Send Region Notice.... | 120 | //Send Region Notice.... |
121 | } | 121 | } |
122 | else | 122 | else |
123 | { | 123 | { |
@@ -149,13 +149,13 @@ namespace OpenSim.Grid.MessagingServer | |||
149 | 149 | ||
150 | WaitCallback cb2 = new WaitCallback(friendlistupdater.go); | 150 | WaitCallback cb2 = new WaitCallback(friendlistupdater.go); |
151 | ThreadPool.QueueUserWorkItem(cb2); | 151 | ThreadPool.QueueUserWorkItem(cb2); |
152 | 152 | ||
153 | //SendRegionPresenceUpdate(userpresence, friendpresence); | 153 | //SendRegionPresenceUpdate(userpresence, friendpresence); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | /// <summary> | 157 | /// <summary> |
158 | /// Adds a backreference so presence specific data doesn't have to be | 158 | /// Adds a backreference so presence specific data doesn't have to be |
159 | /// enumerated for each logged in user every time someone logs on or off. | 159 | /// enumerated for each logged in user every time someone logs on or off. |
160 | /// </summary> | 160 | /// </summary> |
161 | /// <param name="agentID"></param> | 161 | /// <param name="agentID"></param> |
@@ -194,7 +194,7 @@ namespace OpenSim.Grid.MessagingServer | |||
194 | presenseBackReferences.Remove(agentID); | 194 | presenseBackReferences.Remove(agentID); |
195 | } | 195 | } |
196 | 196 | ||
197 | // If there are no more backreferences for this agent, | 197 | // If there are no more backreferences for this agent, |
198 | // remove it to free up memory. | 198 | // remove it to free up memory. |
199 | if (presenseBackReferences.Count == 0) | 199 | if (presenseBackReferences.Count == 0) |
200 | { | 200 | { |
@@ -276,7 +276,7 @@ namespace OpenSim.Grid.MessagingServer | |||
276 | } | 276 | } |
277 | } | 277 | } |
278 | } | 278 | } |
279 | 279 | ||
280 | #endregion | 280 | #endregion |
281 | 281 | ||
282 | #region UserServer Comms | 282 | #region UserServer Comms |
@@ -342,7 +342,7 @@ namespace OpenSim.Grid.MessagingServer | |||
342 | 342 | ||
343 | /// <summary> | 343 | /// <summary> |
344 | /// UserServer sends an expect_user method | 344 | /// UserServer sends an expect_user method |
345 | /// this handles the method and provisions the | 345 | /// this handles the method and provisions the |
346 | /// necessary info for presence to work | 346 | /// necessary info for presence to work |
347 | /// </summary> | 347 | /// </summary> |
348 | /// <param name="request">UserServer Data</param> | 348 | /// <param name="request">UserServer Data</param> |
@@ -398,9 +398,9 @@ namespace OpenSim.Grid.MessagingServer | |||
398 | 398 | ||
399 | return new XmlRpcResponse(); | 399 | return new XmlRpcResponse(); |
400 | } | 400 | } |
401 | 401 | ||
402 | /// <summary> | 402 | /// <summary> |
403 | /// The UserServer got a Logoff message | 403 | /// The UserServer got a Logoff message |
404 | /// Cleanup time for that user. Send out presence notifications | 404 | /// Cleanup time for that user. Send out presence notifications |
405 | /// </summary> | 405 | /// </summary> |
406 | /// <param name="request"></param> | 406 | /// <param name="request"></param> |
@@ -408,7 +408,7 @@ namespace OpenSim.Grid.MessagingServer | |||
408 | public XmlRpcResponse UserLoggedOff(XmlRpcRequest request) | 408 | public XmlRpcResponse UserLoggedOff(XmlRpcRequest request) |
409 | { | 409 | { |
410 | Hashtable requestData = (Hashtable)request.Params[0]; | 410 | Hashtable requestData = (Hashtable)request.Params[0]; |
411 | 411 | ||
412 | LLUUID AgentID = new LLUUID((string)requestData["agentid"]); | 412 | LLUUID AgentID = new LLUUID((string)requestData["agentid"]); |
413 | 413 | ||
414 | ProcessLogOff(AgentID); | 414 | ProcessLogOff(AgentID); |
@@ -433,7 +433,7 @@ namespace OpenSim.Grid.MessagingServer | |||
433 | { | 433 | { |
434 | regionInfo = (RegionProfileData)m_regionInfoCache[regionhandle]; | 434 | regionInfo = (RegionProfileData)m_regionInfoCache[regionhandle]; |
435 | } | 435 | } |
436 | else | 436 | else |
437 | { | 437 | { |
438 | regionInfo = RequestRegionInfo(regionhandle); | 438 | regionInfo = RequestRegionInfo(regionhandle); |
439 | } | 439 | } |
@@ -457,7 +457,7 @@ namespace OpenSim.Grid.MessagingServer | |||
457 | SendParams.Add(requestData); | 457 | SendParams.Add(requestData); |
458 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 458 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
459 | XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); | 459 | XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); |
460 | 460 | ||
461 | Hashtable responseData = (Hashtable)GridResp.Value; | 461 | Hashtable responseData = (Hashtable)GridResp.Value; |
462 | 462 | ||
463 | if (responseData.ContainsKey("error")) | 463 | if (responseData.ContainsKey("error")) |
@@ -479,7 +479,7 @@ namespace OpenSim.Grid.MessagingServer | |||
479 | regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); | 479 | regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); |
480 | regionProfile.regionLocX = regX; | 480 | regionProfile.regionLocX = regX; |
481 | regionProfile.regionLocY = regY; | 481 | regionProfile.regionLocY = regY; |
482 | 482 | ||
483 | regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | 483 | regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); |
484 | regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); | 484 | regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); |
485 | regionProfile.regionName = (string)responseData["region_name"]; | 485 | regionProfile.regionName = (string)responseData["region_name"]; |
@@ -498,7 +498,7 @@ namespace OpenSim.Grid.MessagingServer | |||
498 | " - Is the GridServer down?"); | 498 | " - Is the GridServer down?"); |
499 | return null; | 499 | return null; |
500 | } | 500 | } |
501 | 501 | ||
502 | return regionProfile; | 502 | return regionProfile; |
503 | } | 503 | } |
504 | 504 | ||
@@ -506,19 +506,19 @@ namespace OpenSim.Grid.MessagingServer | |||
506 | { | 506 | { |
507 | Hashtable UserParams = new Hashtable(); | 507 | Hashtable UserParams = new Hashtable(); |
508 | // Login / Authentication | 508 | // Login / Authentication |
509 | 509 | ||
510 | if (m_cfg.HttpSSL) | 510 | if (m_cfg.HttpSSL) |
511 | { | 511 | { |
512 | UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; | 512 | UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; |
513 | } | 513 | } |
514 | else | 514 | else |
515 | { | 515 | { |
516 | UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; | 516 | UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; |
517 | } | 517 | } |
518 | 518 | ||
519 | UserParams["recvkey"] = m_cfg.UserRecvKey; | 519 | UserParams["recvkey"] = m_cfg.UserRecvKey; |
520 | UserParams["sendkey"] = m_cfg.UserRecvKey; | 520 | UserParams["sendkey"] = m_cfg.UserRecvKey; |
521 | 521 | ||
522 | // Package into an XMLRPC Request | 522 | // Package into an XMLRPC Request |
523 | ArrayList SendParams = new ArrayList(); | 523 | ArrayList SendParams = new ArrayList(); |
524 | SendParams.Add(UserParams); | 524 | SendParams.Add(UserParams); |
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs index df3bc22..a0aeacc 100644 --- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs +++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs | |||
@@ -48,9 +48,9 @@ namespace OpenSim.Grid.MessagingServer | |||
48 | : base("GET", "/presence") | 48 | : base("GET", "/presence") |
49 | { | 49 | { |
50 | m_log.Info("[REST]: In Get Request"); | 50 | m_log.Info("[REST]: In Get Request"); |
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | public override byte[] Handle(string path, Stream request) | 54 | public override byte[] Handle(string path, Stream request) |
55 | { | 55 | { |
56 | string param = GetParam(path); | 56 | string param = GetParam(path); |
@@ -61,8 +61,8 @@ namespace OpenSim.Grid.MessagingServer | |||
61 | 61 | ||
62 | if (p.Length > 0) | 62 | if (p.Length > 0) |
63 | { | 63 | { |
64 | LLUUID assetID = null; | 64 | LLUUID assetID = null; |
65 | 65 | ||
66 | if (!LLUUID.TryParse(p[0], out assetID)) | 66 | if (!LLUUID.TryParse(p[0], out assetID)) |
67 | { | 67 | { |
68 | m_log.InfoFormat( | 68 | m_log.InfoFormat( |
@@ -101,7 +101,7 @@ namespace OpenSim.Grid.MessagingServer | |||
101 | public PostXMPPStreamHandler() | 101 | public PostXMPPStreamHandler() |
102 | : base("POST", "/presence") | 102 | : base("POST", "/presence") |
103 | { | 103 | { |
104 | 104 | ||
105 | } | 105 | } |
106 | 106 | ||
107 | } | 107 | } |
diff --git a/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs index 3d06232..d18822c 100644 --- a/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 072c86c..639cd54 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | |||
165 | // if level == 0, add to return | 165 | // if level == 0, add to return |
166 | if (ilevel == 1 && lastlevel == 0) | 166 | if (ilevel == 1 && lastlevel == 0) |
167 | { | 167 | { |
168 | // 0 => 1: Get last | 168 | // 0 => 1: Get last |
169 | Match m = | 169 | Match m = |
170 | Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", | 170 | Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", |
171 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 171 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index f957d63..60f4d42 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -98,9 +98,9 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | |||
98 | ads.ConfigurationFile | 98 | ads.ConfigurationFile |
99 | ); | 99 | ); |
100 | 100 | ||
101 | // Display the name of the calling AppDomain and the name | 101 | // Display the name of the calling AppDomain and the name |
102 | // of the second domain. | 102 | // of the second domain. |
103 | // NOTE: The application's thread has transitioned between | 103 | // NOTE: The application's thread has transitioned between |
104 | // AppDomains. | 104 | // AppDomains. |
105 | Console.WriteLine("Calling to '{0}'.", | 105 | Console.WriteLine("Calling to '{0}'.", |
106 | Thread.GetDomain().FriendlyName | 106 | Thread.GetDomain().FriendlyName |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs index 4ec8618..f7c8fb1 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs | |||
@@ -167,7 +167,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
167 | Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); | 167 | Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); |
168 | //ConstructorBuilder constructor = typeBuilder.DefineConstructor( | 168 | //ConstructorBuilder constructor = typeBuilder.DefineConstructor( |
169 | // MethodAttributes.Public, | 169 | // MethodAttributes.Public, |
170 | // CallingConventions.Standard, | 170 | // CallingConventions.Standard, |
171 | // new Type[0]); | 171 | // new Type[0]); |
172 | ConstructorBuilder constructor = typeBuilder.DefineConstructor( | 172 | ConstructorBuilder constructor = typeBuilder.DefineConstructor( |
173 | MethodAttributes.Public | | 173 | MethodAttributes.Public | |
@@ -191,8 +191,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
191 | //// Create state object | 191 | //// Create state object |
192 | //FieldName = "State"; | 192 | //FieldName = "State"; |
193 | //FieldBuilder State_fb = typeBuilder.DefineField( | 193 | //FieldBuilder State_fb = typeBuilder.DefineField( |
194 | // FieldName, | 194 | // FieldName, |
195 | // typeof(UInt32), | 195 | // typeof(UInt32), |
196 | // FieldAttributes.Public); | 196 | // FieldAttributes.Public); |
197 | //il.Emit(OpCodes.Ldarg_0); | 197 | //il.Emit(OpCodes.Ldarg_0); |
198 | //il.Emit(OpCodes.Ldc_I4, 0); | 198 | //il.Emit(OpCodes.Ldc_I4, 0); |
@@ -205,8 +205,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
205 | 205 | ||
206 | //FieldName = "LSL_BuiltIns"; | 206 | //FieldName = "LSL_BuiltIns"; |
207 | //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( | 207 | //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( |
208 | // FieldName, | 208 | // FieldName, |
209 | // objType1, | 209 | // objType1, |
210 | // FieldAttributes.Public); | 210 | // FieldAttributes.Public); |
211 | 211 | ||
212 | ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); | 212 | ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs index 05f7611..11b567e 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs | |||
@@ -36,9 +36,9 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
36 | * | 36 | * |
37 | * These are internal "assembly" commands, | 37 | * These are internal "assembly" commands, |
38 | * basic operators like "ADD", "PUSH" and "POP" | 38 | * basic operators like "ADD", "PUSH" and "POP" |
39 | * | 39 | * |
40 | * It also contains managed stack and keeps track of internal variables, etc. | 40 | * It also contains managed stack and keeps track of internal variables, etc. |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | 43 | ||
44 | 44 | ||
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs index 9189bf6..25d1211 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs | |||
@@ -75,7 +75,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
75 | /// </summary> | 75 | /// </summary> |
76 | public void Parse() | 76 | public void Parse() |
77 | { | 77 | { |
78 | // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. | 78 | // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. |
79 | 79 | ||
80 | 80 | ||
81 | // HEADER BLOCK | 81 | // HEADER BLOCK |
@@ -295,7 +295,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
295 | myEventCodeChunk = new LSO_Struct.CodeChunk[myStateFrameBlock.StateCount]; | 295 | myEventCodeChunk = new LSO_Struct.CodeChunk[myStateFrameBlock.StateCount]; |
296 | for (int i = 0; i < myStateFrameBlock.StateCount; i++) | 296 | for (int i = 0; i < myStateFrameBlock.StateCount; i++) |
297 | { | 297 | { |
298 | // TODO: Somehow organize events and functions so they can be found again, | 298 | // TODO: Somehow organize events and functions so they can be found again, |
299 | // two level search ain't no good | 299 | // two level search ain't no good |
300 | for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) | 300 | for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) |
301 | { | 301 | { |
@@ -373,7 +373,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO | |||
373 | 373 | ||
374 | //private byte[] br_read_smallendian(int len) | 374 | //private byte[] br_read_smallendian(int len) |
375 | //{ | 375 | //{ |
376 | // byte[] bytes = new byte[len]; | 376 | // byte[] bytes = new byte[len]; |
377 | // br.Read(bytes,0, len); | 377 | // br.Read(bytes,0, len); |
378 | // return bytes; | 378 | // return bytes; |
379 | //} | 379 | //} |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs index d724d22..0d2d7cf 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
67 | public void OnRezScript(uint localID, LLUUID itemID, string script) | 67 | public void OnRezScript(uint localID, LLUUID itemID, string script) |
68 | { | 68 | { |
69 | //myScriptEngine.myScriptManager.StartScript( | 69 | //myScriptEngine.myScriptManager.StartScript( |
70 | // Path.Combine("ScriptEngines", "Default.lsl"), | 70 | // Path.Combine("ScriptEngines", "Default.lsl"), |
71 | // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() | 71 | // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() |
72 | //); | 72 | //); |
73 | Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + | 73 | Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + |
@@ -78,7 +78,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
78 | public void OnRemoveScript(uint localID, LLUUID itemID) | 78 | public void OnRemoveScript(uint localID, LLUUID itemID) |
79 | { | 79 | { |
80 | //myScriptEngine.myScriptManager.StartScript( | 80 | //myScriptEngine.myScriptManager.StartScript( |
81 | // Path.Combine("ScriptEngines", "Default.lsl"), | 81 | // Path.Combine("ScriptEngines", "Default.lsl"), |
82 | // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() | 82 | // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() |
83 | //); | 83 | //); |
84 | Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); | 84 | Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs index 351f26b..060ae0b 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs index e4161d3..0ec6d6c 100644 --- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 00b7f76..79524b4 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -48,10 +48,10 @@ namespace OpenSim.Grid.UserServer | |||
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | private UserConfig Cfg; | 50 | private UserConfig Cfg; |
51 | 51 | ||
52 | public UserManager m_userManager; | 52 | public UserManager m_userManager; |
53 | public UserLoginService m_loginService; | 53 | public UserLoginService m_loginService; |
54 | public MessageServersConnector m_messagesService; | 54 | public MessageServersConnector m_messagesService; |
55 | 55 | ||
56 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | 56 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
57 | 57 | ||
@@ -87,13 +87,13 @@ namespace OpenSim.Grid.UserServer | |||
87 | public void Startup() | 87 | public void Startup() |
88 | { | 88 | { |
89 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); | 89 | Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); |
90 | 90 | ||
91 | m_stats = StatsManager.StartCollectingUserStats(); | 91 | m_stats = StatsManager.StartCollectingUserStats(); |
92 | 92 | ||
93 | m_log.Info("[REGION]: Establishing data connection"); | 93 | m_log.Info("[REGION]: Establishing data connection"); |
94 | m_userManager = new UserManager(); | 94 | m_userManager = new UserManager(); |
95 | m_userManager._config = Cfg; | 95 | m_userManager._config = Cfg; |
96 | m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); | 96 | m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); |
97 | 97 | ||
98 | m_loginService = new UserLoginService( | 98 | m_loginService = new UserLoginService( |
99 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 99 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
@@ -104,7 +104,7 @@ namespace OpenSim.Grid.UserServer | |||
104 | m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; | 104 | m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; |
105 | 105 | ||
106 | m_log.Info("[REGION]: Starting HTTP process"); | 106 | m_log.Info("[REGION]: Starting HTTP process"); |
107 | 107 | ||
108 | m_httpServer = new BaseHttpServer(Cfg.HttpPort); | 108 | m_httpServer = new BaseHttpServer(Cfg.HttpPort); |
109 | AddHttpHandlers(); | 109 | AddHttpHandlers(); |
110 | m_httpServer.Start(); | 110 | m_httpServer.Start(); |
@@ -117,7 +117,7 @@ namespace OpenSim.Grid.UserServer | |||
117 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 117 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
118 | 118 | ||
119 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); | 119 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); |
120 | 120 | ||
121 | m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod); | 121 | m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod); |
122 | 122 | ||
123 | m_httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); | 123 | m_httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); |
@@ -128,7 +128,7 @@ namespace OpenSim.Grid.UserServer | |||
128 | m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); | 128 | m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); |
129 | m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); | 129 | m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); |
130 | m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID); | 130 | m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID); |
131 | 131 | ||
132 | // Message Server ---> User Server | 132 | // Message Server ---> User Server |
133 | m_httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer); | 133 | m_httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer); |
134 | m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion); | 134 | m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion); |
@@ -163,17 +163,17 @@ namespace OpenSim.Grid.UserServer | |||
163 | { | 163 | { |
164 | m_log.ErrorFormat( | 164 | m_log.ErrorFormat( |
165 | "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); | 165 | "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); |
166 | 166 | ||
167 | break; | 167 | break; |
168 | } | 168 | } |
169 | 169 | ||
170 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); | 170 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); |
171 | 171 | ||
172 | LLUUID userID = new LLUUID(); | 172 | LLUUID userID = new LLUUID(); |
173 | try | 173 | try |
174 | { | 174 | { |
175 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 175 | userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
176 | } | 176 | } |
177 | catch (Exception ex) | 177 | catch (Exception ex) |
178 | { | 178 | { |
179 | m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); | 179 | m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); |
@@ -181,31 +181,31 @@ namespace OpenSim.Grid.UserServer | |||
181 | 181 | ||
182 | try | 182 | try |
183 | { | 183 | { |
184 | bool created | 184 | bool created |
185 | = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( | 185 | = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( |
186 | "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); | 186 | "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); |
187 | 187 | ||
188 | if (!created) | 188 | if (!created) |
189 | { | 189 | { |
190 | throw new Exception( | 190 | throw new Exception( |
191 | String.Format( | 191 | String.Format( |
192 | "The inventory creation request for user {0} did not succeed." | 192 | "The inventory creation request for user {0} did not succeed." |
193 | + " Please contact your inventory service provider for more information.", | 193 | + " Please contact your inventory service provider for more information.", |
194 | userID)); | 194 | userID)); |
195 | } | 195 | } |
196 | 196 | ||
197 | } | 197 | } |
198 | catch (WebException) | 198 | catch (WebException) |
199 | { | 199 | { |
200 | m_log.ErrorFormat( | 200 | m_log.ErrorFormat( |
201 | "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", | 201 | "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", |
202 | m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); | 202 | m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); |
203 | } | 203 | } |
204 | catch (Exception e) | 204 | catch (Exception e) |
205 | { | 205 | { |
206 | m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e); | 206 | m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e); |
207 | } | 207 | } |
208 | 208 | ||
209 | m_lastCreatedUser = userID; | 209 | m_lastCreatedUser = userID; |
210 | break; | 210 | break; |
211 | } | 211 | } |
@@ -214,7 +214,7 @@ namespace OpenSim.Grid.UserServer | |||
214 | public override void RunCmd(string cmd, string[] cmdparams) | 214 | public override void RunCmd(string cmd, string[] cmdparams) |
215 | { | 215 | { |
216 | base.RunCmd(cmd, cmdparams); | 216 | base.RunCmd(cmd, cmdparams); |
217 | 217 | ||
218 | switch (cmd) | 218 | switch (cmd) |
219 | { | 219 | { |
220 | case "help": | 220 | case "help": |
@@ -223,7 +223,7 @@ namespace OpenSim.Grid.UserServer | |||
223 | 223 | ||
224 | case "create": | 224 | case "create": |
225 | do_create(cmdparams[0]); | 225 | do_create(cmdparams[0]); |
226 | break; | 226 | break; |
227 | 227 | ||
228 | case "test-inventory": | 228 | case "test-inventory": |
229 | // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); | 229 | // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); |
@@ -242,10 +242,10 @@ namespace OpenSim.Grid.UserServer | |||
242 | public override void Shutdown() | 242 | public override void Shutdown() |
243 | { | 243 | { |
244 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; | 244 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; |
245 | 245 | ||
246 | base.Shutdown(); | 246 | base.Shutdown(); |
247 | } | 247 | } |
248 | 248 | ||
249 | public void TestResponse(List<InventoryFolderBase> resp) | 249 | public void TestResponse(List<InventoryFolderBase> resp) |
250 | { | 250 | { |
251 | m_console.Notice("response got"); | 251 | m_console.Notice("response got"); |
@@ -257,10 +257,10 @@ namespace OpenSim.Grid.UserServer | |||
257 | } | 257 | } |
258 | 258 | ||
259 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | 259 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, |
260 | ulong regionhandle, float positionX, float positionY, | 260 | ulong regionhandle, float positionX, float positionY, |
261 | float positionZ, string firstname, string lastname) | 261 | float positionZ, string firstname, string lastname) |
262 | { | 262 | { |
263 | 263 | ||
264 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, | 264 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, |
265 | positionY, positionZ, firstname, lastname); | 265 | positionY, positionZ, firstname, lastname); |
266 | } | 266 | } |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 4e9728e..529c089 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -41,12 +41,12 @@ namespace OpenSim.Grid.UserServer | |||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | public Dictionary<string, MessageServerInfo> MessageServers; | 43 | public Dictionary<string, MessageServerInfo> MessageServers; |
44 | 44 | ||
45 | public MessageServersConnector() | 45 | public MessageServersConnector() |
46 | { | 46 | { |
47 | MessageServers = new Dictionary<string, MessageServerInfo>(); | 47 | MessageServers = new Dictionary<string, MessageServerInfo>(); |
48 | } | 48 | } |
49 | 49 | ||
50 | public void RegisterMessageServer(string URI, MessageServerInfo serverData) | 50 | public void RegisterMessageServer(string URI, MessageServerInfo serverData) |
51 | { | 51 | { |
52 | lock (MessageServers) | 52 | lock (MessageServers) |
@@ -55,7 +55,7 @@ namespace OpenSim.Grid.UserServer | |||
55 | MessageServers.Add(URI, serverData); | 55 | MessageServers.Add(URI, serverData); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | public void DeRegisterMessageServer(string URI) | 59 | public void DeRegisterMessageServer(string URI) |
60 | { | 60 | { |
61 | lock (MessageServers) | 61 | lock (MessageServers) |
@@ -64,7 +64,7 @@ namespace OpenSim.Grid.UserServer | |||
64 | MessageServers.Remove(URI); | 64 | MessageServers.Remove(URI); |
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | public void AddResponsibleRegion(string URI, ulong regionhandle) | 68 | public void AddResponsibleRegion(string URI, ulong regionhandle) |
69 | { | 69 | { |
70 | if (!MessageServers.ContainsKey(URI)) | 70 | if (!MessageServers.ContainsKey(URI)) |
@@ -76,7 +76,7 @@ namespace OpenSim.Grid.UserServer | |||
76 | MessageServerInfo msginfo = MessageServers["URI"]; | 76 | MessageServerInfo msginfo = MessageServers["URI"]; |
77 | msginfo.responsibleForRegions.Add(regionhandle); | 77 | msginfo.responsibleForRegions.Add(regionhandle); |
78 | MessageServers["URI"] = msginfo; | 78 | MessageServers["URI"] = msginfo; |
79 | } | 79 | } |
80 | } | 80 | } |
81 | public void RemoveResponsibleRegion(string URI, ulong regionhandle) | 81 | public void RemoveResponsibleRegion(string URI, ulong regionhandle) |
82 | { | 82 | { |
@@ -92,7 +92,7 @@ namespace OpenSim.Grid.UserServer | |||
92 | msginfo.responsibleForRegions.Remove(regionhandle); | 92 | msginfo.responsibleForRegions.Remove(regionhandle); |
93 | MessageServers["URI"] = msginfo; | 93 | MessageServers["URI"] = msginfo; |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | } | 97 | } |
98 | public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request) | 98 | public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request) |
@@ -148,7 +148,7 @@ namespace OpenSim.Grid.UserServer | |||
148 | string scurrentpos = (string)requestData["currentpos"]; | 148 | string scurrentpos = (string)requestData["currentpos"]; |
149 | //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); | 149 | //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); |
150 | // TODO: Okay now raise event so the user server can pass this data to the Usermanager | 150 | // TODO: Okay now raise event so the user server can pass this data to the Usermanager |
151 | 151 | ||
152 | responseData["responsestring"] = "TRUE"; | 152 | responseData["responsestring"] = "TRUE"; |
153 | response.Value = responseData; | 153 | response.Value = responseData; |
154 | } | 154 | } |
@@ -156,7 +156,7 @@ namespace OpenSim.Grid.UserServer | |||
156 | } | 156 | } |
157 | 157 | ||
158 | public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | 158 | public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, |
159 | ulong regionhandle, float positionX, float positionY, | 159 | ulong regionhandle, float positionX, float positionY, |
160 | float positionZ, string firstname, string lastname) | 160 | float positionZ, string firstname, string lastname) |
161 | { | 161 | { |
162 | // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D) | 162 | // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D) |
@@ -218,9 +218,9 @@ namespace OpenSim.Grid.UserServer | |||
218 | m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout"); | 218 | m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout"); |
219 | } | 219 | } |
220 | 220 | ||
221 | private void NotifyMessageServerAboutUser(MessageServerInfo serv, | 221 | private void NotifyMessageServerAboutUser(MessageServerInfo serv, |
222 | LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | 222 | LLUUID agentID, LLUUID sessionID, LLUUID RegionID, |
223 | ulong regionhandle, float positionX, float positionY, float positionZ, | 223 | ulong regionhandle, float positionX, float positionY, float positionZ, |
224 | string firstname, string lastname) | 224 | string firstname, string lastname) |
225 | { | 225 | { |
226 | Hashtable reqparams = new Hashtable(); | 226 | Hashtable reqparams = new Hashtable(); |
@@ -250,7 +250,7 @@ namespace OpenSim.Grid.UserServer | |||
250 | { | 250 | { |
251 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); | 251 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); |
252 | } | 252 | } |
253 | 253 | ||
254 | } | 254 | } |
255 | } | 255 | } |
256 | } | 256 | } |
diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs index 680b357..926f680 100644 --- a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 32b1ada..3c9d650 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -50,11 +50,11 @@ namespace OpenSim.Grid.UserServer | |||
50 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; | 50 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; |
51 | 51 | ||
52 | private UserLoggedInAtLocation handlerUserLoggedInAtLocation = null; | 52 | private UserLoggedInAtLocation handlerUserLoggedInAtLocation = null; |
53 | 53 | ||
54 | public UserConfig m_config; | 54 | public UserConfig m_config; |
55 | 55 | ||
56 | public UserLoginService( | 56 | public UserLoginService( |
57 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, | 57 | UserManagerBase userManager, LibraryRootFolder libraryRootFolder, |
58 | UserConfig config, string welcomeMess) | 58 | UserConfig config, string welcomeMess) |
59 | : base(userManager, libraryRootFolder, welcomeMess) | 59 | : base(userManager, libraryRootFolder, welcomeMess) |
60 | { | 60 | { |
@@ -138,9 +138,9 @@ namespace OpenSim.Grid.UserServer | |||
138 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; | 138 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
139 | 139 | ||
140 | // Destination | 140 | // Destination |
141 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 141 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
142 | //CFK: the next one for X & Y and comment this one. | 142 | //CFK: the next one for X & Y and comment this one. |
143 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + | 143 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + |
144 | //CFK: "; Region Y: " + SimInfo.regionLocY); | 144 | //CFK: "; Region Y: " + SimInfo.regionLocY); |
145 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverURI.Split(new char[] { '/', ':' })[3]).ToString(); | 145 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverURI.Split(new char[] { '/', ':' })[3]).ToString(); |
146 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); | 146 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); |
@@ -150,15 +150,15 @@ namespace OpenSim.Grid.UserServer | |||
150 | //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI | 150 | //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI |
151 | string capsPath = Util.GetRandomCapsPath(); | 151 | string capsPath = Util.GetRandomCapsPath(); |
152 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; | 152 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; |
153 | 153 | ||
154 | m_log.DebugFormat( | 154 | m_log.DebugFormat( |
155 | "[LOGIN]: Sending new CAPS seed url {0} to client {1}", | 155 | "[LOGIN]: Sending new CAPS seed url {0} to client {1}", |
156 | response.SeedCapability, response.AgentID); | 156 | response.SeedCapability, response.AgentID); |
157 | 157 | ||
158 | // Notify the target of an incoming user | 158 | // Notify the target of an incoming user |
159 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 159 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
160 | //CFK: the next one for X & Y and comment this one. | 160 | //CFK: the next one for X & Y and comment this one. |
161 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + | 161 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + |
162 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); | 162 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); |
163 | 163 | ||
164 | theUser.CurrentAgent.Region = SimInfo.UUID; | 164 | theUser.CurrentAgent.Region = SimInfo.UUID; |
@@ -187,23 +187,23 @@ namespace OpenSim.Grid.UserServer | |||
187 | // Update agent with target sim | 187 | // Update agent with target sim |
188 | 188 | ||
189 | m_log.InfoFormat( | 189 | m_log.InfoFormat( |
190 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection", | 190 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection", |
191 | SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI); | 191 | SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI); |
192 | 192 | ||
193 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 193 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
194 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); | 194 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); |
195 | 195 | ||
196 | if (GridResp.IsFault) | 196 | if (GridResp.IsFault) |
197 | { | 197 | { |
198 | m_log.ErrorFormat( | 198 | m_log.ErrorFormat( |
199 | "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", | 199 | "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", |
200 | SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString); | 200 | SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString); |
201 | } | 201 | } |
202 | handlerUserLoggedInAtLocation = OnUserLoggedInAtLocation; | 202 | handlerUserLoggedInAtLocation = OnUserLoggedInAtLocation; |
203 | if (handlerUserLoggedInAtLocation != null) | 203 | if (handlerUserLoggedInAtLocation != null) |
204 | { | 204 | { |
205 | //m_log.Info("[LOGIN]: Letting other objects know about login"); | 205 | //m_log.Info("[LOGIN]: Letting other objects know about login"); |
206 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, | 206 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, |
207 | theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X,theUser.CurrentAgent.Position.Y,theUser.CurrentAgent.Position.Z, | 207 | theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X,theUser.CurrentAgent.Position.Y,theUser.CurrentAgent.Position.Z, |
208 | theUser.FirstName,theUser.SurName); | 208 | theUser.FirstName,theUser.SurName); |
209 | } | 209 | } |
@@ -213,7 +213,7 @@ namespace OpenSim.Grid.UserServer | |||
213 | { | 213 | { |
214 | tryDefault = true; | 214 | tryDefault = true; |
215 | } | 215 | } |
216 | 216 | ||
217 | if (tryDefault) | 217 | if (tryDefault) |
218 | { | 218 | { |
219 | // Send him to default region instead | 219 | // Send him to default region instead |
@@ -301,8 +301,8 @@ namespace OpenSim.Grid.UserServer | |||
301 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 301 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
302 | { | 302 | { |
303 | m_log.DebugFormat( | 303 | m_log.DebugFormat( |
304 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", | 304 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", |
305 | m_config.InventoryUrl, userID); | 305 | m_config.InventoryUrl, userID); |
306 | 306 | ||
307 | List<InventoryFolderBase> folders | 307 | List<InventoryFolderBase> folders |
308 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 308 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
@@ -317,23 +317,23 @@ namespace OpenSim.Grid.UserServer | |||
317 | // tools are creating the user profile directly in the database without creating the inventory. At | 317 | // tools are creating the user profile directly in the database without creating the inventory. At |
318 | // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already | 318 | // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already |
319 | // exist. | 319 | // exist. |
320 | bool created = | 320 | bool created = |
321 | SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( | 321 | SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( |
322 | "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); | 322 | "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); |
323 | 323 | ||
324 | if (!created) | 324 | if (!created) |
325 | { | 325 | { |
326 | throw new Exception( | 326 | throw new Exception( |
327 | String.Format( | 327 | String.Format( |
328 | "The inventory creation request for user {0} did not succeed." | 328 | "The inventory creation request for user {0} did not succeed." |
329 | + " Please contact your inventory service provider for more information.", | 329 | + " Please contact your inventory service provider for more information.", |
330 | userID)); | 330 | userID)); |
331 | } | 331 | } |
332 | else | 332 | else |
333 | { | 333 | { |
334 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); | 334 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); |
335 | } | 335 | } |
336 | 336 | ||
337 | folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 337 | folders = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
338 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); | 338 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); |
339 | } | 339 | } |
@@ -343,11 +343,11 @@ namespace OpenSim.Grid.UserServer | |||
343 | LLUUID rootID = LLUUID.Zero; | 343 | LLUUID rootID = LLUUID.Zero; |
344 | ArrayList AgentInventoryArray = new ArrayList(); | 344 | ArrayList AgentInventoryArray = new ArrayList(); |
345 | Hashtable TempHash; | 345 | Hashtable TempHash; |
346 | 346 | ||
347 | foreach (InventoryFolderBase InvFolder in folders) | 347 | foreach (InventoryFolderBase InvFolder in folders) |
348 | { | 348 | { |
349 | // m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); | 349 | // m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); |
350 | 350 | ||
351 | if (InvFolder.ParentID == LLUUID.Zero) | 351 | if (InvFolder.ParentID == LLUUID.Zero) |
352 | { | 352 | { |
353 | rootID = InvFolder.ID; | 353 | rootID = InvFolder.ID; |
@@ -360,14 +360,14 @@ namespace OpenSim.Grid.UserServer | |||
360 | TempHash["folder_id"] = InvFolder.ID.ToString(); | 360 | TempHash["folder_id"] = InvFolder.ID.ToString(); |
361 | AgentInventoryArray.Add(TempHash); | 361 | AgentInventoryArray.Add(TempHash); |
362 | } | 362 | } |
363 | 363 | ||
364 | return new InventoryData(AgentInventoryArray, rootID); | 364 | return new InventoryData(AgentInventoryArray, rootID); |
365 | } | 365 | } |
366 | else | 366 | else |
367 | { | 367 | { |
368 | throw new Exception( | 368 | throw new Exception( |
369 | String.Format( | 369 | String.Format( |
370 | "A root inventory folder for user {0} could not be retrieved from the inventory service", | 370 | "A root inventory folder for user {0} could not be retrieved from the inventory service", |
371 | userID)); | 371 | userID)); |
372 | } | 372 | } |
373 | } | 373 | } |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 5d0e1d6..8372d6a 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Grid.UserServer | |||
41 | public delegate void logOffUser(LLUUID AgentID); | 41 | public delegate void logOffUser(LLUUID AgentID); |
42 | 42 | ||
43 | public class UserManager : UserManagerBase | 43 | public class UserManager : UserManagerBase |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | public event logOffUser OnLogOffUser; | 47 | public event logOffUser OnLogOffUser; |
@@ -91,7 +91,7 @@ namespace OpenSim.Grid.UserServer | |||
91 | responseData["lastname" + i.ToString()] = returnUsers[i].lastName; | 91 | responseData["lastname" + i.ToString()] = returnUsers[i].lastName; |
92 | } | 92 | } |
93 | response.Value = responseData; | 93 | response.Value = responseData; |
94 | 94 | ||
95 | return response; | 95 | return response; |
96 | } | 96 | } |
97 | 97 | ||
@@ -182,7 +182,7 @@ namespace OpenSim.Grid.UserServer | |||
182 | Hashtable responseData = new Hashtable(); | 182 | Hashtable responseData = new Hashtable(); |
183 | string returnString = "FALSE"; | 183 | string returnString = "FALSE"; |
184 | // Query Result Information | 184 | // Query Result Information |
185 | 185 | ||
186 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 186 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) |
187 | { | 187 | { |
188 | // UserManagerBase.AddNewuserFriend | 188 | // UserManagerBase.AddNewuserFriend |
@@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer | |||
201 | Hashtable responseData = new Hashtable(); | 201 | Hashtable responseData = new Hashtable(); |
202 | string returnString = "FALSE"; | 202 | string returnString = "FALSE"; |
203 | // Query Result Information | 203 | // Query Result Information |
204 | 204 | ||
205 | if (requestData.Contains("ownerID") && requestData.Contains("friendID")) | 205 | if (requestData.Contains("ownerID") && requestData.Contains("friendID")) |
206 | { | 206 | { |
207 | // UserManagerBase.AddNewuserFriend | 207 | // UserManagerBase.AddNewuserFriend |
@@ -219,7 +219,7 @@ namespace OpenSim.Grid.UserServer | |||
219 | Hashtable requestData = (Hashtable)request.Params[0]; | 219 | Hashtable requestData = (Hashtable)request.Params[0]; |
220 | Hashtable responseData = new Hashtable(); | 220 | Hashtable responseData = new Hashtable(); |
221 | string returnString = "FALSE"; | 221 | string returnString = "FALSE"; |
222 | 222 | ||
223 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 223 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) |
224 | { | 224 | { |
225 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); | 225 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); |
@@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer | |||
243 | { | 243 | { |
244 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); | 244 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); |
245 | } | 245 | } |
246 | 246 | ||
247 | return FriendListItemListtoXmlRPCResponse(returndata); | 247 | return FriendListItemListtoXmlRPCResponse(returndata); |
248 | } | 248 | } |
249 | 249 | ||
@@ -350,7 +350,7 @@ namespace OpenSim.Grid.UserServer | |||
350 | } | 350 | } |
351 | // dont' know how yet | 351 | // dont' know how yet |
352 | if (requestData.Contains("MaturePublish")) | 352 | if (requestData.Contains("MaturePublish")) |
353 | { | 353 | { |
354 | } | 354 | } |
355 | if (requestData.Contains("AboutText")) | 355 | if (requestData.Contains("AboutText")) |
356 | { | 356 | { |
@@ -362,7 +362,7 @@ namespace OpenSim.Grid.UserServer | |||
362 | } | 362 | } |
363 | // not in DB yet. | 363 | // not in DB yet. |
364 | if (requestData.Contains("ProfileURL")) | 364 | if (requestData.Contains("ProfileURL")) |
365 | { | 365 | { |
366 | } | 366 | } |
367 | if (requestData.Contains("home_region")) | 367 | if (requestData.Contains("home_region")) |
368 | { | 368 | { |
@@ -382,7 +382,7 @@ namespace OpenSim.Grid.UserServer | |||
382 | { | 382 | { |
383 | m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); | 383 | m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); |
384 | } | 384 | } |
385 | 385 | ||
386 | } | 386 | } |
387 | if (requestData.Contains("home_pos_x")) | 387 | if (requestData.Contains("home_pos_x")) |
388 | { | 388 | { |
@@ -442,7 +442,7 @@ namespace OpenSim.Grid.UserServer | |||
442 | } | 442 | } |
443 | if (requestData.Contains("home_look_z")) | 443 | if (requestData.Contains("home_look_z")) |
444 | { | 444 | { |
445 | try | 445 | try |
446 | { | 446 | { |
447 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); | 447 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); |
448 | } | 448 | } |
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index d349d37..b2c710a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim | |||
59 | } | 59 | } |
60 | 60 | ||
61 | Console.WriteLine("Starting...\n"); | 61 | Console.WriteLine("Starting...\n"); |
62 | 62 | ||
63 | Culture.SetCurrentCulture(); | 63 | Culture.SetCurrentCulture(); |
64 | 64 | ||
65 | ArgvConfigSource configSource = new ArgvConfigSource(args); | 65 | ArgvConfigSource configSource = new ArgvConfigSource(args); |
@@ -110,7 +110,7 @@ namespace OpenSim | |||
110 | _IsHandlingException = true; | 110 | _IsHandlingException = true; |
111 | // TODO: Add config option to allow users to turn off error reporting | 111 | // TODO: Add config option to allow users to turn off error reporting |
112 | // TODO: Post error report (disabled for now) | 112 | // TODO: Post error report (disabled for now) |
113 | 113 | ||
114 | string msg = String.Empty; | 114 | string msg = String.Empty; |
115 | msg += "\r\n"; | 115 | msg += "\r\n"; |
116 | msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; | 116 | msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; |
@@ -122,7 +122,7 @@ namespace OpenSim | |||
122 | msg += "InnerException: " + ex.InnerException.ToString() + "\r\n"; | 122 | msg += "InnerException: " + ex.InnerException.ToString() + "\r\n"; |
123 | 123 | ||
124 | msg += "\r\n"; | 124 | msg += "\r\n"; |
125 | msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; | 125 | msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; |
126 | 126 | ||
127 | // Do we not always want to see exception messages? | 127 | // Do we not always want to see exception messages? |
128 | // if (e.IsTerminating) | 128 | // if (e.IsTerminating) |
@@ -132,7 +132,7 @@ namespace OpenSim | |||
132 | try | 132 | try |
133 | { | 133 | { |
134 | // DISABLED UNTIL WE CAN DISCUSS IF THIS IS MORALLY RIGHT OR NOT | 134 | // DISABLED UNTIL WE CAN DISCUSS IF THIS IS MORALLY RIGHT OR NOT |
135 | // Note! Needs reference to System.Web | 135 | // Note! Needs reference to System.Web |
136 | //System.Net.WebClient wc = new WebClient(); | 136 | //System.Net.WebClient wc = new WebClient(); |
137 | //wc.DownloadData("http://www.opensimulator.org/ErrorReport.php?Msg=" + | 137 | //wc.DownloadData("http://www.opensimulator.org/ErrorReport.php?Msg=" + |
138 | // System.Web.HttpUtility.UrlEncode(msg)); | 138 | // System.Web.HttpUtility.UrlEncode(msg)); |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index a8f4bd4..7f13281 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -50,14 +50,14 @@ using OpenSim.Region.Physics.Manager; | |||
50 | namespace OpenSim | 50 | namespace OpenSim |
51 | { | 51 | { |
52 | public class OpenSimMain : RegionApplicationBase | 52 | public class OpenSimMain : RegionApplicationBase |
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Holds a human readable build version for this server. | 57 | /// Holds a human readable build version for this server. |
58 | /// </summary> | 58 | /// </summary> |
59 | protected string buildVersion; | 59 | protected string buildVersion; |
60 | 60 | ||
61 | protected string proxyUrl; | 61 | protected string proxyUrl; |
62 | protected int proxyOffset = 0; | 62 | protected int proxyOffset = 0; |
63 | 63 | ||
@@ -90,42 +90,42 @@ namespace OpenSim | |||
90 | private string m_standaloneUserSource; | 90 | private string m_standaloneUserSource; |
91 | 91 | ||
92 | protected string m_assetStorage = "local"; | 92 | protected string m_assetStorage = "local"; |
93 | 93 | ||
94 | public ConsoleCommand CreateAccount = null; | 94 | public ConsoleCommand CreateAccount = null; |
95 | protected bool m_dumpAssetsToFile; | 95 | protected bool m_dumpAssetsToFile; |
96 | 96 | ||
97 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 97 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
98 | 98 | ||
99 | protected IConfigSource m_finalConfig = null; | 99 | protected IConfigSource m_finalConfig = null; |
100 | 100 | ||
101 | protected IniConfigSource m_config; | 101 | protected IniConfigSource m_config; |
102 | 102 | ||
103 | public IniConfigSource ConfigSource | 103 | public IniConfigSource ConfigSource |
104 | { | 104 | { |
105 | get { return m_config; } | 105 | get { return m_config; } |
106 | set { m_config = value; } | 106 | set { m_config = value; } |
107 | } | 107 | } |
108 | 108 | ||
109 | public List<IClientNetworkServer> ClientServers | 109 | public List<IClientNetworkServer> ClientServers |
110 | { | 110 | { |
111 | get { return m_clientServers; } | 111 | get { return m_clientServers; } |
112 | } | 112 | } |
113 | 113 | ||
114 | public List<RegionInfo> RegionData | 114 | public List<RegionInfo> RegionData |
115 | { | 115 | { |
116 | get { return m_regionData; } | 116 | get { return m_regionData; } |
117 | } | 117 | } |
118 | 118 | ||
119 | public new BaseHttpServer HttpServer | 119 | public new BaseHttpServer HttpServer |
120 | { | 120 | { |
121 | get { return m_httpServer; } | 121 | get { return m_httpServer; } |
122 | } | 122 | } |
123 | 123 | ||
124 | public new uint HttpServerPort | 124 | public new uint HttpServerPort |
125 | { | 125 | { |
126 | get { return m_httpServerPort; } | 126 | get { return m_httpServerPort; } |
127 | } | 127 | } |
128 | 128 | ||
129 | protected ModuleLoader m_moduleLoader; | 129 | protected ModuleLoader m_moduleLoader; |
130 | 130 | ||
131 | public ModuleLoader ModuleLoader | 131 | public ModuleLoader ModuleLoader |
@@ -146,10 +146,10 @@ namespace OpenSim | |||
146 | 146 | ||
147 | if (Directory.Exists("addin-db-001")) | 147 | if (Directory.Exists("addin-db-001")) |
148 | Directory.Delete("addin-db-001", true); | 148 | Directory.Delete("addin-db-001", true); |
149 | 149 | ||
150 | 150 | ||
151 | m_log.Info("[OPENSIM MAIN]: PLEASE IGNORE THE SCANNING ERRORS BELOW. These are the result of a temporary problem with our plugins manager."); | 151 | m_log.Info("[OPENSIM MAIN]: PLEASE IGNORE THE SCANNING ERRORS BELOW. These are the result of a temporary problem with our plugins manager."); |
152 | 152 | ||
153 | AddinManager.Initialize("."); | 153 | AddinManager.Initialize("."); |
154 | AddinManager.Registry.Update(null); | 154 | AddinManager.Registry.Update(null); |
155 | 155 | ||
@@ -270,13 +270,13 @@ namespace OpenSim | |||
270 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); | 270 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); |
271 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); | 271 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); |
272 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); | 272 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); |
273 | 273 | ||
274 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); | 274 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); |
275 | 275 | ||
276 | m_see_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); | 276 | m_see_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); |
277 | 277 | ||
278 | m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.Data.SQLite.dll"); | 278 | m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.Data.SQLite.dll"); |
279 | if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") | 279 | if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") |
280 | { | 280 | { |
281 | m_storageDll = "OpenSim.Data.SQLite.dll"; | 281 | m_storageDll = "OpenSim.Data.SQLite.dll"; |
282 | Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll."); | 282 | Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll."); |
@@ -311,10 +311,10 @@ namespace OpenSim | |||
311 | 311 | ||
312 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); | 312 | m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | ||
316 | m_networkServersInfo.loadFromConfiguration(m_config); | 316 | m_networkServersInfo.loadFromConfiguration(m_config); |
317 | 317 | ||
318 | } | 318 | } |
319 | 319 | ||
320 | private ManualResetEvent WorldHasComeToAnEnd = new ManualResetEvent(false); | 320 | private ManualResetEvent WorldHasComeToAnEnd = new ManualResetEvent(false); |
@@ -331,19 +331,19 @@ namespace OpenSim | |||
331 | m_log.Info("========================= STARTING OPENSIM ========================="); | 331 | m_log.Info("========================= STARTING OPENSIM ========================="); |
332 | m_log.Info("===================================================================="); | 332 | m_log.Info("===================================================================="); |
333 | m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); | 333 | m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); |
334 | 334 | ||
335 | InternalStartUp(); | 335 | InternalStartUp(); |
336 | 336 | ||
337 | // We are done with startup | 337 | // We are done with startup |
338 | m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", | 338 | m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", |
339 | m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); | 339 | m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); |
340 | 340 | ||
341 | WorldHasComeToAnEnd.WaitOne(); | 341 | WorldHasComeToAnEnd.WaitOne(); |
342 | m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); | 342 | m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); |
343 | 343 | ||
344 | Environment.Exit(0); | 344 | Environment.Exit(0); |
345 | } | 345 | } |
346 | 346 | ||
347 | /// <summary> | 347 | /// <summary> |
348 | /// Print the version information available to the library. This include a subversion number if the root | 348 | /// Print the version information available to the library. This include a subversion number if the root |
349 | /// .svn/entries file is present. | 349 | /// .svn/entries file is present. |
@@ -392,9 +392,9 @@ namespace OpenSim | |||
392 | protected void InternalStartUp() | 392 | protected void InternalStartUp() |
393 | { | 393 | { |
394 | printAvailableVersionInformation(); | 394 | printAvailableVersionInformation(); |
395 | 395 | ||
396 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 396 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
397 | 397 | ||
398 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp | 398 | // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp |
399 | // TerrainManager, StorageManager, HTTP Server | 399 | // TerrainManager, StorageManager, HTTP Server |
400 | // This base will call abstract Initialize | 400 | // This base will call abstract Initialize |
@@ -425,7 +425,7 @@ namespace OpenSim | |||
425 | 425 | ||
426 | // set up XMLRPC handler for client's initial login request message | 426 | // set up XMLRPC handler for client's initial login request message |
427 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 427 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
428 | 428 | ||
429 | // provides the web form login | 429 | // provides the web form login |
430 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); | 430 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); |
431 | 431 | ||
@@ -524,12 +524,12 @@ namespace OpenSim | |||
524 | regionInfo.originRegionID = regionInfo.RegionID; | 524 | regionInfo.originRegionID = regionInfo.RegionID; |
525 | 525 | ||
526 | // set initial ServerURI | 526 | // set initial ServerURI |
527 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName | 527 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName |
528 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); | 528 | + ":" + regionInfo.InternalEndPoint.Port.ToString(); |
529 | |||
530 | regionInfo.HttpPort = m_httpServerPort; | ||
531 | 529 | ||
532 | if ((proxyUrl.Length > 0) && (portadd_flag)) | 530 | regionInfo.HttpPort = m_httpServerPort; |
531 | |||
532 | if ((proxyUrl.Length > 0) && (portadd_flag)) | ||
533 | { | 533 | { |
534 | // set proxy url to RegionInfo | 534 | // set proxy url to RegionInfo |
535 | regionInfo.proxyUrl = proxyUrl; | 535 | regionInfo.proxyUrl = proxyUrl; |
@@ -574,9 +574,9 @@ namespace OpenSim | |||
574 | scene.SetModuleInterfaces(); | 574 | scene.SetModuleInterfaces(); |
575 | 575 | ||
576 | //moved these here as the terrain texture has to be created after the modules are initialized | 576 | //moved these here as the terrain texture has to be created after the modules are initialized |
577 | // and has to happen before the region is registered with the grid. | 577 | // and has to happen before the region is registered with the grid. |
578 | scene.CreateTerrainTexture(true); | 578 | scene.CreateTerrainTexture(true); |
579 | 579 | ||
580 | try | 580 | try |
581 | { | 581 | { |
582 | scene.RegisterRegionWithGrid(); | 582 | scene.RegisterRegionWithGrid(); |
@@ -584,18 +584,18 @@ namespace OpenSim | |||
584 | catch (Exception e) | 584 | catch (Exception e) |
585 | { | 585 | { |
586 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); | 586 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); |
587 | 587 | ||
588 | // Carrying on now causes a lot of confusion down the line - we need to get the user's attention | 588 | // Carrying on now causes a lot of confusion down the line - we need to get the user's attention |
589 | System.Environment.Exit(1); | 589 | System.Environment.Exit(1); |
590 | } | 590 | } |
591 | 591 | ||
592 | // We need to do this after we've initialized the scripting engines. | 592 | // We need to do this after we've initialized the scripting engines. |
593 | scene.StartScripts(); | 593 | scene.StartScripts(); |
594 | 594 | ||
595 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 595 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
596 | scene.LandChannel.PerformParcelPrimCountUpdate(); | 596 | scene.LandChannel.PerformParcelPrimCountUpdate(); |
597 | 597 | ||
598 | m_sceneManager.Add(scene); | 598 | m_sceneManager.Add(scene); |
599 | 599 | ||
600 | m_clientServers.Add(clientServer); | 600 | m_clientServers.Add(clientServer); |
601 | m_regionData.Add(regionInfo); | 601 | m_regionData.Add(regionInfo); |
@@ -625,7 +625,7 @@ namespace OpenSim | |||
625 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, | 625 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, |
626 | storageManager, m_httpServer, | 626 | storageManager, m_httpServer, |
627 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config); | 627 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config); |
628 | 628 | ||
629 | } | 629 | } |
630 | 630 | ||
631 | public void handleRestartRegion(RegionInfo whichRegion) | 631 | public void handleRestartRegion(RegionInfo whichRegion) |
@@ -650,7 +650,7 @@ namespace OpenSim | |||
650 | m_clientServers.RemoveAt(clientServerElement); | 650 | m_clientServers.RemoveAt(clientServerElement); |
651 | } | 651 | } |
652 | 652 | ||
653 | //Removing the region from the sim's database of regions.. | 653 | //Removing the region from the sim's database of regions.. |
654 | int RegionHandleElement = -1; | 654 | int RegionHandleElement = -1; |
655 | for (int i = 0; i < m_regionData.Count; i++) | 655 | for (int i = 0; i < m_regionData.Count; i++) |
656 | { | 656 | { |
@@ -676,7 +676,7 @@ namespace OpenSim | |||
676 | 676 | ||
677 | /// <summary> | 677 | /// <summary> |
678 | /// Handler to supply the current status of this sim | 678 | /// Handler to supply the current status of this sim |
679 | /// | 679 | /// |
680 | /// Currently this is always OK if the simulator is still listening for connections on its HTTP service | 680 | /// Currently this is always OK if the simulator is still listening for connections on its HTTP service |
681 | /// </summary> | 681 | /// </summary> |
682 | protected class SimStatusHandler : IStreamedRequestHandler | 682 | protected class SimStatusHandler : IStreamedRequestHandler |
@@ -709,9 +709,9 @@ namespace OpenSim | |||
709 | /// </summary> | 709 | /// </summary> |
710 | public override void Shutdown() | 710 | public override void Shutdown() |
711 | { | 711 | { |
712 | if (proxyUrl.Length > 0) | 712 | if (proxyUrl.Length > 0) |
713 | { | 713 | { |
714 | Util.XmlRpcCommand(proxyUrl, "Stop"); | 714 | Util.XmlRpcCommand(proxyUrl, "Stop"); |
715 | } | 715 | } |
716 | 716 | ||
717 | m_log.Info("[SHUTDOWN]: Closing all threads"); | 717 | m_log.Info("[SHUTDOWN]: Closing all threads"); |
@@ -721,9 +721,9 @@ namespace OpenSim | |||
721 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); | 721 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); |
722 | 722 | ||
723 | m_sceneManager.Close(); | 723 | m_sceneManager.Close(); |
724 | 724 | ||
725 | WorldHasComeToAnEnd.Set(); | 725 | WorldHasComeToAnEnd.Set(); |
726 | 726 | ||
727 | base.Shutdown(); | 727 | base.Shutdown(); |
728 | } | 728 | } |
729 | 729 | ||
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index 2381f57..1b2600c 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim | |||
47 | public delegate void ConsoleCommand(string[] comParams); | 47 | public delegate void ConsoleCommand(string[] comParams); |
48 | 48 | ||
49 | public class OpenSimMainConsole : OpenSimMain, conscmd_callback | 49 | public class OpenSimMainConsole : OpenSimMain, conscmd_callback |
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 | protected string m_startupCommandsFile; | 53 | protected string m_startupCommandsFile; |
@@ -83,12 +83,12 @@ namespace OpenSim | |||
83 | // | 83 | // |
84 | // Called from app startup (OpenSim.Application) | 84 | // Called from app startup (OpenSim.Application) |
85 | // | 85 | // |
86 | 86 | ||
87 | m_log.Info("===================================================================="); | 87 | m_log.Info("===================================================================="); |
88 | m_log.Info("========================= STARTING OPENSIM ========================="); | 88 | m_log.Info("========================= STARTING OPENSIM ========================="); |
89 | m_log.Info("===================================================================="); | 89 | m_log.Info("===================================================================="); |
90 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); | 90 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); |
91 | 91 | ||
92 | m_console = CreateConsole(); | 92 | m_console = CreateConsole(); |
93 | MainConsole.Instance = m_console; | 93 | MainConsole.Instance = m_console; |
94 | InternalStartUp(); | 94 | InternalStartUp(); |
@@ -111,7 +111,7 @@ namespace OpenSim | |||
111 | m_scriptTimer.Interval = 1200 * 1000; | 111 | m_scriptTimer.Interval = 1200 * 1000; |
112 | m_scriptTimer.Elapsed += RunAutoTimerScript; | 112 | m_scriptTimer.Elapsed += RunAutoTimerScript; |
113 | } | 113 | } |
114 | 114 | ||
115 | PrintFileToConsole("startuplogo.txt"); | 115 | PrintFileToConsole("startuplogo.txt"); |
116 | } | 116 | } |
117 | 117 | ||
@@ -131,7 +131,7 @@ namespace OpenSim | |||
131 | #region Console Commands | 131 | #region Console Commands |
132 | 132 | ||
133 | /// <summary> | 133 | /// <summary> |
134 | /// | 134 | /// |
135 | /// </summary> | 135 | /// </summary> |
136 | /// <param name="fileName"></param> | 136 | /// <param name="fileName"></param> |
137 | private void RunCommandScript(string fileName) | 137 | private void RunCommandScript(string fileName) |
@@ -178,7 +178,7 @@ namespace OpenSim | |||
178 | public override void RunCmd(string command, string[] cmdparams) | 178 | public override void RunCmd(string command, string[] cmdparams) |
179 | { | 179 | { |
180 | base.RunCmd(command, cmdparams); | 180 | base.RunCmd(command, cmdparams); |
181 | 181 | ||
182 | switch (command) | 182 | switch (command) |
183 | { | 183 | { |
184 | case "clear-assets": | 184 | case "clear-assets": |
@@ -252,7 +252,7 @@ namespace OpenSim | |||
252 | m_console.Notice("set-time [x] - set the current scene time phase"); | 252 | m_console.Notice("set-time [x] - set the current scene time phase"); |
253 | m_console.Notice("show assets - show state of asset cache."); | 253 | m_console.Notice("show assets - show state of asset cache."); |
254 | m_console.Notice("show users - show info about connected users."); | 254 | m_console.Notice("show users - show info about connected users."); |
255 | m_console.Notice("show modules - shows info about loaded modules."); | 255 | m_console.Notice("show modules - shows info about loaded modules."); |
256 | m_console.Notice("show version - show the running build version."); | 256 | m_console.Notice("show version - show the running build version."); |
257 | m_console.Notice("threads - list threads"); | 257 | m_console.Notice("threads - list threads"); |
258 | m_console.Notice("config set section field value - set a config value"); | 258 | m_console.Notice("config set section field value - set a config value"); |
@@ -264,7 +264,7 @@ namespace OpenSim | |||
264 | case "threads": | 264 | case "threads": |
265 | // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); | 265 | // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); |
266 | // int _tc = 0; | 266 | // int _tc = 0; |
267 | 267 | ||
268 | // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) | 268 | // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) |
269 | // { | 269 | // { |
270 | // _tc++; | 270 | // _tc++; |
@@ -388,7 +388,7 @@ namespace OpenSim | |||
388 | if (m_sceneManager.TryGetScene(regName, out killScene)) | 388 | if (m_sceneManager.TryGetScene(regName, out killScene)) |
389 | { | 389 | { |
390 | // only need to check this if we are not at the | 390 | // only need to check this if we are not at the |
391 | // root level | 391 | // root level |
392 | if ((m_sceneManager.CurrentScene != null) && | 392 | if ((m_sceneManager.CurrentScene != null) && |
393 | (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID)) | 393 | (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID)) |
394 | { | 394 | { |
@@ -520,7 +520,7 @@ namespace OpenSim | |||
520 | { | 520 | { |
521 | foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) | 521 | foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) |
522 | { | 522 | { |
523 | 523 | ||
524 | m_console.Notice("Loading module: " + cmdparams[1]); | 524 | m_console.Notice("Loading module: " + cmdparams[1]); |
525 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); | 525 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); |
526 | } | 526 | } |
@@ -529,7 +529,7 @@ namespace OpenSim | |||
529 | } | 529 | } |
530 | } | 530 | } |
531 | 531 | ||
532 | break; | 532 | break; |
533 | default: | 533 | default: |
534 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; | 534 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; |
535 | cmdparams.CopyTo(tmpPluginArgs, 1); | 535 | cmdparams.CopyTo(tmpPluginArgs, 1); |
@@ -570,7 +570,7 @@ namespace OpenSim | |||
570 | public override void Show(string ShowWhat) | 570 | public override void Show(string ShowWhat) |
571 | { | 571 | { |
572 | base.Show(ShowWhat); | 572 | base.Show(ShowWhat); |
573 | 573 | ||
574 | switch (ShowWhat) | 574 | switch (ShowWhat) |
575 | { | 575 | { |
576 | case "assets": | 576 | case "assets": |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1eab16b..d6329ce 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -57,14 +57,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
57 | 57 | ||
58 | // ~ClientView() | 58 | // ~ClientView() |
59 | // { | 59 | // { |
60 | // m_log.Info("[CLIENTVIEW]: Destructor called"); | 60 | // m_log.Info("[CLIENTVIEW]: Destructor called"); |
61 | // } | 61 | // } |
62 | 62 | ||
63 | /* static variables */ | 63 | /* static variables */ |
64 | public static TerrainManager TerrainManager; | 64 | public static TerrainManager TerrainManager; |
65 | 65 | ||
66 | public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); | 66 | public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); |
67 | public static SynchronizeClientHandler SynchronizeClient = null; | 67 | public static SynchronizeClientHandler SynchronizeClient = null; |
68 | /* private variables */ | 68 | /* private variables */ |
69 | private readonly LLUUID m_sessionId; | 69 | private readonly LLUUID m_sessionId; |
70 | private LLUUID m_secureSessionId = LLUUID.Zero; | 70 | private LLUUID m_secureSessionId = LLUUID.Zero; |
@@ -201,7 +201,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
201 | private RemoveInventoryFolder handlerRemoveInventoryFolder = null; | 201 | private RemoveInventoryFolder handlerRemoveInventoryFolder = null; |
202 | private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; | 202 | private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; |
203 | private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; | 203 | private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; |
204 | private MoveTaskInventory handlerMoveTaskItem = null; | 204 | private MoveTaskInventory handlerMoveTaskItem = null; |
205 | private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; | 205 | private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; |
206 | private RezScript handlerRezScript = null; //OnRezScript; | 206 | private RezScript handlerRezScript = null; //OnRezScript; |
207 | private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; | 207 | private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
324 | /* METHODS */ | 324 | /* METHODS */ |
325 | 325 | ||
326 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, | 326 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, |
327 | AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) | 327 | AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) |
328 | { | 328 | { |
329 | m_moneyBalance = 1000; | 329 | m_moneyBalance = 1000; |
330 | 330 | ||
@@ -348,12 +348,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
348 | 348 | ||
349 | m_userEndPoint = remoteEP; | 349 | m_userEndPoint = remoteEP; |
350 | m_proxyEndPoint = proxyEP; | 350 | m_proxyEndPoint = proxyEP; |
351 | 351 | ||
352 | m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode); | 352 | m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode); |
353 | 353 | ||
354 | // While working on this, the BlockingQueue had me fooled for a bit. | 354 | // While working on this, the BlockingQueue had me fooled for a bit. |
355 | // The Blocking queue causes the thread to stop until there's something | 355 | // The Blocking queue causes the thread to stop until there's something |
356 | // in it to process. It's an on-purpose threadlock though because | 356 | // in it to process. It's an on-purpose threadlock though because |
357 | // without it, the clientloop will suck up all sim resources. | 357 | // without it, the clientloop will suck up all sim resources. |
358 | 358 | ||
359 | m_packetQueue = new LLPacketQueue(agentId); | 359 | m_packetQueue = new LLPacketQueue(agentId); |
@@ -379,9 +379,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
379 | m_scene.RemoveClient(AgentId); | 379 | m_scene.RemoveClient(AgentId); |
380 | 380 | ||
381 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 381 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
382 | //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 382 | //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
383 | 383 | ||
384 | // Send the STOP packet | 384 | // Send the STOP packet |
385 | DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); | 385 | DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); |
386 | OutPacket(disable, ThrottleOutPacketType.Unknown); | 386 | OutPacket(disable, ThrottleOutPacketType.Unknown); |
387 | 387 | ||
@@ -398,12 +398,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
398 | // flushing out all it's packets. There should probably | 398 | // flushing out all it's packets. There should probably |
399 | // be a better mechanism here | 399 | // be a better mechanism here |
400 | 400 | ||
401 | // We can't reach into other scenes and close the connection | 401 | // We can't reach into other scenes and close the connection |
402 | // We need to do this over grid communications | 402 | // We need to do this over grid communications |
403 | //m_scene.CloseAllAgents(CircuitCode); | 403 | //m_scene.CloseAllAgents(CircuitCode); |
404 | 404 | ||
405 | // If we're not shutting down the circuit, then this is the last time we'll go here. | 405 | // If we're not shutting down the circuit, then this is the last time we'll go here. |
406 | // If we are shutting down the circuit, the UDP Server will come back here with | 406 | // If we are shutting down the circuit, the UDP Server will come back here with |
407 | // ShutDownCircuit = false | 407 | // ShutDownCircuit = false |
408 | if (!(shutdownCircuit)) | 408 | if (!(shutdownCircuit)) |
409 | { | 409 | { |
@@ -641,7 +641,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
641 | { | 641 | { |
642 | //this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); | 642 | //this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); |
643 | 643 | ||
644 | // Establish our two timers. We could probably get this down to one | 644 | // Establish our two timers. We could probably get this down to one |
645 | m_ackTimer = new Timer(750); | 645 | m_ackTimer = new Timer(750); |
646 | m_ackTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); | 646 | m_ackTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); |
647 | m_ackTimer.Start(); | 647 | m_ackTimer.Start(); |
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
791 | public event ParcelJoinRequest OnParcelJoinRequest; | 791 | public event ParcelJoinRequest OnParcelJoinRequest; |
792 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 792 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
793 | public event ParcelSelectObjects OnParcelSelectObjects; | 793 | public event ParcelSelectObjects OnParcelSelectObjects; |
794 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; | 794 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; |
795 | public event ParcelAbandonRequest OnParcelAbandonRequest; | 795 | public event ParcelAbandonRequest OnParcelAbandonRequest; |
796 | public event RegionInfoRequest OnRegionInfoRequest; | 796 | public event RegionInfoRequest OnRegionInfoRequest; |
797 | public event EstateCovenantRequest OnEstateCovenantRequest; | 797 | public event EstateCovenantRequest OnEstateCovenantRequest; |
@@ -834,7 +834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
834 | #region Scene/Avatar to Client | 834 | #region Scene/Avatar to Client |
835 | 835 | ||
836 | /// <summary> | 836 | /// <summary> |
837 | /// | 837 | /// |
838 | /// </summary> | 838 | /// </summary> |
839 | /// <param name="regionInfo"></param> | 839 | /// <param name="regionInfo"></param> |
840 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | 840 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) |
@@ -871,7 +871,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
871 | } | 871 | } |
872 | 872 | ||
873 | /// <summary> | 873 | /// <summary> |
874 | /// | 874 | /// |
875 | /// </summary> | 875 | /// </summary> |
876 | /// <param name="regInfo"></param> | 876 | /// <param name="regInfo"></param> |
877 | public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) | 877 | public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) |
@@ -898,7 +898,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
898 | } | 898 | } |
899 | 899 | ||
900 | /// <summary> | 900 | /// <summary> |
901 | /// | 901 | /// |
902 | /// </summary> | 902 | /// </summary> |
903 | /// <param name="message"></param> | 903 | /// <param name="message"></param> |
904 | /// <param name="type"></param> | 904 | /// <param name="type"></param> |
@@ -934,17 +934,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
934 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) | 934 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) |
935 | { | 935 | { |
936 | SendInstantMessage( | 936 | SendInstantMessage( |
937 | fromAgent, fromAgentSession, message, toAgent, | 937 | fromAgent, fromAgentSession, message, toAgent, |
938 | imSessionID, fromName, dialog, timeStamp, new byte[0]); | 938 | imSessionID, fromName, dialog, timeStamp, new byte[0]); |
939 | } | 939 | } |
940 | 940 | ||
941 | /// <summary> | 941 | /// <summary> |
942 | /// Send an instant message to this client | 942 | /// Send an instant message to this client |
943 | /// </summary> | 943 | /// </summary> |
944 | /// <param name="message"></param> | 944 | /// <param name="message"></param> |
945 | /// <param name="target"></param> | 945 | /// <param name="target"></param> |
946 | public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, | 946 | public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, |
947 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, | 947 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, |
948 | byte[] binaryBucket) | 948 | byte[] binaryBucket) |
949 | { | 949 | { |
950 | if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) | 950 | if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) |
@@ -1031,7 +1031,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | /// <summary> | 1033 | /// <summary> |
1034 | /// | 1034 | /// |
1035 | /// </summary> | 1035 | /// </summary> |
1036 | /// <param name="neighbourHandle"></param> | 1036 | /// <param name="neighbourHandle"></param> |
1037 | /// <param name="neighbourIP"></param> | 1037 | /// <param name="neighbourIP"></param> |
@@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | /// <summary> | 1058 | /// <summary> |
1059 | /// | 1059 | /// |
1060 | /// </summary> | 1060 | /// </summary> |
1061 | /// <returns></returns> | 1061 | /// <returns></returns> |
1062 | public AgentCircuitData RequestClientInfo() | 1062 | public AgentCircuitData RequestClientInfo() |
@@ -1166,7 +1166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | /// <summary> | 1168 | /// <summary> |
1169 | /// | 1169 | /// |
1170 | /// </summary> | 1170 | /// </summary> |
1171 | public void SendTeleportFailed(string reason) | 1171 | public void SendTeleportFailed(string reason) |
1172 | { | 1172 | { |
@@ -1179,7 +1179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | /// <summary> | 1181 | /// <summary> |
1182 | /// | 1182 | /// |
1183 | /// </summary> | 1183 | /// </summary> |
1184 | public void SendTeleportLocationStart() | 1184 | public void SendTeleportLocationStart() |
1185 | { | 1185 | { |
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1250 | 1250 | ||
1251 | /// <summary> | 1251 | /// <summary> |
1252 | /// Send information about the items contained in a folder to the client. | 1252 | /// Send information about the items contained in a folder to the client. |
1253 | /// | 1253 | /// |
1254 | /// XXX This method needs some refactoring loving | 1254 | /// XXX This method needs some refactoring loving |
1255 | /// </summary> | 1255 | /// </summary> |
1256 | /// <param name="ownerID">The owner of the folder</param> | 1256 | /// <param name="ownerID">The owner of the folder</param> |
@@ -1261,8 +1261,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1261 | public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, | 1261 | public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, |
1262 | List<InventoryFolderBase> folders, | 1262 | List<InventoryFolderBase> folders, |
1263 | bool fetchFolders, bool fetchItems) | 1263 | bool fetchFolders, bool fetchItems) |
1264 | { | 1264 | { |
1265 | // An inventory descendents packet consists of a single agent section and an inventory details | 1265 | // An inventory descendents packet consists of a single agent section and an inventory details |
1266 | // section for each inventory item. The size of each inventory item is approximately 550 bytes. | 1266 | // section for each inventory item. The size of each inventory item is approximately 550 bytes. |
1267 | // In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent | 1267 | // In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent |
1268 | // packets containing metadata for in excess of 100 items. But in practice, there may be other | 1268 | // packets containing metadata for in excess of 100 items. But in practice, there may be other |
@@ -1367,7 +1367,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1367 | 1367 | ||
1368 | if (i < MAX_ITEMS_PER_PACKET) | 1368 | if (i < MAX_ITEMS_PER_PACKET) |
1369 | { | 1369 | { |
1370 | 1370 | ||
1371 | OutPacket(descend, ThrottleOutPacketType.Asset); | 1371 | OutPacket(descend, ThrottleOutPacketType.Asset); |
1372 | } | 1372 | } |
1373 | } | 1373 | } |
@@ -1376,7 +1376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1376 | if (fetchFolders) | 1376 | if (fetchFolders) |
1377 | { | 1377 | { |
1378 | InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); | 1378 | InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); |
1379 | 1379 | ||
1380 | if (folders.Count < MAX_ITEMS_PER_PACKET) | 1380 | if (folders.Count < MAX_ITEMS_PER_PACKET) |
1381 | { | 1381 | { |
1382 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; | 1382 | descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; |
@@ -1493,27 +1493,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1493 | inventoryReply.Header.Zerocoded = true; | 1493 | inventoryReply.Header.Zerocoded = true; |
1494 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); | 1494 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); |
1495 | } | 1495 | } |
1496 | 1496 | ||
1497 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 1497 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> |
1498 | public void SendBulkUpdateInventory(InventoryItemBase item) | 1498 | public void SendBulkUpdateInventory(InventoryItemBase item) |
1499 | { | 1499 | { |
1500 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; | 1500 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; |
1501 | 1501 | ||
1502 | BulkUpdateInventoryPacket bulkUpdate | 1502 | BulkUpdateInventoryPacket bulkUpdate |
1503 | = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); | 1503 | = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); |
1504 | 1504 | ||
1505 | bulkUpdate.AgentData.AgentID = AgentId; | 1505 | bulkUpdate.AgentData.AgentID = AgentId; |
1506 | bulkUpdate.AgentData.TransactionID = LLUUID.Random(); | 1506 | bulkUpdate.AgentData.TransactionID = LLUUID.Random(); |
1507 | 1507 | ||
1508 | bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; | 1508 | bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; |
1509 | bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); | 1509 | bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); |
1510 | bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; | 1510 | bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; |
1511 | bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; | 1511 | bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; |
1512 | bulkUpdate.FolderData[0].Type = -1; | 1512 | bulkUpdate.FolderData[0].Type = -1; |
1513 | bulkUpdate.FolderData[0].Name = new byte[0]; | 1513 | bulkUpdate.FolderData[0].Name = new byte[0]; |
1514 | 1514 | ||
1515 | bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; | 1515 | bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; |
1516 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); | 1516 | bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); |
1517 | bulkUpdate.ItemData[0].ItemID = item.ID; | 1517 | bulkUpdate.ItemData[0].ItemID = item.ID; |
1518 | bulkUpdate.ItemData[0].AssetID = item.AssetID; | 1518 | bulkUpdate.ItemData[0].AssetID = item.AssetID; |
1519 | bulkUpdate.ItemData[0].CreatorID = item.Creator; | 1519 | bulkUpdate.ItemData[0].CreatorID = item.Creator; |
@@ -1553,11 +1553,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1553 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item) | 1553 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item) |
1554 | { | 1554 | { |
1555 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; | 1555 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; |
1556 | 1556 | ||
1557 | UpdateCreateInventoryItemPacket InventoryReply | 1557 | UpdateCreateInventoryItemPacket InventoryReply |
1558 | = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( | 1558 | = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( |
1559 | PacketType.UpdateCreateInventoryItem); | 1559 | PacketType.UpdateCreateInventoryItem); |
1560 | 1560 | ||
1561 | // TODO: don't create new blocks if recycling an old packet | 1561 | // TODO: don't create new blocks if recycling an old packet |
1562 | InventoryReply.AgentData.AgentID = AgentId; | 1562 | InventoryReply.AgentData.AgentID = AgentId; |
1563 | InventoryReply.AgentData.SimApproved = true; | 1563 | InventoryReply.AgentData.SimApproved = true; |
@@ -1719,7 +1719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1719 | /// </summary> | 1719 | /// </summary> |
1720 | /// <param name="message"></param> | 1720 | /// <param name="message"></param> |
1721 | /// <param name="modal">On the linden client, if this true then it displays a one button text box placed in the | 1721 | /// <param name="modal">On the linden client, if this true then it displays a one button text box placed in the |
1722 | /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for | 1722 | /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for |
1723 | /// the AlertMessage packet).</param> | 1723 | /// the AlertMessage packet).</param> |
1724 | public void SendAgentAlertMessage(string message, bool modal) | 1724 | public void SendAgentAlertMessage(string message, bool modal) |
1725 | { | 1725 | { |
@@ -1784,7 +1784,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1784 | sound.DataBlock.OwnerID = ownerID; | 1784 | sound.DataBlock.OwnerID = ownerID; |
1785 | sound.DataBlock.Gain = gain; | 1785 | sound.DataBlock.Gain = gain; |
1786 | sound.DataBlock.Flags = flags; | 1786 | sound.DataBlock.Flags = flags; |
1787 | 1787 | ||
1788 | OutPacket(sound, ThrottleOutPacketType.Task); | 1788 | OutPacket(sound, ThrottleOutPacketType.Task); |
1789 | } | 1789 | } |
1790 | 1790 | ||
@@ -1907,7 +1907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1907 | #region Appearance/ Wearables Methods | 1907 | #region Appearance/ Wearables Methods |
1908 | 1908 | ||
1909 | /// <summary> | 1909 | /// <summary> |
1910 | /// | 1910 | /// |
1911 | /// </summary> | 1911 | /// </summary> |
1912 | /// <param name="wearables"></param> | 1912 | /// <param name="wearables"></param> |
1913 | public void SendWearables(AvatarWearable[] wearables, int serial) | 1913 | public void SendWearables(AvatarWearable[] wearables, int serial) |
@@ -1933,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1933 | } | 1933 | } |
1934 | 1934 | ||
1935 | /// <summary> | 1935 | /// <summary> |
1936 | /// | 1936 | /// |
1937 | /// </summary> | 1937 | /// </summary> |
1938 | /// <param name="agentID"></param> | 1938 | /// <param name="agentID"></param> |
1939 | /// <param name="visualParams"></param> | 1939 | /// <param name="visualParams"></param> |
@@ -2016,7 +2016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2016 | } | 2016 | } |
2017 | 2017 | ||
2018 | /// <summary> | 2018 | /// <summary> |
2019 | /// | 2019 | /// |
2020 | /// </summary> | 2020 | /// </summary> |
2021 | /// <param name="regionHandle"></param> | 2021 | /// <param name="regionHandle"></param> |
2022 | /// <param name="timeDilation"></param> | 2022 | /// <param name="timeDilation"></param> |
@@ -2071,14 +2071,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2071 | #region Primitive Packet/data Sending Methods | 2071 | #region Primitive Packet/data Sending Methods |
2072 | 2072 | ||
2073 | /// <summary> | 2073 | /// <summary> |
2074 | /// | 2074 | /// |
2075 | /// </summary> | 2075 | /// </summary> |
2076 | /// <param name="localID"></param> | 2076 | /// <param name="localID"></param> |
2077 | /// <param name="rotation"></param> | 2077 | /// <param name="rotation"></param> |
2078 | /// <param name="attachPoint"></param> | 2078 | /// <param name="attachPoint"></param> |
2079 | public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) | 2079 | public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) |
2080 | { | 2080 | { |
2081 | 2081 | ||
2082 | ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); | 2082 | ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); |
2083 | Console.WriteLine("Attach object!"); | 2083 | Console.WriteLine("Attach object!"); |
2084 | // TODO: don't create new blocks if recycling an old packet | 2084 | // TODO: don't create new blocks if recycling an old packet |
@@ -2094,9 +2094,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2094 | } | 2094 | } |
2095 | 2095 | ||
2096 | public void SendPrimitiveToClient( | 2096 | public void SendPrimitiveToClient( |
2097 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 2097 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
2098 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, | 2098 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, |
2099 | uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 2099 | uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
2100 | uint parentID, byte[] particleSystem, byte clickAction) | 2100 | uint parentID, byte[] particleSystem, byte clickAction) |
2101 | { | 2101 | { |
2102 | byte[] textureanim = new byte[0]; | 2102 | byte[] textureanim = new byte[0]; |
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2108 | } | 2108 | } |
2109 | 2109 | ||
2110 | public void SendPrimitiveToClient( | 2110 | public void SendPrimitiveToClient( |
2111 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 2111 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
2112 | LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, | 2112 | LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, |
2113 | uint flags, | 2113 | uint flags, |
2114 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, | 2114 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, |
@@ -2125,15 +2125,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2125 | outPacket.ObjectData[0].ID = localID; | 2125 | outPacket.ObjectData[0].ID = localID; |
2126 | outPacket.ObjectData[0].FullID = objectID; | 2126 | outPacket.ObjectData[0].FullID = objectID; |
2127 | outPacket.ObjectData[0].OwnerID = ownerID; | 2127 | outPacket.ObjectData[0].OwnerID = ownerID; |
2128 | 2128 | ||
2129 | // Anything more than 255 will cause libsecondlife to barf | 2129 | // Anything more than 255 will cause libsecondlife to barf |
2130 | if (text.Length > 255) | 2130 | if (text.Length > 255) |
2131 | { | 2131 | { |
2132 | text = text.Remove(255); | 2132 | text = text.Remove(255); |
2133 | } | 2133 | } |
2134 | 2134 | ||
2135 | outPacket.ObjectData[0].Text = Helpers.StringToField(text); | 2135 | outPacket.ObjectData[0].Text = Helpers.StringToField(text); |
2136 | 2136 | ||
2137 | outPacket.ObjectData[0].TextColor[0] = color[0]; | 2137 | outPacket.ObjectData[0].TextColor[0] = color[0]; |
2138 | outPacket.ObjectData[0].TextColor[1] = color[1]; | 2138 | outPacket.ObjectData[0].TextColor[1] = color[1]; |
2139 | outPacket.ObjectData[0].TextColor[2] = color[2]; | 2139 | outPacket.ObjectData[0].TextColor[2] = color[2]; |
@@ -2148,7 +2148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2148 | // Necessary??? | 2148 | // Necessary??? |
2149 | outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); | 2149 | outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); |
2150 | outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); | 2150 | outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); |
2151 | 2151 | ||
2152 | // Item from inventory??? | 2152 | // Item from inventory??? |
2153 | outPacket.ObjectData[0].NameValue = | 2153 | outPacket.ObjectData[0].NameValue = |
2154 | Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); | 2154 | Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); |
@@ -2179,7 +2179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | /// <summary> | 2181 | /// <summary> |
2182 | /// | 2182 | /// |
2183 | /// </summary> | 2183 | /// </summary> |
2184 | /// <param name="regionHandle"></param> | 2184 | /// <param name="regionHandle"></param> |
2185 | /// <param name="timeDilation"></param> | 2185 | /// <param name="timeDilation"></param> |
@@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2194 | terse.RegionData.RegionHandle = regionHandle; | 2194 | terse.RegionData.RegionHandle = regionHandle; |
2195 | terse.RegionData.TimeDilation = timeDilation; | 2195 | terse.RegionData.TimeDilation = timeDilation; |
2196 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | 2196 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; |
2197 | terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow... | 2197 | terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow... |
2198 | terse.Header.Reliable = false; | 2198 | terse.Header.Reliable = false; |
2199 | terse.Header.Zerocoded = true; | 2199 | terse.Header.Zerocoded = true; |
2200 | OutPacket(terse, ThrottleOutPacketType.Task); | 2200 | OutPacket(terse, ThrottleOutPacketType.Task); |
@@ -2251,7 +2251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2251 | 2251 | ||
2252 | if (ImageSize > 0) | 2252 | if (ImageSize > 0) |
2253 | im.ImageID.Size = ImageSize; | 2253 | im.ImageID.Size = ImageSize; |
2254 | 2254 | ||
2255 | im.ImageData.Data = ImageData; | 2255 | im.ImageData.Data = ImageData; |
2256 | im.ImageID.Codec = imageCodec; | 2256 | im.ImageID.Codec = imageCodec; |
2257 | im.Header.Zerocoded = true; | 2257 | im.Header.Zerocoded = true; |
@@ -2270,7 +2270,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2270 | 2270 | ||
2271 | public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, | 2271 | public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, |
2272 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, | 2272 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, |
2273 | uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, | 2273 | uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, |
2274 | LLUUID LastOwnerID, string ObjectName, string Description) | 2274 | LLUUID LastOwnerID, string ObjectName, string Description) |
2275 | { | 2275 | { |
2276 | ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); | 2276 | ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); |
@@ -2301,9 +2301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2301 | } | 2301 | } |
2302 | 2302 | ||
2303 | public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, | 2303 | public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, |
2304 | LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, | 2304 | LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, |
2305 | LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, | 2305 | LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, |
2306 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, | 2306 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, |
2307 | uint BaseMask) | 2307 | uint BaseMask) |
2308 | { | 2308 | { |
2309 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 2309 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |
@@ -2409,7 +2409,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2409 | rinfoblk.WaterHeight = args.waterHeight; | 2409 | rinfoblk.WaterHeight = args.waterHeight; |
2410 | rinfoblk.SimName = Helpers.StringToField(args.simName); | 2410 | rinfoblk.SimName = Helpers.StringToField(args.simName); |
2411 | 2411 | ||
2412 | 2412 | ||
2413 | rinfopack.RegionInfo = rinfoblk; | 2413 | rinfopack.RegionInfo = rinfoblk; |
2414 | 2414 | ||
2415 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); | 2415 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); |
@@ -2638,7 +2638,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2638 | notifyCount = 32; | 2638 | notifyCount = 32; |
2639 | } | 2639 | } |
2640 | 2640 | ||
2641 | 2641 | ||
2642 | 2642 | ||
2643 | ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock | 2643 | ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock |
2644 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; | 2644 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; |
@@ -2758,7 +2758,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2758 | } | 2758 | } |
2759 | 2759 | ||
2760 | /// <summary> | 2760 | /// <summary> |
2761 | /// | 2761 | /// |
2762 | /// </summary> | 2762 | /// </summary> |
2763 | /// <param name="localID"></param> | 2763 | /// <param name="localID"></param> |
2764 | /// <param name="position"></param> | 2764 | /// <param name="position"></param> |
@@ -2852,8 +2852,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2852 | bytes[i++] = (byte)(rvelz % 256); | 2852 | bytes[i++] = (byte)(rvelz % 256); |
2853 | bytes[i++] = (byte)((rvelz >> 8) % 256); | 2853 | bytes[i++] = (byte)((rvelz >> 8) % 256); |
2854 | dat.Data = bytes; | 2854 | dat.Data = bytes; |
2855 | 2855 | ||
2856 | 2856 | ||
2857 | return dat; | 2857 | return dat; |
2858 | } | 2858 | } |
2859 | 2859 | ||
@@ -2931,7 +2931,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2931 | 2931 | ||
2932 | 2932 | ||
2933 | /// <summary> | 2933 | /// <summary> |
2934 | /// | 2934 | /// |
2935 | /// </summary> | 2935 | /// </summary> |
2936 | /// <returns></returns> | 2936 | /// <returns></returns> |
2937 | public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) | 2937 | public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) |
@@ -2966,7 +2966,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2966 | } | 2966 | } |
2967 | 2967 | ||
2968 | /// <summary> | 2968 | /// <summary> |
2969 | /// | 2969 | /// |
2970 | /// </summary> | 2970 | /// </summary> |
2971 | /// <param name="objdata"></param> | 2971 | /// <param name="objdata"></param> |
2972 | protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata) | 2972 | protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata) |
@@ -3093,7 +3093,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3093 | 3093 | ||
3094 | return true; | 3094 | return true; |
3095 | } | 3095 | } |
3096 | 3096 | ||
3097 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) | 3097 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) |
3098 | { | 3098 | { |
3099 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); | 3099 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); |
@@ -3136,7 +3136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3136 | /// <summary> | 3136 | /// <summary> |
3137 | /// Send a response back to a client when it asks the asset server (via the region server) if it has | 3137 | /// Send a response back to a client when it asks the asset server (via the region server) if it has |
3138 | /// its appearance texture cached. | 3138 | /// its appearance texture cached. |
3139 | /// | 3139 | /// |
3140 | /// At the moment, we always reply that there is no cached texture. | 3140 | /// At the moment, we always reply that there is no cached texture. |
3141 | /// </summary> | 3141 | /// </summary> |
3142 | /// <param name="simclient"></param> | 3142 | /// <param name="simclient"></param> |
@@ -3154,7 +3154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3154 | m_cachedTextureSerial++; | 3154 | m_cachedTextureSerial++; |
3155 | cachedresp.WearableData = | 3155 | cachedresp.WearableData = |
3156 | new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length]; | 3156 | new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length]; |
3157 | 3157 | ||
3158 | for (int i = 0; i < cachedtex.WearableData.Length; i++) | 3158 | for (int i = 0; i < cachedtex.WearableData.Length; i++) |
3159 | { | 3159 | { |
3160 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); | 3160 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); |
@@ -3162,8 +3162,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3162 | cachedresp.WearableData[i].TextureID = LLUUID.Zero; | 3162 | cachedresp.WearableData[i].TextureID = LLUUID.Zero; |
3163 | cachedresp.WearableData[i].HostName = new byte[0]; | 3163 | cachedresp.WearableData[i].HostName = new byte[0]; |
3164 | } | 3164 | } |
3165 | 3165 | ||
3166 | // Temporarily throw these packets on to the wind queue, so we can identify whether these | 3166 | // Temporarily throw these packets on to the wind queue, so we can identify whether these |
3167 | // are somehow the source of the packet bloat. | 3167 | // are somehow the source of the packet bloat. |
3168 | cachedresp.Header.Zerocoded = true; | 3168 | cachedresp.Header.Zerocoded = true; |
3169 | OutPacket(cachedresp, ThrottleOutPacketType.Wind); | 3169 | OutPacket(cachedresp, ThrottleOutPacketType.Wind); |
@@ -3245,7 +3245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3245 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 3245 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
3246 | handlerUpdatePrimScale(localId, scale1, this); | 3246 | handlerUpdatePrimScale(localId, scale1, this); |
3247 | 3247 | ||
3248 | 3248 | ||
3249 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; | 3249 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; |
3250 | if (handlerUpdatePrimSinglePosition != null) | 3250 | if (handlerUpdatePrimSinglePosition != null) |
3251 | { | 3251 | { |
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3414 | 3414 | ||
3415 | // Previously ClientView.m_packetQueue | 3415 | // Previously ClientView.m_packetQueue |
3416 | 3416 | ||
3417 | // A thread safe sequence number allocator. | 3417 | // A thread safe sequence number allocator. |
3418 | protected uint NextSeqNum() | 3418 | protected uint NextSeqNum() |
3419 | { | 3419 | { |
3420 | // Set the sequence number | 3420 | // Set the sequence number |
@@ -3490,7 +3490,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3490 | { | 3490 | { |
3491 | // Keep track of when this packet was sent out | 3491 | // Keep track of when this packet was sent out |
3492 | Pack.TickCount = System.Environment.TickCount; | 3492 | Pack.TickCount = System.Environment.TickCount; |
3493 | 3493 | ||
3494 | if (!Pack.Header.Resent) | 3494 | if (!Pack.Header.Resent) |
3495 | { | 3495 | { |
3496 | Pack.Header.Sequence = NextSeqNum(); | 3496 | Pack.Header.Sequence = NextSeqNum(); |
@@ -3510,7 +3510,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3510 | try | 3510 | try |
3511 | { | 3511 | { |
3512 | byte[] sendbuffer = Pack.ToBytes(); | 3512 | byte[] sendbuffer = Pack.ToBytes(); |
3513 | PacketPool.Instance.ReturnPacket(Pack); | 3513 | PacketPool.Instance.ReturnPacket(Pack); |
3514 | 3514 | ||
3515 | if (Pack.Header.Zerocoded) | 3515 | if (Pack.Header.Zerocoded) |
3516 | { | 3516 | { |
@@ -3737,7 +3737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3737 | } | 3737 | } |
3738 | } | 3738 | } |
3739 | 3739 | ||
3740 | private bool m_packetProcessingEnabled = true; | 3740 | private bool m_packetProcessingEnabled = true; |
3741 | 3741 | ||
3742 | public bool IsActive { | 3742 | public bool IsActive { |
3743 | get { return m_packetProcessingEnabled; } | 3743 | get { return m_packetProcessingEnabled; } |
@@ -3750,7 +3750,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3750 | 3750 | ||
3751 | if (ProcessPacketMethod(Pack)) | 3751 | if (ProcessPacketMethod(Pack)) |
3752 | { | 3752 | { |
3753 | //there is a handler registered that handled this packet type | 3753 | //there is a handler registered that handled this packet type |
3754 | return; | 3754 | return; |
3755 | } | 3755 | } |
3756 | else | 3756 | else |
@@ -3972,7 +3972,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3972 | { | 3972 | { |
3973 | // Temporarily protect ourselves from the mantis #951 failure. | 3973 | // Temporarily protect ourselves from the mantis #951 failure. |
3974 | // However, we could do this for several other handlers where a failure isn't terminal | 3974 | // However, we could do this for several other handlers where a failure isn't terminal |
3975 | // for the client session anyway, in order to protect ourselves against bad code in plugins | 3975 | // for the client session anyway, in order to protect ourselves against bad code in plugins |
3976 | try | 3976 | try |
3977 | { | 3977 | { |
3978 | List<byte> visualparams = new List<byte>(); | 3978 | List<byte> visualparams = new List<byte>(); |
@@ -3986,7 +3986,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3986 | catch (Exception e) | 3986 | catch (Exception e) |
3987 | { | 3987 | { |
3988 | m_log.ErrorFormat( | 3988 | m_log.ErrorFormat( |
3989 | "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}", | 3989 | "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}", |
3990 | e); | 3990 | e); |
3991 | } | 3991 | } |
3992 | } | 3992 | } |
@@ -4027,7 +4027,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4027 | if (handlerDetachAttachmentIntoInv != null) | 4027 | if (handlerDetachAttachmentIntoInv != null) |
4028 | { | 4028 | { |
4029 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; | 4029 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; |
4030 | 4030 | ||
4031 | LLUUID itemID = detachtoInv.ObjectData.ItemID; | 4031 | LLUUID itemID = detachtoInv.ObjectData.ItemID; |
4032 | LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; | 4032 | LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; |
4033 | 4033 | ||
@@ -4223,7 +4223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4223 | m_probesWithNoIngressPackets = 0; | 4223 | m_probesWithNoIngressPackets = 0; |
4224 | m_clientBlocked = false; | 4224 | m_clientBlocked = false; |
4225 | SendStartPingCheck(0); | 4225 | SendStartPingCheck(0); |
4226 | 4226 | ||
4227 | break; | 4227 | break; |
4228 | 4228 | ||
4229 | case PacketType.ForceScriptControlRelease: | 4229 | case PacketType.ForceScriptControlRelease: |
@@ -4284,12 +4284,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4284 | // m_log.Info("[REZData]: " + addPacket.ToString()); | 4284 | // m_log.Info("[REZData]: " + addPacket.ToString()); |
4285 | //BypassRaycast: 1 | 4285 | //BypassRaycast: 1 |
4286 | //RayStart: <69.79469, 158.2652, 98.40343> | 4286 | //RayStart: <69.79469, 158.2652, 98.40343> |
4287 | //RayEnd: <61.97724, 141.995, 92.58341> | 4287 | //RayEnd: <61.97724, 141.995, 92.58341> |
4288 | //RayTargetID: 00000000-0000-0000-0000-000000000000 | 4288 | //RayTargetID: 00000000-0000-0000-0000-000000000000 |
4289 | 4289 | ||
4290 | //Check to see if adding the prim is allowed; useful for any module wanting to restrict the | 4290 | //Check to see if adding the prim is allowed; useful for any module wanting to restrict the |
4291 | //object from rezing initially | 4291 | //object from rezing initially |
4292 | 4292 | ||
4293 | handlerAddPrim = OnAddPrim; | 4293 | handlerAddPrim = OnAddPrim; |
4294 | if (handlerAddPrim != null) | 4294 | if (handlerAddPrim != null) |
4295 | handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); | 4295 | handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); |
@@ -4532,10 +4532,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4532 | } | 4532 | } |
4533 | } | 4533 | } |
4534 | 4534 | ||
4535 | // Here's our data, | 4535 | // Here's our data, |
4536 | // PermField contains the field the info goes into | 4536 | // PermField contains the field the info goes into |
4537 | // PermField determines which mask we're changing | 4537 | // PermField determines which mask we're changing |
4538 | // | 4538 | // |
4539 | // chmask is the mask of the change | 4539 | // chmask is the mask of the change |
4540 | // setTF is whether we're adding it or taking it away | 4540 | // setTF is whether we're adding it or taking it away |
4541 | // | 4541 | // |
@@ -4969,11 +4969,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4969 | } | 4969 | } |
4970 | } | 4970 | } |
4971 | } | 4971 | } |
4972 | 4972 | ||
4973 | break; | 4973 | break; |
4974 | 4974 | ||
4975 | case PacketType.RemoveTaskInventory: | 4975 | case PacketType.RemoveTaskInventory: |
4976 | 4976 | ||
4977 | RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; | 4977 | RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; |
4978 | 4978 | ||
4979 | handlerRemoveTaskItem = OnRemoveTaskItem; | 4979 | handlerRemoveTaskItem = OnRemoveTaskItem; |
@@ -4982,27 +4982,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4982 | { | 4982 | { |
4983 | handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); | 4983 | handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); |
4984 | } | 4984 | } |
4985 | 4985 | ||
4986 | break; | 4986 | break; |
4987 | 4987 | ||
4988 | case PacketType.MoveTaskInventory: | 4988 | case PacketType.MoveTaskInventory: |
4989 | 4989 | ||
4990 | MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; | 4990 | MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; |
4991 | 4991 | ||
4992 | handlerMoveTaskItem = OnMoveTaskItem; | 4992 | handlerMoveTaskItem = OnMoveTaskItem; |
4993 | 4993 | ||
4994 | if (handlerMoveTaskItem != null) | 4994 | if (handlerMoveTaskItem != null) |
4995 | { | 4995 | { |
4996 | handlerMoveTaskItem( | 4996 | handlerMoveTaskItem( |
4997 | this, moveTaskInventoryPacket.AgentData.FolderID, | 4997 | this, moveTaskInventoryPacket.AgentData.FolderID, |
4998 | moveTaskInventoryPacket.InventoryData.LocalID, | 4998 | moveTaskInventoryPacket.InventoryData.LocalID, |
4999 | moveTaskInventoryPacket.InventoryData.ItemID); | 4999 | moveTaskInventoryPacket.InventoryData.ItemID); |
5000 | } | 5000 | } |
5001 | 5001 | ||
5002 | break; | 5002 | break; |
5003 | 5003 | ||
5004 | case PacketType.RezScript: | 5004 | case PacketType.RezScript: |
5005 | 5005 | ||
5006 | //Console.WriteLine(Pack.ToString()); | 5006 | //Console.WriteLine(Pack.ToString()); |
5007 | RezScriptPacket rezScriptx = (RezScriptPacket)Pack; | 5007 | RezScriptPacket rezScriptx = (RezScriptPacket)Pack; |
5008 | 5008 | ||
@@ -5013,7 +5013,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5013 | handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); | 5013 | handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); |
5014 | } | 5014 | } |
5015 | break; | 5015 | break; |
5016 | 5016 | ||
5017 | case PacketType.MapLayerRequest: | 5017 | case PacketType.MapLayerRequest: |
5018 | RequestMapLayer(); | 5018 | RequestMapLayer(); |
5019 | break; | 5019 | break; |
@@ -5054,7 +5054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5054 | tpCancel.Info.AgentID = tpReq.Info.AgentID; | 5054 | tpCancel.Info.AgentID = tpReq.Info.AgentID; |
5055 | OutPacket(tpCancel, ThrottleOutPacketType.Task); | 5055 | OutPacket(tpCancel, ThrottleOutPacketType.Task); |
5056 | } | 5056 | } |
5057 | 5057 | ||
5058 | 5058 | ||
5059 | try | 5059 | try |
5060 | { | 5060 | { |
@@ -5072,7 +5072,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5072 | } | 5072 | } |
5073 | else | 5073 | else |
5074 | { | 5074 | { |
5075 | 5075 | ||
5076 | // Teleport home request | 5076 | // Teleport home request |
5077 | handlerTeleportHomeRequest = OnTeleportHomeRequest; | 5077 | handlerTeleportHomeRequest = OnTeleportHomeRequest; |
5078 | if (handlerTeleportHomeRequest != null) | 5078 | if (handlerTeleportHomeRequest != null) |
@@ -5121,7 +5121,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5121 | 5121 | ||
5122 | #endregion | 5122 | #endregion |
5123 | 5123 | ||
5124 | 5124 | ||
5125 | case PacketType.UUIDNameRequest: | 5125 | case PacketType.UUIDNameRequest: |
5126 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 5126 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |
5127 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) | 5127 | foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) |
@@ -5262,7 +5262,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5262 | break; | 5262 | break; |
5263 | case PacketType.ParcelRelease: | 5263 | case PacketType.ParcelRelease: |
5264 | ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; | 5264 | ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; |
5265 | 5265 | ||
5266 | handlerParcelAbandonRequest = OnParcelAbandonRequest; | 5266 | handlerParcelAbandonRequest = OnParcelAbandonRequest; |
5267 | if (handlerParcelAbandonRequest != null) | 5267 | if (handlerParcelAbandonRequest != null) |
5268 | { | 5268 | { |
@@ -5378,7 +5378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5378 | float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); | 5378 | float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); |
5379 | 5379 | ||
5380 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); | 5380 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); |
5381 | 5381 | ||
5382 | } | 5382 | } |
5383 | catch (Exception ex) | 5383 | catch (Exception ex) |
5384 | { | 5384 | { |
@@ -5462,7 +5462,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5462 | LLUUID Prey = LLUUID.Zero; | 5462 | LLUUID Prey = LLUUID.Zero; |
5463 | 5463 | ||
5464 | Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); | 5464 | Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); |
5465 | 5465 | ||
5466 | OnEstateTeleportOneUserHomeRequest(this,invoice,SenderID,Prey); | 5466 | OnEstateTeleportOneUserHomeRequest(this,invoice,SenderID,Prey); |
5467 | } | 5467 | } |
5468 | break; | 5468 | break; |
@@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5500 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | 5500 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; |
5501 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; | 5501 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; |
5502 | LLUUID token = rblock.Token; | 5502 | LLUUID token = rblock.Token; |
5503 | 5503 | ||
5504 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; | 5504 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; |
5505 | 5505 | ||
5506 | handlerReqGodlikePowers = OnRequestGodlikePowers; | 5506 | handlerReqGodlikePowers = OnRequestGodlikePowers; |
@@ -5623,7 +5623,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5623 | // TODO: Don't display this one, we handle it at a lower level | 5623 | // TODO: Don't display this one, we handle it at a lower level |
5624 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); | 5624 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); |
5625 | break; | 5625 | break; |
5626 | 5626 | ||
5627 | case PacketType.AgentHeightWidth: | 5627 | case PacketType.AgentHeightWidth: |
5628 | // TODO: handle this packet | 5628 | // TODO: handle this packet |
5629 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); | 5629 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |
@@ -5741,7 +5741,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5741 | OutPacket(offp, ThrottleOutPacketType.Task); | 5741 | OutPacket(offp, ThrottleOutPacketType.Task); |
5742 | } | 5742 | } |
5743 | 5743 | ||
5744 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | 5744 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, |
5745 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) | 5745 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) |
5746 | { | 5746 | { |
5747 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); | 5747 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); |
@@ -5766,7 +5766,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5766 | GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); | 5766 | GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); |
5767 | 5767 | ||
5768 | adb.AgentID = AgentId; | 5768 | adb.AgentID = AgentId; |
5769 | adb.SessionID = SessionId; // More security | 5769 | adb.SessionID = SessionId; // More security |
5770 | gdb.GodLevel = (byte)AdminLevel; | 5770 | gdb.GodLevel = (byte)AdminLevel; |
5771 | gdb.Token = Token; | 5771 | gdb.Token = Token; |
5772 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; | 5772 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; |
@@ -5790,7 +5790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5790 | Group.GroupPowers = GroupMembership[i].groupPowers; | 5790 | Group.GroupPowers = GroupMembership[i].groupPowers; |
5791 | Groups[i] = Group; | 5791 | Groups[i] = Group; |
5792 | Groupupdate.GroupData = Groups; | 5792 | Groupupdate.GroupData = Groups; |
5793 | 5793 | ||
5794 | } | 5794 | } |
5795 | Groupupdate.AgentData.AgentID = AgentId; | 5795 | Groupupdate.AgentData.AgentID = AgentId; |
5796 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); | 5796 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); |
@@ -5800,7 +5800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5800 | public ClientInfo GetClientInfo() | 5800 | public ClientInfo GetClientInfo() |
5801 | { | 5801 | { |
5802 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); | 5802 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); |
5803 | 5803 | ||
5804 | ClientInfo info = new ClientInfo(); | 5804 | ClientInfo info = new ClientInfo(); |
5805 | info.userEP = this.m_userEndPoint; | 5805 | info.userEP = this.m_userEndPoint; |
5806 | info.proxyEP = this.m_proxyEndPoint; | 5806 | info.proxyEP = this.m_proxyEndPoint; |
@@ -5822,7 +5822,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5822 | QueItem[] queitems = m_packetQueue.GetQueueArray(); | 5822 | QueItem[] queitems = m_packetQueue.GetQueueArray(); |
5823 | 5823 | ||
5824 | MainLog.Instance.Verbose("CLIENT", "Queue Count : [{0}]", queitems.Length); | 5824 | MainLog.Instance.Verbose("CLIENT", "Queue Count : [{0}]", queitems.Length); |
5825 | 5825 | ||
5826 | for (int i = 0; i < queitems.Length; i++) | 5826 | for (int i = 0; i < queitems.Length; i++) |
5827 | { | 5827 | { |
5828 | if (queitems[i].Incoming == false) | 5828 | if (queitems[i].Incoming == false) |
@@ -5862,7 +5862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5862 | } | 5862 | } |
5863 | catch (Exception) | 5863 | catch (Exception) |
5864 | { | 5864 | { |
5865 | 5865 | ||
5866 | } | 5866 | } |
5867 | 5867 | ||
5868 | m_needAck.Add(key, packet); | 5868 | m_needAck.Add(key, packet); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 8f90f34..8655d80 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -79,14 +79,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
79 | // private long LastThrottle; | 79 | // private long LastThrottle; |
80 | // private long ThrottleInterval; | 80 | // private long ThrottleInterval; |
81 | private Timer throttleTimer; | 81 | private Timer throttleTimer; |
82 | 82 | ||
83 | private LLUUID m_agentId; | 83 | private LLUUID m_agentId; |
84 | 84 | ||
85 | public LLPacketQueue(LLUUID agentId) | 85 | public LLPacketQueue(LLUUID agentId) |
86 | { | 86 | { |
87 | // While working on this, the BlockingQueue had me fooled for a bit. | 87 | // While working on this, the BlockingQueue had me fooled for a bit. |
88 | // The Blocking queue causes the thread to stop until there's something | 88 | // The Blocking queue causes the thread to stop until there's something |
89 | // in it to process. it's an on-purpose threadlock though because | 89 | // in it to process. it's an on-purpose threadlock though because |
90 | // without it, the clientloop will suck up all sim resources. | 90 | // without it, the clientloop will suck up all sim resources. |
91 | 91 | ||
92 | SendQueue = new BlockingQueue<LLQueItem>(); | 92 | SendQueue = new BlockingQueue<LLQueItem>(); |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
111 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); | 111 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); |
112 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); | 112 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); |
113 | // Total Throttle trumps all | 113 | // Total Throttle trumps all |
114 | // Number of bytes allowed to go out per second. (256kbps per client) | 114 | // Number of bytes allowed to go out per second. (256kbps per client) |
115 | TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); | 115 | TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); |
116 | 116 | ||
117 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); | 117 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); |
@@ -121,10 +121,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
121 | // TIMERS needed for this | 121 | // TIMERS needed for this |
122 | // LastThrottle = DateTime.Now.Ticks; | 122 | // LastThrottle = DateTime.Now.Ticks; |
123 | // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); | 123 | // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); |
124 | 124 | ||
125 | m_agentId = agentId; | 125 | m_agentId = agentId; |
126 | 126 | ||
127 | if (StatsManager.SimExtraStats != null) | 127 | if (StatsManager.SimExtraStats != null) |
128 | { | 128 | { |
129 | StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); | 129 | StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); |
130 | } | 130 | } |
@@ -234,11 +234,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
234 | 234 | ||
235 | m_enabled = false; | 235 | m_enabled = false; |
236 | throttleTimer.Stop(); | 236 | throttleTimer.Stop(); |
237 | 237 | ||
238 | if (StatsManager.SimExtraStats != null) | 238 | if (StatsManager.SimExtraStats != null) |
239 | { | 239 | { |
240 | StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); | 240 | StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | 243 | ||
244 | private void ResetCounters() | 244 | private void ResetCounters() |
@@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
275 | int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. | 275 | int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. |
276 | int throttleLoops = 0; | 276 | int throttleLoops = 0; |
277 | 277 | ||
278 | // We're going to dequeue all of the saved up packets until | 278 | // We're going to dequeue all of the saved up packets until |
279 | // we've hit the throttle limit or there's no more packets to send | 279 | // we've hit the throttle limit or there's no more packets to send |
280 | lock (this) | 280 | lock (this) |
281 | { | 281 | { |
@@ -428,8 +428,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
428 | //Agent Throttle Block contains 7 single floatingpoint values. | 428 | //Agent Throttle Block contains 7 single floatingpoint values. |
429 | int j = 0; | 429 | int j = 0; |
430 | 430 | ||
431 | // Some Systems may be big endian... | 431 | // Some Systems may be big endian... |
432 | // it might be smart to do this check more often... | 432 | // it might be smart to do this check more often... |
433 | if (!BitConverter.IsLittleEndian) | 433 | if (!BitConverter.IsLittleEndian) |
434 | for (int i = 0; i < 7; i++) | 434 | for (int i = 0; i < 7; i++) |
435 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); | 435 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); |
@@ -508,7 +508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
508 | // effectively wiggling the slider causes things reset | 508 | // effectively wiggling the slider causes things reset |
509 | ResetCounters(); | 509 | ResetCounters(); |
510 | } | 510 | } |
511 | 511 | ||
512 | // See IPullStatsProvider | 512 | // See IPullStatsProvider |
513 | public string GetStats() | 513 | public string GetStats() |
514 | { | 514 | { |
@@ -522,7 +522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
522 | CloudOutgoingPacketQueue.Count, | 522 | CloudOutgoingPacketQueue.Count, |
523 | TaskOutgoingPacketQueue.Count, | 523 | TaskOutgoingPacketQueue.Count, |
524 | TextureOutgoingPacketQueue.Count, | 524 | TextureOutgoingPacketQueue.Count, |
525 | AssetOutgoingPacketQueue.Count); | 525 | AssetOutgoingPacketQueue.Count); |
526 | } | 526 | } |
527 | 527 | ||
528 | public LLQueItem[] GetQueueArray() | 528 | public LLQueItem[] GetQueueArray() |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 6a033c8..5983454 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
37 | { | 37 | { |
38 | public class LLPacketServer | 38 | public class LLPacketServer |
39 | { | 39 | { |
40 | //private static readonly log4net.ILog m_log | 40 | //private static readonly log4net.ILog m_log |
41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private LLClientStackNetworkHandler m_networkHandler; | 43 | private LLClientStackNetworkHandler m_networkHandler; |
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
61 | } | 61 | } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// | 64 | /// |
65 | /// </summary> | 65 | /// </summary> |
66 | /// <param name="circuitCode"></param> | 66 | /// <param name="circuitCode"></param> |
67 | /// <param name="packet"></param> | 67 | /// <param name="packet"></param> |
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /// <summary> | 114 | /// <summary> |
115 | /// | 115 | /// |
116 | /// </summary> | 116 | /// </summary> |
117 | /// <param name="buffer"></param> | 117 | /// <param name="buffer"></param> |
118 | /// <param name="size"></param> | 118 | /// <param name="size"></param> |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /// <summary> | 126 | /// <summary> |
127 | /// | 127 | /// |
128 | /// </summary> | 128 | /// </summary> |
129 | /// <param name="circuitcode"></param> | 129 | /// <param name="circuitcode"></param> |
130 | public virtual void CloseCircuit(uint circuitcode) | 130 | public virtual void CloseCircuit(uint circuitcode) |
@@ -141,9 +141,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
141 | public virtual void CloseClient(IClientAPI client) | 141 | public virtual void CloseClient(IClientAPI client) |
142 | { | 142 | { |
143 | //m_log.Info("PacketServer:CloseClient()"); | 143 | //m_log.Info("PacketServer:CloseClient()"); |
144 | 144 | ||
145 | CloseCircuit(client.CircuitCode); | 145 | CloseCircuit(client.CircuitCode); |
146 | m_scene.ClientManager.Remove(client.CircuitCode); | 146 | m_scene.ClientManager.Remove(client.CircuitCode); |
147 | client.Close(false); | 147 | client.Close(false); |
148 | } | 148 | } |
149 | } | 149 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 5f83b50..c413416 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -171,11 +171,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
171 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, | 171 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, |
172 | ReceivedData, null); | 172 | ReceivedData, null); |
173 | 173 | ||
174 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. | 174 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. |
175 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. | 175 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. |
176 | // This will happen over and over until we've gone through all packets | 176 | // This will happen over and over until we've gone through all packets |
177 | // sent to and from this particular user. | 177 | // sent to and from this particular user. |
178 | // Stupid I know.. | 178 | // Stupid I know.. |
179 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. | 179 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. |
180 | } | 180 | } |
181 | catch (SocketException) | 181 | catch (SocketException) |
@@ -195,12 +195,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
195 | { | 195 | { |
196 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, | 196 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, |
197 | ReceivedData, null); | 197 | ReceivedData, null); |
198 | 198 | ||
199 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. | 199 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. |
200 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. | 200 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. |
201 | // This will happen over and over until we've gone through all packets | 201 | // This will happen over and over until we've gone through all packets |
202 | // sent to and from this particular user. | 202 | // sent to and from this particular user. |
203 | // Stupid I know.. | 203 | // Stupid I know.. |
204 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. | 204 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. |
205 | } | 205 | } |
206 | catch (SocketException e2) | 206 | catch (SocketException e2) |
@@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
208 | m_log.Error("[UDPSERVER]: " + e2.ToString()); | 208 | m_log.Error("[UDPSERVER]: " + e2.ToString()); |
209 | } | 209 | } |
210 | 210 | ||
211 | // Here's some reference code! :D | 211 | // Here's some reference code! :D |
212 | // Shutdown and restart the UDP listener! hehe | 212 | // Shutdown and restart the UDP listener! hehe |
213 | // Shiny | 213 | // Shiny |
214 | 214 | ||
@@ -228,11 +228,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
228 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, | 228 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, |
229 | ReceivedData, null); | 229 | ReceivedData, null); |
230 | 230 | ||
231 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. | 231 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. |
232 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. | 232 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. |
233 | // This will happen over and over until we've gone through all packets | 233 | // This will happen over and over until we've gone through all packets |
234 | // sent to and from this particular user. | 234 | // sent to and from this particular user. |
235 | // Stupid I know.. | 235 | // Stupid I know.. |
236 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. | 236 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. |
237 | } | 237 | } |
238 | 238 | ||
@@ -283,11 +283,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
283 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, | 283 | m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, |
284 | ReceivedData, null); | 284 | ReceivedData, null); |
285 | 285 | ||
286 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. | 286 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. |
287 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. | 287 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. |
288 | // This will happen over and over until we've gone through all packets | 288 | // This will happen over and over until we've gone through all packets |
289 | // sent to and from this particular user. | 289 | // sent to and from this particular user. |
290 | // Stupid I know.. | 290 | // Stupid I know.. |
291 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. | 291 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. |
292 | } | 292 | } |
293 | catch (SocketException e5) | 293 | catch (SocketException e5) |
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
351 | } | 351 | } |
352 | } | 352 | } |
353 | } | 353 | } |
354 | 354 | ||
355 | } | 355 | } |
356 | 356 | ||
357 | private void CloseEndPoint(EndPoint sender) | 357 | private void CloseEndPoint(EndPoint sender) |
@@ -468,7 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
468 | public void RestoreClient(AgentCircuitData circuit, EndPoint userEP, EndPoint proxyEP) | 468 | public void RestoreClient(AgentCircuitData circuit, EndPoint userEP, EndPoint proxyEP) |
469 | { | 469 | { |
470 | //MainLog.Instance.Verbose("UDPSERVER", "RestoreClient"); | 470 | //MainLog.Instance.Verbose("UDPSERVER", "RestoreClient"); |
471 | 471 | ||
472 | UseCircuitCodePacket useCircuit = new UseCircuitCodePacket(); | 472 | UseCircuitCodePacket useCircuit = new UseCircuitCodePacket(); |
473 | useCircuit.CircuitCode.Code = circuit.circuitcode; | 473 | useCircuit.CircuitCode.Code = circuit.circuitcode; |
474 | useCircuit.CircuitCode.ID = circuit.AgentID; | 474 | useCircuit.CircuitCode.ID = circuit.AgentID; |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index b16f74b..586384f 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ClientStack | |||
44 | { | 44 | { |
45 | public abstract class RegionApplicationBase : BaseOpenSimServer | 45 | public abstract class RegionApplicationBase : BaseOpenSimServer |
46 | { | 46 | { |
47 | private static readonly ILog m_log | 47 | private static readonly ILog m_log |
48 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | protected AssetCache m_assetCache; | 50 | protected AssetCache m_assetCache; |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack | |||
63 | 63 | ||
64 | protected StorageManager m_storageManager; | 64 | protected StorageManager m_storageManager; |
65 | protected string m_storageConnectionString; | 65 | protected string m_storageConnectionString; |
66 | 66 | ||
67 | // An attribute to indicate whether prim inventories should be persisted. | 67 | // An attribute to indicate whether prim inventories should be persisted. |
68 | // Probably will be temporary until this stops being experimental. | 68 | // Probably will be temporary until this stops being experimental. |
69 | protected bool m_storagePersistPrimInventories; | 69 | protected bool m_storagePersistPrimInventories; |
@@ -159,9 +159,9 @@ namespace OpenSim.Region.ClientStack | |||
159 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; | 159 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; |
160 | } | 160 | } |
161 | 161 | ||
162 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 162 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |
163 | scene.StartTimer(); | 163 | scene.StartTimer(); |
164 | 164 | ||
165 | return scene; | 165 | return scene; |
166 | } | 166 | } |
167 | 167 | ||
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 39cf911..0203821 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.Communications.Local | |||
165 | } | 165 | } |
166 | 166 | ||
167 | /// <summary> | 167 | /// <summary> |
168 | /// | 168 | /// |
169 | /// </summary> | 169 | /// </summary> |
170 | /// <param name="regionHandle"></param> | 170 | /// <param name="regionHandle"></param> |
171 | /// <returns></returns> | 171 | /// <returns></returns> |
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Communications.Local | |||
188 | } | 188 | } |
189 | 189 | ||
190 | /// <summary> | 190 | /// <summary> |
191 | /// | 191 | /// |
192 | /// </summary> | 192 | /// </summary> |
193 | /// <param name="minX"></param> | 193 | /// <param name="minX"></param> |
194 | /// <param name="minY"></param> | 194 | /// <param name="minY"></param> |
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Communications.Local | |||
305 | } | 305 | } |
306 | 306 | ||
307 | /// <summary> | 307 | /// <summary> |
308 | /// | 308 | /// |
309 | /// </summary> | 309 | /// </summary> |
310 | /// <param name="regionHandle"></param> | 310 | /// <param name="regionHandle"></param> |
311 | /// <param name="agentData"></param> | 311 | /// <param name="agentData"></param> |
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Communications.Local | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /// <summary> | 340 | /// <summary> |
341 | /// | 341 | /// |
342 | /// </summary> | 342 | /// </summary> |
343 | /// <param name="regionHandle"></param> | 343 | /// <param name="regionHandle"></param> |
344 | /// <param name="agentID"></param> | 344 | /// <param name="agentID"></param> |
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 3d87007..4f60462 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs | |||
@@ -37,20 +37,20 @@ namespace OpenSim.Region.Communications.Local | |||
37 | { | 37 | { |
38 | /// <summary> | 38 | /// <summary> |
39 | /// An implementation of user inventory where the inventory is held locally (e.g. when OpenSim is | 39 | /// An implementation of user inventory where the inventory is held locally (e.g. when OpenSim is |
40 | /// operating in standalone mode. | 40 | /// operating in standalone mode. |
41 | /// </summary> | 41 | /// </summary> |
42 | public class LocalInventoryService : InventoryServiceBase | 42 | public class LocalInventoryService : InventoryServiceBase |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) | 47 | public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) |
48 | { | 48 | { |
49 | m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); | 49 | m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); |
50 | 50 | ||
51 | List<InventoryFolderBase> skeletonFolders = GetInventorySkeleton(userID); | 51 | List<InventoryFolderBase> skeletonFolders = GetInventorySkeleton(userID); |
52 | InventoryFolderImpl rootFolder = null; | 52 | InventoryFolderImpl rootFolder = null; |
53 | 53 | ||
54 | List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); | 54 | List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); |
55 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | 55 | List<InventoryItemBase> items = new List<InventoryItemBase>(); |
56 | 56 | ||
@@ -76,11 +76,11 @@ namespace OpenSim.Region.Communications.Local | |||
76 | } | 76 | } |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | m_log.InfoFormat( | 80 | m_log.InfoFormat( |
81 | "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", | 81 | "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", |
82 | userID, folders.Count, items.Count); | 82 | userID, folders.Count, items.Count); |
83 | 83 | ||
84 | callback(folders, items); | 84 | callback(folders, items); |
85 | } | 85 | } |
86 | 86 | ||
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 1781ef8..966fdd4 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.Local | |||
41 | 41 | ||
42 | public class LocalLoginService : LoginService | 42 | public class LocalLoginService : LoginService |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private CommunicationsLocal m_Parent; | 47 | private CommunicationsLocal m_Parent; |
@@ -55,8 +55,8 @@ namespace OpenSim.Region.Communications.Local | |||
55 | 55 | ||
56 | private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; | 56 | private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; |
57 | 57 | ||
58 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, | 58 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, |
59 | CommunicationsLocal parent, NetworkServersInfo serversInfo, | 59 | CommunicationsLocal parent, NetworkServersInfo serversInfo, |
60 | bool authenticate) | 60 | bool authenticate) |
61 | : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) | 61 | : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) |
62 | { | 62 | { |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.Local | |||
106 | { | 106 | { |
107 | m_log.Info( | 107 | m_log.Info( |
108 | "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName); | 108 | "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName); |
109 | 109 | ||
110 | if (!password.StartsWith("$1$")) | 110 | if (!password.StartsWith("$1$")) |
111 | password = "$1$" + Util.Md5Hash(password); | 111 | password = "$1$" + Util.Md5Hash(password); |
112 | 112 | ||
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Communications.Local | |||
157 | RegionInfo r = m_Parent.GridService.RequestClosestRegion(region); | 157 | RegionInfo r = m_Parent.GridService.RequestClosestRegion(region); |
158 | if (null == r) | 158 | if (null == r) |
159 | { | 159 | { |
160 | m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", | 160 | m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", |
161 | startLocationRequest, region); | 161 | startLocationRequest, region); |
162 | } | 162 | } |
163 | else | 163 | else |
@@ -176,16 +176,16 @@ namespace OpenSim.Region.Communications.Local | |||
176 | 176 | ||
177 | if ((homeReg != null) && (reg != null)) | 177 | if ((homeReg != null) && (reg != null)) |
178 | { | 178 | { |
179 | response.Home = "{'region_handle':[r" + | 179 | response.Home = "{'region_handle':[r" + |
180 | (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + | 180 | (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + |
181 | (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + | 181 | (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + |
182 | "'position':[r" + | 182 | "'position':[r" + |
183 | theUser.HomeLocation.X.ToString() + ",r" + | 183 | theUser.HomeLocation.X.ToString() + ",r" + |
184 | theUser.HomeLocation.Y.ToString() + ",r" + | 184 | theUser.HomeLocation.Y.ToString() + ",r" + |
185 | theUser.HomeLocation.Z.ToString() + "], " + | 185 | theUser.HomeLocation.Z.ToString() + "], " + |
186 | "'look_at':[r" + | 186 | "'look_at':[r" + |
187 | theUser.HomeLocation.X.ToString() + ",r" + | 187 | theUser.HomeLocation.X.ToString() + ",r" + |
188 | theUser.HomeLocation.Y.ToString() + ",r" + | 188 | theUser.HomeLocation.Y.ToString() + ",r" + |
189 | theUser.HomeLocation.Z.ToString() + "]}"; | 189 | theUser.HomeLocation.Z.ToString() + "]}"; |
190 | string capsPath = Util.GetRandomCapsPath(); | 190 | string capsPath = Util.GetRandomCapsPath(); |
191 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); | 191 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); |
@@ -201,17 +201,17 @@ namespace OpenSim.Region.Communications.Local | |||
201 | 201 | ||
202 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + | 202 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + |
203 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; | 203 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; |
204 | 204 | ||
205 | m_log.DebugFormat( | 205 | m_log.DebugFormat( |
206 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", | 206 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", |
207 | response.SeedCapability, response.AgentID); | 207 | response.SeedCapability, response.AgentID); |
208 | 208 | ||
209 | theUser.CurrentAgent.Region = reg.RegionID; | 209 | theUser.CurrentAgent.Region = reg.RegionID; |
210 | theUser.CurrentAgent.Handle = reg.RegionHandle; | 210 | theUser.CurrentAgent.Handle = reg.RegionHandle; |
211 | 211 | ||
212 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); | 212 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); |
213 | 213 | ||
214 | response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); | 214 | response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); |
215 | 215 | ||
216 | Login _login = new Login(); | 216 | Login _login = new Login(); |
217 | //copy data to login object | 217 | //copy data to login object |
@@ -228,9 +228,9 @@ namespace OpenSim.Region.Communications.Local | |||
228 | _login.CapsPath = capsPath; | 228 | _login.CapsPath = capsPath; |
229 | 229 | ||
230 | m_log.InfoFormat( | 230 | m_log.InfoFormat( |
231 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", | 231 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", |
232 | reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); | 232 | reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); |
233 | 233 | ||
234 | handlerLoginToRegion = OnLoginToRegion; | 234 | handlerLoginToRegion = OnLoginToRegion; |
235 | if (handlerLoginToRegion != null) | 235 | if (handlerLoginToRegion != null) |
236 | { | 236 | { |
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Communications.Local | |||
257 | return buddylistreturn; | 257 | return buddylistreturn; |
258 | } | 258 | } |
259 | 259 | ||
260 | // See LoginService | 260 | // See LoginService |
261 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 261 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
262 | { | 262 | { |
263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); | 263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); |
@@ -265,10 +265,10 @@ namespace OpenSim.Region.Communications.Local | |||
265 | // If we have user auth but no inventory folders for some reason, create a new set of folders. | 265 | // If we have user auth but no inventory folders for some reason, create a new set of folders. |
266 | if (null == folders || 0 == folders.Count) | 266 | if (null == folders || 0 == folders.Count) |
267 | { | 267 | { |
268 | m_Parent.InventoryService.CreateNewUserInventory(userID); | 268 | m_Parent.InventoryService.CreateNewUserInventory(userID); |
269 | folders = m_Parent.InventoryService.GetInventorySkeleton(userID); | 269 | folders = m_Parent.InventoryService.GetInventorySkeleton(userID); |
270 | } | 270 | } |
271 | 271 | ||
272 | LLUUID rootID = LLUUID.Zero; | 272 | LLUUID rootID = LLUUID.Zero; |
273 | ArrayList AgentInventoryArray = new ArrayList(); | 273 | ArrayList AgentInventoryArray = new ArrayList(); |
274 | Hashtable TempHash; | 274 | Hashtable TempHash; |
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Communications.Local | |||
286 | TempHash["folder_id"] = InvFolder.ID.ToString(); | 286 | TempHash["folder_id"] = InvFolder.ID.ToString(); |
287 | AgentInventoryArray.Add(TempHash); | 287 | AgentInventoryArray.Add(TempHash); |
288 | } | 288 | } |
289 | 289 | ||
290 | return new InventoryData(AgentInventoryArray, rootID); | 290 | return new InventoryData(AgentInventoryArray, rootID); |
291 | } | 291 | } |
292 | } | 292 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 2a66edc..47f596d 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Communications.Local | |||
40 | private IInventoryServices m_inventoryService; | 40 | private IInventoryServices m_inventoryService; |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// | 43 | /// |
44 | /// </summary> | 44 | /// </summary> |
45 | /// <param name="serversInfo"></param> | 45 | /// <param name="serversInfo"></param> |
46 | /// <param name="defaultHomeLocX"></param> | 46 | /// <param name="defaultHomeLocX"></param> |
diff --git a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs index 2c88586..8712c00 100644 --- a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index fb8dcf6..5e7e238 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -95,9 +95,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
95 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | 95 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) |
96 | { | 96 | { |
97 | m_log.InfoFormat( | 97 | m_log.InfoFormat( |
98 | "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", | 98 | "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", |
99 | regionInfo.RegionName, serversInfo.GridURL); | 99 | regionInfo.RegionName, serversInfo.GridURL); |
100 | 100 | ||
101 | Hashtable GridParams = new Hashtable(); | 101 | Hashtable GridParams = new Hashtable(); |
102 | // Login / Authentication | 102 | // Login / Authentication |
103 | 103 | ||
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
122 | // not at all. Current strategy is to put the code in place to support the validity of this information | 122 | // not at all. Current strategy is to put the code in place to support the validity of this information |
123 | // and to roll forward debugging any issues from that point | 123 | // and to roll forward debugging any issues from that point |
124 | // | 124 | // |
125 | // this particular section of the mod attempts to supply a value from the region's xml file to the grid | 125 | // this particular section of the mod attempts to supply a value from the region's xml file to the grid |
126 | // server for the UUID of the region's owner (master avatar) | 126 | // server for the UUID of the region's owner (master avatar) |
127 | GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString(); | 127 | GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString(); |
128 | 128 | ||
@@ -139,14 +139,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
139 | } | 139 | } |
140 | catch (Exception e) | 140 | catch (Exception e) |
141 | { | 141 | { |
142 | Exception e2 | 142 | Exception e2 |
143 | = new Exception( | 143 | = new Exception( |
144 | String.Format("Unable to connect to grid at {0}. Grid service not running?", serversInfo.GridURL), | 144 | String.Format("Unable to connect to grid at {0}. Grid service not running?", serversInfo.GridURL), |
145 | e); | 145 | e); |
146 | 146 | ||
147 | throw(e2); | 147 | throw(e2); |
148 | } | 148 | } |
149 | 149 | ||
150 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 150 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
151 | Hashtable griddatahash = GridRespData; | 151 | Hashtable griddatahash = GridRespData; |
152 | 152 | ||
@@ -154,9 +154,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
154 | if (GridRespData.ContainsKey("error")) | 154 | if (GridRespData.ContainsKey("error")) |
155 | { | 155 | { |
156 | string errorstring = (string) GridRespData["error"]; | 156 | string errorstring = (string) GridRespData["error"]; |
157 | 157 | ||
158 | Exception e = new Exception(String.Format("Unable to connect to grid at {0}: {1}", serversInfo.GridURL, errorstring)); | 158 | Exception e = new Exception(String.Format("Unable to connect to grid at {0}: {1}", serversInfo.GridURL, errorstring)); |
159 | 159 | ||
160 | throw e; | 160 | throw e; |
161 | } | 161 | } |
162 | else | 162 | else |
@@ -170,9 +170,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
170 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); | 170 | m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | m_log.InfoFormat( | 174 | m_log.InfoFormat( |
175 | "[OGS1 GRID SERVICES]: Region {0} successfully registered with grid at {1}", | 175 | "[OGS1 GRID SERVICES]: Region {0} successfully registered with grid at {1}", |
176 | regionInfo.RegionName, serversInfo.GridURL); | 176 | regionInfo.RegionName, serversInfo.GridURL); |
177 | } | 177 | } |
178 | return m_localBackend.RegisterRegion(regionInfo); | 178 | return m_localBackend.RegisterRegion(regionInfo); |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
245 | 245 | ||
246 | string externalIpStr = String.Empty; | 246 | string externalIpStr = String.Empty; |
247 | try | 247 | try |
248 | { | 248 | { |
249 | externalIpStr = Util.GetHostFromDNS(simIp).ToString(); | 249 | externalIpStr = Util.GetHostFromDNS(simIp).ToString(); |
250 | } | 250 | } |
251 | catch (SocketException e) | 251 | catch (SocketException e) |
@@ -253,16 +253,16 @@ namespace OpenSim.Region.Communications.OGS1 | |||
253 | m_log.WarnFormat("RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list. {1}", simIp, e); | 253 | m_log.WarnFormat("RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list. {1}", simIp, e); |
254 | continue; | 254 | continue; |
255 | } | 255 | } |
256 | 256 | ||
257 | SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); | 257 | SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); |
258 | 258 | ||
259 | sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); | 259 | sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); |
260 | 260 | ||
261 | if (neighbourData.ContainsKey("http_port")) | 261 | if (neighbourData.ContainsKey("http_port")) |
262 | { | 262 | { |
263 | sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]); | 263 | sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]); |
264 | } | 264 | } |
265 | 265 | ||
266 | sri.RegionID = new LLUUID((string) neighbourData["uuid"]); | 266 | sri.RegionID = new LLUUID((string) neighbourData["uuid"]); |
267 | 267 | ||
268 | neighbours.Add(sri); | 268 | neighbours.Add(sri); |
@@ -274,7 +274,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
274 | } | 274 | } |
275 | 275 | ||
276 | /// <summary> | 276 | /// <summary> |
277 | /// | 277 | /// |
278 | /// </summary> | 278 | /// </summary> |
279 | /// <param name="regionHandle"></param> | 279 | /// <param name="regionHandle"></param> |
280 | /// <returns></returns> | 280 | /// <returns></returns> |
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
309 | 309 | ||
310 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 310 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
311 | regionInfo.RemotingAddress = internalIpStr; | 311 | regionInfo.RemotingAddress = internalIpStr; |
312 | 312 | ||
313 | if (responseData.ContainsKey("http_port")) | 313 | if (responseData.ContainsKey("http_port")) |
314 | { | 314 | { |
315 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); | 315 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
327 | } | 327 | } |
328 | 328 | ||
329 | /// <summary> | 329 | /// <summary> |
330 | /// | 330 | /// |
331 | /// </summary> | 331 | /// </summary> |
332 | /// <param name="regionHandle"></param> | 332 | /// <param name="regionHandle"></param> |
333 | /// <returns></returns> | 333 | /// <returns></returns> |
@@ -372,7 +372,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
372 | 372 | ||
373 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 373 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
374 | regionInfo.RemotingAddress = internalIpStr; | 374 | regionInfo.RemotingAddress = internalIpStr; |
375 | 375 | ||
376 | if (responseData.ContainsKey("http_port")) | 376 | if (responseData.ContainsKey("http_port")) |
377 | { | 377 | { |
378 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); | 378 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); |
@@ -429,7 +429,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
429 | 429 | ||
430 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); | 430 | regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
431 | regionInfo.RemotingAddress = internalIpStr; | 431 | regionInfo.RemotingAddress = internalIpStr; |
432 | 432 | ||
433 | if (responseData.ContainsKey("http_port")) | 433 | if (responseData.ContainsKey("http_port")) |
434 | { | 434 | { |
435 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); | 435 | regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); |
@@ -451,7 +451,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
451 | } | 451 | } |
452 | 452 | ||
453 | /// <summary> | 453 | /// <summary> |
454 | /// | 454 | /// |
455 | /// </summary> | 455 | /// </summary> |
456 | /// <param name="minX"></param> | 456 | /// <param name="minX"></param> |
457 | /// <param name="minY"></param> | 457 | /// <param name="minY"></param> |
@@ -601,7 +601,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
601 | #region m_interRegion Comms | 601 | #region m_interRegion Comms |
602 | 602 | ||
603 | /// <summary> | 603 | /// <summary> |
604 | /// | 604 | /// |
605 | /// </summary> | 605 | /// </summary> |
606 | private void StartRemoting() | 606 | private void StartRemoting() |
607 | { | 607 | { |
@@ -688,55 +688,55 @@ namespace OpenSim.Region.Communications.OGS1 | |||
688 | catch (RemotingException e) | 688 | catch (RemotingException e) |
689 | { | 689 | { |
690 | NoteDeadRegion(regionHandle); | 690 | NoteDeadRegion(regionHandle); |
691 | 691 | ||
692 | m_log.WarnFormat( | 692 | m_log.WarnFormat( |
693 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 693 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
694 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 694 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
695 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 695 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
696 | 696 | ||
697 | return false; | 697 | return false; |
698 | } | 698 | } |
699 | catch (SocketException e) | 699 | catch (SocketException e) |
700 | { | 700 | { |
701 | NoteDeadRegion(regionHandle); | 701 | NoteDeadRegion(regionHandle); |
702 | 702 | ||
703 | m_log.WarnFormat( | 703 | m_log.WarnFormat( |
704 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 704 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
705 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 705 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
706 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 706 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
707 | 707 | ||
708 | return false; | 708 | return false; |
709 | } | 709 | } |
710 | catch (InvalidCredentialException e) | 710 | catch (InvalidCredentialException e) |
711 | { | 711 | { |
712 | NoteDeadRegion(regionHandle); | 712 | NoteDeadRegion(regionHandle); |
713 | 713 | ||
714 | m_log.WarnFormat( | 714 | m_log.WarnFormat( |
715 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 715 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
716 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 716 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
717 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 717 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
718 | 718 | ||
719 | return false; | 719 | return false; |
720 | } | 720 | } |
721 | catch (AuthenticationException e) | 721 | catch (AuthenticationException e) |
722 | { | 722 | { |
723 | NoteDeadRegion(regionHandle); | 723 | NoteDeadRegion(regionHandle); |
724 | 724 | ||
725 | m_log.WarnFormat( | 725 | m_log.WarnFormat( |
726 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 726 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
727 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 727 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
728 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 728 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
729 | 729 | ||
730 | return false; | 730 | return false; |
731 | } | 731 | } |
732 | catch (Exception e) | 732 | catch (Exception e) |
733 | { | 733 | { |
734 | NoteDeadRegion(regionHandle); | 734 | NoteDeadRegion(regionHandle); |
735 | 735 | ||
736 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", | 736 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", |
737 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 737 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
738 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 738 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
739 | 739 | ||
740 | return false; | 740 | return false; |
741 | } | 741 | } |
742 | } | 742 | } |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
748 | } | 748 | } |
749 | 749 | ||
750 | /// <summary> | 750 | /// <summary> |
751 | /// | 751 | /// |
752 | /// </summary> | 752 | /// </summary> |
753 | /// <param name="regionHandle"></param> | 753 | /// <param name="regionHandle"></param> |
754 | /// <param name="agentData"></param> | 754 | /// <param name="agentData"></param> |
@@ -797,56 +797,56 @@ namespace OpenSim.Region.Communications.OGS1 | |||
797 | catch (RemotingException e) | 797 | catch (RemotingException e) |
798 | { | 798 | { |
799 | NoteDeadRegion(regionHandle); | 799 | NoteDeadRegion(regionHandle); |
800 | 800 | ||
801 | m_log.WarnFormat( | 801 | m_log.WarnFormat( |
802 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 802 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
803 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 803 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
804 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 804 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
805 | 805 | ||
806 | return false; | 806 | return false; |
807 | } | 807 | } |
808 | catch (SocketException e) | 808 | catch (SocketException e) |
809 | { | 809 | { |
810 | NoteDeadRegion(regionHandle); | 810 | NoteDeadRegion(regionHandle); |
811 | 811 | ||
812 | m_log.WarnFormat( | 812 | m_log.WarnFormat( |
813 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 813 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
814 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 814 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
815 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 815 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
816 | 816 | ||
817 | return false; | 817 | return false; |
818 | } | 818 | } |
819 | catch (InvalidCredentialException e) | 819 | catch (InvalidCredentialException e) |
820 | { | 820 | { |
821 | NoteDeadRegion(regionHandle); | 821 | NoteDeadRegion(regionHandle); |
822 | 822 | ||
823 | m_log.WarnFormat( | 823 | m_log.WarnFormat( |
824 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 824 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
825 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 825 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
826 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 826 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
827 | 827 | ||
828 | return false; | 828 | return false; |
829 | } | 829 | } |
830 | catch (AuthenticationException e) | 830 | catch (AuthenticationException e) |
831 | { | 831 | { |
832 | NoteDeadRegion(regionHandle); | 832 | NoteDeadRegion(regionHandle); |
833 | 833 | ||
834 | m_log.WarnFormat( | 834 | m_log.WarnFormat( |
835 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 835 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
836 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 836 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
837 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 837 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
838 | 838 | ||
839 | return false; | 839 | return false; |
840 | } | 840 | } |
841 | catch (Exception e) | 841 | catch (Exception e) |
842 | { | 842 | { |
843 | NoteDeadRegion(regionHandle); | 843 | NoteDeadRegion(regionHandle); |
844 | 844 | ||
845 | m_log.WarnFormat( | 845 | m_log.WarnFormat( |
846 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 846 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
847 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 847 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
848 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 848 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
849 | 849 | ||
850 | return false; | 850 | return false; |
851 | } | 851 | } |
852 | } | 852 | } |
@@ -857,17 +857,17 @@ namespace OpenSim.Region.Communications.OGS1 | |||
857 | SerializableRegionInfo regInfo = null; | 857 | SerializableRegionInfo regInfo = null; |
858 | try | 858 | try |
859 | { | 859 | { |
860 | // You may ask why this is in here... | 860 | // You may ask why this is in here... |
861 | // The region asking the grid services about itself.. | 861 | // The region asking the grid services about itself.. |
862 | // And, surprisingly, the reason is.. it doesn't know | 862 | // And, surprisingly, the reason is.. it doesn't know |
863 | // it's own remoting port! How special. | 863 | // it's own remoting port! How special. |
864 | RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); | 864 | RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); |
865 | 865 | ||
866 | region = new SerializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); | 866 | region = new SerializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); |
867 | region.RemotingAddress = region.ExternalHostName; | 867 | region.RemotingAddress = region.ExternalHostName; |
868 | region.RemotingPort = NetworkServersInfo.RemotingListenerPort; | 868 | region.RemotingPort = NetworkServersInfo.RemotingListenerPort; |
869 | region.HttpPort = serversInfo.HttpListenerPort; | 869 | region.HttpPort = serversInfo.HttpListenerPort; |
870 | 870 | ||
871 | if (m_localBackend.RegionUp(region, regionhandle)) | 871 | if (m_localBackend.RegionUp(region, regionhandle)) |
872 | { | 872 | { |
873 | return true; | 873 | return true; |
@@ -904,7 +904,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
904 | } | 904 | } |
905 | else | 905 | else |
906 | { | 906 | { |
907 | // We're trying to inform ourselves via remoting. | 907 | // We're trying to inform ourselves via remoting. |
908 | // This is here because we're looping over the listeners before we get here. | 908 | // This is here because we're looping over the listeners before we get here. |
909 | // Odd but it should work. | 909 | // Odd but it should work. |
910 | return true; | 910 | return true; |
@@ -963,7 +963,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
963 | } | 963 | } |
964 | 964 | ||
965 | /// <summary> | 965 | /// <summary> |
966 | /// | 966 | /// |
967 | /// </summary> | 967 | /// </summary> |
968 | /// <param name="regionHandle"></param> | 968 | /// <param name="regionHandle"></param> |
969 | /// <param name="agentData"></param> | 969 | /// <param name="agentData"></param> |
@@ -1058,7 +1058,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | /// <summary> | 1060 | /// <summary> |
1061 | /// | 1061 | /// |
1062 | /// </summary> | 1062 | /// </summary> |
1063 | /// <param name="regionHandle"></param> | 1063 | /// <param name="regionHandle"></param> |
1064 | /// <param name="agentID"></param> | 1064 | /// <param name="agentID"></param> |
@@ -1098,20 +1098,20 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1098 | 1098 | ||
1099 | return retValue; | 1099 | return retValue; |
1100 | } | 1100 | } |
1101 | //TODO need to see if we know about where this region is and use .net remoting | 1101 | //TODO need to see if we know about where this region is and use .net remoting |
1102 | // to inform it. | 1102 | // to inform it. |
1103 | NoteDeadRegion(regionHandle); | 1103 | NoteDeadRegion(regionHandle); |
1104 | return false; | 1104 | return false; |
1105 | } | 1105 | } |
1106 | catch (RemotingException e) | 1106 | catch (RemotingException e) |
1107 | { | 1107 | { |
1108 | NoteDeadRegion(regionHandle); | 1108 | NoteDeadRegion(regionHandle); |
1109 | 1109 | ||
1110 | m_log.WarnFormat( | 1110 | m_log.WarnFormat( |
1111 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", | 1111 | "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", |
1112 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); | 1112 | regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); |
1113 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1113 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1114 | 1114 | ||
1115 | return false; | 1115 | return false; |
1116 | } | 1116 | } |
1117 | catch | 1117 | catch |
@@ -1155,8 +1155,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1155 | 1155 | ||
1156 | return retValue; | 1156 | return retValue; |
1157 | } | 1157 | } |
1158 | //TODO need to see if we know about where this region is and use .net remoting | 1158 | //TODO need to see if we know about where this region is and use .net remoting |
1159 | // to inform it. | 1159 | // to inform it. |
1160 | NoteDeadRegion(regionHandle); | 1160 | NoteDeadRegion(regionHandle); |
1161 | return false; | 1161 | return false; |
1162 | } | 1162 | } |
@@ -1184,7 +1184,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1184 | catch (AuthenticationException e) | 1184 | catch (AuthenticationException e) |
1185 | { | 1185 | { |
1186 | NoteDeadRegion(regionHandle); | 1186 | NoteDeadRegion(regionHandle); |
1187 | m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region: " + regionHandle); | 1187 | m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region: " + regionHandle); |
1188 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); | 1188 | m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); |
1189 | return false; | 1189 | return false; |
1190 | } | 1190 | } |
@@ -1230,8 +1230,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1230 | 1230 | ||
1231 | return true; | 1231 | return true; |
1232 | } | 1232 | } |
1233 | //TODO need to see if we know about where this region is and use .net remoting | 1233 | //TODO need to see if we know about where this region is and use .net remoting |
1234 | // to inform it. | 1234 | // to inform it. |
1235 | NoteDeadRegion(regionHandle); | 1235 | NoteDeadRegion(regionHandle); |
1236 | return false; | 1236 | return false; |
1237 | } | 1237 | } |
@@ -1311,7 +1311,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1311 | #region Methods triggered by calls from external instances | 1311 | #region Methods triggered by calls from external instances |
1312 | 1312 | ||
1313 | /// <summary> | 1313 | /// <summary> |
1314 | /// | 1314 | /// |
1315 | /// </summary> | 1315 | /// </summary> |
1316 | /// <param name="regionHandle"></param> | 1316 | /// <param name="regionHandle"></param> |
1317 | /// <param name="agentData"></param> | 1317 | /// <param name="agentData"></param> |
@@ -1342,7 +1342,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1342 | nRegionInfo.RegionLocX = regionData.X; | 1342 | nRegionInfo.RegionLocX = regionData.X; |
1343 | nRegionInfo.RegionLocY = regionData.Y; | 1343 | nRegionInfo.RegionLocY = regionData.Y; |
1344 | 1344 | ||
1345 | 1345 | ||
1346 | try | 1346 | try |
1347 | { | 1347 | { |
1348 | lock (m_deadRegionCache) | 1348 | lock (m_deadRegionCache) |
@@ -1379,14 +1379,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | /// <summary> | 1381 | /// <summary> |
1382 | /// | 1382 | /// |
1383 | /// </summary> | 1383 | /// </summary> |
1384 | /// <param name="regionHandle"></param> | 1384 | /// <param name="regionHandle"></param> |
1385 | /// <param name="agentData"></param> | 1385 | /// <param name="agentData"></param> |
1386 | /// <returns></returns> | 1386 | /// <returns></returns> |
1387 | public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) | 1387 | public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) |
1388 | { | 1388 | { |
1389 | // Is this necessary? | 1389 | // Is this necessary? |
1390 | try | 1390 | try |
1391 | { | 1391 | { |
1392 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData, XMLMethod); | 1392 | m_localBackend.TriggerExpectPrim(regionHandle, primID, objData, XMLMethod); |
@@ -1401,7 +1401,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1401 | } | 1401 | } |
1402 | 1402 | ||
1403 | /// <summary> | 1403 | /// <summary> |
1404 | /// | 1404 | /// |
1405 | /// </summary> | 1405 | /// </summary> |
1406 | /// <param name="regionHandle"></param> | 1406 | /// <param name="regionHandle"></param> |
1407 | /// <param name="agentID"></param> | 1407 | /// <param name="agentID"></param> |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 0f75a09..9b3d878 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
41 | { | 41 | { |
42 | public class OGS1InventoryService : IInventoryServices | 42 | public class OGS1InventoryService : IInventoryServices |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private string _inventoryServerUrl; | 47 | private string _inventoryServerUrl; |
48 | private Dictionary<LLUUID, InventoryReceiptCallback> m_RequestingInventory | 48 | private Dictionary<LLUUID, InventoryReceiptCallback> m_RequestingInventory |
49 | = new Dictionary<LLUUID, InventoryReceiptCallback>(); | 49 | = new Dictionary<LLUUID, InventoryReceiptCallback>(); |
50 | 50 | ||
51 | public OGS1InventoryService(string inventoryServerUrl) | 51 | public OGS1InventoryService(string inventoryServerUrl) |
@@ -65,26 +65,26 @@ namespace OpenSim.Region.Communications.OGS1 | |||
65 | if (!m_RequestingInventory.ContainsKey(userID)) | 65 | if (!m_RequestingInventory.ContainsKey(userID)) |
66 | { | 66 | { |
67 | m_RequestingInventory.Add(userID, callback); | 67 | m_RequestingInventory.Add(userID, callback); |
68 | 68 | ||
69 | try | 69 | try |
70 | { | 70 | { |
71 | m_log.InfoFormat( | 71 | m_log.InfoFormat( |
72 | "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}", | 72 | "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}", |
73 | _inventoryServerUrl, userID); | 73 | _inventoryServerUrl, userID); |
74 | 74 | ||
75 | RestObjectPosterResponse<InventoryCollection> requester | 75 | RestObjectPosterResponse<InventoryCollection> requester |
76 | = new RestObjectPosterResponse<InventoryCollection>(); | 76 | = new RestObjectPosterResponse<InventoryCollection>(); |
77 | requester.ResponseCallback = InventoryResponse; | 77 | requester.ResponseCallback = InventoryResponse; |
78 | 78 | ||
79 | requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.UUID); | 79 | requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.UUID); |
80 | } | 80 | } |
81 | catch (WebException e) | 81 | catch (WebException e) |
82 | { | 82 | { |
83 | if (StatsManager.SimExtraStats != null) | 83 | if (StatsManager.SimExtraStats != null) |
84 | StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); | 84 | StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); |
85 | 85 | ||
86 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", | 86 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", |
87 | e.Source, e.Message); | 87 | e.Source, e.Message); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | else | 90 | else |
@@ -92,11 +92,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
92 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID); | 92 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | /// <summary> | 96 | /// <summary> |
97 | /// Callback used by the inventory server GetInventory request | 97 | /// Callback used by the inventory server GetInventory request |
98 | /// </summary> | 98 | /// </summary> |
99 | /// <param name="userID"></param> | 99 | /// <param name="userID"></param> |
100 | private void InventoryResponse(InventoryCollection response) | 100 | private void InventoryResponse(InventoryCollection response) |
101 | { | 101 | { |
102 | LLUUID userID = response.UserID; | 102 | LLUUID userID = response.UserID; |
@@ -108,17 +108,17 @@ namespace OpenSim.Region.Communications.OGS1 | |||
108 | 108 | ||
109 | InventoryFolderImpl rootFolder = null; | 109 | InventoryFolderImpl rootFolder = null; |
110 | InventoryReceiptCallback callback = m_RequestingInventory[userID]; | 110 | InventoryReceiptCallback callback = m_RequestingInventory[userID]; |
111 | 111 | ||
112 | ICollection<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); | 112 | ICollection<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); |
113 | ICollection<InventoryItemBase> items = new List<InventoryItemBase>(); | 113 | ICollection<InventoryItemBase> items = new List<InventoryItemBase>(); |
114 | 114 | ||
115 | foreach (InventoryFolderBase folder in response.Folders) | 115 | foreach (InventoryFolderBase folder in response.Folders) |
116 | { | 116 | { |
117 | if (folder.ParentID == LLUUID.Zero) | 117 | if (folder.ParentID == LLUUID.Zero) |
118 | { | 118 | { |
119 | rootFolder = new InventoryFolderImpl(folder); | 119 | rootFolder = new InventoryFolderImpl(folder); |
120 | folders.Add(rootFolder); | 120 | folders.Add(rootFolder); |
121 | 121 | ||
122 | break; | 122 | break; |
123 | } | 123 | } |
124 | } | 124 | } |
@@ -142,9 +142,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
142 | { | 142 | { |
143 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Did not get back an inventory containing a root folder for user {0}", userID); | 143 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Did not get back an inventory containing a root folder for user {0}", userID); |
144 | } | 144 | } |
145 | 145 | ||
146 | callback(folders, items); | 146 | callback(folders, items); |
147 | 147 | ||
148 | m_RequestingInventory.Remove(userID); | 148 | m_RequestingInventory.Remove(userID); |
149 | } | 149 | } |
150 | else | 150 | else |
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
158 | 158 | ||
159 | /// <summary> | 159 | /// <summary> |
160 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 160 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
161 | /// </summary> | 161 | /// </summary> |
162 | public bool AddFolder(InventoryFolderBase folder) | 162 | public bool AddFolder(InventoryFolderBase folder) |
163 | { | 163 | { |
164 | try | 164 | try |
@@ -168,68 +168,68 @@ namespace OpenSim.Region.Communications.OGS1 | |||
168 | } | 168 | } |
169 | catch (WebException e) | 169 | catch (WebException e) |
170 | { | 170 | { |
171 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", | 171 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", |
172 | e.Source, e.Message); | 172 | e.Source, e.Message); |
173 | } | 173 | } |
174 | 174 | ||
175 | return false; | 175 | return false; |
176 | } | 176 | } |
177 | 177 | ||
178 | /// <summary> | 178 | /// <summary> |
179 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 179 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
180 | /// </summary> | 180 | /// </summary> |
181 | /// <param name="folder"></param> | 181 | /// <param name="folder"></param> |
182 | public bool MoveFolder(InventoryFolderBase folder) | 182 | public bool MoveFolder(InventoryFolderBase folder) |
183 | { | 183 | { |
184 | try | 184 | try |
185 | { | 185 | { |
186 | return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | 186 | return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( |
187 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); | 187 | "POST", _inventoryServerUrl + "/MoveFolder/", folder); |
188 | } | 188 | } |
189 | catch (WebException e) | 189 | catch (WebException e) |
190 | { | 190 | { |
191 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", | 191 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", |
192 | e.Source, e.Message); | 192 | e.Source, e.Message); |
193 | } | 193 | } |
194 | 194 | ||
195 | return false; | 195 | return false; |
196 | } | 196 | } |
197 | 197 | ||
198 | /// <summary> | 198 | /// <summary> |
199 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 199 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
200 | /// </summary> | 200 | /// </summary> |
201 | public bool PurgeFolder(InventoryFolderBase folder) | 201 | public bool PurgeFolder(InventoryFolderBase folder) |
202 | { | 202 | { |
203 | try | 203 | try |
204 | { | 204 | { |
205 | return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | 205 | return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( |
206 | "POST", _inventoryServerUrl + "/PurgeFolder/", folder); | 206 | "POST", _inventoryServerUrl + "/PurgeFolder/", folder); |
207 | } | 207 | } |
208 | catch (WebException e) | 208 | catch (WebException e) |
209 | { | 209 | { |
210 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", | 210 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", |
211 | e.Source, e.Message); | 211 | e.Source, e.Message); |
212 | } | 212 | } |
213 | 213 | ||
214 | return false; | 214 | return false; |
215 | } | 215 | } |
216 | 216 | ||
217 | /// <summary> | 217 | /// <summary> |
218 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 218 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
219 | /// </summary> | 219 | /// </summary> |
220 | public bool AddItem(InventoryItemBase item) | 220 | public bool AddItem(InventoryItemBase item) |
221 | { | 221 | { |
222 | try | 222 | try |
223 | { | 223 | { |
224 | return SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( | 224 | return SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( |
225 | "POST", _inventoryServerUrl + "/NewItem/", item); | 225 | "POST", _inventoryServerUrl + "/NewItem/", item); |
226 | } | 226 | } |
227 | catch (WebException e) | 227 | catch (WebException e) |
228 | { | 228 | { |
229 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", | 229 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", |
230 | e.Source, e.Message); | 230 | e.Source, e.Message); |
231 | } | 231 | } |
232 | 232 | ||
233 | return false; | 233 | return false; |
234 | } | 234 | } |
235 | 235 | ||
@@ -246,26 +246,26 @@ namespace OpenSim.Region.Communications.OGS1 | |||
246 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update new inventory item operation failed, {0} {1}", | 246 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update new inventory item operation failed, {0} {1}", |
247 | e.Source, e.Message); | 247 | e.Source, e.Message); |
248 | } | 248 | } |
249 | 249 | ||
250 | return false; | 250 | return false; |
251 | } | 251 | } |
252 | 252 | ||
253 | /// <summary> | 253 | /// <summary> |
254 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 254 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
255 | /// </summary> | 255 | /// </summary> |
256 | public bool DeleteItem(InventoryItemBase item) | 256 | public bool DeleteItem(InventoryItemBase item) |
257 | { | 257 | { |
258 | try | 258 | try |
259 | { | 259 | { |
260 | return SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( | 260 | return SynchronousRestObjectPoster.BeginPostObject<InventoryItemBase, bool>( |
261 | "POST", _inventoryServerUrl + "/DeleteItem/", item); | 261 | "POST", _inventoryServerUrl + "/DeleteItem/", item); |
262 | } | 262 | } |
263 | catch (WebException e) | 263 | catch (WebException e) |
264 | { | 264 | { |
265 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", | 265 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", |
266 | e.Source, e.Message); | 266 | e.Source, e.Message); |
267 | } | 267 | } |
268 | 268 | ||
269 | return false; | 269 | return false; |
270 | } | 270 | } |
271 | 271 | ||
@@ -283,12 +283,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
283 | { | 283 | { |
284 | return false; | 284 | return false; |
285 | } | 285 | } |
286 | 286 | ||
287 | // See IInventoryServices | 287 | // See IInventoryServices |
288 | public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) | 288 | public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) |
289 | { | 289 | { |
290 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: The GetInventorySkeleton() method here should never be called!"); | 290 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: The GetInventorySkeleton() method here should never be called!"); |
291 | 291 | ||
292 | return new List<InventoryFolderBase>(); | 292 | return new List<InventoryFolderBase>(); |
293 | } | 293 | } |
294 | 294 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index e3ee2c1..63fad4a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -117,8 +117,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
117 | { | 117 | { |
118 | List<FriendListItem> buddylist = new List<FriendListItem>(); | 118 | List<FriendListItem> buddylist = new List<FriendListItem>(); |
119 | int buddycount = Convert.ToInt32((string)data["avcount"]); | 119 | int buddycount = Convert.ToInt32((string)data["avcount"]); |
120 | 120 | ||
121 | 121 | ||
122 | for (int i = 0; i < buddycount; i++) | 122 | for (int i = 0; i < buddycount; i++) |
123 | { | 123 | { |
124 | FriendListItem buddylistitem = new FriendListItem(); | 124 | FriendListItem buddylistitem = new FriendListItem(); |
@@ -130,8 +130,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
130 | 130 | ||
131 | buddylist.Add(buddylistitem); | 131 | buddylist.Add(buddylistitem); |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
135 | return buddylist; | 135 | return buddylist; |
136 | } | 136 | } |
137 | 137 | ||
@@ -201,7 +201,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
201 | /// Get a user profile from the user server | 201 | /// Get a user profile from the user server |
202 | /// </summary> | 202 | /// </summary> |
203 | /// <param name="avatarID"></param> | 203 | /// <param name="avatarID"></param> |
204 | /// <returns>null if the request fails</returns> | 204 | /// <returns>null if the request fails</returns> |
205 | public UserProfileData GetUserProfile(string name) | 205 | public UserProfileData GetUserProfile(string name) |
206 | { | 206 | { |
207 | try | 207 | try |
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
222 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by name from remote user server: {0}", | 222 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by name from remote user server: {0}", |
223 | e); | 223 | e); |
224 | } | 224 | } |
225 | 225 | ||
226 | return null; | 226 | return null; |
227 | } | 227 | } |
228 | 228 | ||
@@ -251,7 +251,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
251 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by uuid from remote user server: {0}", | 251 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by uuid from remote user server: {0}", |
252 | e); | 252 | e); |
253 | } | 253 | } |
254 | 254 | ||
255 | return null; | 255 | return null; |
256 | } | 256 | } |
257 | 257 | ||
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
264 | /// Retrieve the user information for the given master uuid. | 264 | /// Retrieve the user information for the given master uuid. |
265 | /// </summary> | 265 | /// </summary> |
266 | /// <param name="uuid"></param> | 266 | /// <param name="uuid"></param> |
267 | /// <returns></returns> | 267 | /// <returns></returns> |
268 | public UserProfileData SetupMasterUser(string firstName, string lastName) | 268 | public UserProfileData SetupMasterUser(string firstName, string lastName) |
269 | { | 269 | { |
270 | return SetupMasterUser(firstName, lastName, String.Empty); | 270 | return SetupMasterUser(firstName, lastName, String.Empty); |
@@ -274,7 +274,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
274 | /// Retrieve the user information for the given master uuid. | 274 | /// Retrieve the user information for the given master uuid. |
275 | /// </summary> | 275 | /// </summary> |
276 | /// <param name="uuid"></param> | 276 | /// <param name="uuid"></param> |
277 | /// <returns></returns> | 277 | /// <returns></returns> |
278 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) | 278 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) |
279 | { | 279 | { |
280 | UserProfileData profile = GetUserProfile(firstName, lastName); | 280 | UserProfileData profile = GetUserProfile(firstName, lastName); |
@@ -289,13 +289,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
289 | public UserProfileData SetupMasterUser(LLUUID uuid) | 289 | public UserProfileData SetupMasterUser(LLUUID uuid) |
290 | { | 290 | { |
291 | UserProfileData data = GetUserProfile(uuid); | 291 | UserProfileData data = GetUserProfile(uuid); |
292 | 292 | ||
293 | if (data == null) | 293 | if (data == null) |
294 | { | 294 | { |
295 | throw new Exception( | 295 | throw new Exception( |
296 | "Could not retrieve profile for master user " + uuid + ". User server did not respond to the request."); | 296 | "Could not retrieve profile for master user " + uuid + ". User server did not respond to the request."); |
297 | } | 297 | } |
298 | 298 | ||
299 | return data; | 299 | return data; |
300 | } | 300 | } |
301 | 301 | ||
@@ -405,9 +405,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
405 | { | 405 | { |
406 | m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " + | 406 | m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " + |
407 | e.Message); | 407 | e.Message); |
408 | 408 | ||
409 | } | 409 | } |
410 | 410 | ||
411 | } | 411 | } |
412 | 412 | ||
413 | /// <summary> | 413 | /// <summary> |
@@ -422,7 +422,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
422 | Hashtable param = new Hashtable(); | 422 | Hashtable param = new Hashtable(); |
423 | param["ownerID"] = friendlistowner.UUID.ToString(); | 423 | param["ownerID"] = friendlistowner.UUID.ToString(); |
424 | param["friendID"] = friend.UUID.ToString(); | 424 | param["friendID"] = friend.UUID.ToString(); |
425 | 425 | ||
426 | 426 | ||
427 | IList parameters = new ArrayList(); | 427 | IList parameters = new ArrayList(); |
428 | parameters.Add(param); | 428 | parameters.Add(param); |
@@ -458,7 +458,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
458 | { | 458 | { |
459 | m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " + | 459 | m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " + |
460 | e.Message); | 460 | e.Message); |
461 | 461 | ||
462 | } | 462 | } |
463 | } | 463 | } |
464 | 464 | ||
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
519 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | 519 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) |
520 | { | 520 | { |
521 | List<FriendListItem> buddylist = new List<FriendListItem>(); | 521 | List<FriendListItem> buddylist = new List<FriendListItem>(); |
522 | 522 | ||
523 | try | 523 | try |
524 | { | 524 | { |
525 | Hashtable param = new Hashtable(); | 525 | Hashtable param = new Hashtable(); |
@@ -531,11 +531,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
531 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); | 531 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); |
532 | Hashtable respData = (Hashtable) resp.Value; | 532 | Hashtable respData = (Hashtable) resp.Value; |
533 | 533 | ||
534 | if (respData.Contains("avcount")) | 534 | if (respData.Contains("avcount")) |
535 | { | 535 | { |
536 | buddylist = ConvertXMLRPCDataToFriendListItemList(respData); | 536 | buddylist = ConvertXMLRPCDataToFriendListItemList(respData); |
537 | } | 537 | } |
538 | 538 | ||
539 | } | 539 | } |
540 | catch (WebException e) | 540 | catch (WebException e) |
541 | { | 541 | { |
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
550 | 550 | ||
551 | /// Appearance | 551 | /// Appearance |
552 | /// TODO: stubs for now to get us to a compiling state gently | 552 | /// TODO: stubs for now to get us to a compiling state gently |
553 | public AvatarAppearance GetUserAppearance(LLUUID user) | 553 | public AvatarAppearance GetUserAppearance(LLUUID user) |
554 | { | 554 | { |
555 | return new AvatarAppearance(); | 555 | return new AvatarAppearance(); |
556 | } | 556 | } |
@@ -564,12 +564,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
564 | { | 564 | { |
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | 567 | ||
568 | public void RemoveAttachment(LLUUID user, LLUUID item) | 568 | public void RemoveAttachment(LLUUID user, LLUUID item) |
569 | { | 569 | { |
570 | return; | 570 | return; |
571 | } | 571 | } |
572 | 572 | ||
573 | public List<LLUUID> GetAttachments(LLUUID user) | 573 | public List<LLUUID> GetAttachments(LLUUID user) |
574 | { | 574 | { |
575 | return new List<LLUUID>(); | 575 | return new List<LLUUID>(); |
diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs index 964180a..c15c604 100644 --- a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs index 2b18871..e08934b 100644 --- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System.Collections; | 29 | using System.Collections; |
@@ -65,7 +65,7 @@ namespace OpenSim.Region.DataSnapshot | |||
65 | reply["str_response_string"] = response.OuterXml; | 65 | reply["str_response_string"] = response.OuterXml; |
66 | reply["int_response_code"] = statuscode; | 66 | reply["int_response_code"] = statuscode; |
67 | reply["content_type"] = "text/xml"; | 67 | reply["content_type"] = "text/xml"; |
68 | 68 | ||
69 | return reply; | 69 | return reply; |
70 | } | 70 | } |
71 | } | 71 | } |
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 5831ddc..af3e547 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -70,14 +70,14 @@ namespace OpenSim.Region.DataSnapshot | |||
70 | #region IRegionModule | 70 | #region IRegionModule |
71 | public void Close() | 71 | public void Close() |
72 | { | 72 | { |
73 | 73 | ||
74 | } | 74 | } |
75 | 75 | ||
76 | public void Initialise(Scene scene, IConfigSource config) | 76 | public void Initialise(Scene scene, IConfigSource config) |
77 | { | 77 | { |
78 | if (!m_scenes.Contains(scene)) | 78 | if (!m_scenes.Contains(scene)) |
79 | m_scenes.Add(scene); | 79 | m_scenes.Add(scene); |
80 | 80 | ||
81 | if (!m_configLoaded) | 81 | if (!m_configLoaded) |
82 | { | 82 | { |
83 | m_configLoaded = true; | 83 | m_configLoaded = true; |
@@ -317,7 +317,7 @@ namespace OpenSim.Region.DataSnapshot | |||
317 | 317 | ||
318 | private String GetRegionCategory(Scene scene) | 318 | private String GetRegionCategory(Scene scene) |
319 | { | 319 | { |
320 | 320 | ||
321 | //Boolean choice between: | 321 | //Boolean choice between: |
322 | // "PG" - Mormontown | 322 | // "PG" - Mormontown |
323 | // "Mature" - Sodom and Gomorrah | 323 | // "Mature" - Sodom and Gomorrah |
@@ -396,7 +396,7 @@ namespace OpenSim.Region.DataSnapshot | |||
396 | } | 396 | } |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * Reply to the http request | 399 | * Reply to the http request |
400 | */ | 400 | */ |
401 | public XmlDocument GetSnapshot(string regionName) | 401 | public XmlDocument GetSnapshot(string regionName) |
402 | { | 402 | { |
diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs index 9f19b43..fb9c51a 100644 --- a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs +++ b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System.Xml; | 29 | using System.Xml; |
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index b60232b..183c2a3 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -51,9 +51,9 @@ namespace OpenSim.Region.DataSnapshot | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * David, I don't think we need this at all. When we do the snapshot, we can | 53 | * David, I don't think we need this at all. When we do the snapshot, we can |
54 | * simply look into the parcels that are marked for ShowDirectory -- see | 54 | * simply look into the parcels that are marked for ShowDirectory -- see |
55 | * conditional in RequestSnapshotData | 55 | * conditional in RequestSnapshotData |
56 | * | 56 | * |
57 | //Revise this, look for more direct way of checking for change in land | 57 | //Revise this, look for more direct way of checking for change in land |
58 | #region Client hooks | 58 | #region Client hooks |
59 | 59 | ||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.DataSnapshot | |||
115 | } | 115 | } |
116 | 116 | ||
117 | public XmlNode RequestSnapshotData(XmlDocument nodeFactory) | 117 | public XmlNode RequestSnapshotData(XmlDocument nodeFactory) |
118 | { | 118 | { |
119 | ILandChannel landChannel = (LandChannel)m_scene.LandChannel; | 119 | ILandChannel landChannel = (LandChannel)m_scene.LandChannel; |
120 | Dictionary<int, ILandObject> landList = null; | 120 | Dictionary<int, ILandObject> landList = null; |
121 | try | 121 | try |
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index b2ef6d3..3270c3a 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.DataSnapshot | |||
58 | foreach (EntityBase entity in m_scene.Entities.Values) | 58 | foreach (EntityBase entity in m_scene.Entities.Values) |
59 | { | 59 | { |
60 | // only objects, not avatars | 60 | // only objects, not avatars |
61 | if (entity is SceneObjectGroup) | 61 | if (entity is SceneObjectGroup) |
62 | { | 62 | { |
63 | SceneObjectGroup obj = (SceneObjectGroup)entity; | 63 | SceneObjectGroup obj = (SceneObjectGroup)entity; |
64 | 64 | ||
diff --git a/OpenSim/Region/Environment/InstantMessageReceiver.cs b/OpenSim/Region/Environment/InstantMessageReceiver.cs index b82b4aa..d82bffc 100644 --- a/OpenSim/Region/Environment/InstantMessageReceiver.cs +++ b/OpenSim/Region/Environment/InstantMessageReceiver.cs | |||
@@ -32,11 +32,11 @@ namespace OpenSim.Region.Environment | |||
32 | /// <summary> | 32 | /// <summary> |
33 | /// Bit Vector for Which Modules to send an instant message to from the Scene or an Associated Module | 33 | /// Bit Vector for Which Modules to send an instant message to from the Scene or an Associated Module |
34 | /// </summary> | 34 | /// </summary> |
35 | 35 | ||
36 | // This prevents the Modules from sending Instant messages to other modules through the scene | 36 | // This prevents the Modules from sending Instant messages to other modules through the scene |
37 | // and then receiving the same messages | 37 | // and then receiving the same messages |
38 | 38 | ||
39 | // This is mostly here because on LLSL and the SecondLife Client, IMs,Groups and friends are linked | 39 | // This is mostly here because on LLSL and the SecondLife Client, IMs,Groups and friends are linked |
40 | // inseparably | 40 | // inseparably |
41 | 41 | ||
42 | [Flags] | 42 | [Flags] |
diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs index 86958d1..d03e167 100644 --- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs | |||
@@ -31,7 +31,7 @@ using OpenSim.Region.Environment.Scenes; | |||
31 | 31 | ||
32 | namespace OpenSim.Region.Environment.Interfaces | 32 | namespace OpenSim.Region.Environment.Interfaces |
33 | { | 33 | { |
34 | public interface IAvatarFactory | 34 | public interface IAvatarFactory |
35 | { | 35 | { |
36 | bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); | 36 | bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); |
37 | void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); | 37 | void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); |
diff --git a/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs index f28b46c..eba4a04 100644 --- a/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs +++ b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Region.Environment.Interfaces | 30 | namespace OpenSim.Region.Environment.Interfaces |
31 | { | 31 | { |
32 | public interface IScenePermissions | 32 | public interface IScenePermissions |
33 | { | 33 | { |
34 | } | 34 | } |
diff --git a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs index 1b9e4eb..ece1953 100644 --- a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs +++ b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs | |||
@@ -31,17 +31,17 @@ namespace OpenSim.Region.Environment.Interfaces | |||
31 | /// Interface for an object which can send texture information to a client | 31 | /// Interface for an object which can send texture information to a client |
32 | /// </summary> | 32 | /// </summary> |
33 | public interface ITextureSender | 33 | public interface ITextureSender |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Are we in the process of sending the texture? | 36 | /// Are we in the process of sending the texture? |
37 | /// </summary> | 37 | /// </summary> |
38 | bool Sending { get; set; } | 38 | bool Sending { get; set; } |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
41 | /// Has the texture send been cancelled? | 41 | /// Has the texture send been cancelled? |
42 | /// </summary> | 42 | /// </summary> |
43 | bool Cancel { get; set; } | 43 | bool Cancel { get; set; } |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Update the non data properties of a texture request | 46 | /// Update the non data properties of a texture request |
47 | /// </summary> | 47 | /// </summary> |
@@ -53,6 +53,6 @@ namespace OpenSim.Region.Environment.Interfaces | |||
53 | /// Send a texture packet to the client. | 53 | /// Send a texture packet to the client. |
54 | /// </summary> | 54 | /// </summary> |
55 | /// <returns>True if the last packet has been sent, false otherwise.</returns> | 55 | /// <returns>True if the last packet has been sent, false otherwise.</returns> |
56 | bool SendTexturePacket(); | 56 | bool SendTexturePacket(); |
57 | } | 57 | } |
58 | } | 58 | } |
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs index 48db51b..d3cf41e 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs | |||
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload | |||
216 | public IClientAPI RequestUser; | 216 | public IClientAPI RequestUser; |
217 | public LLUUID TransferRequestID; | 217 | public LLUUID TransferRequestID; |
218 | //public bool AssetInCache; | 218 | //public bool AssetInCache; |
219 | //public int TimeRequested; | 219 | //public int TimeRequested; |
220 | 220 | ||
221 | public AssetRequest() | 221 | public AssetRequest() |
222 | { | 222 | { |
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs index bae23fa..65785af 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class AgentAssetTransactions | 41 | public class AgentAssetTransactions |
42 | { | 42 | { |
43 | //private static readonly log4net.ILog m_log | 43 | //private static readonly log4net.ILog m_log |
44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // Fields | 46 | // Fields |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
192 | } | 192 | } |
193 | 193 | ||
194 | ourClient.SendConfirmXfer(xferID, packetID); | 194 | ourClient.SendConfirmXfer(xferID, packetID); |
195 | 195 | ||
196 | if ((packetID & 0x80000000) != 0) | 196 | if ((packetID & 0x80000000) != 0) |
197 | { | 197 | { |
198 | SendCompleteMessage(); | 198 | SendCompleteMessage(); |
@@ -209,7 +209,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
209 | /// <param name="xferID"></param> | 209 | /// <param name="xferID"></param> |
210 | /// <param name="packetID"></param> | 210 | /// <param name="packetID"></param> |
211 | /// <param name="data"></param> | 211 | /// <param name="data"></param> |
212 | /// <returns>True if the transfer is complete, false otherwise</returns> | 212 | /// <returns>True if the transfer is complete, false otherwise</returns> |
213 | public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, | 213 | public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, |
214 | bool storeLocal, bool tempFile) | 214 | bool storeLocal, bool tempFile) |
215 | { | 215 | { |
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
363 | 363 | ||
364 | private void DoCreateItem() | 364 | private void DoCreateItem() |
365 | { | 365 | { |
366 | //really need to fix this call, if lbsa71 saw this he would die. | 366 | //really need to fix this call, if lbsa71 saw this he would die. |
367 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); | 367 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); |
368 | CachedUserInfo userInfo = | 368 | CachedUserInfo userInfo = |
369 | m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails(ourClient.AgentId); | 369 | m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails(ourClient.AgentId); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs index fcd0e0c..fd407d9 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
199 | 199 | ||
200 | /// <summary> | 200 | /// <summary> |
201 | /// Create an inventory item from data that has been received through a transaction. | 201 | /// Create an inventory item from data that has been received through a transaction. |
202 | /// | 202 | /// |
203 | /// This is called when new clothing or body parts are created. It may also be called in other | 203 | /// This is called when new clothing or body parts are created. It may also be called in other |
204 | /// situations. | 204 | /// situations. |
205 | /// </summary> | 205 | /// </summary> |
@@ -229,8 +229,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
229 | 229 | ||
230 | /// <summary> | 230 | /// <summary> |
231 | /// Update an inventory item with data that has been received through a transaction. | 231 | /// Update an inventory item with data that has been received through a transaction. |
232 | /// | 232 | /// |
233 | /// This is called when clothing or body parts are updated (for instance, with new textures or | 233 | /// This is called when clothing or body parts are updated (for instance, with new textures or |
234 | /// colours). It may also be called in other situations. | 234 | /// colours). It may also be called in other situations. |
235 | /// </summary> | 235 | /// </summary> |
236 | /// <param name="remoteClient"></param> | 236 | /// <param name="remoteClient"></param> |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index 474ac75..8f81f3d 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
38 | { | 38 | { |
39 | public class TextureDownloadModule : IRegionModule | 39 | public class TextureDownloadModule : IRegionModule |
40 | { | 40 | { |
41 | //private static readonly log4net.ILog m_log | 41 | //private static readonly log4net.ILog m_log |
42 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 42 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
212 | private void TextureSent(ITextureSender sender) | 212 | private void TextureSent(ITextureSender sender) |
213 | { | 213 | { |
214 | sender.Sending = false; | 214 | sender.Sending = false; |
215 | //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); | 215 | //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); |
216 | m_scene.AddPendingDownloads(-1); | 216 | m_scene.AddPendingDownloads(-1); |
217 | } | 217 | } |
218 | } | 218 | } |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs index 70e44d4..7c187c0 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
37 | /// </summary> | 37 | /// </summary> |
38 | public class TextureNotFoundSender : ITextureSender | 38 | public class TextureNotFoundSender : ITextureSender |
39 | { | 39 | { |
40 | //private static readonly log4net.ILog m_log | 40 | //private static readonly log4net.ILog m_log |
41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private bool m_cancel = false; | 43 | private bool m_cancel = false; |
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
80 | public bool SendTexturePacket() | 80 | public bool SendTexturePacket() |
81 | { | 81 | { |
82 | //m_log.InfoFormat( | 82 | //m_log.InfoFormat( |
83 | // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", | 83 | // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", |
84 | // m_textureId); | 84 | // m_textureId); |
85 | 85 | ||
86 | ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); | 86 | ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs index d4fa39f..42624ad 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
39 | { | 39 | { |
40 | /// <summary> | 40 | /// <summary> |
41 | /// This module sets up texture senders in response to client texture requests, and places them on a | 41 | /// This module sets up texture senders in response to client texture requests, and places them on a |
42 | /// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the | 42 | /// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the |
43 | /// asset cache). | 43 | /// asset cache). |
44 | /// </summary> | 44 | /// </summary> |
45 | public class UserTextureDownloadService | 45 | public class UserTextureDownloadService |
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// We will allow the client to request the same texture n times before dropping further requests | 51 | /// We will allow the client to request the same texture n times before dropping further requests |
52 | /// | 52 | /// |
53 | /// This number includes repeated requests for the same texture at different resolutions (which we don't | 53 | /// This number includes repeated requests for the same texture at different resolutions (which we don't |
54 | /// currently handle properly as far as I know). However, this situation should be handled in a more | 54 | /// currently handle properly as far as I know). However, this situation should be handled in a more |
55 | /// sophisticated way. | 55 | /// sophisticated way. |
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
80 | /// We're going to limit requests for the same missing texture. | 80 | /// We're going to limit requests for the same missing texture. |
81 | /// XXX This is really a temporary solution to deal with the situation where a client continually requests | 81 | /// XXX This is really a temporary solution to deal with the situation where a client continually requests |
82 | /// the same missing textures | 82 | /// the same missing textures |
83 | /// </summary> | 83 | /// </summary> |
84 | private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy | 84 | private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy |
85 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); | 85 | = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); |
86 | 86 | ||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
93 | } | 93 | } |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// Handle a texture request. This involves creating a texture sender and placing it on the | 96 | /// Handle a texture request. This involves creating a texture sender and placing it on the |
97 | /// previously passed in shared queue. | 97 | /// previously passed in shared queue. |
98 | /// </summary> | 98 | /// </summary> |
99 | /// <param name="e"></param> | 99 | /// <param name="e"></param> |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
108 | { | 108 | { |
109 | if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender)) | 109 | if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender)) |
110 | { | 110 | { |
111 | // If we've received new non UUID information for this request and it hasn't dispatched | 111 | // If we've received new non UUID information for this request and it hasn't dispatched |
112 | // yet, then update the request accordingly. | 112 | // yet, then update the request accordingly. |
113 | textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); | 113 | textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); |
114 | } | 114 | } |
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
117 | if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) | 117 | if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) |
118 | { | 118 | { |
119 | // m_log.DebugFormat( | 119 | // m_log.DebugFormat( |
120 | // "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", | 120 | // "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", |
121 | // e.RequestedAssetID, m_client.AgentId); | 121 | // e.RequestedAssetID, m_client.AgentId); |
122 | 122 | ||
123 | return; | 123 | return; |
@@ -128,9 +128,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
128 | { | 128 | { |
129 | if (StatsManager.SimExtraStats != null) | 129 | if (StatsManager.SimExtraStats != null) |
130 | StatsManager.SimExtraStats.AddBlockedMissingTextureRequest(); | 130 | StatsManager.SimExtraStats.AddBlockedMissingTextureRequest(); |
131 | 131 | ||
132 | // Commenting out this message for now as it causes too much noise with other | 132 | // Commenting out this message for now as it causes too much noise with other |
133 | // debug messages. | 133 | // debug messages. |
134 | // m_log.DebugFormat( | 134 | // m_log.DebugFormat( |
135 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", | 135 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", |
136 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); | 136 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs index ea84436..be73156 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | |||
@@ -35,7 +35,7 @@ using OpenSim.Region.Environment.Interfaces; | |||
35 | namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | 35 | namespace OpenSim.Region.Environment.Modules.Agent.TextureSender |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// A TextureSender handles the process of receiving a texture requested by the client from the | 38 | /// A TextureSender handles the process of receiving a texture requested by the client from the |
39 | /// AssetCache, and then sending that texture back to the client. | 39 | /// AssetCache, and then sending that texture back to the client. |
40 | /// </summary> | 40 | /// </summary> |
41 | public class TextureSender : ITextureSender | 41 | public class TextureSender : ITextureSender |
@@ -150,14 +150,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
150 | { | 150 | { |
151 | if (NumPackets == 0) | 151 | if (NumPackets == 0) |
152 | { | 152 | { |
153 | 153 | ||
154 | RequestUser.SendImagePart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); | 154 | RequestUser.SendImagePart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); |
155 | 155 | ||
156 | PacketCounter++; | 156 | PacketCounter++; |
157 | } | 157 | } |
158 | else | 158 | else |
159 | { | 159 | { |
160 | 160 | ||
161 | byte[] ImageData1 = new byte[600]; | 161 | byte[] ImageData1 = new byte[600]; |
162 | Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); | 162 | Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); |
163 | 163 | ||
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
167 | } | 167 | } |
168 | else | 168 | else |
169 | { | 169 | { |
170 | // Doesn't like to be refactored... | 170 | // Doesn't like to be refactored... |
171 | ImagePacketPacket im = new ImagePacketPacket(); | 171 | ImagePacketPacket im = new ImagePacketPacket(); |
172 | im.Header.Reliable = false; | 172 | im.Header.Reliable = false; |
173 | im.ImageID.Packet = (ushort)(PacketCounter); | 173 | im.ImageID.Packet = (ushort)(PacketCounter); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index 1b50bbd..16874d7 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /// <summary> | 100 | /// <summary> |
101 | /// | 101 | /// |
102 | /// </summary> | 102 | /// </summary> |
103 | /// <param name="remoteClient"></param> | 103 | /// <param name="remoteClient"></param> |
104 | /// <param name="xferID"></param> | 104 | /// <param name="xferID"></param> |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index 9e5f376..a72010c 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | |||
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
235 | { | 235 | { |
236 | TrySendChatMessage(presence, fromPos, regionPos, | 236 | TrySendChatMessage(presence, fromPos, regionPos, |
237 | fromAgentID, fromName, e.Type, message, ChatSourceType.Agent); | 237 | fromAgentID, fromName, e.Type, message, ChatSourceType.Agent); |
238 | 238 | ||
239 | } | 239 | } |
240 | }); | 240 | }); |
241 | } | 241 | } |
@@ -572,7 +572,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
572 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 572 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
573 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 573 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
574 | MatchCollection matches = RE.Matches(input); | 574 | MatchCollection matches = RE.Matches(input); |
575 | // Get some direct matches $1 $4 is a | 575 | // Get some direct matches $1 $4 is a |
576 | if ((matches.Count == 1) && (matches[0].Groups.Count == 5)) | 576 | if ((matches.Count == 1) && (matches[0].Groups.Count == 5)) |
577 | { | 577 | { |
578 | result = new Dictionary<string, string>(); | 578 | result = new Dictionary<string, string>(); |
@@ -703,7 +703,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
703 | 703 | ||
704 | public void ProcessIRCCommand(string command) | 704 | public void ProcessIRCCommand(string command) |
705 | { | 705 | { |
706 | //m_log.Info("[IRC]: ProcessIRCCommand:" + command); | 706 | //m_log.Info("[IRC]: ProcessIRCCommand:" + command); |
707 | 707 | ||
708 | string[] commArgs = new string[command.Split(' ').Length]; | 708 | string[] commArgs = new string[command.Split(' ').Length]; |
709 | string c_server = m_server; | 709 | string c_server = m_server; |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index c63fc93..fab546b 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | |||
@@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
46 | /// Demo Economy/Money Module. This is not a production quality money/economy module! | 46 | /// Demo Economy/Money Module. This is not a production quality money/economy module! |
47 | /// This is a demo for you to use when making one that works for you. | 47 | /// This is a demo for you to use when making one that works for you. |
48 | /// // To use the following you need to add: | 48 | /// // To use the following you need to add: |
49 | /// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER> | 49 | /// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER> |
50 | /// to the command line parameters you use to start up your client | 50 | /// to the command line parameters you use to start up your client |
51 | /// This commonly looks like -helperuri http://127.0.0.1:9000/ | 51 | /// This commonly looks like -helperuri http://127.0.0.1:9000/ |
52 | /// | 52 | /// |
53 | /// Centralized grid structure example using OpenSimWi Redux revision 9+ | 53 | /// Centralized grid structure example using OpenSimWi Redux revision 9+ |
54 | /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux | 54 | /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux |
55 | /// </summary> | 55 | /// </summary> |
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
147 | XMLRPCHandler = scene; | 147 | XMLRPCHandler = scene; |
148 | 148 | ||
149 | // To use the following you need to add: | 149 | // To use the following you need to add: |
150 | // -helperuri <ADDRESS TO HERE OR grid MONEY SERVER> | 150 | // -helperuri <ADDRESS TO HERE OR grid MONEY SERVER> |
151 | // to the command line parameters you use to start up your client | 151 | // to the command line parameters you use to start up your client |
152 | // This commonly looks like -helperuri http://127.0.0.1:9000/ | 152 | // This commonly looks like -helperuri http://127.0.0.1:9000/ |
153 | 153 | ||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
276 | private void OnNewClient(IClientAPI client) | 276 | private void OnNewClient(IClientAPI client) |
277 | { | 277 | { |
278 | // Here we check if we're in grid mode | 278 | // Here we check if we're in grid mode |
279 | // I imagine that the 'check balance' | 279 | // I imagine that the 'check balance' |
280 | // function for the client should be here or shortly after | 280 | // function for the client should be here or shortly after |
281 | 281 | ||
282 | if (gridmode) | 282 | if (gridmode) |
@@ -367,7 +367,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
367 | { | 367 | { |
368 | lock (m_KnownClientFunds) | 368 | lock (m_KnownClientFunds) |
369 | { | 369 | { |
370 | // If we don't know about the sender, then the sender can't | 370 | // If we don't know about the sender, then the sender can't |
371 | // actually be here and therefore this is likely fraud or outdated. | 371 | // actually be here and therefore this is likely fraud or outdated. |
372 | if (m_MoneyAddress.Length == 0) | 372 | if (m_MoneyAddress.Length == 0) |
373 | { | 373 | { |
@@ -1394,7 +1394,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1394 | 1394 | ||
1395 | 1395 | ||
1396 | m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; | 1396 | m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; |
1397 | 1397 | ||
1398 | 1398 | ||
1399 | //m_log.Info("[MONEY]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + "."); | 1399 | //m_log.Info("[MONEY]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + "."); |
1400 | // Claim User! my user! Mine mine mine! | 1400 | // Claim User! my user! Mine mine mine! |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 8c96392..c82f88d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | |||
@@ -97,9 +97,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
97 | private void OnNewClient(IClientAPI client) | 97 | private void OnNewClient(IClientAPI client) |
98 | { | 98 | { |
99 | // All friends establishment protocol goes over instant message | 99 | // All friends establishment protocol goes over instant message |
100 | // There's no way to send a message from the sim | 100 | // There's no way to send a message from the sim |
101 | // to a user to 'add a friend' without causing dialog box spam | 101 | // to a user to 'add a friend' without causing dialog box spam |
102 | // | 102 | // |
103 | // The base set of friends are added when the user signs on in their XMLRPC response | 103 | // The base set of friends are added when the user signs on in their XMLRPC response |
104 | // Generated by LoginService. The friends are retreived from the database by the UserManager | 104 | // Generated by LoginService. The friends are retreived from the database by the UserManager |
105 | 105 | ||
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
167 | LLUUID[] Agents = new LLUUID[1]; | 167 | LLUUID[] Agents = new LLUUID[1]; |
168 | Agents[0] = client.AgentId; | 168 | Agents[0] = client.AgentId; |
169 | av.ControllingClient.SendAgentOnline(Agents); | 169 | av.ControllingClient.SendAgentOnline(Agents); |
170 | 170 | ||
171 | } | 171 | } |
172 | } | 172 | } |
173 | } | 173 | } |
@@ -223,14 +223,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
223 | } | 223 | } |
224 | catch (IndexOutOfRangeException) | 224 | catch (IndexOutOfRangeException) |
225 | { | 225 | { |
226 | // Ignore the index out of range exception. | 226 | // Ignore the index out of range exception. |
227 | // This causes friend lists to get out of sync slightly.. however | 227 | // This causes friend lists to get out of sync slightly.. however |
228 | // prevents a sim crash. | 228 | // prevents a sim crash. |
229 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); | 229 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); |
230 | } | 230 | } |
231 | catch (ArgumentOutOfRangeException) | 231 | catch (ArgumentOutOfRangeException) |
232 | { | 232 | { |
233 | // Ignore the index out of range exception. | 233 | // Ignore the index out of range exception. |
234 | // This causes friend lists to get out of sync slightly.. however | 234 | // This causes friend lists to get out of sync slightly.. however |
235 | // prevents a sim crash. | 235 | // prevents a sim crash. |
236 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); | 236 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); |
@@ -248,14 +248,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
248 | 248 | ||
249 | catch (IndexOutOfRangeException) | 249 | catch (IndexOutOfRangeException) |
250 | { | 250 | { |
251 | // Ignore the index out of range exception. | 251 | // Ignore the index out of range exception. |
252 | // This causes friend lists to get out of sync slightly.. however | 252 | // This causes friend lists to get out of sync slightly.. however |
253 | // prevents a sim crash. | 253 | // prevents a sim crash. |
254 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); | 254 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); |
255 | } | 255 | } |
256 | catch (ArgumentOutOfRangeException) | 256 | catch (ArgumentOutOfRangeException) |
257 | { | 257 | { |
258 | // Ignore the index out of range exception. | 258 | // Ignore the index out of range exception. |
259 | // This causes friend lists to get out of sync slightly.. however | 259 | // This causes friend lists to get out of sync slightly.. however |
260 | // prevents a sim crash. | 260 | // prevents a sim crash. |
261 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); | 261 | m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); |
@@ -411,10 +411,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
411 | { | 411 | { |
412 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 412 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
413 | { | 413 | { |
414 | // Found Pending Friend Request with that Transaction.. | 414 | // Found Pending Friend Request with that Transaction.. |
415 | Scene SceneAgentIn = m_scene[0]; | 415 | Scene SceneAgentIn = m_scene[0]; |
416 | 416 | ||
417 | // Found Pending Friend Request with that Transaction.. | 417 | // Found Pending Friend Request with that Transaction.. |
418 | ScenePresence agentpresence = GetPresenceFromAgentID(agentID); | 418 | ScenePresence agentpresence = GetPresenceFromAgentID(agentID); |
419 | if (agentpresence != null) | 419 | if (agentpresence != null) |
420 | { | 420 | { |
@@ -453,7 +453,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
453 | { | 453 | { |
454 | Scene SceneAgentIn = m_scene[0]; | 454 | Scene SceneAgentIn = m_scene[0]; |
455 | 455 | ||
456 | // Found Pending Friend Request with that Transaction.. | 456 | // Found Pending Friend Request with that Transaction.. |
457 | ScenePresence agentpresence = GetPresenceFromAgentID(agentID); | 457 | ScenePresence agentpresence = GetPresenceFromAgentID(agentID); |
458 | if (agentpresence != null) | 458 | if (agentpresence != null) |
459 | { | 459 | { |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs index 624f307..e1cc688 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
107 | 107 | ||
108 | // First byte of the array is probably the item type | 108 | // First byte of the array is probably the item type |
109 | // Next 16 bytes are the UUID | 109 | // Next 16 bytes are the UUID |
110 | //Array.Copy(binaryBucket, 1, rawId, 0, 16); | 110 | //Array.Copy(binaryBucket, 1, rawId, 0, 16); |
111 | 111 | ||
112 | //LLUUID itemId = new LLUUID(new Guid(rawId)); | 112 | //LLUUID itemId = new LLUUID(new Guid(rawId)); |
113 | LLUUID itemId = new LLUUID(binaryBucket, 1); | 113 | LLUUID itemId = new LLUUID(binaryBucket, 1); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs index 15825b6..2e2be7a 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles | |||
86 | } | 86 | } |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// | 89 | /// |
90 | /// </summary> | 90 | /// </summary> |
91 | /// <param name="remoteClient"></param> | 91 | /// <param name="remoteClient"></param> |
92 | /// <param name="avatarID"></param> | 92 | /// <param name="avatarID"></param> |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs index 2112f91..f8651a3 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice | |||
226 | public string ProvisionVoiceAccountRequest(string request, string path, string param, | 226 | public string ProvisionVoiceAccountRequest(string request, string path, string param, |
227 | LLUUID agentID, Caps caps) | 227 | LLUUID agentID, Caps caps) |
228 | { | 228 | { |
229 | // we need to | 229 | // we need to |
230 | // - get user data from UserProfileCacheService | 230 | // - get user data from UserProfileCacheService |
231 | // - generate nonce for user voice account password | 231 | // - generate nonce for user voice account password |
232 | // - issue XmlRpc request to asterisk opensim front end: | 232 | // - issue XmlRpc request to asterisk opensim front end: |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs index e1339a3..87ecfee 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -40,25 +40,25 @@ using OpenSim.Region.Environment.Scenes; | |||
40 | /***************************************************** | 40 | /***************************************************** |
41 | * | 41 | * |
42 | * ScriptsHttpRequests | 42 | * ScriptsHttpRequests |
43 | * | 43 | * |
44 | * Implements the llHttpRequest and http_response | 44 | * Implements the llHttpRequest and http_response |
45 | * callback. | 45 | * callback. |
46 | * | 46 | * |
47 | * Some stuff was already in LSLLongCmdHandler, and then | 47 | * Some stuff was already in LSLLongCmdHandler, and then |
48 | * there was this file with a stub class in it. So, | 48 | * there was this file with a stub class in it. So, |
49 | * I am moving some of the objects and functions out of | 49 | * I am moving some of the objects and functions out of |
50 | * LSLLongCmdHandler, such as the HttpRequestClass, the | 50 | * LSLLongCmdHandler, such as the HttpRequestClass, the |
51 | * start and stop methods, and setting up pending and | 51 | * start and stop methods, and setting up pending and |
52 | * completed queues. These are processed in the | 52 | * completed queues. These are processed in the |
53 | * LSLLongCmdHandler polling loop. Similiar to the | 53 | * LSLLongCmdHandler polling loop. Similiar to the |
54 | * XMLRPCModule, since that seems to work. | 54 | * XMLRPCModule, since that seems to work. |
55 | * | 55 | * |
56 | * //TODO | 56 | * //TODO |
57 | * | 57 | * |
58 | * This probably needs some throttling mechanism but | 58 | * This probably needs some throttling mechanism but |
59 | * its wide open right now. This applies to both | 59 | * its wide open right now. This applies to both |
60 | * number of requests and data volume. | 60 | * number of requests and data volume. |
61 | * | 61 | * |
62 | * Linden puts all kinds of header fields in the requests. | 62 | * Linden puts all kinds of header fields in the requests. |
63 | * Not doing any of that: | 63 | * Not doing any of that: |
64 | * User-Agent | 64 | * User-Agent |
@@ -71,13 +71,13 @@ using OpenSim.Region.Environment.Scenes; | |||
71 | * X-SecondLife-Local-Rotation | 71 | * X-SecondLife-Local-Rotation |
72 | * X-SecondLife-Owner-Name | 72 | * X-SecondLife-Owner-Name |
73 | * X-SecondLife-Owner-Key | 73 | * X-SecondLife-Owner-Key |
74 | * | 74 | * |
75 | * HTTPS support | 75 | * HTTPS support |
76 | * | 76 | * |
77 | * Configurable timeout? | 77 | * Configurable timeout? |
78 | * Configurable max repsonse size? | 78 | * Configurable max repsonse size? |
79 | * Configurable | 79 | * Configurable |
80 | * | 80 | * |
81 | * **************************************************/ | 81 | * **************************************************/ |
82 | 82 | ||
83 | namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | 83 | namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs index 626c60f..bbd4fa3 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender | |||
226 | foreach (string line in lines) | 226 | foreach (string line in lines) |
227 | { | 227 | { |
228 | string nextLine = line.Trim(); | 228 | string nextLine = line.Trim(); |
229 | //replace with switch, or even better, do some proper parsing | 229 | //replace with switch, or even better, do some proper parsing |
230 | if (nextLine.StartsWith("MoveTo")) | 230 | if (nextLine.StartsWith("MoveTo")) |
231 | { | 231 | { |
232 | float x = 0; | 232 | float x = 0; |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs index 7a15708..4ed0fb5 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -37,25 +37,25 @@ using OpenSim.Region.Environment.Scenes; | |||
37 | /***************************************************** | 37 | /***************************************************** |
38 | * | 38 | * |
39 | * WorldCommModule | 39 | * WorldCommModule |
40 | * | 40 | * |
41 | * | 41 | * |
42 | * Holding place for world comms - basically llListen | 42 | * Holding place for world comms - basically llListen |
43 | * function implementation. | 43 | * function implementation. |
44 | * | 44 | * |
45 | * lLListen(integer channel, string name, key id, string msg) | 45 | * lLListen(integer channel, string name, key id, string msg) |
46 | * The name, id, and msg arguments specify the filtering | 46 | * The name, id, and msg arguments specify the filtering |
47 | * criteria. You can pass the empty string | 47 | * criteria. You can pass the empty string |
48 | * (or NULL_KEY for id) for these to set a completely | 48 | * (or NULL_KEY for id) for these to set a completely |
49 | * open filter; this causes the listen() event handler to be | 49 | * open filter; this causes the listen() event handler to be |
50 | * invoked for all chat on the channel. To listen only | 50 | * invoked for all chat on the channel. To listen only |
51 | * for chat spoken by a specific object or avatar, | 51 | * for chat spoken by a specific object or avatar, |
52 | * specify the name and/or id arguments. To listen | 52 | * specify the name and/or id arguments. To listen |
53 | * only for a specific command, specify the | 53 | * only for a specific command, specify the |
54 | * (case-sensitive) msg argument. If msg is not empty, | 54 | * (case-sensitive) msg argument. If msg is not empty, |
55 | * listener will only hear strings which are exactly equal | 55 | * listener will only hear strings which are exactly equal |
56 | * to msg. You can also use all the arguments to establish | 56 | * to msg. You can also use all the arguments to establish |
57 | * the most restrictive filtering criteria. | 57 | * the most restrictive filtering criteria. |
58 | * | 58 | * |
59 | * It might be useful for each listener to maintain a message | 59 | * It might be useful for each listener to maintain a message |
60 | * digest, with a list of recent messages by UUID. This can | 60 | * digest, with a list of recent messages by UUID. This can |
61 | * be used to prevent in-world repeater loops. However, the | 61 | * be used to prevent in-world repeater loops. However, the |
@@ -76,7 +76,7 @@ using OpenSim.Region.Environment.Scenes; | |||
76 | * Might be actually easier to map the global handle into | 76 | * Might be actually easier to map the global handle into |
77 | * script-local handle in the ScriptEngine. Not sure if its | 77 | * script-local handle in the ScriptEngine. Not sure if its |
78 | * worth the effort tho. | 78 | * worth the effort tho. |
79 | * | 79 | * |
80 | * **************************************************/ | 80 | * **************************************************/ |
81 | 81 | ||
82 | namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | 82 | namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm |
@@ -317,9 +317,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /******************************************************************** | 319 | /******************************************************************** |
320 | * | 320 | * |
321 | * Listener Stuff | 321 | * Listener Stuff |
322 | * | 322 | * |
323 | * *****************************************************************/ | 323 | * *****************************************************************/ |
324 | 324 | ||
325 | private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) | 325 | private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs index a039d42..9d4e0fa 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs | |||
@@ -43,12 +43,12 @@ using OpenSim.Region.Environment.Scenes; | |||
43 | /***************************************************** | 43 | /***************************************************** |
44 | * | 44 | * |
45 | * XMLRPCModule | 45 | * XMLRPCModule |
46 | * | 46 | * |
47 | * Module for accepting incoming communications from | 47 | * Module for accepting incoming communications from |
48 | * external XMLRPC client and calling a remote data | 48 | * external XMLRPC client and calling a remote data |
49 | * procedure for a registered data channel/prim. | 49 | * procedure for a registered data channel/prim. |
50 | * | 50 | * |
51 | * | 51 | * |
52 | * 1. On module load, open a listener port | 52 | * 1. On module load, open a listener port |
53 | * 2. Attach an XMLRPC handler | 53 | * 2. Attach an XMLRPC handler |
54 | * 3. When a request is received: | 54 | * 3. When a request is received: |
@@ -59,18 +59,18 @@ using OpenSim.Region.Environment.Scenes; | |||
59 | * 3.5 Return response to client caller | 59 | * 3.5 Return response to client caller |
60 | * 3.6 If no response from llRemoteDataReply within | 60 | * 3.6 If no response from llRemoteDataReply within |
61 | * RemoteReplyScriptTimeout, generate script timeout fault | 61 | * RemoteReplyScriptTimeout, generate script timeout fault |
62 | * | 62 | * |
63 | * Prims in script must: | 63 | * Prims in script must: |
64 | * 1. Open a remote data channel | 64 | * 1. Open a remote data channel |
65 | * 1.1 Generate a channel ID | 65 | * 1.1 Generate a channel ID |
66 | * 1.2 Register primid,channelid pair with module | 66 | * 1.2 Register primid,channelid pair with module |
67 | * 2. Implement the remote data procedure handler | 67 | * 2. Implement the remote data procedure handler |
68 | * | 68 | * |
69 | * llOpenRemoteDataChannel | 69 | * llOpenRemoteDataChannel |
70 | * llRemoteDataReply | 70 | * llRemoteDataReply |
71 | * remote_data(integer type, key channel, key messageid, string sender, integer ival, string sval) | 71 | * remote_data(integer type, key channel, key messageid, string sender, integer ival, string sval) |
72 | * llCloseRemoteDataChannel | 72 | * llCloseRemoteDataChannel |
73 | * | 73 | * |
74 | * **************************************************/ | 74 | * **************************************************/ |
75 | 75 | ||
76 | namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | 76 | namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC |
@@ -157,16 +157,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
157 | 157 | ||
158 | /********************************************** | 158 | /********************************************** |
159 | * OpenXMLRPCChannel | 159 | * OpenXMLRPCChannel |
160 | * | 160 | * |
161 | * Generate a LLUUID channel key and add it and | 161 | * Generate a LLUUID channel key and add it and |
162 | * the prim id to dictionary <channelUUID, primUUID> | 162 | * the prim id to dictionary <channelUUID, primUUID> |
163 | * | 163 | * |
164 | * First check if there is a channel assigned for | 164 | * First check if there is a channel assigned for |
165 | * this itemID. If there is, then someone called | 165 | * this itemID. If there is, then someone called |
166 | * llOpenRemoteDataChannel twice. Just return the | 166 | * llOpenRemoteDataChannel twice. Just return the |
167 | * original channel. Other option is to delete the | 167 | * original channel. Other option is to delete the |
168 | * current channel and assign a new one. | 168 | * current channel and assign a new one. |
169 | * | 169 | * |
170 | * ********************************************/ | 170 | * ********************************************/ |
171 | 171 | ||
172 | public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) | 172 | public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) |
@@ -224,9 +224,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
224 | 224 | ||
225 | /********************************************** | 225 | /********************************************** |
226 | * Remote Data Reply | 226 | * Remote Data Reply |
227 | * | 227 | * |
228 | * Response to RPC message | 228 | * Response to RPC message |
229 | * | 229 | * |
230 | *********************************************/ | 230 | *********************************************/ |
231 | 231 | ||
232 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) | 232 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) |
@@ -245,9 +245,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
245 | 245 | ||
246 | /********************************************** | 246 | /********************************************** |
247 | * CloseXMLRPCChannel | 247 | * CloseXMLRPCChannel |
248 | * | 248 | * |
249 | * Remove channel from dictionary | 249 | * Remove channel from dictionary |
250 | * | 250 | * |
251 | *********************************************/ | 251 | *********************************************/ |
252 | 252 | ||
253 | public void CloseXMLRPCChannel(LLUUID channelKey) | 253 | public void CloseXMLRPCChannel(LLUUID channelKey) |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index b5d5e6e..82341a9 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
41 | #region Constants | 41 | #region Constants |
42 | 42 | ||
43 | //Land types set with flags in ParcelOverlay. | 43 | //Land types set with flags in ParcelOverlay. |
44 | //Only one of these can be used. | 44 | //Only one of these can be used. |
45 | public const float BAN_LINE_SAFETY_HIEGHT = 100; | 45 | public const float BAN_LINE_SAFETY_HIEGHT = 100; |
46 | public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 | 46 | public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 |
47 | public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 | 47 | public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 |
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
584 | if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) | 584 | if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) |
585 | { | 585 | { |
586 | remote_client.sendLandParcelOverlay(byteArray, sequenceID); | 586 | remote_client.sendLandParcelOverlay(byteArray, sequenceID); |
587 | byteArrayCount = 0; | 587 | byteArrayCount = 0; |
588 | sequenceID++; | 588 | sequenceID++; |
589 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; | 589 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; |
590 | } | 590 | } |
@@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
655 | 655 | ||
656 | public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) | 656 | public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) |
657 | { | 657 | { |
658 | 658 | ||
659 | landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); | 659 | landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); |
660 | } | 660 | } |
661 | 661 | ||
@@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
870 | } | 870 | } |
871 | 871 | ||
872 | public void handleAnyClientMovement(ScenePresence avatar) | 872 | public void handleAnyClientMovement(ScenePresence avatar) |
873 | //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. | 873 | //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. |
874 | { | 874 | { |
875 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 875 | ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
876 | if (over != null) | 876 | if (over != null) |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index b319370..54870d8 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
622 | /// <summary> | 622 | /// <summary> |
623 | /// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes | 623 | /// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes |
624 | /// aggreagete details such as the number of prims. | 624 | /// aggreagete details such as the number of prims. |
625 | /// | 625 | /// |
626 | /// </summary> | 626 | /// </summary> |
627 | /// <param name="remote_client"> | 627 | /// <param name="remote_client"> |
628 | /// A <see cref="IClientAPI"/> | 628 | /// A <see cref="IClientAPI"/> |
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index d31a250..43e8f36 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
47 | 47 | ||
48 | #region Constants | 48 | #region Constants |
49 | // These are here for testing. They will be taken out | 49 | // These are here for testing. They will be taken out |
50 | 50 | ||
51 | //private uint PERM_ALL = (uint)2147483647; | 51 | //private uint PERM_ALL = (uint)2147483647; |
52 | private uint PERM_COPY = (uint)32768; | 52 | private uint PERM_COPY = (uint)32768; |
53 | //private uint PERM_MODIFY = (uint)16384; | 53 | //private uint PERM_MODIFY = (uint)16384; |
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
59 | 59 | ||
60 | #region Bypass Permissions / Debug Permissions Stuff | 60 | #region Bypass Permissions / Debug Permissions Stuff |
61 | 61 | ||
62 | // Bypasses the permissions engine | 62 | // Bypasses the permissions engine |
63 | private bool m_bypassPermissions = false; | 63 | private bool m_bypassPermissions = false; |
64 | private bool m_bypassPermissionsValue = true; | 64 | private bool m_bypassPermissionsValue = true; |
65 | private bool m_debugPermissions = false; | 65 | private bool m_debugPermissions = false; |
@@ -126,18 +126,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
126 | public void Initialise(Scene scene, IConfigSource config) | 126 | public void Initialise(Scene scene, IConfigSource config) |
127 | { | 127 | { |
128 | m_scene = scene; | 128 | m_scene = scene; |
129 | 129 | ||
130 | IConfig myConfig = config.Configs["Startup"]; | 130 | IConfig myConfig = config.Configs["Startup"]; |
131 | |||
132 | string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | ||
133 | 131 | ||
134 | List<string> modules=new List<string>(permissionModules.Split(',')); | 132 | string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); |
133 | |||
134 | List<string> modules=new List<string>(permissionModules.Split(',')); | ||
135 | 135 | ||
136 | if(!modules.Contains("DefaultPermissionsModule")) | 136 | if (!modules.Contains("DefaultPermissionsModule")) |
137 | return; | 137 | return; |
138 | |||
139 | m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); | ||
138 | 140 | ||
139 | m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); | ||
140 | |||
141 | m_scene.RegisterModuleInterface<IScenePermissions>(this); | 141 | m_scene.RegisterModuleInterface<IScenePermissions>(this); |
142 | 142 | ||
143 | //Register functions with Scene External Checks! | 143 | //Register functions with Scene External Checks! |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
212 | get { return false; } | 212 | get { return false; } |
213 | } | 213 | } |
214 | 214 | ||
215 | #endregion | 215 | #endregion |
216 | 216 | ||
217 | #region Helper Functions | 217 | #region Helper Functions |
218 | protected void SendPermissionError(LLUUID user, string reason) | 218 | protected void SendPermissionError(LLUUID user, string reason) |
@@ -252,38 +252,38 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
252 | } | 252 | } |
253 | #endregion | 253 | #endregion |
254 | 254 | ||
255 | public bool PropagatePermissions() | 255 | public bool PropagatePermissions() |
256 | { | 256 | { |
257 | return false; | 257 | return false; |
258 | } | 258 | } |
259 | 259 | ||
260 | public bool BypassPermissions() | 260 | public bool BypassPermissions() |
261 | { | 261 | { |
262 | return m_bypassPermissions; | 262 | return m_bypassPermissions; |
263 | } | 263 | } |
264 | 264 | ||
265 | public void SetBypassPermissions(bool value) | 265 | public void SetBypassPermissions(bool value) |
266 | { | 266 | { |
267 | m_bypassPermissions=value; | 267 | m_bypassPermissions=value; |
268 | } | 268 | } |
269 | 269 | ||
270 | #region Object Permissions | 270 | #region Object Permissions |
271 | 271 | ||
272 | public uint GenerateClientFlags(LLUUID user, LLUUID objID) | 272 | public uint GenerateClientFlags(LLUUID user, LLUUID objID) |
273 | { | 273 | { |
274 | // Here's the way this works, | 274 | // Here's the way this works, |
275 | // ObjectFlags and Permission flags are two different enumerations | 275 | // ObjectFlags and Permission flags are two different enumerations |
276 | // ObjectFlags, however, tells the client to change what it will allow the user to do. | 276 | // ObjectFlags, however, tells the client to change what it will allow the user to do. |
277 | // So, that means that all of the permissions type ObjectFlags are /temporary/ and only | 277 | // So, that means that all of the permissions type ObjectFlags are /temporary/ and only |
278 | // supposed to be set when customizing the objectflags for the client. | 278 | // supposed to be set when customizing the objectflags for the client. |
279 | 279 | ||
280 | // These temporary objectflags get computed and added in this function based on the | 280 | // These temporary objectflags get computed and added in this function based on the |
281 | // Permission mask that's appropriate! | 281 | // Permission mask that's appropriate! |
282 | // Outside of this method, they should never be added to objectflags! | 282 | // Outside of this method, they should never be added to objectflags! |
283 | // -teravus | 283 | // -teravus |
284 | 284 | ||
285 | SceneObjectPart task=m_scene.GetSceneObjectPart(objID); | 285 | SceneObjectPart task=m_scene.GetSceneObjectPart(objID); |
286 | 286 | ||
287 | // this shouldn't ever happen.. return no permissions/objectflags. | 287 | // this shouldn't ever happen.. return no permissions/objectflags. |
288 | if (task == null) | 288 | if (task == null) |
289 | return (uint)0; | 289 | return (uint)0; |
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
292 | LLUUID objectOwner = task.OwnerID; | 292 | LLUUID objectOwner = task.OwnerID; |
293 | 293 | ||
294 | 294 | ||
295 | // Remove any of the objectFlags that are temporary. These will get added back if appropriate | 295 | // Remove any of the objectFlags that are temporary. These will get added back if appropriate |
296 | // in the next bit of code | 296 | // in the next bit of code |
297 | 297 | ||
298 | objflags &= (uint) | 298 | objflags &= (uint) |
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
354 | 354 | ||
355 | private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask) | 355 | private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask) |
356 | { | 356 | { |
357 | // We are adding the temporary objectflags to the object's objectflags based on the | 357 | // We are adding the temporary objectflags to the object's objectflags based on the |
358 | // permission flag given. These change the F flags on the client. | 358 | // permission flag given. These change the F flags on the client. |
359 | 359 | ||
360 | if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) | 360 | if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) |
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
404 | locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); | 404 | locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); |
405 | 405 | ||
406 | // People shouldn't be able to do anything with locked objects, except the Administrator | 406 | // People shouldn't be able to do anything with locked objects, except the Administrator |
407 | // The 'set permissions' runs through a different permission check, so when an object owner | 407 | // The 'set permissions' runs through a different permission check, so when an object owner |
408 | // sets an object locked, the only thing that they can do is unlock it. | 408 | // sets an object locked, the only thing that they can do is unlock it. |
409 | // | 409 | // |
410 | // Nobody but the object owner can set permissions on an object | 410 | // Nobody but the object owner can set permissions on an object |
@@ -458,7 +458,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
458 | bool permission = false; | 458 | bool permission = false; |
459 | string reason = "Only registered users may communicate with another account."; | 459 | string reason = "Only registered users may communicate with another account."; |
460 | 460 | ||
461 | 461 | ||
462 | if (IsAdministrator(user)) | 462 | if (IsAdministrator(user)) |
463 | permission = true; | 463 | permission = true; |
464 | 464 | ||
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
521 | return GenericParcelPermission(user, parcel); | 521 | return GenericParcelPermission(user, parcel); |
522 | } | 522 | } |
523 | #endregion | 523 | #endregion |
524 | 524 | ||
525 | #region Permission Checks | 525 | #region Permission Checks |
526 | private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) | 526 | private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) |
527 | { | 527 | { |
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
607 | { | 607 | { |
608 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 608 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
609 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 609 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
610 | 610 | ||
611 | return GenericCommunicationPermission(user, target); | 611 | return GenericCommunicationPermission(user, target); |
612 | } | 612 | } |
613 | 613 | ||
@@ -632,8 +632,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
632 | return false; | 632 | return false; |
633 | } | 633 | } |
634 | 634 | ||
635 | // The client | 635 | // The client |
636 | // may request to edit linked parts, and therefore, it needs | 636 | // may request to edit linked parts, and therefore, it needs |
637 | // to also check for SceneObjectPart | 637 | // to also check for SceneObjectPart |
638 | 638 | ||
639 | // If it's not an object, we cant edit it. | 639 | // If it's not an object, we cant edit it. |
@@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
647 | 647 | ||
648 | 648 | ||
649 | LLUUID taskOwner = null; | 649 | LLUUID taskOwner = null; |
650 | // Added this because at this point in time it wouldn't be wise for | 650 | // Added this because at this point in time it wouldn't be wise for |
651 | // the administrator object permissions to take effect. | 651 | // the administrator object permissions to take effect. |
652 | LLUUID objectOwner = task.OwnerID; | 652 | LLUUID objectOwner = task.OwnerID; |
653 | 653 | ||
@@ -682,12 +682,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
682 | 682 | ||
683 | 683 | ||
684 | // This is an exception to the generic object permission. | 684 | // This is an exception to the generic object permission. |
685 | // Administrators who lock their objects should not be able to move them, | 685 | // Administrators who lock their objects should not be able to move them, |
686 | // however generic object permission should return true. | 686 | // however generic object permission should return true. |
687 | // This keeps locked objects from being affected by random click + drag actions by accident | 687 | // This keeps locked objects from being affected by random click + drag actions by accident |
688 | // and allows the administrator to grab or delete a locked object. | 688 | // and allows the administrator to grab or delete a locked object. |
689 | 689 | ||
690 | // Administrators and estate managers are still able to click+grab locked objects not | 690 | // Administrators and estate managers are still able to click+grab locked objects not |
691 | // owned by them in the scene | 691 | // owned by them in the scene |
692 | // This is by design. | 692 | // This is by design. |
693 | 693 | ||
@@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
834 | 834 | ||
835 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; | 835 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; |
836 | LLUUID taskOwner = null; | 836 | LLUUID taskOwner = null; |
837 | // Added this because at this point in time it wouldn't be wise for | 837 | // Added this because at this point in time it wouldn't be wise for |
838 | // the administrator object permissions to take effect. | 838 | // the administrator object permissions to take effect. |
839 | LLUUID objectOwner = task.OwnerID; | 839 | LLUUID objectOwner = task.OwnerID; |
840 | 840 | ||
@@ -895,61 +895,61 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
895 | 895 | ||
896 | #endregion | 896 | #endregion |
897 | 897 | ||
898 | public bool CanLinkObject(LLUUID userID, LLUUID objectID) | 898 | public bool CanLinkObject(LLUUID userID, LLUUID objectID) |
899 | { | 899 | { |
900 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 900 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
901 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 901 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
902 | 902 | ||
903 | return true; | 903 | return true; |
904 | } | 904 | } |
905 | 905 | ||
906 | public bool CanDelinkObject(LLUUID userID, LLUUID objectID) | 906 | public bool CanDelinkObject(LLUUID userID, LLUUID objectID) |
907 | { | 907 | { |
908 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 908 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
909 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 909 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
910 | 910 | ||
911 | return true; | 911 | return true; |
912 | } | 912 | } |
913 | 913 | ||
914 | public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) | 914 | public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) |
915 | { | 915 | { |
916 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 916 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
917 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 917 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
918 | 918 | ||
919 | return true; | 919 | return true; |
920 | } | 920 | } |
921 | 921 | ||
922 | public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) | 922 | public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) |
923 | { | 923 | { |
924 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 924 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
925 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 925 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
926 | 926 | ||
927 | return true; | 927 | return true; |
928 | } | 928 | } |
929 | 929 | ||
930 | public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) | 930 | public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) |
931 | { | 931 | { |
932 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 932 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
933 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 933 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
934 | 934 | ||
935 | return true; | 935 | return true; |
936 | } | 936 | } |
937 | 937 | ||
938 | public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) | 938 | public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) |
939 | { | 939 | { |
940 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 940 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
941 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 941 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
942 | 942 | ||
943 | return true; | 943 | return true; |
944 | } | 944 | } |
945 | 945 | ||
946 | public bool CanTeleport(LLUUID userID) | 946 | public bool CanTeleport(LLUUID userID) |
947 | { | 947 | { |
948 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 948 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
949 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 949 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
950 | 950 | ||
951 | return true; | 951 | return true; |
952 | } | 952 | } |
953 | 953 | ||
954 | 954 | ||
955 | } | 955 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index beb74ce..1bdc702 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules | |||
99 | // Current time in elpased seconds since Jan 1st 1970 | 99 | // Current time in elpased seconds since Jan 1st 1970 |
100 | private ulong CurrentTime | 100 | private ulong CurrentTime |
101 | { | 101 | { |
102 | get { | 102 | get { |
103 | return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); | 103 | return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); |
104 | } | 104 | } |
105 | } | 105 | } |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules | |||
118 | 118 | ||
119 | TimeZone local = TimeZone.CurrentTimeZone; | 119 | TimeZone local = TimeZone.CurrentTimeZone; |
120 | TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; | 120 | TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; |
121 | 121 | ||
122 | m_log.Debug("[SUN] localtime offset is " + TicksOffset); | 122 | m_log.Debug("[SUN] localtime offset is " + TicksOffset); |
123 | 123 | ||
124 | // Align ticks with Second Life | 124 | // Align ticks with Second Life |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules | |||
246 | avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); | 246 | avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); |
247 | } | 247 | } |
248 | 248 | ||
249 | // set estate settings for region access to sun position | 249 | // set estate settings for region access to sun position |
250 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; | 250 | m_scene.RegionInfo.EstateSettings.sunPosition = Position; |
251 | } | 251 | } |
252 | 252 | ||
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules | |||
281 | 281 | ||
282 | Position = LLVector3.Rot(Position,Tilt); | 282 | Position = LLVector3.Rot(Position,Tilt); |
283 | 283 | ||
284 | // Finally we shift the axis so that more of the | 284 | // Finally we shift the axis so that more of the |
285 | // circle is above the horizon than below. This | 285 | // circle is above the horizon than below. This |
286 | // makes the nights shorter than the days. | 286 | // makes the nights shorter than the days. |
287 | 287 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs index eb981d9..98d69a5 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs | |||
@@ -31,9 +31,9 @@ using OpenSim.Region.Environment.Interfaces; | |||
31 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | 31 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders |
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// A generic windows bitmap loader. | 34 | /// A generic windows bitmap loader. |
35 | /// Should be capable of handling 24-bit RGB images. | 35 | /// Should be capable of handling 24-bit RGB images. |
36 | /// | 36 | /// |
37 | /// Uses the System.Drawing filesystem loader. | 37 | /// Uses the System.Drawing filesystem loader. |
38 | /// </summary> | 38 | /// </summary> |
39 | internal class BMP : GenericSystemDrawing | 39 | internal class BMP : GenericSystemDrawing |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index 484bb89..bb819e1 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Region.Environment.Interfaces; | |||
33 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | 33 | namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// A virtual class designed to have methods overloaded, | 36 | /// A virtual class designed to have methods overloaded, |
37 | /// this class provides an interface for a generic image | 37 | /// this class provides an interface for a generic image |
38 | /// saving and loading mechanism, but does not specify the | 38 | /// saving and loading mechanism, but does not specify the |
39 | /// format. It should not be insubstantiated directly. | 39 | /// format. It should not be insubstantiated directly. |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
99 | } | 99 | } |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// Protected method, generates a grayscale bitmap | 102 | /// Protected method, generates a grayscale bitmap |
103 | /// image from a specified terrain channel. | 103 | /// image from a specified terrain channel. |
104 | /// </summary> | 104 | /// </summary> |
105 | /// <param name="map">The terrain channel to export to bitmap</param> | 105 | /// <param name="map">The terrain channel to export to bitmap</param> |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /// <summary> | 136 | /// <summary> |
137 | /// Protected method, generates a coloured bitmap | 137 | /// Protected method, generates a coloured bitmap |
138 | /// image from a specified terrain channel. | 138 | /// image from a specified terrain channel. |
139 | /// </summary> | 139 | /// </summary> |
140 | /// <param name="map">The terrain channel to export to bitmap</param> | 140 | /// <param name="map">The terrain channel to export to bitmap</param> |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs index 0c4e3de..7bf88f0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
43 | double sum = 0.0; | 43 | double sum = 0.0; |
44 | double step2 = 0.0; | 44 | double step2 = 0.0; |
45 | 45 | ||
46 | // compute delta map | 46 | // compute delta map |
47 | for (x = 0; x < map.Width; x++) | 47 | for (x = 0; x < map.Width; x++) |
48 | { | 48 | { |
49 | for (y = 0; y < map.Height; y++) | 49 | for (y = 0; y < map.Height; y++) |
50 | { | 50 | { |
51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
52 | 52 | ||
53 | if (z > 0) // add in non-zero amount | 53 | if (z > 0) // add in non-zero amount |
54 | { | 54 | { |
55 | sum += map[x, y] * z; | 55 | sum += map[x, y] * z; |
56 | step2 += z; | 56 | step2 += z; |
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
60 | 60 | ||
61 | double avg = sum / step2; | 61 | double avg = sum / step2; |
62 | 62 | ||
63 | // blend in map | 63 | // blend in map |
64 | for (x = 0; x < map.Width; x++) | 64 | for (x = 0; x < map.Width; x++) |
65 | { | 65 | { |
66 | for (y = 0; y < map.Height; y++) | 66 | for (y = 0; y < map.Height; y++) |
67 | { | 67 | { |
68 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; | 68 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; |
69 | 69 | ||
70 | if (z > 0) // add in non-zero amount | 70 | if (z > 0) // add in non-zero amount |
71 | { | 71 | { |
72 | if (z > 1.0) | 72 | if (z > 1.0) |
73 | z = 1.0; | 73 | z = 1.0; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs index f2a1800..6df8408 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs | |||
@@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Speed-Optimised Hybrid Erosion Brush | 34 | /// Speed-Optimised Hybrid Erosion Brush |
35 | /// | 35 | /// |
36 | /// As per Jacob Olsen's Paper | 36 | /// As per Jacob Olsen's Paper |
37 | /// http://www.oddlabs.com/download/terrain_generation.pdf | 37 | /// http://www.oddlabs.com/download/terrain_generation.pdf |
38 | /// </summary> | 38 | /// </summary> |
39 | public class OlsenSphere : ITerrainPaintableEffect | 39 | public class OlsenSphere : ITerrainPaintableEffect |
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
164 | { | 164 | { |
165 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 165 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
166 | 166 | ||
167 | if (z > 0) // add in non-zero amount | 167 | if (z > 0) // add in non-zero amount |
168 | { | 168 | { |
169 | const int NEIGHBOUR_ME = 4; | 169 | const int NEIGHBOUR_ME = 4; |
170 | const int NEIGHBOUR_MAX = 9; | 170 | const int NEIGHBOUR_MAX = 9; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs index 49946fd..fc0a579 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs | |||
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
43 | double area = strength; | 43 | double area = strength; |
44 | double step = strength / 4.0; | 44 | double step = strength / 4.0; |
45 | 45 | ||
46 | // compute delta map | 46 | // compute delta map |
47 | for (x = 0; x < map.Width; x++) | 47 | for (x = 0; x < map.Width; x++) |
48 | { | 48 | { |
49 | for (y = 0; y < map.Height; y++) | 49 | for (y = 0; y < map.Height; y++) |
50 | { | 50 | { |
51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 51 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
52 | 52 | ||
53 | if (z > 0) // add in non-zero amount | 53 | if (z > 0) // add in non-zero amount |
54 | { | 54 | { |
55 | double average = 0.0; | 55 | double average = 0.0; |
56 | int avgsteps = 0; | 56 | int avgsteps = 0; |
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | } | 71 | } |
72 | // blend in map | 72 | // blend in map |
73 | for (x = 0; x < map.Width; x++) | 73 | for (x = 0; x < map.Width; x++) |
74 | { | 74 | { |
75 | for (y = 0; y < map.Height; y++) | 75 | for (y = 0; y < map.Height; y++) |
76 | { | 76 | { |
77 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 77 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
78 | 78 | ||
79 | if (z > 0) // add in non-zero amount | 79 | if (z > 0) // add in non-zero amount |
80 | { | 80 | { |
81 | double da = z; | 81 | double da = z; |
82 | double a = (map[x, y] - tweak[x, y]) * da; | 82 | double a = (map[x, y] - tweak[x, y]) * da; |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs index 753d171..b3aa732 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs | |||
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
160 | { | 160 | { |
161 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | 161 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); |
162 | 162 | ||
163 | if (z > 0) // add in non-zero amount | 163 | if (z > 0) // add in non-zero amount |
164 | { | 164 | { |
165 | const int NEIGHBOUR_ME = 4; | 165 | const int NEIGHBOUR_ME = 4; |
166 | const int NEIGHBOUR_MAX = 9; | 166 | const int NEIGHBOUR_MAX = 9; |
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 18a2851..4b6ca49 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | [Serializable] | 36 | [Serializable] |
37 | public abstract class EntityBase : ISerializable | 37 | public abstract class EntityBase : ISerializable |
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// The scene to which this entity belongs | 40 | /// The scene to which this entity belongs |
41 | /// </summary> | 41 | /// </summary> |
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
56 | protected string m_name; | 56 | protected string m_name; |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// | 59 | /// |
60 | /// </summary> | 60 | /// </summary> |
61 | public virtual string Name | 61 | public virtual string Name |
62 | { | 62 | { |
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
67 | protected LLVector3 m_pos; | 67 | protected LLVector3 m_pos; |
68 | 68 | ||
69 | /// <summary> | 69 | /// <summary> |
70 | /// | 70 | /// |
71 | /// </summary> | 71 | /// </summary> |
72 | public virtual LLVector3 AbsolutePosition | 72 | public virtual LLVector3 AbsolutePosition |
73 | { | 73 | { |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | protected LLVector3 m_rotationalvelocity; | 79 | protected LLVector3 m_rotationalvelocity; |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// | 82 | /// |
83 | /// </summary> | 83 | /// </summary> |
84 | public virtual LLVector3 Velocity | 84 | public virtual LLVector3 Velocity |
85 | { | 85 | { |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
118 | } | 118 | } |
119 | 119 | ||
120 | /// <summary> | 120 | /// <summary> |
121 | /// | 121 | /// |
122 | /// </summary> | 122 | /// </summary> |
123 | public abstract void UpdateMovement(); | 123 | public abstract void UpdateMovement(); |
124 | 124 | ||
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index aa22740..352fdf9 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
93 | set | 93 | set |
94 | { | 94 | { |
95 | // If we're not doing the initial set | 95 | // If we're not doing the initial set |
96 | // Then we've got to remove the previous | 96 | // Then we've got to remove the previous |
97 | // event handler | 97 | // event handler |
98 | try | 98 | try |
99 | { | 99 | { |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
104 | // This occurs when storing to _PhyScene the first time. | 104 | // This occurs when storing to _PhyScene the first time. |
105 | // Is there a better way to check the event handler before | 105 | // Is there a better way to check the event handler before |
106 | // getting here | 106 | // getting here |
107 | // This can be safely ignored. We're setting the first inital | 107 | // This can be safely ignored. We're setting the first inital |
108 | // there are no event handler's registered. | 108 | // there are no event handler's registered. |
109 | } | 109 | } |
110 | 110 | ||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
120 | { | 120 | { |
121 | ScenePresences.Clear(); | 121 | ScenePresences.Clear(); |
122 | } | 122 | } |
123 | 123 | ||
124 | //SceneObjects.Clear(); | 124 | //SceneObjects.Clear(); |
125 | Entities.Clear(); | 125 | Entities.Clear(); |
126 | } | 126 | } |
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
235 | for (int i = 0; i < m_updateList.Count; i++) | 235 | for (int i = 0; i < m_updateList.Count; i++) |
236 | { | 236 | { |
237 | EntityBase entity = m_updateList[i]; | 237 | EntityBase entity = m_updateList[i]; |
238 | 238 | ||
239 | // Don't abort the whole update if one entity happens to give us an exception. | 239 | // Don't abort the whole update if one entity happens to give us an exception. |
240 | try | 240 | try |
241 | { | 241 | { |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
327 | part.Undo(); | 327 | part.Undo(); |
328 | 328 | ||
329 | } | 329 | } |
330 | 330 | ||
331 | 331 | ||
332 | } | 332 | } |
333 | 333 | ||
@@ -341,7 +341,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
341 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) | 341 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) |
342 | { | 342 | { |
343 | // Calls attach with a Zero position | 343 | // Calls attach with a Zero position |
344 | 344 | ||
345 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); | 345 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); |
346 | } | 346 | } |
347 | public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) | 347 | public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) |
@@ -364,8 +364,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
364 | // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? | 364 | // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? |
365 | public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) | 365 | public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) |
366 | { | 366 | { |
367 | 367 | ||
368 | if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... | 368 | if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... |
369 | return; | 369 | return; |
370 | 370 | ||
371 | List<EntityBase> EntityList = GetEntities(); | 371 | List<EntityBase> EntityList = GetEntities(); |
@@ -443,14 +443,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
443 | { | 443 | { |
444 | remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); | 444 | remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); |
445 | } | 445 | } |
446 | 446 | ||
447 | } | 447 | } |
448 | 448 | ||
449 | } | 449 | } |
450 | } | 450 | } |
451 | 451 | ||
452 | } | 452 | } |
453 | 453 | ||
454 | public ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance) | 454 | public ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance) |
455 | { | 455 | { |
456 | ScenePresence newAvatar = null; | 456 | ScenePresence newAvatar = null; |
@@ -627,13 +627,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
627 | 627 | ||
628 | return result; | 628 | return result; |
629 | } | 629 | } |
630 | 630 | ||
631 | /// <summary> | 631 | /// <summary> |
632 | /// Get the controlling client for the given avatar, if there is one. | 632 | /// Get the controlling client for the given avatar, if there is one. |
633 | /// | 633 | /// |
634 | /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't | 634 | /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't |
635 | /// use the ScenePresence. This could be better solved in a number of ways - we could establish an | 635 | /// use the ScenePresence. This could be better solved in a number of ways - we could establish an |
636 | /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more | 636 | /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more |
637 | /// suitable solution). | 637 | /// suitable solution). |
638 | /// </summary> | 638 | /// </summary> |
639 | /// <param name="agentId"></param> | 639 | /// <param name="agentId"></param> |
@@ -641,12 +641,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
641 | public IClientAPI GetControllingClient(LLUUID agentId) | 641 | public IClientAPI GetControllingClient(LLUUID agentId) |
642 | { | 642 | { |
643 | ScenePresence presence = GetScenePresence(agentId); | 643 | ScenePresence presence = GetScenePresence(agentId); |
644 | 644 | ||
645 | if (presence != null) | 645 | if (presence != null) |
646 | { | 646 | { |
647 | return presence.ControllingClient; | 647 | return presence.ControllingClient; |
648 | } | 648 | } |
649 | 649 | ||
650 | return null; | 650 | return null; |
651 | } | 651 | } |
652 | 652 | ||
@@ -657,7 +657,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
657 | public List<ScenePresence> GetScenePresences(FilterAvatarList filter) | 657 | public List<ScenePresence> GetScenePresences(FilterAvatarList filter) |
658 | { | 658 | { |
659 | // No locking of scene presences here since we're passing back a list... | 659 | // No locking of scene presences here since we're passing back a list... |
660 | 660 | ||
661 | List<ScenePresence> result = new List<ScenePresence>(); | 661 | List<ScenePresence> result = new List<ScenePresence>(); |
662 | List<ScenePresence> ScenePresencesList = GetScenePresences(); | 662 | List<ScenePresence> ScenePresencesList = GetScenePresences(); |
663 | 663 | ||
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
681 | { | 681 | { |
682 | ScenePresence sp; | 682 | ScenePresence sp; |
683 | ScenePresences.TryGetValue(agentID, out sp); | 683 | ScenePresences.TryGetValue(agentID, out sp); |
684 | 684 | ||
685 | return sp; | 685 | return sp; |
686 | } | 686 | } |
687 | 687 | ||
@@ -764,13 +764,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
764 | { | 764 | { |
765 | if (!presence.IsChildAgent) | 765 | if (!presence.IsChildAgent) |
766 | { | 766 | { |
767 | avatar = presence; | 767 | avatar = presence; |
768 | return true; | 768 | return true; |
769 | } | 769 | } |
770 | else | 770 | else |
771 | { | 771 | { |
772 | m_log.WarnFormat( | 772 | m_log.WarnFormat( |
773 | "[INNER SCENE]: Requested avatar {0} could not be found in scene {1} since it is only registered as a child agent!", | 773 | "[INNER SCENE]: Requested avatar {0} could not be found in scene {1} since it is only registered as a child agent!", |
774 | avatarId, m_parentScene.RegionInfo.RegionName); | 774 | avatarId, m_parentScene.RegionInfo.RegionName); |
775 | } | 775 | } |
776 | } | 776 | } |
@@ -846,8 +846,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
846 | { | 846 | { |
847 | // Only send child agents stuff in their draw distance. | 847 | // Only send child agents stuff in their draw distance. |
848 | // This will need to be done for every agent once we figure out | 848 | // This will need to be done for every agent once we figure out |
849 | // what we're going to use to store prim that agents already got | 849 | // what we're going to use to store prim that agents already got |
850 | // the initial update for and what we'll use to limit the | 850 | // the initial update for and what we'll use to limit the |
851 | // space we check for new objects on movement. | 851 | // space we check for new objects on movement. |
852 | 852 | ||
853 | if (presence.IsChildAgent && m_parentScene.m_seeIntoRegionFromNeighbor) | 853 | if (presence.IsChildAgent && m_parentScene.m_seeIntoRegionFromNeighbor) |
@@ -889,7 +889,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
889 | #region Client Event handlers | 889 | #region Client Event handlers |
890 | 890 | ||
891 | /// <summary> | 891 | /// <summary> |
892 | /// | 892 | /// |
893 | /// </summary> | 893 | /// </summary> |
894 | /// <param name="localID"></param> | 894 | /// <param name="localID"></param> |
895 | /// <param name="scale"></param> | 895 | /// <param name="scale"></param> |
@@ -918,7 +918,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
918 | } | 918 | } |
919 | 919 | ||
920 | /// <summary> | 920 | /// <summary> |
921 | /// This handles the nifty little tool tip that you get when you drag your mouse over an object | 921 | /// This handles the nifty little tool tip that you get when you drag your mouse over an object |
922 | /// Send to the Object Group to process. We don't know enough to service the request | 922 | /// Send to the Object Group to process. We don't know enough to service the request |
923 | /// </summary> | 923 | /// </summary> |
924 | /// <param name="remoteClient"></param> | 924 | /// <param name="remoteClient"></param> |
@@ -936,7 +936,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
936 | } | 936 | } |
937 | 937 | ||
938 | /// <summary> | 938 | /// <summary> |
939 | /// | 939 | /// |
940 | /// </summary> | 940 | /// </summary> |
941 | /// <param name="localID"></param> | 941 | /// <param name="localID"></param> |
942 | /// <param name="rot"></param> | 942 | /// <param name="rot"></param> |
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
954 | } | 954 | } |
955 | 955 | ||
956 | /// <summary> | 956 | /// <summary> |
957 | /// | 957 | /// |
958 | /// </summary> | 958 | /// </summary> |
959 | /// <param name="localID"></param> | 959 | /// <param name="localID"></param> |
960 | /// <param name="rot"></param> | 960 | /// <param name="rot"></param> |
@@ -972,7 +972,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
972 | } | 972 | } |
973 | 973 | ||
974 | /// <summary> | 974 | /// <summary> |
975 | /// | 975 | /// |
976 | /// </summary> | 976 | /// </summary> |
977 | /// <param name="localID"></param> | 977 | /// <param name="localID"></param> |
978 | /// <param name="pos"></param> | 978 | /// <param name="pos"></param> |
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | /// <summary> | 1011 | /// <summary> |
1012 | /// | 1012 | /// |
1013 | /// </summary> | 1013 | /// </summary> |
1014 | /// <param name="localID"></param> | 1014 | /// <param name="localID"></param> |
1015 | /// <param name="pos"></param> | 1015 | /// <param name="pos"></param> |
@@ -1019,13 +1019,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1019 | SceneObjectGroup group = GetGroupByPrim(localID); | 1019 | SceneObjectGroup group = GetGroupByPrim(localID); |
1020 | if (group != null) | 1020 | if (group != null) |
1021 | { | 1021 | { |
1022 | 1022 | ||
1023 | LLVector3 oldPos = group.AbsolutePosition; | 1023 | LLVector3 oldPos = group.AbsolutePosition; |
1024 | if (group.RootPart.m_IsAttachment) | 1024 | if (group.RootPart.m_IsAttachment) |
1025 | { | 1025 | { |
1026 | group.UpdateGroupPosition(pos); | 1026 | group.UpdateGroupPosition(pos); |
1027 | } | 1027 | } |
1028 | else | 1028 | else |
1029 | { | 1029 | { |
1030 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment) | 1030 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment) |
1031 | { | 1031 | { |
@@ -1041,7 +1041,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | /// <summary> | 1043 | /// <summary> |
1044 | /// | 1044 | /// |
1045 | /// </summary> | 1045 | /// </summary> |
1046 | /// <param name="localID"></param> | 1046 | /// <param name="localID"></param> |
1047 | /// <param name="texture"></param> | 1047 | /// <param name="texture"></param> |
@@ -1059,7 +1059,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | /// <summary> | 1061 | /// <summary> |
1062 | /// | 1062 | /// |
1063 | /// </summary> | 1063 | /// </summary> |
1064 | /// <param name="localID"></param> | 1064 | /// <param name="localID"></param> |
1065 | /// <param name="packet"></param> | 1065 | /// <param name="packet"></param> |
@@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | /// <summary> | 1096 | /// <summary> |
1097 | /// | 1097 | /// |
1098 | /// </summary> | 1098 | /// </summary> |
1099 | /// <param name="primLocalID"></param> | 1099 | /// <param name="primLocalID"></param> |
1100 | /// <param name="description"></param> | 1100 | /// <param name="description"></param> |
@@ -1111,7 +1111,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | /// <summary> | 1113 | /// <summary> |
1114 | /// | 1114 | /// |
1115 | /// </summary> | 1115 | /// </summary> |
1116 | /// <param name="primLocalID"></param> | 1116 | /// <param name="primLocalID"></param> |
1117 | /// <param name="description"></param> | 1117 | /// <param name="description"></param> |
@@ -1141,7 +1141,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1141 | } | 1141 | } |
1142 | 1142 | ||
1143 | /// <summary> | 1143 | /// <summary> |
1144 | /// | 1144 | /// |
1145 | /// </summary> | 1145 | /// </summary> |
1146 | /// <param name="primLocalID"></param> | 1146 | /// <param name="primLocalID"></param> |
1147 | /// <param name="shapeBlock"></param> | 1147 | /// <param name="shapeBlock"></param> |
@@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1223 | { | 1223 | { |
1224 | parenPrim.LinkToGroup(sceneObj); | 1224 | parenPrim.LinkToGroup(sceneObj); |
1225 | } | 1225 | } |
1226 | 1226 | ||
1227 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1227 | // We need to explicitly resend the newly link prim's object properties since no other actions |
1228 | // occur on link to invoke this elsewhere (such as object selection) | 1228 | // occur on link to invoke this elsewhere (such as object selection) |
1229 | parenPrim.GetProperties(client); | 1229 | parenPrim.GetProperties(client); |
@@ -1232,7 +1232,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1232 | /// <summary> | 1232 | /// <summary> |
1233 | /// Delink a linkset | 1233 | /// Delink a linkset |
1234 | /// </summary> | 1234 | /// </summary> |
1235 | /// <param name="prims"></param> | 1235 | /// <param name="prims"></param> |
1236 | public void DelinkObjects(List<uint> primIds) | 1236 | public void DelinkObjects(List<uint> primIds) |
1237 | { | 1237 | { |
1238 | SceneObjectGroup parenPrim = null; | 1238 | SceneObjectGroup parenPrim = null; |
@@ -1278,7 +1278,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1278 | else | 1278 | else |
1279 | { | 1279 | { |
1280 | // If the first scan failed, we need to do a /deep/ scan of the linkages. This is /really/ slow | 1280 | // If the first scan failed, we need to do a /deep/ scan of the linkages. This is /really/ slow |
1281 | // We know that this is not the root prim now essentially, so we don't have to worry about remapping | 1281 | // We know that this is not the root prim now essentially, so we don't have to worry about remapping |
1282 | // which one is the root prim | 1282 | // which one is the root prim |
1283 | bool delinkedSomething = false; | 1283 | bool delinkedSomething = false; |
1284 | for (int i = 0; i < primIds.Count; i++) | 1284 | for (int i = 0; i < primIds.Count; i++) |
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1324 | } | 1324 | } |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | //Protip: In my day, we didn't call them searchable objects, we called them limited point-to-point joints | 1328 | //Protip: In my day, we didn't call them searchable objects, we called them limited point-to-point joints |
1329 | //aka ObjectFlags.JointWheel = IncludeInSearch | 1329 | //aka ObjectFlags.JointWheel = IncludeInSearch |
1330 | 1330 | ||
@@ -1356,7 +1356,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1356 | public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) | 1356 | public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) |
1357 | { | 1357 | { |
1358 | m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); | 1358 | m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); |
1359 | 1359 | ||
1360 | List<EntityBase> EntityList = GetEntities(); | 1360 | List<EntityBase> EntityList = GetEntities(); |
1361 | 1361 | ||
1362 | SceneObjectGroup originPrim = null; | 1362 | SceneObjectGroup originPrim = null; |
@@ -1405,7 +1405,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1405 | /// <returns></returns> | 1405 | /// <returns></returns> |
1406 | public float Vector3Distance(Vector3 v1, Vector3 v2) | 1406 | public float Vector3Distance(Vector3 v1, Vector3 v2) |
1407 | { | 1407 | { |
1408 | // We don't really need the double floating point precision... | 1408 | // We don't really need the double floating point precision... |
1409 | // so casting it to a single | 1409 | // so casting it to a single |
1410 | 1410 | ||
1411 | return | 1411 | return |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 6aef45e..5e2ccec 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
40 | { | 40 | { |
41 | public partial class Scene | 41 | public partial class Scene |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
@@ -49,14 +49,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
49 | public void StartScripts() | 49 | public void StartScripts() |
50 | { | 50 | { |
51 | m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); | 51 | m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); |
52 | 52 | ||
53 | foreach (EntityBase group in Entities.Values) | 53 | foreach (EntityBase group in Entities.Values) |
54 | { | 54 | { |
55 | if (group is SceneObjectGroup) | 55 | if (group is SceneObjectGroup) |
56 | { | 56 | { |
57 | ((SceneObjectGroup) group).StartScripts(); | 57 | ((SceneObjectGroup) group).StartScripts(); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
@@ -67,9 +67,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
67 | /// in which the item is to be placed.</param> | 67 | /// in which the item is to be placed.</param> |
68 | public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item) | 68 | public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item) |
69 | { | 69 | { |
70 | CachedUserInfo userInfo | 70 | CachedUserInfo userInfo |
71 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 71 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
72 | 72 | ||
73 | if (userInfo != null) | 73 | if (userInfo != null) |
74 | { | 74 | { |
75 | userInfo.AddItem(item); | 75 | userInfo.AddItem(item); |
@@ -91,17 +91,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | m_log.ErrorFormat( | 91 | m_log.ErrorFormat( |
92 | "[AGENT INVENTORY]: Agent {0} {1} was not found for add of item {2} {3}", | 92 | "[AGENT INVENTORY]: Agent {0} {1} was not found for add of item {2} {3}", |
93 | remoteClient.Name, remoteClient.AgentId, item.Name, item.ID); | 93 | remoteClient.Name, remoteClient.AgentId, item.Name, item.ID); |
94 | 94 | ||
95 | return; | 95 | return; |
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
99 | /// <summary> | 99 | /// <summary> |
100 | /// <see>AddInventoryItem(LLUUID, InventoryItemBase)</see> | 100 | /// <see>AddInventoryItem(LLUUID, InventoryItemBase)</see> |
101 | /// </summary> | 101 | /// </summary> |
102 | /// <param name="avatarId">The ID of the avatar</param> | 102 | /// <param name="avatarId">The ID of the avatar</param> |
103 | /// <param name="item">The item. This structure contains all the item metadata, including the folder | 103 | /// <param name="item">The item. This structure contains all the item metadata, including the folder |
104 | /// in which the item is to be placed.</param> | 104 | /// in which the item is to be placed.</param> |
105 | public void AddInventoryItem(LLUUID avatarId, InventoryItemBase item) | 105 | public void AddInventoryItem(LLUUID avatarId, InventoryItemBase item) |
106 | { | 106 | { |
107 | ScenePresence avatar; | 107 | ScenePresence avatar; |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | if (userInfo.RootFolder != null) | 131 | if (userInfo.RootFolder != null) |
132 | { | 132 | { |
133 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 133 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); |
134 | 134 | ||
135 | if (item != null) | 135 | if (item != null) |
136 | { | 136 | { |
137 | AssetBase asset = | 137 | AssetBase asset = |
@@ -188,13 +188,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | /// <param name="itemID"></param> | 188 | /// <param name="itemID"></param> |
189 | /// <param name="primID">The prim which contains the item to update</param> | 189 | /// <param name="primID">The prim which contains the item to update</param> |
190 | /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param> | 190 | /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param> |
191 | /// <param name="data"></param> | 191 | /// <param name="data"></param> |
192 | public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, LLUUID itemId, | 192 | public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, LLUUID itemId, |
193 | LLUUID primId, bool isScriptRunning, byte[] data) | 193 | LLUUID primId, bool isScriptRunning, byte[] data) |
194 | { | 194 | { |
195 | // Retrieve group | 195 | // Retrieve group |
196 | SceneObjectPart part = GetSceneObjectPart(primId); | 196 | SceneObjectPart part = GetSceneObjectPart(primId); |
197 | SceneObjectGroup group = part.ParentGroup; | 197 | SceneObjectGroup group = part.ParentGroup; |
198 | if (null == group) | 198 | if (null == group) |
199 | { | 199 | { |
200 | m_log.ErrorFormat( | 200 | m_log.ErrorFormat( |
@@ -204,36 +204,36 @@ namespace OpenSim.Region.Environment.Scenes | |||
204 | 204 | ||
205 | return; | 205 | return; |
206 | } | 206 | } |
207 | 207 | ||
208 | // Retrieve item | 208 | // Retrieve item |
209 | TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); | 209 | TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); |
210 | if (null == item) | 210 | if (null == item) |
211 | { | 211 | { |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | 214 | ||
215 | // Create new asset | 215 | // Create new asset |
216 | // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this | 216 | // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this |
217 | // There may well be one in libsecondlife | 217 | // There may well be one in libsecondlife |
218 | AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data); | 218 | AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data); |
219 | AssetCache.AddAsset(asset); | 219 | AssetCache.AddAsset(asset); |
220 | 220 | ||
221 | // Update item with new asset | 221 | // Update item with new asset |
222 | item.AssetID = asset.FullID; | 222 | item.AssetID = asset.FullID; |
223 | group.UpdateInventoryItem(item); | 223 | group.UpdateInventoryItem(item); |
224 | group.GetProperties(remoteClient); | 224 | group.GetProperties(remoteClient); |
225 | 225 | ||
226 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) | 226 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) |
227 | if (isScriptRunning) | 227 | if (isScriptRunning) |
228 | { | 228 | { |
229 | group.StopScript(part.LocalId, item.ItemID); | 229 | group.StopScript(part.LocalId, item.ItemID); |
230 | group.StartScript(part.LocalId, item.ItemID); | 230 | group.StartScript(part.LocalId, item.ItemID); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
234 | /// <summary> | 234 | /// <summary> |
235 | /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, LLUUID, LLUUID, bool, byte[])</see> | 235 | /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, LLUUID, LLUUID, bool, byte[])</see> |
236 | /// </summary> | 236 | /// </summary> |
237 | private void CapsUpdateTaskInventoryScriptAsset(LLUUID avatarId, LLUUID itemId, | 237 | private void CapsUpdateTaskInventoryScriptAsset(LLUUID avatarId, LLUUID itemId, |
238 | LLUUID primId, bool isScriptRunning, byte[] data) | 238 | LLUUID primId, bool isScriptRunning, byte[] data) |
239 | { | 239 | { |
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
276 | if (userInfo != null && userInfo.RootFolder != null) | 276 | if (userInfo != null && userInfo.RootFolder != null) |
277 | { | 277 | { |
278 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 278 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); |
279 | 279 | ||
280 | if (item != null) | 280 | if (item != null) |
281 | { | 281 | { |
282 | if (LLUUID.Zero == transactionID) | 282 | if (LLUUID.Zero == transactionID) |
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
284 | item.Name = itemUpd.Name; | 284 | item.Name = itemUpd.Name; |
285 | item.Description = itemUpd.Description; | 285 | item.Description = itemUpd.Description; |
286 | item.NextPermissions = itemUpd.NextPermissions; | 286 | item.NextPermissions = itemUpd.NextPermissions; |
287 | item.CurrentPermissions |= 8; // Slam! | 287 | item.CurrentPermissions |= 8; // Slam! |
288 | item.EveryOnePermissions = itemUpd.EveryOnePermissions; | 288 | item.EveryOnePermissions = itemUpd.EveryOnePermissions; |
289 | 289 | ||
290 | // TODO: Requires sanity checks | 290 | // TODO: Requires sanity checks |
@@ -323,7 +323,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
323 | "[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); | 323 | "[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | /// <summary> | 327 | /// <summary> |
328 | /// Give an inventory item from one avatar to another | 328 | /// Give an inventory item from one avatar to another |
329 | /// </summary> | 329 | /// </summary> |
@@ -333,35 +333,35 @@ namespace OpenSim.Region.Environment.Scenes | |||
333 | public void GiveInventoryItem(IClientAPI recipientClient, LLUUID senderId, LLUUID itemId) | 333 | public void GiveInventoryItem(IClientAPI recipientClient, LLUUID senderId, LLUUID itemId) |
334 | { | 334 | { |
335 | // Retrieve the item from the sender | 335 | // Retrieve the item from the sender |
336 | CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); | 336 | CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); |
337 | 337 | ||
338 | if (senderUserInfo == null) | 338 | if (senderUserInfo == null) |
339 | { | 339 | { |
340 | m_log.ErrorFormat( | 340 | m_log.ErrorFormat( |
341 | "[AGENT INVENTORY]: Failed to find sending user {0} for item {1}", senderId, itemId); | 341 | "[AGENT INVENTORY]: Failed to find sending user {0} for item {1}", senderId, itemId); |
342 | 342 | ||
343 | return; | 343 | return; |
344 | } | 344 | } |
345 | 345 | ||
346 | if (senderUserInfo.RootFolder != null) | 346 | if (senderUserInfo.RootFolder != null) |
347 | { | 347 | { |
348 | InventoryItemBase item = senderUserInfo.RootFolder.FindItem(itemId); | 348 | InventoryItemBase item = senderUserInfo.RootFolder.FindItem(itemId); |
349 | 349 | ||
350 | if (item != null) | 350 | if (item != null) |
351 | { | 351 | { |
352 | if (!ExternalChecks.ExternalChecksBypassPermissions()) | 352 | if (!ExternalChecks.ExternalChecksBypassPermissions()) |
353 | { | 353 | { |
354 | if((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) | 354 | if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) |
355 | return; | 355 | return; |
356 | } | 356 | } |
357 | 357 | ||
358 | // TODO get recipient's root folder | 358 | // TODO get recipient's root folder |
359 | CachedUserInfo recipientUserInfo | 359 | CachedUserInfo recipientUserInfo |
360 | = CommsManager.UserProfileCacheService.GetUserDetails(recipientClient.AgentId); | 360 | = CommsManager.UserProfileCacheService.GetUserDetails(recipientClient.AgentId); |
361 | 361 | ||
362 | if (recipientUserInfo != null) | 362 | if (recipientUserInfo != null) |
363 | { | 363 | { |
364 | // Insert a copy of the item into the recipient | 364 | // Insert a copy of the item into the recipient |
365 | InventoryItemBase itemCopy = new InventoryItemBase(); | 365 | InventoryItemBase itemCopy = new InventoryItemBase(); |
366 | itemCopy.Owner = recipientClient.AgentId; | 366 | itemCopy.Owner = recipientClient.AgentId; |
367 | itemCopy.Creator = senderId; | 367 | itemCopy.Creator = senderId; |
@@ -372,37 +372,37 @@ namespace OpenSim.Region.Environment.Scenes | |||
372 | itemCopy.AssetType = item.AssetType; | 372 | itemCopy.AssetType = item.AssetType; |
373 | itemCopy.InvType = item.InvType; | 373 | itemCopy.InvType = item.InvType; |
374 | itemCopy.Folder = recipientUserInfo.RootFolder.ID; | 374 | itemCopy.Folder = recipientUserInfo.RootFolder.ID; |
375 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | 375 | if (ExternalChecks.ExternalChecksPropagatePermissions()) |
376 | { | 376 | { |
377 | if(item.InvType == 6) | 377 | if (item.InvType == 6) |
378 | { | 378 | { |
379 | itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); | 379 | itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); |
380 | itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13; | 380 | itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13; |
381 | } | 381 | } |
382 | else | 382 | else |
383 | { | 383 | { |
384 | Console.WriteLine("Non-Prim item ==>"); | 384 | Console.WriteLine("Non-Prim item ==>"); |
385 | itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; | 385 | itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; |
386 | } | 386 | } |
387 | 387 | ||
388 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; | 388 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; |
389 | if((item.CurrentPermissions & 8) != 0) // Propagate slam bit | 389 | if ((item.CurrentPermissions & 8) != 0) // Propagate slam bit |
390 | { | 390 | { |
391 | itemCopy.CurrentPermissions = item.NextPermissions; | 391 | itemCopy.CurrentPermissions = item.NextPermissions; |
392 | itemCopy.BasePermissions=itemCopy.CurrentPermissions; | 392 | itemCopy.BasePermissions=itemCopy.CurrentPermissions; |
393 | itemCopy.CurrentPermissions |= 8; | 393 | itemCopy.CurrentPermissions |= 8; |
394 | } | 394 | } |
395 | 395 | ||
396 | itemCopy.NextPermissions = item.NextPermissions; | 396 | itemCopy.NextPermissions = item.NextPermissions; |
397 | itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; | 397 | itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; |
398 | } | 398 | } |
399 | else | 399 | else |
400 | { | 400 | { |
401 | itemCopy.CurrentPermissions = item.CurrentPermissions; | 401 | itemCopy.CurrentPermissions = item.CurrentPermissions; |
402 | itemCopy.NextPermissions = item.NextPermissions; | 402 | itemCopy.NextPermissions = item.NextPermissions; |
403 | itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; | 403 | itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; |
404 | itemCopy.BasePermissions = item.BasePermissions; | 404 | itemCopy.BasePermissions = item.BasePermissions; |
405 | } | 405 | } |
406 | itemCopy.GroupID = item.GroupID; | 406 | itemCopy.GroupID = item.GroupID; |
407 | itemCopy.GroupOwned = item.GroupOwned; | 407 | itemCopy.GroupOwned = item.GroupOwned; |
408 | itemCopy.Flags = item.Flags; | 408 | itemCopy.Flags = item.Flags; |
@@ -410,21 +410,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
410 | itemCopy.SaleType = item.SaleType; | 410 | itemCopy.SaleType = item.SaleType; |
411 | 411 | ||
412 | recipientUserInfo.AddItem(itemCopy); | 412 | recipientUserInfo.AddItem(itemCopy); |
413 | 413 | ||
414 | if (!ExternalChecks.ExternalChecksBypassPermissions()) | 414 | if (!ExternalChecks.ExternalChecksBypassPermissions()) |
415 | { | 415 | { |
416 | if((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 416 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
417 | senderUserInfo.DeleteItem(itemId); | 417 | senderUserInfo.DeleteItem(itemId); |
418 | } | 418 | } |
419 | 419 | ||
420 | // Let the recipient client know about this new item | 420 | // Let the recipient client know about this new item |
421 | recipientClient.SendBulkUpdateInventory(itemCopy); | 421 | recipientClient.SendBulkUpdateInventory(itemCopy); |
422 | } | 422 | } |
423 | else | 423 | else |
424 | { | 424 | { |
425 | m_log.ErrorFormat( | 425 | m_log.ErrorFormat( |
426 | "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", | 426 | "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", |
427 | recipientClient.Name, recipientClient.AgentId, item.Name, | 427 | recipientClient.Name, recipientClient.AgentId, item.Name, |
428 | item.ID, senderId); | 428 | item.ID, senderId); |
429 | } | 429 | } |
430 | } | 430 | } |
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
432 | { | 432 | { |
433 | m_log.ErrorFormat( | 433 | m_log.ErrorFormat( |
434 | "[AGENT INVENTORY]: Failed to find item {0} to give to {1}", itemId, senderId); | 434 | "[AGENT INVENTORY]: Failed to find item {0} to give to {1}", itemId, senderId); |
435 | 435 | ||
436 | return; | 436 | return; |
437 | } | 437 | } |
438 | } | 438 | } |
@@ -440,7 +440,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
440 | { | 440 | { |
441 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder"); | 441 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder"); |
442 | return; | 442 | return; |
443 | } | 443 | } |
444 | } | 444 | } |
445 | 445 | ||
446 | public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, | 446 | public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, |
@@ -449,9 +449,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
449 | m_log.DebugFormat( | 449 | m_log.DebugFormat( |
450 | "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", | 450 | "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", |
451 | remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); | 451 | remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); |
452 | 452 | ||
453 | InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(oldItemID); | 453 | InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(oldItemID); |
454 | 454 | ||
455 | if (item == null) | 455 | if (item == null) |
456 | { | 456 | { |
457 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); | 457 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); |
@@ -464,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
464 | if (userInfo.RootFolder != null) | 464 | if (userInfo.RootFolder != null) |
465 | { | 465 | { |
466 | item = userInfo.RootFolder.FindItem(oldItemID); | 466 | item = userInfo.RootFolder.FindItem(oldItemID); |
467 | 467 | ||
468 | if (item == null) | 468 | if (item == null) |
469 | { | 469 | { |
470 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); | 470 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); |
@@ -477,29 +477,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
477 | return; | 477 | return; |
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
481 | AssetBase asset | 481 | AssetBase asset |
482 | = AssetCache.GetAsset( | 482 | = AssetCache.GetAsset( |
483 | item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); | 483 | item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); |
484 | 484 | ||
485 | if (asset != null) | 485 | if (asset != null) |
486 | { | 486 | { |
487 | if(remoteClient.AgentId == oldAgentID) | 487 | if (remoteClient.AgentId == oldAgentID) |
488 | { | 488 | { |
489 | CreateNewInventoryItem( | 489 | CreateNewInventoryItem( |
490 | remoteClient, newFolderID, callbackID, asset, item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); | 490 | remoteClient, newFolderID, callbackID, asset, item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); |
491 | } | 491 | } |
492 | else | 492 | else |
493 | { | 493 | { |
494 | CreateNewInventoryItem( | 494 | CreateNewInventoryItem( |
495 | remoteClient, newFolderID, callbackID, asset, item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); | 495 | remoteClient, newFolderID, callbackID, asset, item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); |
496 | } | 496 | } |
497 | } | 497 | } |
498 | else | 498 | else |
499 | { | 499 | { |
500 | m_log.ErrorFormat( | 500 | m_log.ErrorFormat( |
501 | "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found", | 501 | "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found", |
502 | item.Name, item.AssetID); | 502 | item.Name, item.AssetID); |
503 | } | 503 | } |
504 | } | 504 | } |
505 | 505 | ||
@@ -530,18 +530,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
530 | "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); | 530 | "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); |
531 | 531 | ||
532 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 532 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
533 | 533 | ||
534 | if (userInfo == null) | 534 | if (userInfo == null) |
535 | { | 535 | { |
536 | m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); | 536 | m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); |
537 | 537 | ||
538 | return; | 538 | return; |
539 | } | 539 | } |
540 | 540 | ||
541 | if (userInfo.RootFolder != null) | 541 | if (userInfo.RootFolder != null) |
542 | { | 542 | { |
543 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 543 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); |
544 | 544 | ||
545 | if (item != null) | 545 | if (item != null) |
546 | { | 546 | { |
547 | if (newName != String.Empty) | 547 | if (newName != String.Empty) |
@@ -549,7 +549,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
549 | item.Name = newName; | 549 | item.Name = newName; |
550 | } | 550 | } |
551 | item.Folder = folderID; | 551 | item.Folder = folderID; |
552 | 552 | ||
553 | userInfo.DeleteItem(item.ID); | 553 | userInfo.DeleteItem(item.ID); |
554 | 554 | ||
555 | AddInventoryItem(remoteClient, item); | 555 | AddInventoryItem(remoteClient, item); |
@@ -557,23 +557,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
557 | else | 557 | else |
558 | { | 558 | { |
559 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString()); | 559 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString()); |
560 | 560 | ||
561 | return; | 561 | return; |
562 | } | 562 | } |
563 | } | 563 | } |
564 | else | 564 | else |
565 | { | 565 | { |
566 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); | 566 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); |
567 | 567 | ||
568 | return; | 568 | return; |
569 | } | 569 | } |
570 | } | 570 | } |
571 | 571 | ||
572 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, | 572 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, |
573 | AssetBase asset, uint nextOwnerMask) | 573 | AssetBase asset, uint nextOwnerMask) |
574 | { | 574 | { |
575 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask, nextOwnerMask, 0, nextOwnerMask); | 575 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask, nextOwnerMask, 0, nextOwnerMask); |
576 | } | 576 | } |
577 | 577 | ||
578 | /// <summary> | 578 | /// <summary> |
579 | /// Create a new inventory item. | 579 | /// Create a new inventory item. |
@@ -586,9 +586,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
586 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, | 586 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, |
587 | AssetBase asset, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) | 587 | AssetBase asset, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) |
588 | { | 588 | { |
589 | CachedUserInfo userInfo | 589 | CachedUserInfo userInfo |
590 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 590 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
591 | 591 | ||
592 | if (userInfo != null) | 592 | if (userInfo != null) |
593 | { | 593 | { |
594 | InventoryItemBase item = new InventoryItemBase(); | 594 | InventoryItemBase item = new InventoryItemBase(); |
@@ -603,8 +603,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
603 | item.Folder = folderID; | 603 | item.Folder = folderID; |
604 | item.CurrentPermissions = currentMask; | 604 | item.CurrentPermissions = currentMask; |
605 | item.NextPermissions = nextOwnerMask; | 605 | item.NextPermissions = nextOwnerMask; |
606 | item.EveryOnePermissions = everyoneMask; | 606 | item.EveryOnePermissions = everyoneMask; |
607 | item.BasePermissions = baseMask; | 607 | item.BasePermissions = baseMask; |
608 | 608 | ||
609 | userInfo.AddItem(item); | 609 | userInfo.AddItem(item); |
610 | remoteClient.SendInventoryItemCreateUpdate(item); | 610 | remoteClient.SendInventoryItemCreateUpdate(item); |
@@ -612,7 +612,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
612 | else | 612 | else |
613 | { | 613 | { |
614 | m_log.WarnFormat( | 614 | m_log.WarnFormat( |
615 | "No user details associated with client {0} uuid {1} in CreateNewInventoryItem!", | 615 | "No user details associated with client {0} uuid {1} in CreateNewInventoryItem!", |
616 | remoteClient.Name, remoteClient.AgentId); | 616 | remoteClient.Name, remoteClient.AgentId); |
617 | } | 617 | } |
618 | } | 618 | } |
@@ -637,12 +637,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
637 | byte wearableType, uint nextOwnerMask) | 637 | byte wearableType, uint nextOwnerMask) |
638 | { | 638 | { |
639 | // m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); | 639 | // m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); |
640 | 640 | ||
641 | if (transactionID == LLUUID.Zero) | 641 | if (transactionID == LLUUID.Zero) |
642 | { | 642 | { |
643 | CachedUserInfo userInfo | 643 | CachedUserInfo userInfo |
644 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 644 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
645 | 645 | ||
646 | if (userInfo != null) | 646 | if (userInfo != null) |
647 | { | 647 | { |
648 | ScenePresence presence; | 648 | ScenePresence presence; |
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
666 | else | 666 | else |
667 | { | 667 | { |
668 | m_log.ErrorFormat( | 668 | m_log.ErrorFormat( |
669 | "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem", | 669 | "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem", |
670 | remoteClient.AgentId); | 670 | remoteClient.AgentId); |
671 | } | 671 | } |
672 | } | 672 | } |
@@ -677,10 +677,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
677 | { | 677 | { |
678 | agentTransactions.HandleItemCreationFromTransaction( | 678 | agentTransactions.HandleItemCreationFromTransaction( |
679 | remoteClient, transactionID, folderID, callbackID, description, | 679 | remoteClient, transactionID, folderID, callbackID, description, |
680 | name, invType, assetType, wearableType, nextOwnerMask); | 680 | name, invType, assetType, wearableType, nextOwnerMask); |
681 | } | 681 | } |
682 | 682 | ||
683 | 683 | ||
684 | } | 684 | } |
685 | } | 685 | } |
686 | 686 | ||
@@ -693,13 +693,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
693 | { | 693 | { |
694 | CachedUserInfo userInfo | 694 | CachedUserInfo userInfo |
695 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 695 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
696 | 696 | ||
697 | if (userInfo == null) | 697 | if (userInfo == null) |
698 | { | 698 | { |
699 | m_log.WarnFormat( | 699 | m_log.WarnFormat( |
700 | "[AGENT INVENTORY]: Failed to find user {0} {1} to delete inventory item {2}", | 700 | "[AGENT INVENTORY]: Failed to find user {0} {1} to delete inventory item {2}", |
701 | remoteClient.Name, remoteClient.AgentId, itemID); | 701 | remoteClient.Name, remoteClient.AgentId, itemID); |
702 | 702 | ||
703 | return; | 703 | return; |
704 | } | 704 | } |
705 | 705 | ||
@@ -716,7 +716,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
716 | { | 716 | { |
717 | CachedUserInfo userInfo | 717 | CachedUserInfo userInfo |
718 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 718 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
719 | 719 | ||
720 | if (userInfo == null) | 720 | if (userInfo == null) |
721 | { | 721 | { |
722 | m_log.Warn("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); | 722 | m_log.Warn("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); |
@@ -726,13 +726,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
726 | if (userInfo.RootFolder != null) | 726 | if (userInfo.RootFolder != null) |
727 | { | 727 | { |
728 | InventoryItemBase folder = userInfo.RootFolder.FindItem(folderID); | 728 | InventoryItemBase folder = userInfo.RootFolder.FindItem(folderID); |
729 | 729 | ||
730 | if (folder != null) | 730 | if (folder != null) |
731 | { | 731 | { |
732 | m_log.WarnFormat( | 732 | m_log.WarnFormat( |
733 | "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}", | 733 | "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}", |
734 | remoteClient.Name, remoteClient.AgentId, folderID); | 734 | remoteClient.Name, remoteClient.AgentId, folderID); |
735 | 735 | ||
736 | // doesn't work just yet, commented out. will fix in next patch. | 736 | // doesn't work just yet, commented out. will fix in next patch. |
737 | // userInfo.DeleteItem(folder); | 737 | // userInfo.DeleteItem(folder); |
738 | } | 738 | } |
@@ -760,7 +760,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
760 | /// <param name="remoteClient"></param> | 760 | /// <param name="remoteClient"></param> |
761 | /// <param name="primLocalID"></param> | 761 | /// <param name="primLocalID"></param> |
762 | public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) | 762 | public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) |
763 | { | 763 | { |
764 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 764 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
765 | if (group != null) | 765 | if (group != null) |
766 | { | 766 | { |
@@ -808,7 +808,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
808 | localID); | 808 | localID); |
809 | } | 809 | } |
810 | } | 810 | } |
811 | 811 | ||
812 | /// <summary> | 812 | /// <summary> |
813 | /// Move the given item in the given prim to a folder in the client's inventory | 813 | /// Move the given item in the given prim to a folder in the client's inventory |
814 | /// </summary> | 814 | /// </summary> |
@@ -819,33 +819,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
819 | public void MoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) | 819 | public void MoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) |
820 | { | 820 | { |
821 | SceneObjectPart part = GetSceneObjectPart(primLocalId); | 821 | SceneObjectPart part = GetSceneObjectPart(primLocalId); |
822 | 822 | ||
823 | if (null == part) | 823 | if (null == part) |
824 | { | 824 | { |
825 | m_log.WarnFormat( | 825 | m_log.WarnFormat( |
826 | "[PRIM INVENTORY]: " + | 826 | "[PRIM INVENTORY]: " + |
827 | "Move of inventory item {0} from prim with local id {1} failed because the prim could not be found", | 827 | "Move of inventory item {0} from prim with local id {1} failed because the prim could not be found", |
828 | itemId, primLocalId); | 828 | itemId, primLocalId); |
829 | 829 | ||
830 | return; | 830 | return; |
831 | } | 831 | } |
832 | 832 | ||
833 | TaskInventoryItem taskItem = part.GetInventoryItem(itemId); | 833 | TaskInventoryItem taskItem = part.GetInventoryItem(itemId); |
834 | 834 | ||
835 | if (null == taskItem) | 835 | if (null == taskItem) |
836 | { | 836 | { |
837 | // Console already notified of error in GetInventoryItem | 837 | // Console already notified of error in GetInventoryItem |
838 | return; | 838 | return; |
839 | } | 839 | } |
840 | 840 | ||
841 | // Only owner can copy | 841 | // Only owner can copy |
842 | if (remoteClient.AgentId != taskItem.OwnerID) | 842 | if (remoteClient.AgentId != taskItem.OwnerID) |
843 | { | 843 | { |
844 | return; | 844 | return; |
845 | } | 845 | } |
846 | 846 | ||
847 | InventoryItemBase agentItem = new InventoryItemBase(); | 847 | InventoryItemBase agentItem = new InventoryItemBase(); |
848 | 848 | ||
849 | agentItem.ID = LLUUID.Random(); | 849 | agentItem.ID = LLUUID.Random(); |
850 | agentItem.Creator = taskItem.CreatorID; | 850 | agentItem.Creator = taskItem.CreatorID; |
851 | agentItem.Owner = remoteClient.AgentId; | 851 | agentItem.Owner = remoteClient.AgentId; |
@@ -855,33 +855,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
855 | agentItem.AssetType = taskItem.Type; | 855 | agentItem.AssetType = taskItem.Type; |
856 | agentItem.InvType = taskItem.InvType; | 856 | agentItem.InvType = taskItem.InvType; |
857 | agentItem.Folder = folderId; | 857 | agentItem.Folder = folderId; |
858 | 858 | ||
859 | if ((remoteClient.AgentId != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) | 859 | if ((remoteClient.AgentId != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) |
860 | { | 860 | { |
861 | agentItem.BasePermissions = taskItem.NextOwnerMask; | 861 | agentItem.BasePermissions = taskItem.NextOwnerMask; |
862 | agentItem.CurrentPermissions = taskItem.NextOwnerMask; | 862 | agentItem.CurrentPermissions = taskItem.NextOwnerMask; |
863 | agentItem.NextPermissions = taskItem.NextOwnerMask; | 863 | agentItem.NextPermissions = taskItem.NextOwnerMask; |
864 | agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask; | 864 | agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask; |
865 | } | 865 | } |
866 | else | 866 | else |
867 | { | 867 | { |
868 | agentItem.BasePermissions = taskItem.BaseMask; | 868 | agentItem.BasePermissions = taskItem.BaseMask; |
869 | agentItem.CurrentPermissions = taskItem.OwnerMask; | 869 | agentItem.CurrentPermissions = taskItem.OwnerMask; |
870 | agentItem.NextPermissions = taskItem.NextOwnerMask; | 870 | agentItem.NextPermissions = taskItem.NextOwnerMask; |
871 | agentItem.EveryOnePermissions = taskItem.EveryoneMask; | 871 | agentItem.EveryOnePermissions = taskItem.EveryoneMask; |
872 | } | 872 | } |
873 | 873 | ||
874 | AddInventoryItem(remoteClient, agentItem); | 874 | AddInventoryItem(remoteClient, agentItem); |
875 | if (!ExternalChecks.ExternalChecksBypassPermissions()) | 875 | if (!ExternalChecks.ExternalChecksBypassPermissions()) |
876 | { | 876 | { |
877 | if((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) | 877 | if ((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) |
878 | part.RemoveInventoryItem(itemId); | 878 | part.RemoveInventoryItem(itemId); |
879 | } | 879 | } |
880 | 880 | ||
881 | } | 881 | } |
882 | 882 | ||
883 | /// <summary> | 883 | /// <summary> |
884 | /// Update an item in a prim (task) inventory. | 884 | /// Update an item in a prim (task) inventory. |
885 | /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> | 885 | /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> |
886 | /// </summary> | 886 | /// </summary> |
887 | /// <param name="remoteClient"></param> | 887 | /// <param name="remoteClient"></param> |
@@ -915,14 +915,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
915 | { | 915 | { |
916 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); | 916 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); |
917 | m_log.InfoFormat( | 917 | m_log.InfoFormat( |
918 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", | 918 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", |
919 | item.Name, primLocalID, remoteClient.Name); | 919 | item.Name, primLocalID, remoteClient.Name); |
920 | part.ParentGroup.GetProperties(remoteClient); | 920 | part.ParentGroup.GetProperties(remoteClient); |
921 | if (!ExternalChecks.ExternalChecksBypassPermissions()) | 921 | if (!ExternalChecks.ExternalChecksBypassPermissions()) |
922 | { | 922 | { |
923 | if((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 923 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
924 | RemoveInventoryItem(remoteClient, itemID); | 924 | RemoveInventoryItem(remoteClient, itemID); |
925 | } | 925 | } |
926 | } | 926 | } |
927 | else | 927 | else |
928 | { | 928 | { |
@@ -951,22 +951,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
951 | public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) | 951 | public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) |
952 | { | 952 | { |
953 | LLUUID copyID = LLUUID.Random(); | 953 | LLUUID copyID = LLUUID.Random(); |
954 | 954 | ||
955 | if (itemID != LLUUID.Zero) | 955 | if (itemID != LLUUID.Zero) |
956 | { | 956 | { |
957 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 957 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
958 | 958 | ||
959 | if (userInfo != null && userInfo.RootFolder != null) | 959 | if (userInfo != null && userInfo.RootFolder != null) |
960 | { | 960 | { |
961 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 961 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); |
962 | 962 | ||
963 | // Try library | 963 | // Try library |
964 | // XXX clumsy, possibly should be one call | 964 | // XXX clumsy, possibly should be one call |
965 | if (null == item) | 965 | if (null == item) |
966 | { | 966 | { |
967 | item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); | 967 | item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); |
968 | } | 968 | } |
969 | 969 | ||
970 | if (item != null) | 970 | if (item != null) |
971 | { | 971 | { |
972 | SceneObjectPart part = GetSceneObjectPart(localID); | 972 | SceneObjectPart part = GetSceneObjectPart(localID); |
@@ -975,7 +975,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
975 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); | 975 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); |
976 | part.ParentGroup.StartScript(localID, copyID); | 976 | part.ParentGroup.StartScript(localID, copyID); |
977 | part.ParentGroup.GetProperties(remoteClient); | 977 | part.ParentGroup.GetProperties(remoteClient); |
978 | 978 | ||
979 | // m_log.InfoFormat("[PRIMINVENTORY]: " + | 979 | // m_log.InfoFormat("[PRIMINVENTORY]: " + |
980 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 980 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
981 | // item.inventoryName, localID, remoteClient.Name); | 981 | // item.inventoryName, localID, remoteClient.Name); |
@@ -1000,10 +1000,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1000 | else // If the itemID is zero then the script has been rezzed directly in an object's inventory | 1000 | else // If the itemID is zero then the script has been rezzed directly in an object's inventory |
1001 | { | 1001 | { |
1002 | // not yet implemented | 1002 | // not yet implemented |
1003 | // TODO Need to get more details from original RezScript packet | 1003 | // TODO Need to get more details from original RezScript packet |
1004 | // XXX jc tmp | 1004 | // XXX jc tmp |
1005 | // AssetBase asset = CreateAsset("chimney sweep", "sailor.lsl", 10, 10, null); | 1005 | // AssetBase asset = CreateAsset("chimney sweep", "sailor.lsl", 10, 10, null); |
1006 | // AssetCache.AddAsset(asset); | 1006 | // AssetCache.AddAsset(asset); |
1007 | } | 1007 | } |
1008 | } | 1008 | } |
1009 | 1009 | ||
@@ -1023,11 +1023,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1023 | else | 1023 | else |
1024 | { | 1024 | { |
1025 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 1025 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
1026 | { | 1026 | { |
1027 | // m_log.DebugFormat( | 1027 | // m_log.DebugFormat( |
1028 | // "[AGENT INVENTORY]: Received request to derez {0} into folder {1}", | 1028 | // "[AGENT INVENTORY]: Received request to derez {0} into folder {1}", |
1029 | // Data.ObjectLocalID, DeRezPacket.AgentBlock.DestinationID); | 1029 | // Data.ObjectLocalID, DeRezPacket.AgentBlock.DestinationID); |
1030 | 1030 | ||
1031 | EntityBase selectedEnt = null; | 1031 | EntityBase selectedEnt = null; |
1032 | //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); | 1032 | //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); |
1033 | 1033 | ||
@@ -1046,9 +1046,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1046 | bool permissionToTake = false; | 1046 | bool permissionToTake = false; |
1047 | bool permissionToDelete = false; | 1047 | bool permissionToDelete = false; |
1048 | if (DeRezPacket.AgentBlock.Destination == 1)// Take Copy | 1048 | if (DeRezPacket.AgentBlock.Destination == 1)// Take Copy |
1049 | { | 1049 | { |
1050 | permissionToTake = ExternalChecks.ExternalChecksCanTakeCopyObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | 1050 | permissionToTake = ExternalChecks.ExternalChecksCanTakeCopyObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); |
1051 | permissionToDelete = false; //Just taking copy! | 1051 | permissionToDelete = false; //Just taking copy! |
1052 | 1052 | ||
1053 | } | 1053 | } |
1054 | else if (DeRezPacket.AgentBlock.Destination == 4) //Take | 1054 | else if (DeRezPacket.AgentBlock.Destination == 4) //Take |
@@ -1094,27 +1094,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
1094 | item.Folder = DeRezPacket.AgentBlock.DestinationID; | 1094 | item.Folder = DeRezPacket.AgentBlock.DestinationID; |
1095 | if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) | 1095 | if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) |
1096 | { | 1096 | { |
1097 | uint perms=objectGroup.GetEffectivePermissions(); | 1097 | uint perms=objectGroup.GetEffectivePermissions(); |
1098 | uint nextPerms=(perms & 7) << 13; | 1098 | uint nextPerms=(perms & 7) << 13; |
1099 | if((nextPerms & (uint)PermissionMask.Copy) == 0) | 1099 | if ((nextPerms & (uint)PermissionMask.Copy) == 0) |
1100 | perms &= ~(uint)PermissionMask.Copy; | 1100 | perms &= ~(uint)PermissionMask.Copy; |
1101 | if((nextPerms & (uint)PermissionMask.Transfer) == 0) | 1101 | if ((nextPerms & (uint)PermissionMask.Transfer) == 0) |
1102 | perms &= ~(uint)PermissionMask.Transfer; | 1102 | perms &= ~(uint)PermissionMask.Transfer; |
1103 | if((nextPerms & (uint)PermissionMask.Modify) == 0) | 1103 | if ((nextPerms & (uint)PermissionMask.Modify) == 0) |
1104 | perms &= ~(uint)PermissionMask.Modify; | 1104 | perms &= ~(uint)PermissionMask.Modify; |
1105 | 1105 | ||
1106 | item.BasePermissions = perms & objectGroup.RootPart.NextOwnerMask; | 1106 | item.BasePermissions = perms & objectGroup.RootPart.NextOwnerMask; |
1107 | item.CurrentPermissions = item.BasePermissions; | 1107 | item.CurrentPermissions = item.BasePermissions; |
1108 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1108 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1109 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; | 1109 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; |
1110 | item.CurrentPermissions |= 8; // Slam! | 1110 | item.CurrentPermissions |= 8; // Slam! |
1111 | } | 1111 | } |
1112 | else | 1112 | else |
1113 | { | 1113 | { |
1114 | item.BasePermissions = objectGroup.GetEffectivePermissions(); | 1114 | item.BasePermissions = objectGroup.GetEffectivePermissions(); |
1115 | item.CurrentPermissions = objectGroup.GetEffectivePermissions(); | 1115 | item.CurrentPermissions = objectGroup.GetEffectivePermissions(); |
1116 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1116 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1117 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; | 1117 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; |
1118 | } | 1118 | } |
1119 | 1119 | ||
1120 | // TODO: add the new fields (Flags, Sale info, etc) | 1120 | // TODO: add the new fields (Flags, Sale info, etc) |
@@ -1201,15 +1201,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1201 | item.BasePermissions = objectGroup.RootPart.NextOwnerMask; | 1201 | item.BasePermissions = objectGroup.RootPart.NextOwnerMask; |
1202 | item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; | 1202 | item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; |
1203 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1203 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1204 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; | 1204 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; |
1205 | } | 1205 | } |
1206 | else | 1206 | else |
1207 | { | 1207 | { |
1208 | item.BasePermissions = objectGroup.GetEffectivePermissions(); | 1208 | item.BasePermissions = objectGroup.GetEffectivePermissions(); |
1209 | item.CurrentPermissions = objectGroup.GetEffectivePermissions(); | 1209 | item.CurrentPermissions = objectGroup.GetEffectivePermissions(); |
1210 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1210 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1211 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; | 1211 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | userInfo.AddItem(item); | 1214 | userInfo.AddItem(item); |
1215 | 1215 | ||
@@ -1218,7 +1218,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1218 | { | 1218 | { |
1219 | remoteClient.SendInventoryItemCreateUpdate(item); | 1219 | remoteClient.SendInventoryItemCreateUpdate(item); |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | } | 1222 | } |
1223 | } | 1223 | } |
1224 | } | 1224 | } |
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1250 | item.Name = asset.Name; | 1250 | item.Name = asset.Name; |
1251 | item.AssetType = asset.Type; | 1251 | item.AssetType = asset.Type; |
1252 | item.InvType = asset.InvType; | 1252 | item.InvType = asset.InvType; |
1253 | 1253 | ||
1254 | // Sticking it in root folder for now.. objects folder later? | 1254 | // Sticking it in root folder for now.. objects folder later? |
1255 | 1255 | ||
1256 | item.Folder = userInfo.RootFolder.ID;// DeRezPacket.AgentBlock.DestinationID; | 1256 | item.Folder = userInfo.RootFolder.ID;// DeRezPacket.AgentBlock.DestinationID; |
@@ -1259,14 +1259,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1259 | item.BasePermissions = objectGroup.RootPart.NextOwnerMask; | 1259 | item.BasePermissions = objectGroup.RootPart.NextOwnerMask; |
1260 | item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; | 1260 | item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; |
1261 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1261 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1262 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; | 1262 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; |
1263 | } | 1263 | } |
1264 | else | 1264 | else |
1265 | { | 1265 | { |
1266 | item.BasePermissions = objectGroup.RootPart.BaseMask; | 1266 | item.BasePermissions = objectGroup.RootPart.BaseMask; |
1267 | item.CurrentPermissions = objectGroup.RootPart.OwnerMask; | 1267 | item.CurrentPermissions = objectGroup.RootPart.OwnerMask; |
1268 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; | 1268 | item.NextPermissions = objectGroup.RootPart.NextOwnerMask; |
1269 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; | 1269 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | userInfo.AddItem(item); | 1272 | userInfo.AddItem(item); |
@@ -1345,12 +1345,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1345 | 1345 | ||
1346 | LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f); | 1346 | LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f); |
1347 | 1347 | ||
1348 | 1348 | ||
1349 | LLVector3 pos = GetNewRezLocation( | 1349 | LLVector3 pos = GetNewRezLocation( |
1350 | RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), | 1350 | RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), |
1351 | BypassRayCast, bRayEndIsIntersection,true,scale, false); | 1351 | BypassRayCast, bRayEndIsIntersection,true,scale, false); |
1352 | 1352 | ||
1353 | 1353 | ||
1354 | 1354 | ||
1355 | // Rez object | 1355 | // Rez object |
1356 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 1356 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
@@ -1359,14 +1359,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1359 | if (userInfo.RootFolder != null) | 1359 | if (userInfo.RootFolder != null) |
1360 | { | 1360 | { |
1361 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 1361 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); |
1362 | 1362 | ||
1363 | if (item != null) | 1363 | if (item != null) |
1364 | { | 1364 | { |
1365 | AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); | 1365 | AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); |
1366 | 1366 | ||
1367 | if (rezAsset != null) | 1367 | if (rezAsset != null) |
1368 | { | 1368 | { |
1369 | string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); | 1369 | string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); |
1370 | SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); | 1370 | SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); |
1371 | if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count,remoteClient.AgentId, pos) && !attachment) | 1371 | if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count,remoteClient.AgentId, pos) && !attachment) |
1372 | { | 1372 | { |
@@ -1401,10 +1401,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1401 | 1401 | ||
1402 | if (attachment) | 1402 | if (attachment) |
1403 | isAttachment = " Object was an attachment"; | 1403 | isAttachment = " Object was an attachment"; |
1404 | 1404 | ||
1405 | m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); | 1405 | m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); |
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | // Since renaming the item in the inventory does not affect the name stored | 1408 | // Since renaming the item in the inventory does not affect the name stored |
1409 | // in the serialization, transfer the correct name from the inventory to the | 1409 | // in the serialization, transfer the correct name from the inventory to the |
1410 | // object itself before we rez. | 1410 | // object itself before we rez. |
@@ -1413,18 +1413,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1413 | 1413 | ||
1414 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); | 1414 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); |
1415 | 1415 | ||
1416 | if(rootPart.OwnerID != item.Owner) | 1416 | if (rootPart.OwnerID != item.Owner) |
1417 | { | 1417 | { |
1418 | if((item.CurrentPermissions & 8) != 0) | 1418 | if ((item.CurrentPermissions & 8) != 0) |
1419 | { | 1419 | { |
1420 | foreach (SceneObjectPart part in partList) | 1420 | foreach (SceneObjectPart part in partList) |
1421 | { | 1421 | { |
1422 | part.EveryoneMask = item.EveryOnePermissions; | 1422 | part.EveryoneMask = item.EveryOnePermissions; |
1423 | part.NextOwnerMask = item.NextPermissions; | 1423 | part.NextOwnerMask = item.NextPermissions; |
1424 | } | 1424 | } |
1425 | } | 1425 | } |
1426 | group.ApplyNextOwnerPermissions(); | 1426 | group.ApplyNextOwnerPermissions(); |
1427 | } | 1427 | } |
1428 | 1428 | ||
1429 | foreach (SceneObjectPart part in partList) | 1429 | foreach (SceneObjectPart part in partList) |
1430 | { | 1430 | { |
@@ -1434,13 +1434,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1434 | part.OwnerID = item.Owner; | 1434 | part.OwnerID = item.Owner; |
1435 | part.ChangeInventoryOwner(item.Owner); | 1435 | part.ChangeInventoryOwner(item.Owner); |
1436 | } | 1436 | } |
1437 | else if(((item.CurrentPermissions & 8) != 0) && (!attachment)) // Slam! | 1437 | else if (((item.CurrentPermissions & 8) != 0) && (!attachment)) // Slam! |
1438 | { | 1438 | { |
1439 | part.EveryoneMask = item.EveryOnePermissions; | 1439 | part.EveryoneMask = item.EveryOnePermissions; |
1440 | part.NextOwnerMask = item.NextPermissions; | 1440 | part.NextOwnerMask = item.NextPermissions; |
1441 | } | 1441 | } |
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | rootPart.TrimPermissions(); | 1444 | rootPart.TrimPermissions(); |
1445 | 1445 | ||
1446 | if (!attachment) | 1446 | if (!attachment) |
@@ -1451,11 +1451,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1451 | } | 1451 | } |
1452 | group.ApplyPhysics(m_physicalPrim); | 1452 | group.ApplyPhysics(m_physicalPrim); |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | 1455 | ||
1456 | group.StartScripts(); | 1456 | group.StartScripts(); |
1457 | 1457 | ||
1458 | 1458 | ||
1459 | if (!attachment) | 1459 | if (!attachment) |
1460 | rootPart.ScheduleFullUpdate(); | 1460 | rootPart.ScheduleFullUpdate(); |
1461 | 1461 | ||
@@ -1505,18 +1505,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1505 | 1505 | ||
1506 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); | 1506 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); |
1507 | 1507 | ||
1508 | if(rootPart.OwnerID != item.OwnerID) | 1508 | if (rootPart.OwnerID != item.OwnerID) |
1509 | { | 1509 | { |
1510 | if((item.OwnerMask & 8) != 0) | 1510 | if ((item.OwnerMask & 8) != 0) |
1511 | { | 1511 | { |
1512 | foreach (SceneObjectPart part in partList) | 1512 | foreach (SceneObjectPart part in partList) |
1513 | { | 1513 | { |
1514 | part.EveryoneMask = item.EveryoneMask; | 1514 | part.EveryoneMask = item.EveryoneMask; |
1515 | part.NextOwnerMask = item.NextOwnerMask; | 1515 | part.NextOwnerMask = item.NextOwnerMask; |
1516 | } | 1516 | } |
1517 | } | 1517 | } |
1518 | group.ApplyNextOwnerPermissions(); | 1518 | group.ApplyNextOwnerPermissions(); |
1519 | } | 1519 | } |
1520 | 1520 | ||
1521 | foreach (SceneObjectPart part in partList) | 1521 | foreach (SceneObjectPart part in partList) |
1522 | { | 1522 | { |
@@ -1526,11 +1526,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1526 | part.OwnerID = item.OwnerID; | 1526 | part.OwnerID = item.OwnerID; |
1527 | part.ChangeInventoryOwner(item.OwnerID); | 1527 | part.ChangeInventoryOwner(item.OwnerID); |
1528 | } | 1528 | } |
1529 | else if((item.OwnerMask & 8) != 0) // Slam! | 1529 | else if ((item.OwnerMask & 8) != 0) // Slam! |
1530 | { | 1530 | { |
1531 | part.EveryoneMask = item.EveryoneMask; | 1531 | part.EveryoneMask = item.EveryoneMask; |
1532 | part.NextOwnerMask = item.NextOwnerMask; | 1532 | part.NextOwnerMask = item.NextOwnerMask; |
1533 | } | 1533 | } |
1534 | } | 1534 | } |
1535 | rootPart.TrimPermissions(); | 1535 | rootPart.TrimPermissions(); |
1536 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) | 1536 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) |
@@ -1548,6 +1548,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1548 | } | 1548 | } |
1549 | return null; | 1549 | return null; |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | } | 1552 | } |
1553 | } | 1553 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index f55d822..c486e28 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | public partial class Scene | 35 | public partial class Scene |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// | 38 | /// |
39 | /// </summary> | 39 | /// </summary> |
40 | /// <param name="message"></param> | 40 | /// <param name="message"></param> |
41 | /// <param name="type"></param> | 41 | /// <param name="type"></param> |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
81 | foreach (EntityBase ent in EntitieList) | 81 | foreach (EntityBase ent in EntitieList) |
82 | { | 82 | { |
83 | if (ent is SceneObjectGroup) | 83 | if (ent is SceneObjectGroup) |
84 | { | 84 | { |
85 | if (((SceneObjectGroup) ent).LocalId == primLocalID) | 85 | if (((SceneObjectGroup) ent).LocalId == primLocalID) |
86 | { | 86 | { |
87 | // A prim is only tainted if it's allowed to be edited by the person clicking it. | 87 | // A prim is only tainted if it's allowed to be edited by the person clicking it. |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /// <summary> | 100 | /// <summary> |
101 | /// | 101 | /// |
102 | /// </summary> | 102 | /// </summary> |
103 | /// <param name="primLocalID"></param> | 103 | /// <param name="primLocalID"></param> |
104 | /// <param name="remoteClient"></param> | 104 | /// <param name="remoteClient"></param> |
@@ -139,10 +139,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
139 | agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); | 139 | agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); |
140 | 140 | ||
141 | // First, allow all validators a stab at it | 141 | // First, allow all validators a stab at it |
142 | m_eventManager.TriggerValidateLandBuy(this, args); | 142 | m_eventManager.TriggerValidateLandBuy(this, args); |
143 | 143 | ||
144 | // Then, check validation and transfer | 144 | // Then, check validation and transfer |
145 | m_eventManager.TriggerLandBuy(this, args); | 145 | m_eventManager.TriggerLandBuy(this, args); |
146 | } | 146 | } |
147 | 147 | ||
148 | public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) | 148 | public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1964ef4..32dc7d5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | /// Each agent has its own capabilities handler. | 98 | /// Each agent has its own capabilities handler. |
99 | /// </summary> | 99 | /// </summary> |
100 | protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); | 100 | protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); |
101 | 101 | ||
102 | protected BaseHttpServer m_httpListener; | 102 | protected BaseHttpServer m_httpListener; |
103 | 103 | ||
104 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); | 104 | protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); |
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
135 | private int m_update_backup = 200; | 135 | private int m_update_backup = 200; |
136 | private int m_update_terrain = 50; | 136 | private int m_update_terrain = 50; |
137 | private int m_update_land = 1; | 137 | private int m_update_land = 1; |
138 | 138 | ||
139 | 139 | ||
140 | private int frameMS = 0; | 140 | private int frameMS = 0; |
141 | private int physicsMS2 = 0; | 141 | private int physicsMS2 = 0; |
@@ -201,7 +201,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
201 | get { return m_innerScene.Entities; } | 201 | get { return m_innerScene.Entities; } |
202 | set { m_innerScene.Entities = value; } | 202 | set { m_innerScene.Entities = value; } |
203 | } | 203 | } |
204 | 204 | ||
205 | public Dictionary<LLUUID, ScenePresence> m_restorePresences | 205 | public Dictionary<LLUUID, ScenePresence> m_restorePresences |
206 | { | 206 | { |
207 | get { return m_innerScene.RestorePresences; } | 207 | get { return m_innerScene.RestorePresences; } |
@@ -324,14 +324,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
324 | 324 | ||
325 | public override bool OtherRegionUp(RegionInfo otherRegion) | 325 | public override bool OtherRegionUp(RegionInfo otherRegion) |
326 | { | 326 | { |
327 | // Another region is up. | 327 | // Another region is up. |
328 | // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1) | 328 | // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1) |
329 | // We have to tell all our ScenePresences about it.. | 329 | // We have to tell all our ScenePresences about it.. |
330 | // and add it to the neighbor list. | 330 | // and add it to the neighbor list. |
331 | 331 | ||
332 | // We only add it to the neighbor list if it's within 1 region from here. | 332 | // We only add it to the neighbor list if it's within 1 region from here. |
333 | // Agents may have draw distance values that cross two regions though, so | 333 | // Agents may have draw distance values that cross two regions though, so |
334 | // we add it to the notify list regardless of distance. | 334 | // we add it to the notify list regardless of distance. |
335 | // We'll check the agent's draw distance before notifying them though. | 335 | // We'll check the agent's draw distance before notifying them though. |
336 | 336 | ||
337 | 337 | ||
@@ -339,9 +339,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
339 | { | 339 | { |
340 | for (int i = 0; i < m_neighbours.Count; i++) | 340 | for (int i = 0; i < m_neighbours.Count; i++) |
341 | { | 341 | { |
342 | // The purpose of this loop is to re-update the known neighbors | 342 | // The purpose of this loop is to re-update the known neighbors |
343 | // when another region comes up on top of another one. | 343 | // when another region comes up on top of another one. |
344 | // The latest region in that location ends up in the | 344 | // The latest region in that location ends up in the |
345 | // 'known neighbors list' | 345 | // 'known neighbors list' |
346 | // Additionally, the commFailTF property gets reset to false. | 346 | // Additionally, the commFailTF property gets reset to false. |
347 | if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle) | 347 | if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle) |
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | } | 354 | } |
355 | 355 | ||
356 | // If the value isn't in the neighbours, add it. | 356 | // If the value isn't in the neighbours, add it. |
357 | // If the RegionInfo isn't exact but is for the same XY World location, | 357 | // If the RegionInfo isn't exact but is for the same XY World location, |
358 | // then the above loop will fix that. | 358 | // then the above loop will fix that. |
359 | 359 | ||
360 | if (!(CheckNeighborRegion(otherRegion))) | 360 | if (!(CheckNeighborRegion(otherRegion))) |
@@ -431,8 +431,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | } | 431 | } |
432 | } | 432 | } |
433 | return found; | 433 | return found; |
434 | 434 | ||
435 | 435 | ||
436 | } | 436 | } |
437 | public virtual void Restart(float seconds) | 437 | public virtual void Restart(float seconds) |
438 | { | 438 | { |
@@ -461,8 +461,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
461 | } | 461 | } |
462 | } | 462 | } |
463 | 463 | ||
464 | // The Restart timer has occured. | 464 | // The Restart timer has occured. |
465 | // We have to figure out if this is a notification or if the number of seconds specified in Restart | 465 | // We have to figure out if this is a notification or if the number of seconds specified in Restart |
466 | // have elapsed. | 466 | // have elapsed. |
467 | // If they have elapsed, call RestartNow() | 467 | // If they have elapsed, call RestartNow() |
468 | public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) | 468 | public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) |
@@ -500,7 +500,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
500 | } | 500 | } |
501 | 501 | ||
502 | // This is a helper function that notifies root agents in this region that a new sim near them has come up | 502 | // This is a helper function that notifies root agents in this region that a new sim near them has come up |
503 | // This is in the form of a timer because when an instance of OpenSim.exe is started, | 503 | // This is in the form of a timer because when an instance of OpenSim.exe is started, |
504 | // Even though the sims initialize, they don't listen until 'all of the sims are initialized' | 504 | // Even though the sims initialize, they don't listen until 'all of the sims are initialized' |
505 | // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it. | 505 | // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it. |
506 | // subsequently the agent will never see the region come back online. | 506 | // subsequently the agent will never see the region come back online. |
@@ -730,7 +730,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
730 | if (m_frame % m_update_entities == 0) | 730 | if (m_frame % m_update_entities == 0) |
731 | m_innerScene.UpdateEntities(); | 731 | m_innerScene.UpdateEntities(); |
732 | 732 | ||
733 | // run through entities that have scheduled themselves for | 733 | // run through entities that have scheduled themselves for |
734 | // updates looking for updates(faster) | 734 | // updates looking for updates(faster) |
735 | if (m_frame % m_update_entitiesquick == 0) | 735 | if (m_frame % m_update_entitiesquick == 0) |
736 | m_innerScene.ProcessUpdates(); | 736 | m_innerScene.ProcessUpdates(); |
@@ -743,13 +743,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
743 | { | 743 | { |
744 | if (m_frame % m_update_events == 0) | 744 | if (m_frame % m_update_events == 0) |
745 | UpdateEvents(); | 745 | UpdateEvents(); |
746 | 746 | ||
747 | if (m_frame % m_update_backup == 0) | 747 | if (m_frame % m_update_backup == 0) |
748 | UpdateStorageBackup(); | 748 | UpdateStorageBackup(); |
749 | 749 | ||
750 | if (m_frame % m_update_terrain == 0) | 750 | if (m_frame % m_update_terrain == 0) |
751 | UpdateTerrain(); | 751 | UpdateTerrain(); |
752 | 752 | ||
753 | if (m_frame % m_update_land == 0) | 753 | if (m_frame % m_update_land == 0) |
754 | UpdateLand(); | 754 | UpdateLand(); |
755 | otherMS = System.Environment.TickCount - otherMS; | 755 | otherMS = System.Environment.TickCount - otherMS; |
@@ -800,14 +800,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
800 | // Get actual time dilation | 800 | // Get actual time dilation |
801 | float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); | 801 | float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); |
802 | 802 | ||
803 | // If actual time dilation is greater then one, we're catching up, so subtract | 803 | // If actual time dilation is greater then one, we're catching up, so subtract |
804 | // the amount that's greater then 1 from the time dilation | 804 | // the amount that's greater then 1 from the time dilation |
805 | if (tmpval > 1.0) | 805 | if (tmpval > 1.0) |
806 | { | 806 | { |
807 | tmpval = tmpval - (tmpval - 1.0f); | 807 | tmpval = tmpval - (tmpval - 1.0f); |
808 | } | 808 | } |
809 | m_timedilation = tmpval; | 809 | m_timedilation = tmpval; |
810 | 810 | ||
811 | m_lastupdate = DateTime.Now; | 811 | m_lastupdate = DateTime.Now; |
812 | } | 812 | } |
813 | } | 813 | } |
@@ -858,9 +858,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
858 | { | 858 | { |
859 | ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); }); | 859 | ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); }); |
860 | } | 860 | } |
861 | 861 | ||
862 | /// <summary> | 862 | /// <summary> |
863 | /// | 863 | /// |
864 | /// </summary> | 864 | /// </summary> |
865 | /// <returns></returns> | 865 | /// <returns></returns> |
866 | public bool Backup() | 866 | public bool Backup() |
@@ -929,7 +929,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | /// <summary> | 929 | /// <summary> |
930 | /// Loads the World heightmap | 930 | /// Loads the World heightmap |
931 | /// </summary> | 931 | /// </summary> |
932 | /// | 932 | /// |
933 | public override void LoadWorldMap() | 933 | public override void LoadWorldMap() |
934 | { | 934 | { |
935 | try | 935 | try |
@@ -946,7 +946,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
946 | { | 946 | { |
947 | Heightmap = new TerrainChannel(map); | 947 | Heightmap = new TerrainChannel(map); |
948 | } | 948 | } |
949 | 949 | ||
950 | } | 950 | } |
951 | catch (Exception e) | 951 | catch (Exception e) |
952 | { | 952 | { |
@@ -961,13 +961,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
961 | public void RegisterRegionWithGrid() | 961 | public void RegisterRegionWithGrid() |
962 | { | 962 | { |
963 | RegisterCommsEvents(); | 963 | RegisterCommsEvents(); |
964 | 964 | ||
965 | // These two 'commands' *must be* next to each other or sim rebooting fails. | 965 | // These two 'commands' *must be* next to each other or sim rebooting fails. |
966 | m_sceneGridService.RegisterRegion(RegionInfo); | 966 | m_sceneGridService.RegisterRegion(RegionInfo); |
967 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); | 967 | m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); |
968 | 968 | ||
969 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); | 969 | Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); |
970 | 970 | ||
971 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) | 971 | if (dGridSettings.ContainsKey("allow_forceful_banlines")) |
972 | { | 972 | { |
973 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 973 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
@@ -984,11 +984,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
984 | } | 984 | } |
985 | 985 | ||
986 | /// <summary> | 986 | /// <summary> |
987 | /// | 987 | /// |
988 | /// </summary> | 988 | /// </summary> |
989 | public void CreateTerrainTexture(bool temporary) | 989 | public void CreateTerrainTexture(bool temporary) |
990 | { | 990 | { |
991 | //create a texture asset of the terrain | 991 | //create a texture asset of the terrain |
992 | IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); | 992 | IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); |
993 | 993 | ||
994 | // Cannot create a map for a nonexistant heightmap yet. | 994 | // Cannot create a map for a nonexistant heightmap yet. |
@@ -1129,7 +1129,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1129 | AssetCache.AddAsset(asset); | 1129 | AssetCache.AddAsset(asset); |
1130 | } | 1130 | } |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | #endregion | 1135 | #endregion |
@@ -1211,7 +1211,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1211 | if (RayTargetID != LLUUID.Zero) | 1211 | if (RayTargetID != LLUUID.Zero) |
1212 | { | 1212 | { |
1213 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); | 1213 | SceneObjectPart target = GetSceneObjectPart(RayTargetID); |
1214 | 1214 | ||
1215 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 1215 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); |
1216 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1216 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1217 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1217 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
@@ -1220,9 +1220,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1220 | { | 1220 | { |
1221 | pos = target.AbsolutePosition; | 1221 | pos = target.AbsolutePosition; |
1222 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); | 1222 | //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); |
1223 | 1223 | ||
1224 | // TODO: Raytrace better here | 1224 | // TODO: Raytrace better here |
1225 | 1225 | ||
1226 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); | 1226 | //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); |
1227 | Ray NewRay = new Ray(AXOrigin, AXdirection); | 1227 | Ray NewRay = new Ray(AXOrigin, AXdirection); |
1228 | 1228 | ||
@@ -1246,13 +1246,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1246 | // Set the position to the intersection point | 1246 | // Set the position to the intersection point |
1247 | LLVector3 offset = (normal * (ScaleOffset / 2f)); | 1247 | LLVector3 offset = (normal * (ScaleOffset / 2f)); |
1248 | pos = (intersectionpoint + offset); | 1248 | pos = (intersectionpoint + offset); |
1249 | 1249 | ||
1250 | // Un-offset the prim (it gets offset later by the consumer method) | 1250 | // Un-offset the prim (it gets offset later by the consumer method) |
1251 | pos.Z -= 0.25F; | 1251 | pos.Z -= 0.25F; |
1252 | 1252 | ||
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | 1255 | ||
1256 | return pos; | 1256 | return pos; |
1257 | } | 1257 | } |
1258 | else | 1258 | else |
@@ -1267,8 +1267,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1267 | if (ei.HitTF) | 1267 | if (ei.HitTF) |
1268 | { | 1268 | { |
1269 | pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); | 1269 | pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | return pos; | 1272 | return pos; |
1273 | } | 1273 | } |
1274 | } | 1274 | } |
@@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1284 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1284 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, |
1285 | byte RayEndIsIntersection) | 1285 | byte RayEndIsIntersection) |
1286 | { | 1286 | { |
1287 | 1287 | ||
1288 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); | 1288 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); |
1289 | 1289 | ||
1290 | if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) | 1290 | if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) |
@@ -1386,11 +1386,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1386 | 1386 | ||
1387 | /// <summary> | 1387 | /// <summary> |
1388 | /// Locate New region Handle and offset the prim position for the new region | 1388 | /// Locate New region Handle and offset the prim position for the new region |
1389 | /// | 1389 | /// |
1390 | /// </summary> | 1390 | /// </summary> |
1391 | /// <param name="position">current position of Group</param> | 1391 | /// <param name="position">current position of Group</param> |
1392 | /// <param name="grp">Scene Object Group that we're crossing</param> | 1392 | /// <param name="grp">Scene Object Group that we're crossing</param> |
1393 | 1393 | ||
1394 | public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) | 1394 | public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) |
1395 | { | 1395 | { |
1396 | if (grp == null) | 1396 | if (grp == null) |
@@ -1424,7 +1424,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1424 | pos.X = ((pos.X - Constants.RegionSize)); | 1424 | pos.X = ((pos.X - Constants.RegionSize)); |
1425 | 1425 | ||
1426 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); | 1426 | newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); |
1427 | 1427 | ||
1428 | // x + 1 | 1428 | // x + 1 |
1429 | } | 1429 | } |
1430 | else if (position.X < -0.1f) | 1430 | else if (position.X < -0.1f) |
@@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1449 | 1449 | ||
1450 | // Offset the positions for the new region across the border | 1450 | // Offset the positions for the new region across the border |
1451 | grp.OffsetForNewRegion(pos); | 1451 | grp.OffsetForNewRegion(pos); |
1452 | 1452 | ||
1453 | CrossPrimGroupIntoNewRegion(newRegionHandle, grp); | 1453 | CrossPrimGroupIntoNewRegion(newRegionHandle, grp); |
1454 | 1454 | ||
1455 | } | 1455 | } |
@@ -1507,7 +1507,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1507 | if (sp != null) | 1507 | if (sp != null) |
1508 | { | 1508 | { |
1509 | // hack assetID until we get assetID into the XML format. | 1509 | // hack assetID until we get assetID into the XML format. |
1510 | // LastOwnerID is used for group deeding, so when you do stuff | 1510 | // LastOwnerID is used for group deeding, so when you do stuff |
1511 | // with the deeded object, it goes back to them | 1511 | // with the deeded object, it goes back to them |
1512 | 1512 | ||
1513 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 1513 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
@@ -1515,7 +1515,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1515 | } | 1515 | } |
1516 | } | 1516 | } |
1517 | } | 1517 | } |
1518 | 1518 | ||
1519 | 1519 | ||
1520 | } | 1520 | } |
1521 | } | 1521 | } |
@@ -1533,16 +1533,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1533 | #region Add/Remove Avatar Methods | 1533 | #region Add/Remove Avatar Methods |
1534 | 1534 | ||
1535 | /// <summary> | 1535 | /// <summary> |
1536 | /// | 1536 | /// |
1537 | /// </summary> | 1537 | /// </summary> |
1538 | /// <param name="client"></param | 1538 | /// <param name="client"></param |
1539 | /// <param name="child"></param> | 1539 | /// <param name="child"></param> |
1540 | public override void AddNewClient(IClientAPI client, bool child) | 1540 | public override void AddNewClient(IClientAPI client, bool child) |
1541 | { | 1541 | { |
1542 | m_log.DebugFormat( | 1542 | m_log.DebugFormat( |
1543 | "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", | 1543 | "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", |
1544 | client.AgentId, RegionInfo.RegionName); | 1544 | client.AgentId, RegionInfo.RegionName); |
1545 | 1545 | ||
1546 | SubscribeToClientEvents(client); | 1546 | SubscribeToClientEvents(client); |
1547 | ScenePresence presence; | 1547 | ScenePresence presence; |
1548 | 1548 | ||
@@ -1618,7 +1618,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1618 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; | 1618 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; |
1619 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; | 1619 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; |
1620 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; | 1620 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; |
1621 | 1621 | ||
1622 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; | 1622 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; |
1623 | client.OnGodKickUser += HandleGodlikeKickUser; | 1623 | client.OnGodKickUser += HandleGodlikeKickUser; |
1624 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; | 1624 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; |
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1655 | 1655 | ||
1656 | client.OnSetStartLocationRequest += SetHomeRezPoint; | 1656 | client.OnSetStartLocationRequest += SetHomeRezPoint; |
1657 | client.OnUndo += m_innerScene.HandleUndo; | 1657 | client.OnUndo += m_innerScene.HandleUndo; |
1658 | 1658 | ||
1659 | EventManager.TriggerOnNewClient(client); | 1659 | EventManager.TriggerOnNewClient(client); |
1660 | } | 1660 | } |
1661 | public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) | 1661 | public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) |
@@ -1669,14 +1669,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1669 | RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); | 1669 | RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); |
1670 | } | 1670 | } |
1671 | } | 1671 | } |
1672 | 1672 | ||
1673 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, | 1673 | public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, |
1674 | LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, | 1674 | LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, |
1675 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) | 1675 | bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) |
1676 | { | 1676 | { |
1677 | LLVector3 pos; | 1677 | LLVector3 pos; |
1678 | const bool frontFacesOnly = true; | 1678 | const bool frontFacesOnly = true; |
1679 | 1679 | ||
1680 | SceneObjectPart target = GetSceneObjectPart(localID); | 1680 | SceneObjectPart target = GetSceneObjectPart(localID); |
1681 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); | 1681 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); |
1682 | 1682 | ||
@@ -1685,8 +1685,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1685 | 1685 | ||
1686 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); | 1686 | LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); |
1687 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | 1687 | Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); |
1688 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | 1688 | Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); |
1689 | 1689 | ||
1690 | if (target2.ParentGroup != null) | 1690 | if (target2.ParentGroup != null) |
1691 | { | 1691 | { |
1692 | pos = target2.AbsolutePosition; | 1692 | pos = target2.AbsolutePosition; |
@@ -1717,7 +1717,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1717 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); | 1717 | LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); |
1718 | LLVector3 offset = (normal * (ScaleOffset / 2f)); | 1718 | LLVector3 offset = (normal * (ScaleOffset / 2f)); |
1719 | pos = (intersectionpoint + offset); | 1719 | pos = (intersectionpoint + offset); |
1720 | 1720 | ||
1721 | if (CopyCenters) | 1721 | if (CopyCenters) |
1722 | { | 1722 | { |
1723 | // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. | 1723 | // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. |
@@ -1735,7 +1735,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1735 | normal.Z = ei2.normal.z; | 1735 | normal.Z = ei2.normal.z; |
1736 | } | 1736 | } |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | // Set the position to the intersection point | 1739 | // Set the position to the intersection point |
1740 | offset = (normal * (ScaleOffset / 2f)); | 1740 | offset = (normal * (ScaleOffset / 2f)); |
1741 | pos = (intersectionpoint + offset); | 1741 | pos = (intersectionpoint + offset); |
@@ -1749,8 +1749,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1749 | return; | 1749 | return; |
1750 | } | 1750 | } |
1751 | return; | 1751 | return; |
1752 | 1752 | ||
1753 | 1753 | ||
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | 1756 | ||
@@ -1776,7 +1776,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1776 | UserProfile.HomeLookAtY = (int)lookAt.Y; | 1776 | UserProfile.HomeLookAtY = (int)lookAt.Y; |
1777 | UserProfile.HomeLookAtZ = (int)lookAt.Z; | 1777 | UserProfile.HomeLookAtZ = (int)lookAt.Z; |
1778 | CommsManager.UserService.UpdateUserProfileProperties(UserProfile); | 1778 | CommsManager.UserService.UpdateUserProfileProperties(UserProfile); |
1779 | 1779 | ||
1780 | remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); | 1780 | remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); |
1781 | } | 1781 | } |
1782 | else | 1782 | else |
@@ -1784,7 +1784,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1784 | remoteClient.SendAgentAlertMessage("Set Home request Failed",false); | 1784 | remoteClient.SendAgentAlertMessage("Set Home request Failed",false); |
1785 | } | 1785 | } |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) | 1788 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) |
1789 | { | 1789 | { |
1790 | AvatarAppearance appearance; | 1790 | AvatarAppearance appearance; |
@@ -1844,7 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1844 | m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); | 1844 | m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); |
1845 | 1845 | ||
1846 | RemoveCapsHandler(agentID); | 1846 | RemoveCapsHandler(agentID); |
1847 | 1847 | ||
1848 | CommsManager.UserProfileCacheService.RemoveUser(agentID); | 1848 | CommsManager.UserProfileCacheService.RemoveUser(agentID); |
1849 | } | 1849 | } |
1850 | 1850 | ||
@@ -1870,7 +1870,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1870 | 1870 | ||
1871 | ForEachScenePresence( | 1871 | ForEachScenePresence( |
1872 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); | 1872 | delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); |
1873 | 1873 | ||
1874 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 1874 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
1875 | if (agentTransactions != null) | 1875 | if (agentTransactions != null) |
1876 | { | 1876 | { |
@@ -1921,7 +1921,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 1923 | //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
1924 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 1924 | //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) | 1927 | public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) |
@@ -1931,7 +1931,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1931 | { | 1931 | { |
1932 | lock (av) | 1932 | lock (av) |
1933 | { | 1933 | { |
1934 | 1934 | ||
1935 | for (int i = 0; i < regionslst.Count; i++) | 1935 | for (int i = 0; i < regionslst.Count; i++) |
1936 | { | 1936 | { |
1937 | av.KnownChildRegions.Remove(regionslst[i]); | 1937 | av.KnownChildRegions.Remove(regionslst[i]); |
@@ -1957,7 +1957,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1957 | #region Entities | 1957 | #region Entities |
1958 | 1958 | ||
1959 | /// <summary> | 1959 | /// <summary> |
1960 | /// | 1960 | /// |
1961 | /// </summary> | 1961 | /// </summary> |
1962 | /// <param name="entID"></param> | 1962 | /// <param name="entID"></param> |
1963 | /// <returns></returns> | 1963 | /// <returns></returns> |
@@ -1983,7 +1983,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1983 | #region RegionComms | 1983 | #region RegionComms |
1984 | 1984 | ||
1985 | /// <summary> | 1985 | /// <summary> |
1986 | /// | 1986 | /// |
1987 | /// </summary> | 1987 | /// </summary> |
1988 | public void RegisterCommsEvents() | 1988 | public void RegisterCommsEvents() |
1989 | { | 1989 | { |
@@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1999 | } | 1999 | } |
2000 | 2000 | ||
2001 | /// <summary> | 2001 | /// <summary> |
2002 | /// | 2002 | /// |
2003 | /// </summary> | 2003 | /// </summary> |
2004 | public void UnRegisterReginWithComms() | 2004 | public void UnRegisterReginWithComms() |
2005 | { | 2005 | { |
@@ -2026,7 +2026,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2026 | if (regionHandle == m_regInfo.RegionHandle) | 2026 | if (regionHandle == m_regInfo.RegionHandle) |
2027 | { | 2027 | { |
2028 | capsPaths[agent.AgentID] = agent.CapsPath; | 2028 | capsPaths[agent.AgentID] = agent.CapsPath; |
2029 | 2029 | ||
2030 | if (!agent.child) | 2030 | if (!agent.child) |
2031 | { | 2031 | { |
2032 | AddCapsHandler(agent.AgentID); | 2032 | AddCapsHandler(agent.AgentID); |
@@ -2041,44 +2041,44 @@ namespace OpenSim.Region.Environment.Scenes | |||
2041 | } | 2041 | } |
2042 | } | 2042 | } |
2043 | } | 2043 | } |
2044 | 2044 | ||
2045 | m_log.DebugFormat( | 2045 | m_log.DebugFormat( |
2046 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", | 2046 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", |
2047 | agent.circuitcode, agent.AgentID, RegionInfo.RegionName); | 2047 | agent.circuitcode, agent.AgentID, RegionInfo.RegionName); |
2048 | 2048 | ||
2049 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 2049 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |
2050 | } | 2050 | } |
2051 | else | 2051 | else |
2052 | { | 2052 | { |
2053 | m_log.WarnFormat( | 2053 | m_log.WarnFormat( |
2054 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", | 2054 | "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", |
2055 | agent.AgentID, regionHandle, RegionInfo.RegionName); | 2055 | agent.AgentID, regionHandle, RegionInfo.RegionName); |
2056 | } | 2056 | } |
2057 | } | 2057 | } |
2058 | 2058 | ||
2059 | /// <summary> | 2059 | /// <summary> |
2060 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, | 2060 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, |
2061 | /// then it is replaced by a new CAPS handler. | 2061 | /// then it is replaced by a new CAPS handler. |
2062 | /// | 2062 | /// |
2063 | /// FIXME: On login this is called twice, once for the login and once when the connection is made. | 2063 | /// FIXME: On login this is called twice, once for the login and once when the connection is made. |
2064 | /// This is somewhat innefficient and should be fixed. The initial login creation is necessary | 2064 | /// This is somewhat innefficient and should be fixed. The initial login creation is necessary |
2065 | /// since the client asks for capabilities immediately after being informed of the seed. | 2065 | /// since the client asks for capabilities immediately after being informed of the seed. |
2066 | /// </summary> | 2066 | /// </summary> |
2067 | /// <param name="agentId"></param> | 2067 | /// <param name="agentId"></param> |
2068 | /// <param name="capsObjectPath"></param> | 2068 | /// <param name="capsObjectPath"></param> |
2069 | public void AddCapsHandler(LLUUID agentId) | 2069 | public void AddCapsHandler(LLUUID agentId) |
2070 | { | 2070 | { |
2071 | String capsObjectPath = GetCapsPath(agentId); | 2071 | String capsObjectPath = GetCapsPath(agentId); |
2072 | 2072 | ||
2073 | m_log.DebugFormat( | 2073 | m_log.DebugFormat( |
2074 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", | 2074 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", |
2075 | agentId, RegionInfo.RegionName); | 2075 | agentId, RegionInfo.RegionName); |
2076 | 2076 | ||
2077 | Caps cap = | 2077 | Caps cap = |
2078 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, | 2078 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, |
2079 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); | 2079 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); |
2080 | cap.RegisterHandlers(); | 2080 | cap.RegisterHandlers(); |
2081 | 2081 | ||
2082 | EventManager.TriggerOnRegisterCaps(agentId, cap); | 2082 | EventManager.TriggerOnRegisterCaps(agentId, cap); |
2083 | 2083 | ||
2084 | cap.AddNewInventoryItem = AddInventoryItem; | 2084 | cap.AddNewInventoryItem = AddInventoryItem; |
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2087 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; | 2087 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; |
2088 | cap.GetClient = m_innerScene.GetControllingClient; | 2088 | cap.GetClient = m_innerScene.GetControllingClient; |
2089 | m_capsHandlers[agentId] = cap; | 2089 | m_capsHandlers[agentId] = cap; |
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | /// <summary> | 2092 | /// <summary> |
2093 | /// Remove the caps handler for a given agent. | 2093 | /// Remove the caps handler for a given agent. |
@@ -2100,9 +2100,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
2100 | if (m_capsHandlers.ContainsKey(agentId)) | 2100 | if (m_capsHandlers.ContainsKey(agentId)) |
2101 | { | 2101 | { |
2102 | m_log.DebugFormat( | 2102 | m_log.DebugFormat( |
2103 | "[CAPS]: Removing CAPS handler for root agent {0} in {1}", | 2103 | "[CAPS]: Removing CAPS handler for root agent {0} in {1}", |
2104 | agentId, RegionInfo.RegionName); | 2104 | agentId, RegionInfo.RegionName); |
2105 | 2105 | ||
2106 | m_capsHandlers[agentId].DeregisterHandlers(); | 2106 | m_capsHandlers[agentId].DeregisterHandlers(); |
2107 | EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); | 2107 | EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); |
2108 | 2108 | ||
@@ -2118,7 +2118,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | /// <summary> | 2120 | /// <summary> |
2121 | /// | 2121 | /// |
2122 | /// </summary> | 2122 | /// </summary> |
2123 | /// <param name="regionHandle"></param> | 2123 | /// <param name="regionHandle"></param> |
2124 | /// <param name="agentID"></param> | 2124 | /// <param name="agentID"></param> |
@@ -2152,8 +2152,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2152 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); | 2152 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); |
2153 | if (childAgentUpdate != null) | 2153 | if (childAgentUpdate != null) |
2154 | { | 2154 | { |
2155 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 2155 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
2156 | // however to avoid a race condition crossing borders.. | 2156 | // however to avoid a race condition crossing borders.. |
2157 | if (childAgentUpdate.IsChildAgent) | 2157 | if (childAgentUpdate.IsChildAgent) |
2158 | { | 2158 | { |
2159 | uint rRegionX = (uint)(cAgentData.regionHandle >> 40); | 2159 | uint rRegionX = (uint)(cAgentData.regionHandle >> 40); |
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2193 | } | 2193 | } |
2194 | // Tell a single agent to disconnect from the region. | 2194 | // Tell a single agent to disconnect from the region. |
2195 | presence.ControllingClient.SendShutdownConnectionNotice(); | 2195 | presence.ControllingClient.SendShutdownConnectionNotice(); |
2196 | 2196 | ||
2197 | presence.ControllingClient.Close(true); | 2197 | presence.ControllingClient.Close(true); |
2198 | } | 2198 | } |
2199 | } | 2199 | } |
@@ -2202,11 +2202,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2202 | 2202 | ||
2203 | /// <summary> | 2203 | /// <summary> |
2204 | /// Tell neighboring regions about this agent | 2204 | /// Tell neighboring regions about this agent |
2205 | /// When the regions respond with a true value, | 2205 | /// When the regions respond with a true value, |
2206 | /// tell the agents about the region. | 2206 | /// tell the agents about the region. |
2207 | /// | 2207 | /// |
2208 | /// We have to tell the regions about the agents first otherwise it'll deny them access | 2208 | /// We have to tell the regions about the agents first otherwise it'll deny them access |
2209 | /// | 2209 | /// |
2210 | /// </summary> | 2210 | /// </summary> |
2211 | /// <param name="presence"></param> | 2211 | /// <param name="presence"></param> |
2212 | public void InformClientOfNeighbours(ScenePresence presence) | 2212 | public void InformClientOfNeighbours(ScenePresence presence) |
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2309 | #region Module Methods | 2309 | #region Module Methods |
2310 | 2310 | ||
2311 | /// <summary> | 2311 | /// <summary> |
2312 | /// | 2312 | /// |
2313 | /// </summary> | 2313 | /// </summary> |
2314 | /// <param name="name"></param> | 2314 | /// <param name="name"></param> |
2315 | /// <param name="module"></param> | 2315 | /// <param name="module"></param> |
@@ -2379,21 +2379,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
2379 | m_statsReporter.SetObjectCapacity(objects); | 2379 | m_statsReporter.SetObjectCapacity(objects); |
2380 | } | 2380 | } |
2381 | objectCapacity = objects; | 2381 | objectCapacity = objects; |
2382 | 2382 | ||
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | public List<FriendListItem> GetFriendList(LLUUID avatarID) | 2385 | public List<FriendListItem> GetFriendList(LLUUID avatarID) |
2386 | { | 2386 | { |
2387 | return CommsManager.GetUserFriendList(avatarID); | 2387 | return CommsManager.GetUserFriendList(avatarID); |
2388 | } | 2388 | } |
2389 | 2389 | ||
2390 | 2390 | ||
2391 | #endregion | 2391 | #endregion |
2392 | 2392 | ||
2393 | #region Other Methods | 2393 | #region Other Methods |
2394 | 2394 | ||
2395 | /// <summary> | 2395 | /// <summary> |
2396 | /// | 2396 | /// |
2397 | /// </summary> | 2397 | /// </summary> |
2398 | /// <param name="phase"></param> | 2398 | /// <param name="phase"></param> |
2399 | public void SetTimePhase(int phase) | 2399 | public void SetTimePhase(int phase) |
@@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2402 | } | 2402 | } |
2403 | 2403 | ||
2404 | /// <summary> | 2404 | /// <summary> |
2405 | /// | 2405 | /// |
2406 | /// </summary> | 2406 | /// </summary> |
2407 | /// <param name="avatarID"></param> | 2407 | /// <param name="avatarID"></param> |
2408 | /// <param name="objectName"></param> | 2408 | /// <param name="objectName"></param> |
@@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2437 | } | 2437 | } |
2438 | 2438 | ||
2439 | /// <summary> | 2439 | /// <summary> |
2440 | /// | 2440 | /// |
2441 | /// </summary> | 2441 | /// </summary> |
2442 | /// <param name="url"></param> | 2442 | /// <param name="url"></param> |
2443 | /// <param name="type"></param> | 2443 | /// <param name="type"></param> |
@@ -2451,14 +2451,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2451 | } | 2451 | } |
2452 | return LLUUID.Zero; | 2452 | return LLUUID.Zero; |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | 2455 | ||
2456 | /// <summary> | 2456 | /// <summary> |
2457 | /// This method is a way for the Friends Module to create an instant | 2457 | /// This method is a way for the Friends Module to create an instant |
2458 | /// message to the avatar and for Instant Messages that travel across | 2458 | /// message to the avatar and for Instant Messages that travel across |
2459 | /// gridcomms to make it to the Instant Message Module. | 2459 | /// gridcomms to make it to the Instant Message Module. |
2460 | /// | 2460 | /// |
2461 | /// Friendship establishment and groups are unfortunately tied with instant messaging and | 2461 | /// Friendship establishment and groups are unfortunately tied with instant messaging and |
2462 | /// there's no way to separate them completely. | 2462 | /// there's no way to separate them completely. |
2463 | /// </summary> | 2463 | /// </summary> |
2464 | /// <param name="message">object containing the instant message data</param> | 2464 | /// <param name="message">object containing the instant message data</param> |
@@ -2525,7 +2525,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2525 | } | 2525 | } |
2526 | 2526 | ||
2527 | /// <summary> | 2527 | /// <summary> |
2528 | /// | 2528 | /// |
2529 | /// </summary> | 2529 | /// </summary> |
2530 | /// <param name="message"></param> | 2530 | /// <param name="message"></param> |
2531 | public void SendGeneralAlert(string message) | 2531 | public void SendGeneralAlert(string message) |
@@ -2539,7 +2539,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2539 | } | 2539 | } |
2540 | 2540 | ||
2541 | /// <summary> | 2541 | /// <summary> |
2542 | /// | 2542 | /// |
2543 | /// </summary> | 2543 | /// </summary> |
2544 | /// <param name="agentID"></param> | 2544 | /// <param name="agentID"></param> |
2545 | /// <param name="message"></param> | 2545 | /// <param name="message"></param> |
@@ -2556,7 +2556,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | /// <summary> | 2558 | /// <summary> |
2559 | /// | 2559 | /// |
2560 | /// </summary> | 2560 | /// </summary> |
2561 | /// <param name="agentID"></param> | 2561 | /// <param name="agentID"></param> |
2562 | /// <param name="sessionID"></param> | 2562 | /// <param name="sessionID"></param> |
@@ -2569,7 +2569,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2569 | { | 2569 | { |
2570 | // User needs to be logged into this sim | 2570 | // User needs to be logged into this sim |
2571 | if (m_scenePresences.ContainsKey(agentID)) | 2571 | if (m_scenePresences.ContainsKey(agentID)) |
2572 | { | 2572 | { |
2573 | // First check that this is the sim owner | 2573 | // First check that this is the sim owner |
2574 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) | 2574 | if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) |
2575 | { | 2575 | { |
@@ -2632,8 +2632,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2632 | 2632 | ||
2633 | /// <summary> | 2633 | /// <summary> |
2634 | /// Kicks User specified from the simulator. This logs them off of the grid | 2634 | /// Kicks User specified from the simulator. This logs them off of the grid |
2635 | /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes | 2635 | /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes |
2636 | /// that you're kicking it even if the avatar's UUID isn't the UUID that the | 2636 | /// that you're kicking it even if the avatar's UUID isn't the UUID that the |
2637 | /// agent is assigned | 2637 | /// agent is assigned |
2638 | /// </summary> | 2638 | /// </summary> |
2639 | /// <param name="godID">The person doing the kicking</param> | 2639 | /// <param name="godID">The person doing the kicking</param> |
@@ -2662,7 +2662,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2662 | 2662 | ||
2663 | } | 2663 | } |
2664 | ); | 2664 | ); |
2665 | 2665 | ||
2666 | // This is a bit crude. It seems the client will be null before it actually stops the thread | 2666 | // This is a bit crude. It seems the client will be null before it actually stops the thread |
2667 | // The thread will kill itself eventually :/ | 2667 | // The thread will kill itself eventually :/ |
2668 | // Is there another way to make sure *all* clients get this 'inter region' message? | 2668 | // Is there another way to make sure *all* clients get this 'inter region' message? |
@@ -2722,7 +2722,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | /// <summary> | 2724 | /// <summary> |
2725 | /// | 2725 | /// |
2726 | /// </summary> | 2726 | /// </summary> |
2727 | /// <param name="firstName"></param> | 2727 | /// <param name="firstName"></param> |
2728 | /// <param name="lastName"></param> | 2728 | /// <param name="lastName"></param> |
@@ -2743,7 +2743,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2743 | } | 2743 | } |
2744 | 2744 | ||
2745 | /// <summary> | 2745 | /// <summary> |
2746 | /// | 2746 | /// |
2747 | /// </summary> | 2747 | /// </summary> |
2748 | /// <param name="commandParams"></param> | 2748 | /// <param name="commandParams"></param> |
2749 | public void HandleAlertCommand(string[] commandParams) | 2749 | public void HandleAlertCommand(string[] commandParams) |
@@ -2931,7 +2931,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2931 | private bool m_dumpAssetsToFile; | 2931 | private bool m_dumpAssetsToFile; |
2932 | 2932 | ||
2933 | /// <summary> | 2933 | /// <summary> |
2934 | /// | 2934 | /// |
2935 | /// </summary> | 2935 | /// </summary> |
2936 | /// <param name="scriptEngine"></param> | 2936 | /// <param name="scriptEngine"></param> |
2937 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) | 2937 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) |
@@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2978 | { | 2978 | { |
2979 | return false; | 2979 | return false; |
2980 | } | 2980 | } |
2981 | } | 2981 | } |
2982 | else | 2982 | else |
2983 | { | 2983 | { |
2984 | if (part.OwnerID == parcel.landData.ownerID) | 2984 | if (part.OwnerID == parcel.landData.ownerID) |
@@ -2996,7 +2996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2996 | 2996 | ||
2997 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) | 2997 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) |
2998 | { | 2998 | { |
2999 | // The only time parcel != null when an object is inside a region is when | 2999 | // The only time parcel != null when an object is inside a region is when |
3000 | // there is nothing behind the landchannel. IE, no land plugin loaded. | 3000 | // there is nothing behind the landchannel. IE, no land plugin loaded. |
3001 | return true; | 3001 | return true; |
3002 | } | 3002 | } |
@@ -3027,7 +3027,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3027 | 3027 | ||
3028 | public bool pipeEventsForScript(uint localID) | 3028 | public bool pipeEventsForScript(uint localID) |
3029 | { | 3029 | { |
3030 | 3030 | ||
3031 | SceneObjectPart part = GetSceneObjectPart(localID); | 3031 | SceneObjectPart part = GetSceneObjectPart(localID); |
3032 | if (part != null) | 3032 | if (part != null) |
3033 | { | 3033 | { |
@@ -3046,7 +3046,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3046 | #region InnerScene wrapper methods | 3046 | #region InnerScene wrapper methods |
3047 | 3047 | ||
3048 | /// <summary> | 3048 | /// <summary> |
3049 | /// | 3049 | /// |
3050 | /// </summary> | 3050 | /// </summary> |
3051 | /// <param name="localID"></param> | 3051 | /// <param name="localID"></param> |
3052 | /// <returns></returns> | 3052 | /// <returns></returns> |
@@ -3071,7 +3071,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3071 | } | 3071 | } |
3072 | 3072 | ||
3073 | /// <summary> | 3073 | /// <summary> |
3074 | /// | 3074 | /// |
3075 | /// </summary> | 3075 | /// </summary> |
3076 | /// <param name="presence"></param> | 3076 | /// <param name="presence"></param> |
3077 | public void SendAllSceneObjectsToClient(ScenePresence presence) | 3077 | public void SendAllSceneObjectsToClient(ScenePresence presence) |
@@ -3080,10 +3080,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
3080 | } | 3080 | } |
3081 | 3081 | ||
3082 | //The idea is to have a group of method that return a list of avatars meeting some requirement | 3082 | //The idea is to have a group of method that return a list of avatars meeting some requirement |
3083 | // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. | 3083 | // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. |
3084 | 3084 | ||
3085 | /// <summary> | 3085 | /// <summary> |
3086 | /// | 3086 | /// |
3087 | /// </summary> | 3087 | /// </summary> |
3088 | /// <returns></returns> | 3088 | /// <returns></returns> |
3089 | public List<ScenePresence> GetAvatars() | 3089 | public List<ScenePresence> GetAvatars() |
@@ -3132,7 +3132,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3132 | } | 3132 | } |
3133 | 3133 | ||
3134 | /// <summary> | 3134 | /// <summary> |
3135 | /// | 3135 | /// |
3136 | /// </summary> | 3136 | /// </summary> |
3137 | /// <param name="action"></param> | 3137 | /// <param name="action"></param> |
3138 | public void ForEachScenePresence(Action<ScenePresence> action) | 3138 | public void ForEachScenePresence(Action<ScenePresence> action) |
@@ -3154,13 +3154,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
3154 | } | 3154 | } |
3155 | } | 3155 | } |
3156 | } | 3156 | } |
3157 | 3157 | ||
3158 | /// <summary> | 3158 | /// <summary> |
3159 | /// Delete this object from the scene. | 3159 | /// Delete this object from the scene. |
3160 | /// </summary> | 3160 | /// </summary> |
3161 | /// <param name="group"></param> | 3161 | /// <param name="group"></param> |
3162 | public void DeleteSceneObjectGroup(SceneObjectGroup group) | 3162 | public void DeleteSceneObjectGroup(SceneObjectGroup group) |
3163 | { | 3163 | { |
3164 | SceneObjectPart rootPart = (group).GetChildPart(group.UUID); | 3164 | SceneObjectPart rootPart = (group).GetChildPart(group.UUID); |
3165 | if (rootPart.PhysActor != null) | 3165 | if (rootPart.PhysActor != null) |
3166 | { | 3166 | { |
@@ -3177,18 +3177,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
3177 | m_innerScene.RemoveAPrimCount(); | 3177 | m_innerScene.RemoveAPrimCount(); |
3178 | } | 3178 | } |
3179 | group.DeleteParts(); | 3179 | group.DeleteParts(); |
3180 | 3180 | ||
3181 | // In case anybody else retains a reference to this group, signal deletion by changing the name | 3181 | // In case anybody else retains a reference to this group, signal deletion by changing the name |
3182 | // to null. We can't zero out the UUID because this is taken from the root part, which has already | 3182 | // to null. We can't zero out the UUID because this is taken from the root part, which has already |
3183 | // been removed. | 3183 | // been removed. |
3184 | // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race | 3184 | // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race |
3185 | // conditions where a user deletes an entity while it is being stored. Really, the update | 3185 | // conditions where a user deletes an entity while it is being stored. Really, the update |
3186 | // code needs a redesign. | 3186 | // code needs a redesign. |
3187 | group.Name = null; | 3187 | group.Name = null; |
3188 | } | 3188 | } |
3189 | 3189 | ||
3190 | /// <summary> | 3190 | /// <summary> |
3191 | /// | 3191 | /// |
3192 | /// </summary> | 3192 | /// </summary> |
3193 | /// <param name="action"></param> | 3193 | /// <param name="action"></param> |
3194 | // public void ForEachObject(Action<SceneObjectGroup> action) | 3194 | // public void ForEachObject(Action<SceneObjectGroup> action) |
@@ -3207,7 +3207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3207 | // } | 3207 | // } |
3208 | 3208 | ||
3209 | /// <summary> | 3209 | /// <summary> |
3210 | /// | 3210 | /// |
3211 | /// </summary> | 3211 | /// </summary> |
3212 | /// <param name="localID"></param> | 3212 | /// <param name="localID"></param> |
3213 | /// <returns></returns> | 3213 | /// <returns></returns> |
@@ -3217,7 +3217,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3217 | } | 3217 | } |
3218 | 3218 | ||
3219 | /// <summary> | 3219 | /// <summary> |
3220 | /// | 3220 | /// |
3221 | /// </summary> | 3221 | /// </summary> |
3222 | /// <param name="fullID"></param> | 3222 | /// <param name="fullID"></param> |
3223 | /// <returns></returns> | 3223 | /// <returns></returns> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index dc67436..fbef367 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -77,11 +77,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | { | 77 | { |
78 | get { return m_externalChecks; } | 78 | get { return m_externalChecks; } |
79 | } | 79 | } |
80 | 80 | ||
81 | protected string m_datastore; | 81 | protected string m_datastore; |
82 | 82 | ||
83 | private uint m_nextLocalId = 8880000; | 83 | private uint m_nextLocalId = 8880000; |
84 | 84 | ||
85 | private AssetCache m_assetCache; | 85 | private AssetCache m_assetCache; |
86 | 86 | ||
87 | public AssetCache AssetCache | 87 | public AssetCache AssetCache |
@@ -89,8 +89,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
89 | get { return m_assetCache; } | 89 | get { return m_assetCache; } |
90 | set { m_assetCache = value; } | 90 | set { m_assetCache = value; } |
91 | } | 91 | } |
92 | 92 | ||
93 | protected RegionStatus m_regStatus; | 93 | protected RegionStatus m_regStatus; |
94 | 94 | ||
95 | public RegionStatus Region_Status | 95 | public RegionStatus Region_Status |
96 | { | 96 | { |
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
130 | #region Add/Remove Agent/Avatar | 130 | #region Add/Remove Agent/Avatar |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// | 133 | /// |
134 | /// </summary> | 134 | /// </summary> |
135 | /// <param name="remoteClient"></param> | 135 | /// <param name="remoteClient"></param> |
136 | /// <param name="agentID"></param> | 136 | /// <param name="agentID"></param> |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
138 | public abstract void AddNewClient(IClientAPI client, bool child); | 138 | public abstract void AddNewClient(IClientAPI client, bool child); |
139 | 139 | ||
140 | /// <summary> | 140 | /// <summary> |
141 | /// | 141 | /// |
142 | /// </summary> | 142 | /// </summary> |
143 | /// <param name="agentID"></param> | 143 | /// <param name="agentID"></param> |
144 | public abstract void RemoveClient(LLUUID agentID); | 144 | public abstract void RemoveClient(LLUUID agentID); |
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
148 | #endregion | 148 | #endregion |
149 | 149 | ||
150 | /// <summary> | 150 | /// <summary> |
151 | /// | 151 | /// |
152 | /// </summary> | 152 | /// </summary> |
153 | /// <returns></returns> | 153 | /// <returns></returns> |
154 | public virtual RegionInfo RegionInfo | 154 | public virtual RegionInfo RegionInfo |
@@ -206,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
206 | } | 206 | } |
207 | 207 | ||
208 | #endregion | 208 | #endregion |
209 | 209 | ||
210 | /// <summary> | 210 | /// <summary> |
211 | /// XXX These two methods are very temporary | 211 | /// XXX These two methods are very temporary |
212 | /// </summary> | 212 | /// </summary> |
@@ -217,7 +217,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | { | 217 | { |
218 | return capsPaths[agentId]; | 218 | return capsPaths[agentId]; |
219 | } | 219 | } |
220 | 220 | ||
221 | return null; | 221 | return null; |
222 | } | 222 | } |
223 | } | 223 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 18ce61a..885d1e9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
104 | regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; | 104 | regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; |
105 | regionCommsHost.OnCloseAgentConnection += CloseConnection; | 105 | regionCommsHost.OnCloseAgentConnection += CloseConnection; |
106 | regionCommsHost.OnRegionUp += newRegionUp; | 106 | regionCommsHost.OnRegionUp += newRegionUp; |
107 | regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; | 107 | regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; |
108 | } | 108 | } |
109 | else | 109 | else |
110 | { | 110 | { |
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
130 | #region CommsManager Event handlers | 130 | #region CommsManager Event handlers |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// | 133 | /// |
134 | /// </summary> | 134 | /// </summary> |
135 | /// <param name="regionHandle"></param> | 135 | /// <param name="regionHandle"></param> |
136 | /// <param name="agent"></param> | 136 | /// <param name="agent"></param> |
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | agent.child = true; | 289 | agent.child = true; |
290 | 290 | ||
291 | InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; | 291 | InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; |
292 | 292 | ||
293 | try | 293 | try |
294 | { | 294 | { |
295 | d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, | 295 | d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, |
@@ -299,20 +299,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
299 | catch (Exception e) | 299 | catch (Exception e) |
300 | { | 300 | { |
301 | m_log.ErrorFormat( | 301 | m_log.ErrorFormat( |
302 | "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3}). {4}", | 302 | "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3}). {4}", |
303 | neighbours[i].ExternalHostName, | 303 | neighbours[i].ExternalHostName, |
304 | neighbours[i].RegionHandle, | 304 | neighbours[i].RegionHandle, |
305 | neighbours[i].RegionLocX, | 305 | neighbours[i].RegionLocX, |
306 | neighbours[i].RegionLocY, | 306 | neighbours[i].RegionLocY, |
307 | e); | 307 | e); |
308 | 308 | ||
309 | // FIXME: Okay, even though we've failed, we're still going to throw the exception on, | 309 | // FIXME: Okay, even though we've failed, we're still going to throw the exception on, |
310 | // since I don't know what will happen if we just let the client continue | 310 | // since I don't know what will happen if we just let the client continue |
311 | 311 | ||
312 | // XXX: Well, decided to swallow the exception instead for now. Let us see how that goes. | 312 | // XXX: Well, decided to swallow the exception instead for now. Let us see how that goes. |
313 | // throw e; | 313 | // throw e; |
314 | 314 | ||
315 | } | 315 | } |
316 | } | 316 | } |
317 | } | 317 | } |
318 | } | 318 | } |
@@ -362,12 +362,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
362 | { | 362 | { |
363 | m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); | 363 | m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); |
364 | handlerRegionUp = OnRegionUp; | 364 | handlerRegionUp = OnRegionUp; |
365 | 365 | ||
366 | // yes, we're notifying ourselves. | 366 | // yes, we're notifying ourselves. |
367 | if (handlerRegionUp != null) | 367 | if (handlerRegionUp != null) |
368 | handlerRegionUp(region); | 368 | handlerRegionUp(region); |
369 | 369 | ||
370 | 370 | ||
371 | } | 371 | } |
372 | else | 372 | else |
373 | { | 373 | { |
@@ -407,9 +407,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
407 | /// <summary> | 407 | /// <summary> |
408 | /// This informs all neighboring regions about the settings of it's child agent. | 408 | /// This informs all neighboring regions about the settings of it's child agent. |
409 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 409 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
410 | /// | 410 | /// |
411 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. | 411 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. |
412 | /// | 412 | /// |
413 | /// </summary> | 413 | /// </summary> |
414 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) | 414 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) |
415 | { | 415 | { |
@@ -468,14 +468,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
468 | if (regionAccepted) | 468 | if (regionAccepted) |
469 | { | 469 | { |
470 | m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); | 470 | m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); |
471 | 471 | ||
472 | } | 472 | } |
473 | else | 473 | else |
474 | { | 474 | { |
475 | m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); | 475 | m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); |
476 | 476 | ||
477 | } | 477 | } |
478 | 478 | ||
479 | } | 479 | } |
480 | // We remove the list of known regions from the agent's known region list through an event | 480 | // We remove the list of known regions from the agent's known region list through an event |
481 | // to scene, because, if an agent logged of, it's likely that there will be no scene presence | 481 | // to scene, because, if an agent logged of, it's likely that there will be no scene presence |
@@ -572,25 +572,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
572 | if (destRegionUp) | 572 | if (destRegionUp) |
573 | { | 573 | { |
574 | avatar.Close(); | 574 | avatar.Close(); |
575 | 575 | ||
576 | // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport | 576 | // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport |
577 | // failure at this point (unlike a border crossing failure). So perhaps this can never fail | 577 | // failure at this point (unlike a border crossing failure). So perhaps this can never fail |
578 | // once we reach here... | 578 | // once we reach here... |
579 | avatar.Scene.RemoveCapsHandler(avatar.UUID); | 579 | avatar.Scene.RemoveCapsHandler(avatar.UUID); |
580 | 580 | ||
581 | m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent); | 581 | m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent); |
582 | m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, | 582 | m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, |
583 | position, false); | 583 | position, false); |
584 | AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); | 584 | AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); |
585 | 585 | ||
586 | // TODO Should construct this behind a method | 586 | // TODO Should construct this behind a method |
587 | string capsPath = | 587 | string capsPath = |
588 | "http://" + reg.ExternalHostName + ":" + reg.HttpPort | 588 | "http://" + reg.ExternalHostName + ":" + reg.HttpPort |
589 | + "/CAPS/" + circuitdata.CapsPath + "0000/"; | 589 | + "/CAPS/" + circuitdata.CapsPath + "0000/"; |
590 | 590 | ||
591 | m_log.DebugFormat( | 591 | m_log.DebugFormat( |
592 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); | 592 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); |
593 | 593 | ||
594 | avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), | 594 | avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), |
595 | capsPath); | 595 | capsPath); |
596 | avatar.MakeChildAgent(); | 596 | avatar.MakeChildAgent(); |
@@ -618,7 +618,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
618 | } | 618 | } |
619 | 619 | ||
620 | /// <summary> | 620 | /// <summary> |
621 | /// | 621 | /// |
622 | /// </summary> | 622 | /// </summary> |
623 | /// <param name="regionhandle"></param> | 623 | /// <param name="regionhandle"></param> |
624 | /// <param name="agentID"></param> | 624 | /// <param name="agentID"></param> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index dacd609..7ff9213 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs | |||
@@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
183 | public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); | 183 | public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); |
184 | public event DeregisterCapsEvent OnDeregisterCaps; | 184 | public event DeregisterCapsEvent OnDeregisterCaps; |
185 | 185 | ||
186 | public class MoneyTransferArgs : EventArgs | 186 | public class MoneyTransferArgs : EventArgs |
187 | { | 187 | { |
188 | public LLUUID sender; | 188 | public LLUUID sender; |
189 | public LLUUID receiver; | 189 | public LLUUID receiver; |
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
208 | public class LandBuyArgs : EventArgs | 208 | public class LandBuyArgs : EventArgs |
209 | { | 209 | { |
210 | public LLUUID agentId = LLUUID.Zero; | 210 | public LLUUID agentId = LLUUID.Zero; |
211 | 211 | ||
212 | public LLUUID groupId = LLUUID.Zero; | 212 | public LLUUID groupId = LLUUID.Zero; |
213 | 213 | ||
214 | public LLUUID parcelOwnerID = LLUUID.Zero; | 214 | public LLUUID parcelOwnerID = LLUUID.Zero; |
@@ -225,9 +225,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
225 | public int transactionID = 0; | 225 | public int transactionID = 0; |
226 | public int amountDebited = 0; | 226 | public int amountDebited = 0; |
227 | 227 | ||
228 | 228 | ||
229 | public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, | 229 | public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, |
230 | bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, | 230 | bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, |
231 | bool pauthenticated) | 231 | bool pauthenticated) |
232 | { | 232 | { |
233 | agentId = pagentId; | 233 | agentId = pagentId; |
@@ -367,7 +367,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
367 | if (handlerParcelPrimCountUpdate != null) | 367 | if (handlerParcelPrimCountUpdate != null) |
368 | { | 368 | { |
369 | handlerParcelPrimCountUpdate(); | 369 | handlerParcelPrimCountUpdate(); |
370 | } | 370 | } |
371 | } | 371 | } |
372 | 372 | ||
373 | public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) | 373 | public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) |
@@ -538,7 +538,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
538 | } | 538 | } |
539 | } | 539 | } |
540 | 540 | ||
541 | public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps) | 541 | public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps) |
542 | { | 542 | { |
543 | handlerRegisterCaps = OnRegisterCaps; | 543 | handlerRegisterCaps = OnRegisterCaps; |
544 | if (handlerRegisterCaps != null) | 544 | if (handlerRegisterCaps != null) |
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
547 | } | 547 | } |
548 | } | 548 | } |
549 | 549 | ||
550 | public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps) | 550 | public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps) |
551 | { | 551 | { |
552 | handlerDeregisterCaps = OnDeregisterCaps; | 552 | handlerDeregisterCaps = OnDeregisterCaps; |
553 | if (handlerDeregisterCaps != null) | 553 | if (handlerDeregisterCaps != null) |
@@ -580,7 +580,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
580 | handlerValidateLandBuy(sender, e); | 580 | handlerValidateLandBuy(sender, e); |
581 | } | 581 | } |
582 | } | 582 | } |
583 | 583 | ||
584 | public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) | 584 | public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) |
585 | { | 585 | { |
586 | handlerScriptAtTargetEvent = OnScriptAtTargetEvent; | 586 | handlerScriptAtTargetEvent = OnScriptAtTargetEvent; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs index 645c302..040ee70 100644 --- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs +++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs | |||
@@ -61,19 +61,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
61 | 61 | ||
62 | public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) | 62 | public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) |
63 | { | 63 | { |
64 | SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); | 64 | SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); |
65 | 65 | ||
66 | uint perms=part.GetEffectiveObjectFlags() | | 66 | uint perms=part.GetEffectiveObjectFlags() | |
67 | (uint)LLObject.ObjectFlags.ObjectModify | | 67 | (uint)LLObject.ObjectFlags.ObjectModify | |
68 | (uint)LLObject.ObjectFlags.ObjectCopy | | 68 | (uint)LLObject.ObjectFlags.ObjectCopy | |
69 | (uint)LLObject.ObjectFlags.ObjectMove | | 69 | (uint)LLObject.ObjectFlags.ObjectMove | |
70 | (uint)LLObject.ObjectFlags.ObjectTransfer | | 70 | (uint)LLObject.ObjectFlags.ObjectTransfer | |
71 | (uint)LLObject.ObjectFlags.ObjectYouOwner | | 71 | (uint)LLObject.ObjectFlags.ObjectYouOwner | |
72 | (uint)LLObject.ObjectFlags.ObjectYouOfficer; | 72 | (uint)LLObject.ObjectFlags.ObjectYouOfficer; |
73 | 73 | ||
74 | foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) | 74 | foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) |
75 | { | 75 | { |
76 | perms &= check(userID, objectID); | 76 | perms &= check(userID, objectID); |
77 | } | 77 | } |
78 | return perms; | 78 | return perms; |
79 | } | 79 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 215ab75..8f3de51 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | [Obsolete("TODO: Remove this warning by 0.7")] | 180 | [Obsolete("TODO: Remove this warning by 0.7")] |
181 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) | 181 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) |
182 | { | 182 | { |
183 | m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands."); | 183 | m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands."); |
184 | return false; | 184 | return false; |
185 | } | 185 | } |
186 | 186 | ||
@@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
253 | public bool TrySetCurrentScene(LLUUID regionID) | 253 | public bool TrySetCurrentScene(LLUUID regionID) |
254 | { | 254 | { |
255 | Console.WriteLine("Searching for Region: '{0}'", regionID.ToString()); | 255 | Console.WriteLine("Searching for Region: '{0}'", regionID.ToString()); |
256 | 256 | ||
257 | foreach (Scene scene in m_localScenes) | 257 | foreach (Scene scene in m_localScenes) |
258 | { | 258 | { |
259 | if (scene.RegionInfo.RegionID == regionID) | 259 | if (scene.RegionInfo.RegionID == regionID) |
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
262 | return true; | 262 | return true; |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | return false; | 266 | return false; |
267 | } | 267 | } |
268 | 268 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 8a7096f..1ac51a6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
50 | if (part != null) | 50 | if (part != null) |
51 | { | 51 | { |
52 | part.StartScript(itemID); | 52 | part.StartScript(itemID); |
53 | 53 | ||
54 | } | 54 | } |
55 | else | 55 | else |
56 | { | 56 | { |
@@ -58,9 +58,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | "[PRIM INVENTORY]: " + | 58 | "[PRIM INVENTORY]: " + |
59 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 59 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
60 | localID, Name, UUID, itemID); | 60 | localID, Name, UUID, itemID); |
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | // /// Start a given script. | 64 | // /// Start a given script. |
65 | // /// </summary> | 65 | // /// </summary> |
66 | // /// <param name="localID"> | 66 | // /// <param name="localID"> |
@@ -79,9 +79,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | // "[PRIM INVENTORY]: " + | 79 | // "[PRIM INVENTORY]: " + |
80 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 80 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
81 | // localID, Name, UUID, itemID); | 81 | // localID, Name, UUID, itemID); |
82 | // } | 82 | // } |
83 | // } | 83 | // } |
84 | 84 | ||
85 | /// <summary> | 85 | /// <summary> |
86 | /// Start the scripts contained in all the prims in this group. | 86 | /// Start the scripts contained in all the prims in this group. |
87 | /// </summary> | 87 | /// </summary> |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
111 | /// Start a given script. | 111 | /// Start a given script. |
112 | /// </summary> | 112 | /// </summary> |
113 | /// <param name="localID"> | 113 | /// <param name="localID"> |
@@ -127,11 +127,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
127 | "[PRIM INVENTORY]: " + | 127 | "[PRIM INVENTORY]: " + |
128 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", | 128 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", |
129 | partID, Name, UUID, itemID); | 129 | partID, Name, UUID, itemID); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | /// <summary> | 133 | /// <summary> |
134 | /// | 134 | /// |
135 | /// </summary> | 135 | /// </summary> |
136 | /// <param name="remoteClient"></param> | 136 | /// <param name="remoteClient"></param> |
137 | /// <param name="localID"></param> | 137 | /// <param name="localID"></param> |
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
172 | localID, Name, UUID); | 172 | localID, Name, UUID); |
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | /// <summary> | 176 | /// <summary> |
177 | /// Add an inventory item to a prim in this group. | 177 | /// Add an inventory item to a prim in this group. |
178 | /// </summary> | 178 | /// </summary> |
@@ -181,7 +181,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
181 | /// <param name="item"></param> | 181 | /// <param name="item"></param> |
182 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> | 182 | /// <param name="copyItemID">The item UUID that should be used by the new item.</param> |
183 | /// <returns></returns> | 183 | /// <returns></returns> |
184 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, | 184 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, |
185 | InventoryItemBase item, LLUUID copyItemID) | 185 | InventoryItemBase item, LLUUID copyItemID) |
186 | { | 186 | { |
187 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; | 187 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; |
@@ -190,8 +190,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
190 | if (part != null) | 190 | if (part != null) |
191 | { | 191 | { |
192 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 192 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
193 | 193 | ||
194 | taskItem.ItemID = newItemId; | 194 | taskItem.ItemID = newItemId; |
195 | taskItem.AssetID = item.AssetID; | 195 | taskItem.AssetID = item.AssetID; |
196 | taskItem.Name = item.Name; | 196 | taskItem.Name = item.Name; |
197 | taskItem.Description = item.Description; | 197 | taskItem.Description = item.Description; |
@@ -199,15 +199,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | taskItem.CreatorID = item.Creator; | 199 | taskItem.CreatorID = item.Creator; |
200 | taskItem.Type = item.AssetType; | 200 | taskItem.Type = item.AssetType; |
201 | taskItem.InvType = item.InvType; | 201 | taskItem.InvType = item.InvType; |
202 | 202 | ||
203 | taskItem.BaseMask = item.BasePermissions; | 203 | taskItem.BaseMask = item.BasePermissions; |
204 | taskItem.OwnerMask = item.CurrentPermissions; | 204 | taskItem.OwnerMask = item.CurrentPermissions; |
205 | // FIXME: ignoring group permissions for now as they aren't stored in item | 205 | // FIXME: ignoring group permissions for now as they aren't stored in item |
206 | taskItem.EveryoneMask = item.EveryOnePermissions; | 206 | taskItem.EveryoneMask = item.EveryOnePermissions; |
207 | taskItem.NextOwnerMask = item.NextPermissions; | 207 | taskItem.NextOwnerMask = item.NextPermissions; |
208 | 208 | ||
209 | part.AddInventoryItem(taskItem); | 209 | part.AddInventoryItem(taskItem); |
210 | 210 | ||
211 | return true; | 211 | return true; |
212 | } | 212 | } |
213 | else | 213 | else |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
220 | 220 | ||
221 | return false; | 221 | return false; |
222 | } | 222 | } |
223 | 223 | ||
224 | /// <summary> | 224 | /// <summary> |
225 | /// Returns an existing inventory item. Returns the original, so any changes will be live. | 225 | /// Returns an existing inventory item. Returns the original, so any changes will be live. |
226 | /// </summary> | 226 | /// </summary> |
@@ -240,11 +240,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
240 | "[PRIM INVENTORY]: " + | 240 | "[PRIM INVENTORY]: " + |
241 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", | 241 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", |
242 | primID, part.Name, part.UUID, itemID); | 242 | primID, part.Name, part.UUID, itemID); |
243 | } | 243 | } |
244 | 244 | ||
245 | return null; | 245 | return null; |
246 | } | 246 | } |
247 | 247 | ||
248 | /// <summary> | 248 | /// <summary> |
249 | /// Update an existing inventory item. | 249 | /// Update an existing inventory item. |
250 | /// </summary> | 250 | /// </summary> |
@@ -256,8 +256,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
256 | SceneObjectPart part = GetChildPart(item.ParentPartID); | 256 | SceneObjectPart part = GetChildPart(item.ParentPartID); |
257 | if (part != null) | 257 | if (part != null) |
258 | { | 258 | { |
259 | part.UpdateInventoryItem(item); | 259 | part.UpdateInventoryItem(item); |
260 | 260 | ||
261 | return true; | 261 | return true; |
262 | } | 262 | } |
263 | else | 263 | else |
@@ -266,55 +266,55 @@ namespace OpenSim.Region.Environment.Scenes | |||
266 | "[PRIM INVENTORY]: " + | 266 | "[PRIM INVENTORY]: " + |
267 | "Couldn't find prim ID {0} to update item {1}, {2}", | 267 | "Couldn't find prim ID {0} to update item {1}, {2}", |
268 | item.ParentPartID, item.Name, item.ItemID); | 268 | item.ParentPartID, item.Name, item.ItemID); |
269 | } | 269 | } |
270 | 270 | ||
271 | return false; | 271 | return false; |
272 | } | 272 | } |
273 | 273 | ||
274 | public int RemoveInventoryItem(uint localID, LLUUID itemID) | 274 | public int RemoveInventoryItem(uint localID, LLUUID itemID) |
275 | { | 275 | { |
276 | SceneObjectPart part = GetChildPart(localID); | 276 | SceneObjectPart part = GetChildPart(localID); |
277 | if (part != null) | 277 | if (part != null) |
278 | { | 278 | { |
279 | int type = part.RemoveInventoryItem(itemID); | 279 | int type = part.RemoveInventoryItem(itemID); |
280 | 280 | ||
281 | return type; | 281 | return type; |
282 | } | 282 | } |
283 | 283 | ||
284 | return -1; | 284 | return -1; |
285 | } | 285 | } |
286 | 286 | ||
287 | public uint GetEffectivePermissions() | 287 | public uint GetEffectivePermissions() |
288 | { | 288 | { |
289 | uint perms=(uint)(PermissionMask.Modify | | 289 | uint perms=(uint)(PermissionMask.Modify | |
290 | PermissionMask.Copy | | 290 | PermissionMask.Copy | |
291 | PermissionMask.Move | | 291 | PermissionMask.Move | |
292 | PermissionMask.Transfer) | 7; | 292 | PermissionMask.Transfer) | 7; |
293 | 293 | ||
294 | foreach (SceneObjectPart part in m_parts.Values) | 294 | foreach (SceneObjectPart part in m_parts.Values) |
295 | perms &= part.MaskEffectivePermissions(); | 295 | perms &= part.MaskEffectivePermissions(); |
296 | 296 | ||
297 | if((RootPart.OwnerMask & (uint)PermissionMask.Modify) == 0) | 297 | if ((RootPart.OwnerMask & (uint)PermissionMask.Modify) == 0) |
298 | perms &= ~(uint)PermissionMask.Modify; | 298 | perms &= ~(uint)PermissionMask.Modify; |
299 | if((RootPart.OwnerMask & (uint)PermissionMask.Copy) == 0) | 299 | if ((RootPart.OwnerMask & (uint)PermissionMask.Copy) == 0) |
300 | perms &= ~(uint)PermissionMask.Copy; | 300 | perms &= ~(uint)PermissionMask.Copy; |
301 | if((RootPart.OwnerMask & (uint)PermissionMask.Transfer) == 0) | 301 | if ((RootPart.OwnerMask & (uint)PermissionMask.Transfer) == 0) |
302 | perms &= ~(uint)PermissionMask.Transfer; | 302 | perms &= ~(uint)PermissionMask.Transfer; |
303 | 303 | ||
304 | if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) | 304 | if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) |
305 | perms &= ~((uint)PermissionMask.Modify >> 13); | 305 | perms &= ~((uint)PermissionMask.Modify >> 13); |
306 | if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) | 306 | if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) |
307 | perms &= ~((uint)PermissionMask.Copy >> 13); | 307 | perms &= ~((uint)PermissionMask.Copy >> 13); |
308 | if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) | 308 | if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) |
309 | perms &= ~((uint)PermissionMask.Transfer >> 13); | 309 | perms &= ~((uint)PermissionMask.Transfer >> 13); |
310 | 310 | ||
311 | return perms; | 311 | return perms; |
312 | } | 312 | } |
313 | 313 | ||
314 | public void ApplyNextOwnerPermissions() | 314 | public void ApplyNextOwnerPermissions() |
315 | { | 315 | { |
316 | foreach (SceneObjectPart part in m_parts.Values) | 316 | foreach (SceneObjectPart part in m_parts.Values) |
317 | part.ApplyNextOwnerPermissions(); | 317 | part.ApplyNextOwnerPermissions(); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | } | 320 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 14bfde0..332d160 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -86,11 +86,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
86 | private PrimCountTaintedDelegate handlerPrimCountTainted = null; | 86 | private PrimCountTaintedDelegate handlerPrimCountTainted = null; |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Signal whether the non-inventory attributes of any prims in the group have changed | 89 | /// Signal whether the non-inventory attributes of any prims in the group have changed |
90 | /// since the group's last persistent backup | 90 | /// since the group's last persistent backup |
91 | /// </summary> | 91 | /// </summary> |
92 | public bool HasGroupChanged = false; | 92 | public bool HasGroupChanged = false; |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | private LLVector3 lastPhysGroupPos; | 96 | private LLVector3 lastPhysGroupPos; |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
119 | /// but not sure a object should have this | 119 | /// but not sure a object should have this |
120 | /// as what does it tell us? that some avatar has selected it (but not what Avatar/user) | 120 | /// as what does it tell us? that some avatar has selected it (but not what Avatar/user) |
121 | /// think really there should be a list (or whatever) in each scenepresence | 121 | /// think really there should be a list (or whatever) in each scenepresence |
122 | /// saying what prim(s) that user has selected. | 122 | /// saying what prim(s) that user has selected. |
123 | /// </summary> | 123 | /// </summary> |
124 | protected bool m_isSelected = false; | 124 | protected bool m_isSelected = false; |
125 | 125 | ||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /// <summary> | 136 | /// <summary> |
137 | /// | 137 | /// |
138 | /// </summary> | 138 | /// </summary> |
139 | public int PrimCount | 139 | public int PrimCount |
140 | { | 140 | { |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
153 | } | 153 | } |
154 | 154 | ||
155 | /// <summary> | 155 | /// <summary> |
156 | /// | 156 | /// |
157 | /// </summary> | 157 | /// </summary> |
158 | public LLVector3 GroupCentrePoint | 158 | public LLVector3 GroupCentrePoint |
159 | { | 159 | { |
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
215 | part.GroupPosition = val; | 215 | part.GroupPosition = val; |
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | //if (m_rootPart.PhysActor != null) | 219 | //if (m_rootPart.PhysActor != null) |
220 | //{ | 220 | //{ |
221 | //m_rootPart.PhysActor.Position = | 221 | //m_rootPart.PhysActor.Position = |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
225 | //} | 225 | //} |
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
229 | public override uint LocalId | 229 | public override uint LocalId |
230 | { | 230 | { |
231 | get | 231 | get |
@@ -316,17 +316,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | #region Constructors | 316 | #region Constructors |
317 | 317 | ||
318 | /// <summary> | 318 | /// <summary> |
319 | /// | 319 | /// |
320 | /// </summary> | 320 | /// </summary> |
321 | public SceneObjectGroup() | 321 | public SceneObjectGroup() |
322 | { | 322 | { |
323 | } | 323 | } |
324 | 324 | ||
325 | /// <summary> | 325 | /// <summary> |
326 | /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. | 326 | /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. |
327 | /// The original SceneObjectPart will be used rather than a copy, preserving | 327 | /// The original SceneObjectPart will be used rather than a copy, preserving |
328 | /// its existing localID and UUID. | 328 | /// its existing localID and UUID. |
329 | /// </summary> | 329 | /// </summary> |
330 | public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part) | 330 | public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part) |
331 | { | 331 | { |
332 | m_scene = scene; | 332 | m_scene = scene; |
@@ -416,7 +416,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
416 | } | 416 | } |
417 | 417 | ||
418 | /// <summary> | 418 | /// <summary> |
419 | /// | 419 | /// |
420 | /// </summary> | 420 | /// </summary> |
421 | public SceneObjectGroup(string xmlData) | 421 | public SceneObjectGroup(string xmlData) |
422 | { | 422 | { |
@@ -464,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
464 | } | 464 | } |
465 | 465 | ||
466 | /// <summary> | 466 | /// <summary> |
467 | /// | 467 | /// |
468 | /// </summary> | 468 | /// </summary> |
469 | public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, | 469 | public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, |
470 | LLQuaternion rot, PrimitiveBaseShape shape) | 470 | LLQuaternion rot, PrimitiveBaseShape shape) |
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /// <summary> | 488 | /// <summary> |
489 | /// | 489 | /// |
490 | /// </summary> | 490 | /// </summary> |
491 | public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, | 491 | public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, |
492 | PrimitiveBaseShape shape) | 492 | PrimitiveBaseShape shape) |
@@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
576 | 576 | ||
577 | EntityIntersection inter = part.TestIntersectionOBB(hRay, parentrotation,frontFacesOnly, faceCenters); | 577 | EntityIntersection inter = part.TestIntersectionOBB(hRay, parentrotation,frontFacesOnly, faceCenters); |
578 | 578 | ||
579 | // This may need to be updated to the maximum draw distance possible.. | 579 | // This may need to be updated to the maximum draw distance possible.. |
580 | // We might (and probably will) be checking for prim creation from other sims | 580 | // We might (and probably will) be checking for prim creation from other sims |
581 | // when the camera crosses the border. | 581 | // when the camera crosses the border. |
582 | float idist = Constants.RegionSize; | 582 | float idist = Constants.RegionSize; |
@@ -676,7 +676,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
676 | } | 676 | } |
677 | 677 | ||
678 | /// <summary> | 678 | /// <summary> |
679 | /// | 679 | /// |
680 | /// </summary> | 680 | /// </summary> |
681 | /// <param name="part"></param> | 681 | /// <param name="part"></param> |
682 | private void SetPartAsRoot(SceneObjectPart part) | 682 | private void SetPartAsRoot(SceneObjectPart part) |
@@ -693,7 +693,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
693 | DetachFromBackup(this); | 693 | DetachFromBackup(this); |
694 | m_rootPart.m_attachedAvatar = agentID; | 694 | m_rootPart.m_attachedAvatar = agentID; |
695 | 695 | ||
696 | 696 | ||
697 | if (m_rootPart.PhysActor != null) | 697 | if (m_rootPart.PhysActor != null) |
698 | { | 698 | { |
699 | m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); | 699 | m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); |
@@ -753,7 +753,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
753 | AttachToBackup(); | 753 | AttachToBackup(); |
754 | m_rootPart.ScheduleFullUpdate(); | 754 | m_rootPart.ScheduleFullUpdate(); |
755 | m_rootPart.ClearUndoState(); | 755 | m_rootPart.ClearUndoState(); |
756 | 756 | ||
757 | } | 757 | } |
758 | public void DetachToInventoryPrep() | 758 | public void DetachToInventoryPrep() |
759 | { | 759 | { |
@@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
764 | //detachedpos = avatar.AbsolutePosition; | 764 | //detachedpos = avatar.AbsolutePosition; |
765 | avatar.RemoveAttachment(this); | 765 | avatar.RemoveAttachment(this); |
766 | } | 766 | } |
767 | 767 | ||
768 | m_rootPart.m_attachedAvatar = LLUUID.Zero; | 768 | m_rootPart.m_attachedAvatar = LLUUID.Zero; |
769 | m_rootPart.SetParentLocalId(0); | 769 | m_rootPart.SetParentLocalId(0); |
770 | //m_rootPart.SetAttachmentPoint((byte)0); | 770 | //m_rootPart.SetAttachmentPoint((byte)0); |
@@ -773,10 +773,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
773 | //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); | 773 | //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); |
774 | //AttachToBackup(); | 774 | //AttachToBackup(); |
775 | //m_rootPart.ScheduleFullUpdate(); | 775 | //m_rootPart.ScheduleFullUpdate(); |
776 | 776 | ||
777 | } | 777 | } |
778 | /// <summary> | 778 | /// <summary> |
779 | /// | 779 | /// |
780 | /// </summary> | 780 | /// </summary> |
781 | /// <param name="part"></param> | 781 | /// <param name="part"></param> |
782 | private void SetPartAsNonRoot(SceneObjectPart part) | 782 | private void SetPartAsNonRoot(SceneObjectPart part) |
@@ -802,7 +802,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
802 | } | 802 | } |
803 | 803 | ||
804 | /// <summary> | 804 | /// <summary> |
805 | /// Added as a way for the storage provider to reset the scene, | 805 | /// Added as a way for the storage provider to reset the scene, |
806 | /// most likely a better way to do this sort of thing but for now... | 806 | /// most likely a better way to do this sort of thing but for now... |
807 | /// </summary> | 807 | /// </summary> |
808 | /// <param name="scene"></param> | 808 | /// <param name="scene"></param> |
@@ -813,7 +813,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
813 | } | 813 | } |
814 | 814 | ||
815 | /// <summary> | 815 | /// <summary> |
816 | /// | 816 | /// |
817 | /// </summary> | 817 | /// </summary> |
818 | /// <param name="part"></param> | 818 | /// <param name="part"></param> |
819 | public void AddPart(SceneObjectPart part) | 819 | public void AddPart(SceneObjectPart part) |
@@ -826,7 +826,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
826 | try | 826 | try |
827 | { | 827 | { |
828 | m_parts.Add(part.UUID, part); | 828 | m_parts.Add(part.UUID, part); |
829 | 829 | ||
830 | } | 830 | } |
831 | catch (Exception e) | 831 | catch (Exception e) |
832 | { | 832 | { |
@@ -836,7 +836,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
836 | } | 836 | } |
837 | 837 | ||
838 | /// <summary> | 838 | /// <summary> |
839 | /// | 839 | /// |
840 | /// </summary> | 840 | /// </summary> |
841 | public void UpdateParentIDs() | 841 | public void UpdateParentIDs() |
842 | { | 842 | { |
@@ -847,7 +847,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
847 | if (part.UUID != m_rootPart.UUID) | 847 | if (part.UUID != m_rootPart.UUID) |
848 | { | 848 | { |
849 | part.ParentID = m_rootPart.LocalId; | 849 | part.ParentID = m_rootPart.LocalId; |
850 | 850 | ||
851 | } | 851 | } |
852 | } | 852 | } |
853 | } | 853 | } |
@@ -860,7 +860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
860 | foreach (SceneObjectPart part in m_parts.Values) | 860 | foreach (SceneObjectPart part in m_parts.Values) |
861 | { | 861 | { |
862 | part.UUID = LLUUID.Random(); | 862 | part.UUID = LLUUID.Random(); |
863 | 863 | ||
864 | } | 864 | } |
865 | } | 865 | } |
866 | } | 866 | } |
@@ -897,7 +897,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
897 | { | 897 | { |
898 | SceneObjectPart part = GetChildPart(localId); | 898 | SceneObjectPart part = GetChildPart(localId); |
899 | OnGrabPart(part, offsetPos, remoteClient); | 899 | OnGrabPart(part, offsetPos, remoteClient); |
900 | 900 | ||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
905 | { | 905 | { |
906 | part.StoreUndoState(); | 906 | part.StoreUndoState(); |
907 | part.OnGrab(offsetPos, remoteClient); | 907 | part.OnGrab(offsetPos, remoteClient); |
908 | 908 | ||
909 | } | 909 | } |
910 | 910 | ||
911 | public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) | 911 | public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) |
@@ -1068,7 +1068,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1068 | #region Events | 1068 | #region Events |
1069 | 1069 | ||
1070 | /// <summary> | 1070 | /// <summary> |
1071 | /// | 1071 | /// |
1072 | /// </summary> | 1072 | /// </summary> |
1073 | public void TriggerTainted() | 1073 | public void TriggerTainted() |
1074 | { | 1074 | { |
@@ -1198,7 +1198,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1198 | 1198 | ||
1199 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1199 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1200 | } | 1200 | } |
1201 | // Now we've made a copy that replaces this one, we need to | 1201 | // Now we've made a copy that replaces this one, we need to |
1202 | // switch the owner to the person who did the copying | 1202 | // switch the owner to the person who did the copying |
1203 | // Second Life copies an object and duplicates the first one in it's place | 1203 | // Second Life copies an object and duplicates the first one in it's place |
1204 | // So, we have to make a copy of this one, set it in it's place then set the owner on this one | 1204 | // So, we have to make a copy of this one, set it in it's place then set the owner on this one |
@@ -1227,7 +1227,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | /// <summary> | 1229 | /// <summary> |
1230 | /// | 1230 | /// |
1231 | /// </summary> | 1231 | /// </summary> |
1232 | /// <param name="part"></param> | 1232 | /// <param name="part"></param> |
1233 | /// <param name="cAgentID"></param> | 1233 | /// <param name="cAgentID"></param> |
@@ -1359,7 +1359,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1359 | } | 1359 | } |
1360 | 1360 | ||
1361 | /// <summary> | 1361 | /// <summary> |
1362 | /// | 1362 | /// |
1363 | /// </summary> | 1363 | /// </summary> |
1364 | /// <param name="part"></param> | 1364 | /// <param name="part"></param> |
1365 | /// <param name="cAgentID"></param> | 1365 | /// <param name="cAgentID"></param> |
@@ -1373,14 +1373,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1373 | { | 1373 | { |
1374 | m_parts.Add(newPart.UUID, newPart); | 1374 | m_parts.Add(newPart.UUID, newPart); |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | SetPartAsNonRoot(newPart); | 1377 | SetPartAsNonRoot(newPart); |
1378 | 1378 | ||
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | /// <summary> | 1381 | /// <summary> |
1382 | /// Reset the LLUUIDs for all the prims that make up this group. | 1382 | /// Reset the LLUUIDs for all the prims that make up this group. |
1383 | /// | 1383 | /// |
1384 | /// This is called by methods which want to add a new group to an existing scene, in order | 1384 | /// This is called by methods which want to add a new group to an existing scene, in order |
1385 | /// to ensure that there are no clashes with groups already present. | 1385 | /// to ensure that there are no clashes with groups already present. |
1386 | /// </summary> | 1386 | /// </summary> |
@@ -1398,7 +1398,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | /// <summary> | 1400 | /// <summary> |
1401 | /// | 1401 | /// |
1402 | /// </summary> | 1402 | /// </summary> |
1403 | /// <param name="part"></param> | 1403 | /// <param name="part"></param> |
1404 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) | 1404 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) |
@@ -1425,7 +1425,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1425 | /// </summary> | 1425 | /// </summary> |
1426 | public override void Update() | 1426 | public override void Update() |
1427 | { | 1427 | { |
1428 | 1428 | ||
1429 | lock (m_parts) | 1429 | lock (m_parts) |
1430 | { | 1430 | { |
1431 | //if (m_rootPart.m_IsAttachment) | 1431 | //if (m_rootPart.m_IsAttachment) |
@@ -1436,7 +1436,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1436 | //} | 1436 | //} |
1437 | //return; | 1437 | //return; |
1438 | //} | 1438 | //} |
1439 | 1439 | ||
1440 | if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) | 1440 | if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) |
1441 | { | 1441 | { |
1442 | m_rootPart.UpdateFlag = 1; | 1442 | m_rootPart.UpdateFlag = 1; |
@@ -1447,10 +1447,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1447 | //if (part.UpdateFlag == 0) part.UpdateFlag = 1; | 1447 | //if (part.UpdateFlag == 0) part.UpdateFlag = 1; |
1448 | //} | 1448 | //} |
1449 | 1449 | ||
1450 | 1450 | ||
1451 | 1451 | ||
1452 | checkAtTargets(); | 1452 | checkAtTargets(); |
1453 | 1453 | ||
1454 | 1454 | ||
1455 | if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) | 1455 | if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) |
1456 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) | 1456 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) |
@@ -1508,7 +1508,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | /// <summary> | 1510 | /// <summary> |
1511 | /// | 1511 | /// |
1512 | /// </summary> | 1512 | /// </summary> |
1513 | public void ScheduleGroupForTerseUpdate() | 1513 | public void ScheduleGroupForTerseUpdate() |
1514 | { | 1514 | { |
@@ -1524,7 +1524,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | /// <summary> | 1526 | /// <summary> |
1527 | /// | 1527 | /// |
1528 | /// </summary> | 1528 | /// </summary> |
1529 | public void SendGroupFullUpdate() | 1529 | public void SendGroupFullUpdate() |
1530 | { | 1530 | { |
@@ -1545,7 +1545,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | /// <summary> | 1547 | /// <summary> |
1548 | /// | 1548 | /// |
1549 | /// </summary> | 1549 | /// </summary> |
1550 | public void SendGroupTerseUpdate() | 1550 | public void SendGroupTerseUpdate() |
1551 | { | 1551 | { |
@@ -1669,7 +1669,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1669 | { | 1669 | { |
1670 | if (objectGroup.RootPart.UpdateFlag > 0) | 1670 | if (objectGroup.RootPart.UpdateFlag > 0) |
1671 | { | 1671 | { |
1672 | // I've never actually seen this happen, though I think it's theoretically possible | 1672 | // I've never actually seen this happen, though I think it's theoretically possible |
1673 | m_log.WarnFormat( | 1673 | m_log.WarnFormat( |
1674 | "[SCENE OBJECT GROUP]: Aborted linking {0}, {1} to {2}, {3} as it has yet to finish delinking", | 1674 | "[SCENE OBJECT GROUP]: Aborted linking {0}, {1} to {2}, {3} as it has yet to finish delinking", |
1675 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); | 1675 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); |
@@ -1678,7 +1678,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | // m_log.DebugFormat( | 1680 | // m_log.DebugFormat( |
1681 | // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", | 1681 | // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", |
1682 | // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); | 1682 | // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); |
1683 | 1683 | ||
1684 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 1684 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
@@ -1747,19 +1747,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
1747 | } | 1747 | } |
1748 | 1748 | ||
1749 | /// <summary> | 1749 | /// <summary> |
1750 | /// Delink the given prim from this group. The delinked prim is established as | 1750 | /// Delink the given prim from this group. The delinked prim is established as |
1751 | /// an independent SceneObjectGroup. | 1751 | /// an independent SceneObjectGroup. |
1752 | /// </summary> | 1752 | /// </summary> |
1753 | /// <param name="partID"></param> | 1753 | /// <param name="partID"></param> |
1754 | public void DelinkFromGroup(uint partID) | 1754 | public void DelinkFromGroup(uint partID) |
1755 | { | 1755 | { |
1756 | SceneObjectPart linkPart = GetChildPart(partID); | 1756 | SceneObjectPart linkPart = GetChildPart(partID); |
1757 | 1757 | ||
1758 | if (null != linkPart) | 1758 | if (null != linkPart) |
1759 | { | 1759 | { |
1760 | linkPart.ClearUndoState(); | 1760 | linkPart.ClearUndoState(); |
1761 | // m_log.DebugFormat( | 1761 | // m_log.DebugFormat( |
1762 | // "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", | 1762 | // "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", |
1763 | // linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID); | 1763 | // linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID); |
1764 | 1764 | ||
1765 | LLQuaternion worldRot = linkPart.GetWorldRotation(); | 1765 | LLQuaternion worldRot = linkPart.GetWorldRotation(); |
@@ -1777,8 +1777,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1777 | m_scene.PhysicsScene.RemovePrim(linkPart.PhysActor); | 1777 | m_scene.PhysicsScene.RemovePrim(linkPart.PhysActor); |
1778 | } | 1778 | } |
1779 | 1779 | ||
1780 | // We need to reset the child part's position | 1780 | // We need to reset the child part's position |
1781 | // ready for life as a separate object after being a part of another object | 1781 | // ready for life as a separate object after being a part of another object |
1782 | Quaternion parentRot | 1782 | Quaternion parentRot |
1783 | = new Quaternion( | 1783 | = new Quaternion( |
1784 | m_rootPart.RotationOffset.W, | 1784 | m_rootPart.RotationOffset.W, |
@@ -1933,7 +1933,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1933 | m_rootPart.TouchName, new byte[0], m_rootPart.SitName, m_rootPart.Name, m_rootPart.Description, | 1933 | m_rootPart.TouchName, new byte[0], m_rootPart.SitName, m_rootPart.Name, m_rootPart.Description, |
1934 | m_rootPart.OwnerMask, m_rootPart.NextOwnerMask, m_rootPart.GroupMask, m_rootPart.EveryoneMask, | 1934 | m_rootPart.OwnerMask, m_rootPart.NextOwnerMask, m_rootPart.GroupMask, m_rootPart.EveryoneMask, |
1935 | m_rootPart.BaseMask); | 1935 | m_rootPart.BaseMask); |
1936 | 1936 | ||
1937 | } | 1937 | } |
1938 | 1938 | ||
1939 | /// <summary> | 1939 | /// <summary> |
@@ -1998,13 +1998,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1998 | } | 1998 | } |
1999 | 1999 | ||
2000 | /// <summary> | 2000 | /// <summary> |
2001 | /// | 2001 | /// |
2002 | /// </summary> | 2002 | /// </summary> |
2003 | /// <param name="localID"></param> | 2003 | /// <param name="localID"></param> |
2004 | /// <param name="type"></param> | 2004 | /// <param name="type"></param> |
2005 | /// <param name="inUse"></param> | 2005 | /// <param name="inUse"></param> |
2006 | /// <param name="data"></param> | 2006 | /// <param name="data"></param> |
2007 | /// | 2007 | /// |
2008 | public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) | 2008 | public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) |
2009 | { | 2009 | { |
2010 | SceneObjectPart part = GetChildPart(localID); | 2010 | SceneObjectPart part = GetChildPart(localID); |
@@ -2046,7 +2046,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2046 | } | 2046 | } |
2047 | 2047 | ||
2048 | /// <summary> | 2048 | /// <summary> |
2049 | /// | 2049 | /// |
2050 | /// </summary> | 2050 | /// </summary> |
2051 | /// <param name="localID"></param> | 2051 | /// <param name="localID"></param> |
2052 | /// <param name="textureEntry"></param> | 2052 | /// <param name="textureEntry"></param> |
@@ -2071,7 +2071,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2071 | #region Shape | 2071 | #region Shape |
2072 | 2072 | ||
2073 | /// <summary> | 2073 | /// <summary> |
2074 | /// | 2074 | /// |
2075 | /// </summary> | 2075 | /// </summary> |
2076 | /// <param name="shapeBlock"></param> | 2076 | /// <param name="shapeBlock"></param> |
2077 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) | 2077 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) |
@@ -2091,7 +2091,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2091 | #region Resize | 2091 | #region Resize |
2092 | 2092 | ||
2093 | /// <summary> | 2093 | /// <summary> |
2094 | /// | 2094 | /// |
2095 | /// </summary> | 2095 | /// </summary> |
2096 | /// <param name="scale"></param> | 2096 | /// <param name="scale"></param> |
2097 | /// <param name="localID"></param> | 2097 | /// <param name="localID"></param> |
@@ -2169,7 +2169,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2169 | #region Position | 2169 | #region Position |
2170 | 2170 | ||
2171 | /// <summary> | 2171 | /// <summary> |
2172 | /// | 2172 | /// |
2173 | /// </summary> | 2173 | /// </summary> |
2174 | /// <param name="pos"></param> | 2174 | /// <param name="pos"></param> |
2175 | public void UpdateGroupPosition(LLVector3 pos) | 2175 | public void UpdateGroupPosition(LLVector3 pos) |
@@ -2189,7 +2189,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2189 | } | 2189 | } |
2190 | 2190 | ||
2191 | /// <summary> | 2191 | /// <summary> |
2192 | /// | 2192 | /// |
2193 | /// </summary> | 2193 | /// </summary> |
2194 | /// <param name="pos"></param> | 2194 | /// <param name="pos"></param> |
2195 | /// <param name="localID"></param> | 2195 | /// <param name="localID"></param> |
@@ -2210,7 +2210,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2210 | } | 2210 | } |
2211 | 2211 | ||
2212 | /// <summary> | 2212 | /// <summary> |
2213 | /// | 2213 | /// |
2214 | /// </summary> | 2214 | /// </summary> |
2215 | /// <param name="pos"></param> | 2215 | /// <param name="pos"></param> |
2216 | private void UpdateRootPosition(LLVector3 pos) | 2216 | private void UpdateRootPosition(LLVector3 pos) |
@@ -2255,7 +2255,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2255 | #region Rotation | 2255 | #region Rotation |
2256 | 2256 | ||
2257 | /// <summary> | 2257 | /// <summary> |
2258 | /// | 2258 | /// |
2259 | /// </summary> | 2259 | /// </summary> |
2260 | /// <param name="rot"></param> | 2260 | /// <param name="rot"></param> |
2261 | public void UpdateGroupRotation(LLQuaternion rot) | 2261 | public void UpdateGroupRotation(LLQuaternion rot) |
@@ -2272,7 +2272,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2272 | } | 2272 | } |
2273 | 2273 | ||
2274 | /// <summary> | 2274 | /// <summary> |
2275 | /// | 2275 | /// |
2276 | /// </summary> | 2276 | /// </summary> |
2277 | /// <param name="pos"></param> | 2277 | /// <param name="pos"></param> |
2278 | /// <param name="rot"></param> | 2278 | /// <param name="rot"></param> |
@@ -2291,7 +2291,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2291 | } | 2291 | } |
2292 | 2292 | ||
2293 | /// <summary> | 2293 | /// <summary> |
2294 | /// | 2294 | /// |
2295 | /// </summary> | 2295 | /// </summary> |
2296 | /// <param name="rot"></param> | 2296 | /// <param name="rot"></param> |
2297 | /// <param name="localID"></param> | 2297 | /// <param name="localID"></param> |
@@ -2312,7 +2312,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2312 | } | 2312 | } |
2313 | 2313 | ||
2314 | /// <summary> | 2314 | /// <summary> |
2315 | /// | 2315 | /// |
2316 | /// </summary> | 2316 | /// </summary> |
2317 | /// <param name="rot"></param> | 2317 | /// <param name="rot"></param> |
2318 | private void UpdateRootRotation(LLQuaternion rot) | 2318 | private void UpdateRootRotation(LLQuaternion rot) |
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2463 | // Reusing att.tolerance to hold the index of the target in the targets dictionary | 2463 | // Reusing att.tolerance to hold the index of the target in the targets dictionary |
2464 | // to avoid deadlocking the sim. | 2464 | // to avoid deadlocking the sim. |
2465 | m_scene.TriggerAtTargetEvent(localids[ctr], (uint)att.tolerance, att.targetPos, m_rootPart.GroupPosition); | 2465 | m_scene.TriggerAtTargetEvent(localids[ctr], (uint)att.tolerance, att.targetPos, m_rootPart.GroupPosition); |
2466 | 2466 | ||
2467 | 2467 | ||
2468 | } | 2468 | } |
2469 | } | 2469 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index e1be8ff..cce263c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
67 | 67 | ||
68 | /// <summary> | 68 | /// <summary> |
69 | /// Holds in memory prim inventory | 69 | /// Holds in memory prim inventory |
70 | /// </summary> | 70 | /// </summary> |
71 | protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); | 71 | protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); |
72 | 72 | ||
73 | public TaskInventoryDictionary TaskInventory | 73 | public TaskInventoryDictionary TaskInventory |
@@ -84,21 +84,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
84 | /// <summary> | 84 | /// <summary> |
85 | /// Reset LLUUIDs for all the items in the prim's inventory. This involves either generating | 85 | /// Reset LLUUIDs for all the items in the prim's inventory. This involves either generating |
86 | /// new ones or setting existing UUIDs to the correct parent UUIDs. | 86 | /// new ones or setting existing UUIDs to the correct parent UUIDs. |
87 | /// | 87 | /// |
88 | /// If this method is called and there are inventory items, then we regard the inventory as having changed. | 88 | /// If this method is called and there are inventory items, then we regard the inventory as having changed. |
89 | /// </summary> | 89 | /// </summary> |
90 | /// <param name="linkNum">Link number for the part</param> | 90 | /// <param name="linkNum">Link number for the part</param> |
91 | public void ResetInventoryIDs() | 91 | public void ResetInventoryIDs() |
92 | { | 92 | { |
93 | lock (TaskInventory) | 93 | lock (TaskInventory) |
94 | { | 94 | { |
95 | if (0 == TaskInventory.Count) | 95 | if (0 == TaskInventory.Count) |
96 | { | 96 | { |
97 | return; | 97 | return; |
98 | } | 98 | } |
99 | 99 | ||
100 | HasInventoryChanged = true; | 100 | HasInventoryChanged = true; |
101 | 101 | ||
102 | IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values); | 102 | IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values); |
103 | TaskInventory.Clear(); | 103 | TaskInventory.Clear(); |
104 | 104 | ||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
127 | if (ownerId != item.OwnerID) | 127 | if (ownerId != item.OwnerID) |
128 | { | 128 | { |
129 | item.LastOwnerID = item.OwnerID; | 129 | item.LastOwnerID = item.OwnerID; |
130 | item.OwnerID = ownerId; | 130 | item.OwnerID = ownerId; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | } | 133 | } |
@@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
178 | { | 178 | { |
179 | // m_log.InfoFormat( | 179 | // m_log.InfoFormat( |
180 | // "[PRIM INVENTORY]: " + | 180 | // "[PRIM INVENTORY]: " + |
181 | // "Starting script {0}, {1} in prim {2}, {3}", | 181 | // "Starting script {0}, {1} in prim {2}, {3}", |
182 | // item.Name, item.ItemID, Name, UUID); | 182 | // item.Name, item.ItemID, Name, UUID); |
183 | AddFlag(LLObject.ObjectFlags.Scripted); | 183 | AddFlag(LLObject.ObjectFlags.Scripted); |
184 | 184 | ||
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
211 | /// </summary> | 211 | /// </summary> |
212 | /// <param name="itemId"> | 212 | /// <param name="itemId"> |
213 | /// A <see cref="LLUUID"/> | 213 | /// A <see cref="LLUUID"/> |
214 | /// </param> | 214 | /// </param> |
215 | public void StartScript(LLUUID itemId) | 215 | public void StartScript(LLUUID itemId) |
216 | { | 216 | { |
217 | lock (m_taskInventory) | 217 | lock (m_taskInventory) |
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
234 | /// <summary> | 234 | /// <summary> |
235 | /// Stop a script which is in this prim's inventory. | 235 | /// Stop a script which is in this prim's inventory. |
236 | /// </summary> | 236 | /// </summary> |
237 | /// <param name="itemId"></param> | 237 | /// <param name="itemId"></param> |
238 | public void StopScript(LLUUID itemId) | 238 | public void StopScript(LLUUID itemId) |
239 | { | 239 | { |
240 | if (m_taskInventory.ContainsKey(itemId)) | 240 | if (m_taskInventory.ContainsKey(itemId)) |
@@ -306,9 +306,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | } | 306 | } |
307 | 307 | ||
308 | /// <summary> | 308 | /// <summary> |
309 | /// Restore a whole collection of items to the prim's inventory at once. | 309 | /// Restore a whole collection of items to the prim's inventory at once. |
310 | /// We assume that the items already have all their fields correctly filled out. | 310 | /// We assume that the items already have all their fields correctly filled out. |
311 | /// The items are not flagged for persistence to the database, since they are being restored | 311 | /// The items are not flagged for persistence to the database, since they are being restored |
312 | /// from persistence rather than being newly added. | 312 | /// from persistence rather than being newly added. |
313 | /// </summary> | 313 | /// </summary> |
314 | /// <param name="items"></param> | 314 | /// <param name="items"></param> |
@@ -338,9 +338,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
338 | if (m_taskInventory.ContainsKey(itemID)) | 338 | if (m_taskInventory.ContainsKey(itemID)) |
339 | { | 339 | { |
340 | // m_log.DebugFormat( | 340 | // m_log.DebugFormat( |
341 | // "[PRIM INVENTORY]: Retrieved task inventory item {0}, {1} from prim {2}, {3}", | 341 | // "[PRIM INVENTORY]: Retrieved task inventory item {0}, {1} from prim {2}, {3}", |
342 | // m_taskInventory[itemID].Name, itemID, Name, UUID); | 342 | // m_taskInventory[itemID].Name, itemID, Name, UUID); |
343 | 343 | ||
344 | return m_taskInventory[itemID]; | 344 | return m_taskInventory[itemID]; |
345 | } | 345 | } |
346 | else | 346 | else |
@@ -450,11 +450,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
450 | /// <param name="client"></param> | 450 | /// <param name="client"></param> |
451 | /// <param name="localID"></param> | 451 | /// <param name="localID"></param> |
452 | public bool GetInventoryFileName(IClientAPI client, uint localID) | 452 | public bool GetInventoryFileName(IClientAPI client, uint localID) |
453 | { | 453 | { |
454 | // m_log.DebugFormat( | 454 | // m_log.DebugFormat( |
455 | // "[PRIM INVENTORY]: Received request from client {0} for inventory file name of {1}, {2}", | 455 | // "[PRIM INVENTORY]: Received request from client {0} for inventory file name of {1}, {2}", |
456 | // client.AgentId, Name, UUID); | 456 | // client.AgentId, Name, UUID); |
457 | 457 | ||
458 | if (m_inventorySerial > 0) | 458 | if (m_inventorySerial > 0) |
459 | { | 459 | { |
460 | client.SendTaskInventory(m_uuid, (short)m_inventorySerial, | 460 | client.SendTaskInventory(m_uuid, (short)m_inventorySerial, |
@@ -473,9 +473,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
473 | /// </summary> | 473 | /// </summary> |
474 | /// <param name="xferManager"></param> | 474 | /// <param name="xferManager"></param> |
475 | public void RequestInventoryFile(IXfer xferManager) | 475 | public void RequestInventoryFile(IXfer xferManager) |
476 | { | 476 | { |
477 | byte[] fileData = new byte[0]; | 477 | byte[] fileData = new byte[0]; |
478 | 478 | ||
479 | // Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches | 479 | // Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches |
480 | // what appears to happen in the Second Life protocol. If this isn't the case. then various functionality | 480 | // what appears to happen in the Second Life protocol. If this isn't the case. then various functionality |
481 | // isn't available (such as drag from prim inventory to agent inventory) | 481 | // isn't available (such as drag from prim inventory to agent inventory) |
@@ -486,39 +486,39 @@ namespace OpenSim.Region.Environment.Scenes | |||
486 | foreach (TaskInventoryItem item in m_taskInventory.Values) | 486 | foreach (TaskInventoryItem item in m_taskInventory.Values) |
487 | { | 487 | { |
488 | invString.AddItemStart(); | 488 | invString.AddItemStart(); |
489 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); | 489 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); |
490 | invString.AddNameValueLine("parent_id", UUID.ToString()); | 490 | invString.AddNameValueLine("parent_id", UUID.ToString()); |
491 | 491 | ||
492 | invString.AddPermissionsStart(); | 492 | invString.AddPermissionsStart(); |
493 | 493 | ||
494 | invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); | 494 | invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); |
495 | invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); | 495 | invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); |
496 | invString.AddNameValueLine("group_mask", "00000000"); | 496 | invString.AddNameValueLine("group_mask", "00000000"); |
497 | invString.AddNameValueLine("everyone_mask", "00000000"); | 497 | invString.AddNameValueLine("everyone_mask", "00000000"); |
498 | invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); | 498 | invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); |
499 | 499 | ||
500 | invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); | 500 | invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); |
501 | invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); | 501 | invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); |
502 | 502 | ||
503 | invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); | 503 | invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); |
504 | // invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString()); | 504 | // invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString()); |
505 | 505 | ||
506 | invString.AddNameValueLine("group_id", item.GroupID.ToString()); | 506 | invString.AddNameValueLine("group_id", item.GroupID.ToString()); |
507 | invString.AddSectionEnd(); | 507 | invString.AddSectionEnd(); |
508 | 508 | ||
509 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); | 509 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); |
510 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); | 510 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); |
511 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); | 511 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); |
512 | invString.AddNameValueLine("flags", "00000000"); | 512 | invString.AddNameValueLine("flags", "00000000"); |
513 | 513 | ||
514 | invString.AddSaleStart(); | 514 | invString.AddSaleStart(); |
515 | invString.AddNameValueLine("sale_type", "not"); | 515 | invString.AddNameValueLine("sale_type", "not"); |
516 | invString.AddNameValueLine("sale_price", "0"); | 516 | invString.AddNameValueLine("sale_price", "0"); |
517 | invString.AddSectionEnd(); | 517 | invString.AddSectionEnd(); |
518 | 518 | ||
519 | invString.AddNameValueLine("name", item.Name + "|"); | 519 | invString.AddNameValueLine("name", item.Name + "|"); |
520 | invString.AddNameValueLine("desc", item.Description + "|"); | 520 | invString.AddNameValueLine("desc", item.Description + "|"); |
521 | 521 | ||
522 | invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); | 522 | invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); |
523 | invString.AddSectionEnd(); | 523 | invString.AddSectionEnd(); |
524 | } | 524 | } |
@@ -576,13 +576,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
576 | BuildString += "\tpermissions 0\n"; | 576 | BuildString += "\tpermissions 0\n"; |
577 | AddSectionStart(); | 577 | AddSectionStart(); |
578 | } | 578 | } |
579 | 579 | ||
580 | public void AddSaleStart() | 580 | public void AddSaleStart() |
581 | { | 581 | { |
582 | BuildString += "\tsale_info\t0\n"; | 582 | BuildString += "\tsale_info\t0\n"; |
583 | AddSectionStart(); | 583 | AddSectionStart(); |
584 | } | 584 | } |
585 | 585 | ||
586 | protected void AddSectionStart() | 586 | protected void AddSectionStart() |
587 | { | 587 | { |
588 | BuildString += "\t{\n"; | 588 | BuildString += "\t{\n"; |
@@ -610,64 +610,64 @@ namespace OpenSim.Region.Environment.Scenes | |||
610 | } | 610 | } |
611 | } | 611 | } |
612 | 612 | ||
613 | public uint MaskEffectivePermissions() | 613 | public uint MaskEffectivePermissions() |
614 | { | 614 | { |
615 | uint mask=0x7fffffff; | 615 | uint mask=0x7fffffff; |
616 | 616 | ||
617 | foreach (TaskInventoryItem item in m_taskInventory.Values) | 617 | foreach (TaskInventoryItem item in m_taskInventory.Values) |
618 | { | 618 | { |
619 | if(item.InvType != 6) | 619 | if (item.InvType != 6) |
620 | { | 620 | { |
621 | if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0) | 621 | if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0) |
622 | mask &= ~((uint)PermissionMask.Copy >> 13); | 622 | mask &= ~((uint)PermissionMask.Copy >> 13); |
623 | if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) | 623 | if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) |
624 | mask &= ~((uint)PermissionMask.Transfer >> 13); | 624 | mask &= ~((uint)PermissionMask.Transfer >> 13); |
625 | if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0) | 625 | if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0) |
626 | mask &= ~((uint)PermissionMask.Modify >> 13); | 626 | mask &= ~((uint)PermissionMask.Modify >> 13); |
627 | } | 627 | } |
628 | else | 628 | else |
629 | { | 629 | { |
630 | if((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) | 630 | if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) |
631 | mask &= ~((uint)PermissionMask.Copy >> 13); | 631 | mask &= ~((uint)PermissionMask.Copy >> 13); |
632 | if((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) | 632 | if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) |
633 | mask &= ~((uint)PermissionMask.Transfer >> 13); | 633 | mask &= ~((uint)PermissionMask.Transfer >> 13); |
634 | if((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) | 634 | if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) |
635 | mask &= ~((uint)PermissionMask.Modify >> 13); | 635 | mask &= ~((uint)PermissionMask.Modify >> 13); |
636 | } | 636 | } |
637 | 637 | ||
638 | if((item.OwnerMask & (uint)PermissionMask.Copy) == 0) | 638 | if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0) |
639 | mask &= ~(uint)PermissionMask.Copy; | 639 | mask &= ~(uint)PermissionMask.Copy; |
640 | if((item.OwnerMask & (uint)PermissionMask.Transfer) == 0) | 640 | if ((item.OwnerMask & (uint)PermissionMask.Transfer) == 0) |
641 | mask &= ~(uint)PermissionMask.Transfer; | 641 | mask &= ~(uint)PermissionMask.Transfer; |
642 | if((item.OwnerMask & (uint)PermissionMask.Modify) == 0) | 642 | if ((item.OwnerMask & (uint)PermissionMask.Modify) == 0) |
643 | mask &= ~(uint)PermissionMask.Modify; | 643 | mask &= ~(uint)PermissionMask.Modify; |
644 | } | 644 | } |
645 | return mask; | 645 | return mask; |
646 | } | 646 | } |
647 | 647 | ||
648 | public void ApplyNextOwnerPermissions() | 648 | public void ApplyNextOwnerPermissions() |
649 | { | 649 | { |
650 | BaseMask &= NextOwnerMask; | 650 | BaseMask &= NextOwnerMask; |
651 | OwnerMask &= NextOwnerMask; | 651 | OwnerMask &= NextOwnerMask; |
652 | EveryoneMask &= NextOwnerMask; | 652 | EveryoneMask &= NextOwnerMask; |
653 | 653 | ||
654 | foreach (TaskInventoryItem item in m_taskInventory.Values) | 654 | foreach (TaskInventoryItem item in m_taskInventory.Values) |
655 | { | 655 | { |
656 | if(item.InvType == 6) | 656 | if (item.InvType == 6) |
657 | { | 657 | { |
658 | if((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) | 658 | if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) |
659 | item.OwnerMask &= ~(uint)PermissionMask.Copy; | 659 | item.OwnerMask &= ~(uint)PermissionMask.Copy; |
660 | if((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) | 660 | if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) |
661 | item.OwnerMask &= ~(uint)PermissionMask.Transfer; | 661 | item.OwnerMask &= ~(uint)PermissionMask.Transfer; |
662 | if((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) | 662 | if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) |
663 | item.OwnerMask &= ~(uint)PermissionMask.Modify; | 663 | item.OwnerMask &= ~(uint)PermissionMask.Modify; |
664 | } | 664 | } |
665 | item.OwnerMask &= item.NextOwnerMask; | 665 | item.OwnerMask &= item.NextOwnerMask; |
666 | item.BaseMask &= item.NextOwnerMask; | 666 | item.BaseMask &= item.NextOwnerMask; |
667 | item.EveryoneMask &= item.NextOwnerMask; | 667 | item.EveryoneMask &= item.NextOwnerMask; |
668 | } | 668 | } |
669 | 669 | ||
670 | TriggerScriptChangedEvent(Changed.OWNER); | 670 | TriggerScriptChangedEvent(Changed.OWNER); |
671 | } | 671 | } |
672 | } | 672 | } |
673 | } | 673 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0196b91..a52d5f9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -41,7 +41,7 @@ using OpenSim.Region.Physics.Manager; | |||
41 | 41 | ||
42 | namespace OpenSim.Region.Environment.Scenes | 42 | namespace OpenSim.Region.Environment.Scenes |
43 | { | 43 | { |
44 | // I don't really know where to put this except here. | 44 | // I don't really know where to put this except here. |
45 | // Can't access the OpenSim.Region.ScriptEngine.Common.LSL_BaseClass.Changed constants | 45 | // Can't access the OpenSim.Region.ScriptEngine.Common.LSL_BaseClass.Changed constants |
46 | [Flags] | 46 | [Flags] |
47 | public enum ExtraParamType | 47 | public enum ExtraParamType |
@@ -81,13 +81,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
81 | SCALE = 0x40 | 81 | SCALE = 0x40 |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | [Serializable] | 85 | [Serializable] |
86 | public partial class SceneObjectPart : IScriptHost, ISerializable | 86 | public partial class SceneObjectPart : IScriptHost, ISerializable |
87 | { | 87 | { |
88 | 88 | ||
89 | [XmlIgnore] public PhysicsActor PhysActor = null; | 89 | [XmlIgnore] public PhysicsActor PhysActor = null; |
90 | 90 | ||
91 | public LLUUID LastOwnerID; | 91 | public LLUUID LastOwnerID; |
92 | public LLUUID OwnerID; | 92 | public LLUUID OwnerID; |
93 | public LLUUID GroupID; | 93 | public LLUUID GroupID; |
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
95 | public byte ObjectSaleType; | 95 | public byte ObjectSaleType; |
96 | public int SalePrice; | 96 | public int SalePrice; |
97 | public uint Category; | 97 | public uint Category; |
98 | 98 | ||
99 | // TODO: This needs to be persisted in next XML version update! | 99 | // TODO: This needs to be persisted in next XML version update! |
100 | [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; | 100 | [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; |
101 | [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); | 101 | [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); |
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
139 | set { Flags = (LLObject.ObjectFlags)value; } | 139 | set { Flags = (LLObject.ObjectFlags)value; } |
140 | } | 140 | } |
141 | 141 | ||
142 | #endregion | 142 | #endregion |
143 | 143 | ||
144 | protected byte[] m_particleSystem = new byte[0]; | 144 | protected byte[] m_particleSystem = new byte[0]; |
145 | 145 | ||
@@ -152,13 +152,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
152 | /// 0 - no update is scheduled | 152 | /// 0 - no update is scheduled |
153 | /// 1 - terse update scheduled | 153 | /// 1 - terse update scheduled |
154 | /// 2 - full update scheduled | 154 | /// 2 - full update scheduled |
155 | /// | 155 | /// |
156 | /// TODO - This should be an enumeration | 156 | /// TODO - This should be an enumeration |
157 | /// </summary> | 157 | /// </summary> |
158 | private byte m_updateFlag; | 158 | private byte m_updateFlag; |
159 | 159 | ||
160 | #region Properties | 160 | #region Properties |
161 | 161 | ||
162 | public LLUUID CreatorID; | 162 | public LLUUID CreatorID; |
163 | 163 | ||
164 | public LLUUID ObjectCreator | 164 | public LLUUID ObjectCreator |
@@ -230,7 +230,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
230 | /// <returns>A Linked Child Prim objects position in world</returns> | 230 | /// <returns>A Linked Child Prim objects position in world</returns> |
231 | public LLVector3 GetWorldPosition() | 231 | public LLVector3 GetWorldPosition() |
232 | { | 232 | { |
233 | 233 | ||
234 | Quaternion parentRot = new Quaternion( | 234 | Quaternion parentRot = new Quaternion( |
235 | ParentGroup.RootPart.RotationOffset.W, | 235 | ParentGroup.RootPart.RotationOffset.W, |
236 | ParentGroup.RootPart.RotationOffset.X, | 236 | ParentGroup.RootPart.RotationOffset.X, |
@@ -256,13 +256,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
256 | /// <returns></returns> | 256 | /// <returns></returns> |
257 | public LLQuaternion GetWorldRotation() | 257 | public LLQuaternion GetWorldRotation() |
258 | { | 258 | { |
259 | 259 | ||
260 | Quaternion newRot; | 260 | Quaternion newRot; |
261 | 261 | ||
262 | if (this.LinkNum == 0) | 262 | if (this.LinkNum == 0) |
263 | { | 263 | { |
264 | newRot = new Quaternion(RotationOffset.W,RotationOffset.X,RotationOffset.Y,RotationOffset.Z); | 264 | newRot = new Quaternion(RotationOffset.W,RotationOffset.X,RotationOffset.Y,RotationOffset.Z); |
265 | 265 | ||
266 | } | 266 | } |
267 | else | 267 | else |
268 | { | 268 | { |
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
286 | //return new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w); | 286 | //return new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w); |
287 | 287 | ||
288 | } | 288 | } |
289 | 289 | ||
290 | public void StoreUndoState() | 290 | public void StoreUndoState() |
291 | { | 291 | { |
292 | if (!m_undoing) | 292 | if (!m_undoing) |
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
307 | if (m_parentGroup.GetSceneMaxUndo() > 0) | 307 | if (m_parentGroup.GetSceneMaxUndo() > 0) |
308 | { | 308 | { |
309 | UndoState nUndo = new UndoState(this); | 309 | UndoState nUndo = new UndoState(this); |
310 | 310 | ||
311 | m_undo.Push(nUndo); | 311 | m_undo.Push(nUndo); |
312 | 312 | ||
313 | } | 313 | } |
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
362 | } | 362 | } |
363 | else | 363 | else |
364 | { | 364 | { |
365 | 365 | ||
366 | // To move the child prim in respect to the group position and rotation we have to calculate | 366 | // To move the child prim in respect to the group position and rotation we have to calculate |
367 | 367 | ||
368 | LLVector3 resultingposition = GetWorldPosition(); | 368 | LLVector3 resultingposition = GetWorldPosition(); |
@@ -370,7 +370,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
370 | LLQuaternion resultingrot = GetWorldRotation(); | 370 | LLQuaternion resultingrot = GetWorldRotation(); |
371 | PhysActor.Orientation = new Quaternion(resultingrot.W, resultingrot.X, resultingrot.Y, resultingrot.Z); | 371 | PhysActor.Orientation = new Quaternion(resultingrot.W, resultingrot.X, resultingrot.Y, resultingrot.Z); |
372 | } | 372 | } |
373 | 373 | ||
374 | // Tell the physics engines that this prim changed. | 374 | // Tell the physics engines that this prim changed. |
375 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 375 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
376 | } | 376 | } |
@@ -379,12 +379,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
379 | Console.WriteLine(e.Message); | 379 | Console.WriteLine(e.Message); |
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | private byte[] m_TextureAnimation; | 386 | private byte[] m_TextureAnimation; |
387 | 387 | ||
388 | protected LLVector3 m_offsetPosition; | 388 | protected LLVector3 m_offsetPosition; |
389 | 389 | ||
390 | public LLVector3 OffsetPosition | 390 | public LLVector3 OffsetPosition |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
398 | { | 398 | { |
399 | // Hack to get the child prim to update world positions in the physics engine | 399 | // Hack to get the child prim to update world positions in the physics engine |
400 | ParentGroup.ResetChildPrimPhysicsPositions(); | 400 | ParentGroup.ResetChildPrimPhysicsPositions(); |
401 | 401 | ||
402 | } | 402 | } |
403 | catch (NullReferenceException) | 403 | catch (NullReferenceException) |
404 | { | 404 | { |
@@ -467,7 +467,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
467 | Console.WriteLine(ex.Message); | 467 | Console.WriteLine(ex.Message); |
468 | } | 468 | } |
469 | } | 469 | } |
470 | 470 | ||
471 | } | 471 | } |
472 | } | 472 | } |
473 | 473 | ||
@@ -494,8 +494,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
494 | 494 | ||
495 | return m_velocity; | 495 | return m_velocity; |
496 | } | 496 | } |
497 | set { | 497 | set { |
498 | 498 | ||
499 | m_velocity = value; | 499 | m_velocity = value; |
500 | if (PhysActor != null) | 500 | if (PhysActor != null) |
501 | { | 501 | { |
@@ -505,7 +505,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
505 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 505 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | } | 509 | } |
510 | } | 510 | } |
511 | 511 | ||
@@ -565,7 +565,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
565 | { | 565 | { |
566 | m_color = value; | 566 | m_color = value; |
567 | TriggerScriptChangedEvent(Changed.COLOR); | 567 | TriggerScriptChangedEvent(Changed.COLOR); |
568 | 568 | ||
569 | /* ScheduleFullUpdate() need not be called b/c after | 569 | /* ScheduleFullUpdate() need not be called b/c after |
570 | * setting the color, the text will be set, so then | 570 | * setting the color, the text will be set, so then |
571 | * ScheduleFullUpdate() will be called. */ | 571 | * ScheduleFullUpdate() will be called. */ |
@@ -615,11 +615,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
615 | public int LinkNum | 615 | public int LinkNum |
616 | { | 616 | { |
617 | get { return m_linkNum; } | 617 | get { return m_linkNum; } |
618 | set | 618 | set |
619 | { | 619 | { |
620 | m_linkNum = value; | 620 | m_linkNum = value; |
621 | TriggerScriptChangedEvent(Changed.LINK); | 621 | TriggerScriptChangedEvent(Changed.LINK); |
622 | 622 | ||
623 | } | 623 | } |
624 | } | 624 | } |
625 | 625 | ||
@@ -646,7 +646,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
646 | public void ApplyImpulse(LLVector3 impulsei, bool localGlobalTF) | 646 | public void ApplyImpulse(LLVector3 impulsei, bool localGlobalTF) |
647 | { | 647 | { |
648 | PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); | 648 | PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); |
649 | 649 | ||
650 | if (localGlobalTF) | 650 | if (localGlobalTF) |
651 | { | 651 | { |
652 | 652 | ||
@@ -659,7 +659,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
659 | } | 659 | } |
660 | else | 660 | else |
661 | { | 661 | { |
662 | 662 | ||
663 | if (m_parentGroup != null) | 663 | if (m_parentGroup != null) |
664 | { | 664 | { |
665 | m_parentGroup.applyImpulse(impulse); | 665 | m_parentGroup.applyImpulse(impulse); |
@@ -698,9 +698,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
698 | public PrimitiveBaseShape Shape | 698 | public PrimitiveBaseShape Shape |
699 | { | 699 | { |
700 | get { return m_shape; } | 700 | get { return m_shape; } |
701 | set | 701 | set |
702 | { | 702 | { |
703 | 703 | ||
704 | m_shape = value; | 704 | m_shape = value; |
705 | TriggerScriptChangedEvent(Changed.SHAPE); | 705 | TriggerScriptChangedEvent(Changed.SHAPE); |
706 | } | 706 | } |
@@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
709 | public LLVector3 Scale | 709 | public LLVector3 Scale |
710 | { | 710 | { |
711 | get { return m_shape.Scale; } | 711 | get { return m_shape.Scale; } |
712 | set | 712 | set |
713 | { | 713 | { |
714 | StoreUndoState(); | 714 | StoreUndoState(); |
715 | m_shape.Scale = value; | 715 | m_shape.Scale = value; |
@@ -731,7 +731,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
731 | } | 731 | } |
732 | 732 | ||
733 | #endregion | 733 | #endregion |
734 | 734 | ||
735 | public LLUUID ObjectOwner | 735 | public LLUUID ObjectOwner |
736 | { | 736 | { |
737 | get { return OwnerID; } | 737 | get { return OwnerID; } |
@@ -809,9 +809,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
809 | Acceleration = new LLVector3(0, 0, 0); | 809 | Acceleration = new LLVector3(0, 0, 0); |
810 | m_TextureAnimation = new byte[0]; | 810 | m_TextureAnimation = new byte[0]; |
811 | m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; | 811 | m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; |
812 | 812 | ||
813 | // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, | 813 | // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, |
814 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from | 814 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from |
815 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log | 815 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log |
816 | 816 | ||
817 | Flags = 0; | 817 | Flags = 0; |
@@ -819,7 +819,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
819 | 819 | ||
820 | TrimPermissions(); | 820 | TrimPermissions(); |
821 | //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); | 821 | //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); |
822 | 822 | ||
823 | ScheduleFullUpdate(); | 823 | ScheduleFullUpdate(); |
824 | } | 824 | } |
825 | 825 | ||
@@ -855,14 +855,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
855 | OffsetPosition = position; | 855 | OffsetPosition = position; |
856 | RotationOffset = rotation; | 856 | RotationOffset = rotation; |
857 | ObjectFlags = flags; | 857 | ObjectFlags = flags; |
858 | 858 | ||
859 | // Since we don't store script state, this is only a 'temporary' objectflag now | 859 | // Since we don't store script state, this is only a 'temporary' objectflag now |
860 | // If the object is scripted, the script will get loaded and this will be set again | 860 | // If the object is scripted, the script will get loaded and this will be set again |
861 | ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); | 861 | ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); |
862 | 862 | ||
863 | TrimPermissions(); | 863 | TrimPermissions(); |
864 | // ApplyPhysics(); | 864 | // ApplyPhysics(); |
865 | 865 | ||
866 | ScheduleFullUpdate(); | 866 | ScheduleFullUpdate(); |
867 | } | 867 | } |
868 | 868 | ||
@@ -881,7 +881,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
881 | SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); | 881 | SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); |
882 | return newobject; | 882 | return newobject; |
883 | } | 883 | } |
884 | 884 | ||
885 | public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) | 885 | public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) |
886 | { | 886 | { |
887 | 887 | ||
@@ -902,7 +902,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
902 | new PhysicsVector(Scale.X, Scale.Y, Scale.Z), | 902 | new PhysicsVector(Scale.X, Scale.Y, Scale.Z), |
903 | new Quaternion(RotationOffset.W, RotationOffset.X, | 903 | new Quaternion(RotationOffset.W, RotationOffset.X, |
904 | RotationOffset.Y, RotationOffset.Z), RigidBody); | 904 | RotationOffset.Y, RotationOffset.Z), RigidBody); |
905 | 905 | ||
906 | // Basic Physics returns null.. joy joy joy. | 906 | // Basic Physics returns null.. joy joy joy. |
907 | if (PhysActor != null) | 907 | if (PhysActor != null) |
908 | { | 908 | { |
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
954 | Vector3 rOrigin = iray.Origin; | 954 | Vector3 rOrigin = iray.Origin; |
955 | Vector3 rDirection = iray.Direction; | 955 | Vector3 rDirection = iray.Direction; |
956 | 956 | ||
957 | 957 | ||
958 | 958 | ||
959 | //rDirection = rDirection.Normalize(); | 959 | //rDirection = rDirection.Normalize(); |
960 | // Buidling the first part of the Quadratic equation | 960 | // Buidling the first part of the Quadratic equation |
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
985 | radius = vScale.z; | 985 | radius = vScale.z; |
986 | 986 | ||
987 | // the second part of this is the default prim size | 987 | // the second part of this is the default prim size |
988 | // once we factor in the aabb of the prim we're adding we can | 988 | // once we factor in the aabb of the prim we're adding we can |
989 | // change this to; | 989 | // change this to; |
990 | // radius = (radius / 2) - 0.01f; | 990 | // radius = (radius / 2) - 0.01f; |
991 | // | 991 | // |
@@ -1018,7 +1018,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1018 | } | 1018 | } |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | // We got an intersection. putting together an EntityIntersection object with the | 1021 | // We got an intersection. putting together an EntityIntersection object with the |
1022 | // intersection information | 1022 | // intersection information |
1023 | Vector3 ipoint = | 1023 | Vector3 ipoint = |
1024 | new Vector3(iray.Origin.x + (iray.Direction.x*root), iray.Origin.y + (iray.Direction.y*root), | 1024 | new Vector3(iray.Origin.x + (iray.Direction.x*root), iray.Origin.y + (iray.Direction.y*root), |
@@ -1089,16 +1089,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1089 | Vector3 AXpos = new Vector3(pos.X, pos.Y, pos.Z); | 1089 | Vector3 AXpos = new Vector3(pos.X, pos.Y, pos.Z); |
1090 | 1090 | ||
1091 | // tScale is the offset to derive the vertex based on the scale. | 1091 | // tScale is the offset to derive the vertex based on the scale. |
1092 | // it's different for each vertex because we've got to rotate it | 1092 | // it's different for each vertex because we've got to rotate it |
1093 | // to get the world position of the vertex to produce the Oriented Bounding Box | 1093 | // to get the world position of the vertex to produce the Oriented Bounding Box |
1094 | 1094 | ||
1095 | Vector3 tScale = new Vector3(); | 1095 | Vector3 tScale = new Vector3(); |
1096 | 1096 | ||
1097 | Vector3 AXscale = new Vector3(m_shape.Scale.X * 0.5f, m_shape.Scale.Y * 0.5f, m_shape.Scale.Z * 0.5f); | 1097 | Vector3 AXscale = new Vector3(m_shape.Scale.X * 0.5f, m_shape.Scale.Y * 0.5f, m_shape.Scale.Z * 0.5f); |
1098 | 1098 | ||
1099 | //Vector3 pScale = (AXscale) - (AXrot.Inverse() * (AXscale)); | 1099 | //Vector3 pScale = (AXscale) - (AXrot.Inverse() * (AXscale)); |
1100 | //Vector3 nScale = (AXscale * -1) - (AXrot.Inverse() * (AXscale * -1)); | 1100 | //Vector3 nScale = (AXscale * -1) - (AXrot.Inverse() * (AXscale * -1)); |
1101 | 1101 | ||
1102 | // rScale is the rotated offset to find a vertex based on the scale and the world rotation. | 1102 | // rScale is the rotated offset to find a vertex based on the scale and the world rotation. |
1103 | Vector3 rScale = new Vector3(); | 1103 | Vector3 rScale = new Vector3(); |
1104 | 1104 | ||
@@ -1109,14 +1109,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1109 | // | | | 1109 | // | | |
1110 | // | 4 top | | 1110 | // | 4 top | |
1111 | // |_________| | 1111 | // |_________| |
1112 | // C D | 1112 | // C D |
1113 | 1113 | ||
1114 | // A _________ B | 1114 | // A _________ B |
1115 | // | Back | | 1115 | // | Back | |
1116 | // | 3 | | 1116 | // | 3 | |
1117 | // |_________| | 1117 | // |_________| |
1118 | // C D | 1118 | // C D |
1119 | 1119 | ||
1120 | // A _________ B B _________ A | 1120 | // A _________ B B _________ A |
1121 | // | Left | | Right | | 1121 | // | Left | | Right | |
1122 | // | 0 | | 2 | | 1122 | // | 0 | | 2 | |
@@ -1127,13 +1127,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1127 | // | Front | | 1127 | // | Front | |
1128 | // | 1 | | 1128 | // | 1 | |
1129 | // |_________| | 1129 | // |_________| |
1130 | // C D | 1130 | // C D |
1131 | 1131 | ||
1132 | // C _________ D | 1132 | // C _________ D |
1133 | // | | | 1133 | // | | |
1134 | // | 5 bot | | 1134 | // | 5 bot | |
1135 | // |_________| | 1135 | // |_________| |
1136 | // A B | 1136 | // A B |
1137 | #endregion | 1137 | #endregion |
1138 | 1138 | ||
1139 | #region Plane Decomposition of Oriented Bounding Box | 1139 | #region Plane Decomposition of Oriented Bounding Box |
@@ -1238,22 +1238,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
1238 | for (int i = 0; i < 6; i++) | 1238 | for (int i = 0; i < 6; i++) |
1239 | { | 1239 | { |
1240 | //m_log.Info("[FACECALCULATION]: FaceA[" + i + "]=" + FaceA[i] + " FaceB[" + i + "]=" + FaceB[i] + " FaceC[" + i + "]=" + FaceC[i] + " FaceD[" + i + "]=" + FaceD[i]); | 1240 | //m_log.Info("[FACECALCULATION]: FaceA[" + i + "]=" + FaceA[i] + " FaceB[" + i + "]=" + FaceB[i] + " FaceC[" + i + "]=" + FaceC[i] + " FaceD[" + i + "]=" + FaceD[i]); |
1241 | 1241 | ||
1242 | // Our Plane direction | 1242 | // Our Plane direction |
1243 | AmBa = FaceA[i] - FaceB[i]; | 1243 | AmBa = FaceA[i] - FaceB[i]; |
1244 | AmBb = FaceB[i] - FaceC[i]; | 1244 | AmBb = FaceB[i] - FaceC[i]; |
1245 | 1245 | ||
1246 | cross = AmBb.Cross(AmBa); | 1246 | cross = AmBb.Cross(AmBa); |
1247 | 1247 | ||
1248 | // normalize the cross product to get the normal. | 1248 | // normalize the cross product to get the normal. |
1249 | normals[i] = cross / cross.Length; | 1249 | normals[i] = cross / cross.Length; |
1250 | 1250 | ||
1251 | //m_log.Info("[NORMALS]: normals[ " + i + "]" + normals[i].ToString()); | 1251 | //m_log.Info("[NORMALS]: normals[ " + i + "]" + normals[i].ToString()); |
1252 | //distance[i] = (normals[i].x * AmBa.x + normals[i].y * AmBa.y + normals[i].z * AmBa.z) * -1; | 1252 | //distance[i] = (normals[i].x * AmBa.x + normals[i].y * AmBa.y + normals[i].z * AmBa.z) * -1; |
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | EntityIntersection returnresult = new EntityIntersection(); | 1255 | EntityIntersection returnresult = new EntityIntersection(); |
1256 | 1256 | ||
1257 | returnresult.distance = 1024; | 1257 | returnresult.distance = 1024; |
1258 | float c = 0; | 1258 | float c = 0; |
1259 | float a = 0; | 1259 | float a = 0; |
@@ -1276,7 +1276,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1276 | //{ | 1276 | //{ |
1277 | //return returnresult; | 1277 | //return returnresult; |
1278 | //} | 1278 | //} |
1279 | // else | 1279 | // else |
1280 | //{ | 1280 | //{ |
1281 | //continue; | 1281 | //continue; |
1282 | //} | 1282 | //} |
@@ -1294,9 +1294,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1294 | //} | 1294 | //} |
1295 | 1295 | ||
1296 | //} | 1296 | //} |
1297 | //else | 1297 | //else |
1298 | //{ | 1298 | //{ |
1299 | //if (a < fmin) | 1299 | //if (a < fmin) |
1300 | //{ | 1300 | //{ |
1301 | //if (a < 0 || a < fmax) | 1301 | //if (a < 0 || a < fmax) |
1302 | //{ | 1302 | //{ |
@@ -1339,7 +1339,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1339 | 1339 | ||
1340 | // If the normal is pointing outside the object | 1340 | // If the normal is pointing outside the object |
1341 | 1341 | ||
1342 | 1342 | ||
1343 | 1343 | ||
1344 | if (iray.Direction.Dot(normals[i]) < 0 || !frontFacesOnly) | 1344 | if (iray.Direction.Dot(normals[i]) < 0 || !frontFacesOnly) |
1345 | { | 1345 | { |
@@ -1359,7 +1359,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1359 | { | 1359 | { |
1360 | distance2 = (float)GetDistanceTo(q, iray.Origin); | 1360 | distance2 = (float)GetDistanceTo(q, iray.Origin); |
1361 | } | 1361 | } |
1362 | 1362 | ||
1363 | 1363 | ||
1364 | if (distance2 < returnresult.distance) | 1364 | if (distance2 < returnresult.distance) |
1365 | { | 1365 | { |
@@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1378 | } | 1378 | } |
1379 | return returnresult; | 1379 | return returnresult; |
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | // Use this for attachments! LocalID should be avatar's localid | 1382 | // Use this for attachments! LocalID should be avatar's localid |
1383 | public void SetParentLocalId(uint localID) | 1383 | public void SetParentLocalId(uint localID) |
1384 | { | 1384 | { |
@@ -1388,16 +1388,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
1388 | public void SetAttachmentPoint(uint AttachmentPoint) | 1388 | public void SetAttachmentPoint(uint AttachmentPoint) |
1389 | { | 1389 | { |
1390 | m_attachmentPoint = AttachmentPoint; | 1390 | m_attachmentPoint = AttachmentPoint; |
1391 | 1391 | ||
1392 | // save the attachment point. | 1392 | // save the attachment point. |
1393 | //if (AttachmentPoint != 0) | 1393 | //if (AttachmentPoint != 0) |
1394 | //{ | 1394 | //{ |
1395 | m_shape.State = (byte)AttachmentPoint; | 1395 | m_shape.State = (byte)AttachmentPoint; |
1396 | //} | 1396 | //} |
1397 | 1397 | ||
1398 | } | 1398 | } |
1399 | /// <summary> | 1399 | /// <summary> |
1400 | /// | 1400 | /// |
1401 | /// </summary> | 1401 | /// </summary> |
1402 | public void SetParent(SceneObjectGroup parent) | 1402 | public void SetParent(SceneObjectGroup parent) |
1403 | { | 1403 | { |
@@ -1417,7 +1417,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1417 | PhysActor.Buoyancy = fvalue; | 1417 | PhysActor.Buoyancy = fvalue; |
1418 | } | 1418 | } |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | public void SetAxisRotation(int axis, int rotate) | 1421 | public void SetAxisRotation(int axis, int rotate) |
1422 | { | 1422 | { |
1423 | if (m_parentGroup != null) | 1423 | if (m_parentGroup != null) |
@@ -1448,7 +1448,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1448 | 1448 | ||
1449 | } | 1449 | } |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | 1452 | ||
1453 | public LLVector3 GetSitTargetPositionLL() | 1453 | public LLVector3 GetSitTargetPositionLL() |
1454 | { | 1454 | { |
@@ -1547,9 +1547,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1547 | dupe.ObjectSaleType = ObjectSaleType; | 1547 | dupe.ObjectSaleType = ObjectSaleType; |
1548 | dupe.SalePrice = SalePrice; | 1548 | dupe.SalePrice = SalePrice; |
1549 | dupe.Category = Category; | 1549 | dupe.Category = Category; |
1550 | 1550 | ||
1551 | dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone(); | 1551 | dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone(); |
1552 | 1552 | ||
1553 | dupe.ResetIDs(linkNum); | 1553 | dupe.ResetIDs(linkNum); |
1554 | 1554 | ||
1555 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. | 1555 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. |
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1569 | } | 1569 | } |
1570 | 1570 | ||
1571 | #endregion | 1571 | #endregion |
1572 | 1572 | ||
1573 | /// <summary> | 1573 | /// <summary> |
1574 | /// Reset LLUUIDs for this part. This involves generate this part's own LLUUID and | 1574 | /// Reset LLUUIDs for this part. This involves generate this part's own LLUUID and |
1575 | /// generating new LLUUIDs for all the items in the inventory. | 1575 | /// generating new LLUUIDs for all the items in the inventory. |
@@ -1578,8 +1578,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1578 | public void ResetIDs(int linkNum) | 1578 | public void ResetIDs(int linkNum) |
1579 | { | 1579 | { |
1580 | UUID = LLUUID.Random(); | 1580 | UUID = LLUUID.Random(); |
1581 | LinkNum = linkNum; | 1581 | LinkNum = linkNum; |
1582 | 1582 | ||
1583 | ResetInventoryIDs(); | 1583 | ResetInventoryIDs(); |
1584 | } | 1584 | } |
1585 | 1585 | ||
@@ -1603,9 +1603,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1603 | m_parentGroup.HasGroupChanged = true; | 1603 | m_parentGroup.HasGroupChanged = true; |
1604 | m_parentGroup.QueueForUpdateCheck(); | 1604 | m_parentGroup.QueueForUpdateCheck(); |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | int timeNow = Util.UnixTimeSinceEpoch(); | 1607 | int timeNow = Util.UnixTimeSinceEpoch(); |
1608 | 1608 | ||
1609 | // If multiple updates are scheduled on the same second, we still need to perform all of them | 1609 | // If multiple updates are scheduled on the same second, we still need to perform all of them |
1610 | // So we'll force the issue by bumping up the timestamp so that later processing sees these need | 1610 | // So we'll force the issue by bumping up the timestamp so that later processing sees these need |
1611 | // to be performed. | 1611 | // to be performed. |
@@ -1617,11 +1617,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1617 | { | 1617 | { |
1618 | TimeStampFull = (uint)timeNow; | 1618 | TimeStampFull = (uint)timeNow; |
1619 | } | 1619 | } |
1620 | 1620 | ||
1621 | m_updateFlag = 2; | 1621 | m_updateFlag = 2; |
1622 | 1622 | ||
1623 | // m_log.DebugFormat( | 1623 | // m_log.DebugFormat( |
1624 | // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", | 1624 | // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", |
1625 | // UUID, Name, TimeStampFull); | 1625 | // UUID, Name, TimeStampFull); |
1626 | } | 1626 | } |
1627 | 1627 | ||
@@ -1668,13 +1668,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1668 | m_updateFlag = 1; | 1668 | m_updateFlag = 1; |
1669 | 1669 | ||
1670 | // m_log.DebugFormat( | 1670 | // m_log.DebugFormat( |
1671 | // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", | 1671 | // "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", |
1672 | // UUID, Name, TimeStampTerse); | 1672 | // UUID, Name, TimeStampTerse); |
1673 | } | 1673 | } |
1674 | } | 1674 | } |
1675 | 1675 | ||
1676 | /// <summary> | 1676 | /// <summary> |
1677 | /// Tell all the prims which have had updates scheduled | 1677 | /// Tell all the prims which have had updates scheduled |
1678 | /// </summary> | 1678 | /// </summary> |
1679 | public void SendScheduledUpdates() | 1679 | public void SendScheduledUpdates() |
1680 | { | 1680 | { |
@@ -1687,7 +1687,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1687 | // bad, so it's been replaced by an event driven method. | 1687 | // bad, so it's been replaced by an event driven method. |
1688 | //if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0) | 1688 | //if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0) |
1689 | //{ | 1689 | //{ |
1690 | // Only send the constant terse updates on physical objects! | 1690 | // Only send the constant terse updates on physical objects! |
1691 | //ScheduleTerseUpdate(); | 1691 | //ScheduleTerseUpdate(); |
1692 | //} | 1692 | //} |
1693 | } | 1693 | } |
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1706 | #region Shape | 1706 | #region Shape |
1707 | 1707 | ||
1708 | /// <summary> | 1708 | /// <summary> |
1709 | /// | 1709 | /// |
1710 | /// </summary> | 1710 | /// </summary> |
1711 | /// <param name="shapeBlock"></param> | 1711 | /// <param name="shapeBlock"></param> |
1712 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) | 1712 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) |
@@ -1750,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1750 | //m_log.Info("TSomething4:" + ((type & (ushort)ExtraParamType.Something4) == (ushort)ExtraParamType.Something4)); | 1750 | //m_log.Info("TSomething4:" + ((type & (ushort)ExtraParamType.Something4) == (ushort)ExtraParamType.Something4)); |
1751 | //m_log.Info("TSomething5:" + ((type & (ushort)ExtraParamType.Something5) == (ushort)ExtraParamType.Something5)); | 1751 | //m_log.Info("TSomething5:" + ((type & (ushort)ExtraParamType.Something5) == (ushort)ExtraParamType.Something5)); |
1752 | //m_log.Info("TSomething6:" + ((type & (ushort)ExtraParamType.Something6) == (ushort)ExtraParamType.Something6)); | 1752 | //m_log.Info("TSomething6:" + ((type & (ushort)ExtraParamType.Something6) == (ushort)ExtraParamType.Something6)); |
1753 | 1753 | ||
1754 | bool usePhysics = false; | 1754 | bool usePhysics = false; |
1755 | bool IsTemporary = false; | 1755 | bool IsTemporary = false; |
1756 | bool IsPhantom = false; | 1756 | bool IsPhantom = false; |
@@ -1758,7 +1758,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1758 | bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); | 1758 | bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); |
1759 | //bool IsLocked = false; | 1759 | //bool IsLocked = false; |
1760 | int i = 0; | 1760 | int i = 0; |
1761 | 1761 | ||
1762 | 1762 | ||
1763 | try | 1763 | try |
1764 | { | 1764 | { |
@@ -1975,7 +1975,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1975 | #region Texture | 1975 | #region Texture |
1976 | 1976 | ||
1977 | /// <summary> | 1977 | /// <summary> |
1978 | /// | 1978 | /// |
1979 | /// </summary> | 1979 | /// </summary> |
1980 | /// <param name="textureEntry"></param> | 1980 | /// <param name="textureEntry"></param> |
1981 | public void UpdateTextureEntry(byte[] textureEntry) | 1981 | public void UpdateTextureEntry(byte[] textureEntry) |
@@ -1985,7 +1985,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1985 | ScheduleFullUpdate(); | 1985 | ScheduleFullUpdate(); |
1986 | } | 1986 | } |
1987 | 1987 | ||
1988 | // Added to handle bug in libsecondlife's TextureEntry.ToBytes() | 1988 | // Added to handle bug in libsecondlife's TextureEntry.ToBytes() |
1989 | // not handling RGBA properly. Cycles through, and "fixes" the color | 1989 | // not handling RGBA properly. Cycles through, and "fixes" the color |
1990 | // info | 1990 | // info |
1991 | public void UpdateTexture(LLObject.TextureEntry tex) | 1991 | public void UpdateTexture(LLObject.TextureEntry tex) |
@@ -2030,7 +2030,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2030 | byte[] data = new byte[16]; | 2030 | byte[] data = new byte[16]; |
2031 | int pos = 0; | 2031 | int pos = 0; |
2032 | 2032 | ||
2033 | // The flags don't like conversion from uint to byte, so we have to do | 2033 | // The flags don't like conversion from uint to byte, so we have to do |
2034 | // it the crappy way. See the above function :( | 2034 | // it the crappy way. See the above function :( |
2035 | 2035 | ||
2036 | data[pos] = ConvertScriptUintToByte(pTexAnim.Flags); pos++; | 2036 | data[pos] = ConvertScriptUintToByte(pTexAnim.Flags); pos++; |
@@ -2059,7 +2059,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2059 | #region Position | 2059 | #region Position |
2060 | 2060 | ||
2061 | /// <summary> | 2061 | /// <summary> |
2062 | /// | 2062 | /// |
2063 | /// </summary> | 2063 | /// </summary> |
2064 | /// <param name="pos"></param> | 2064 | /// <param name="pos"></param> |
2065 | public void UpdateOffSet(LLVector3 pos) | 2065 | public void UpdateOffSet(LLVector3 pos) |
@@ -2115,7 +2115,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2115 | foreach (ScenePresence p in avatarts) | 2115 | foreach (ScenePresence p in avatarts) |
2116 | { | 2116 | { |
2117 | // TODO: some filtering by distance of avatar | 2117 | // TODO: some filtering by distance of avatar |
2118 | 2118 | ||
2119 | p.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | 2119 | p.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); |
2120 | } | 2120 | } |
2121 | } | 2121 | } |
@@ -2193,14 +2193,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2193 | #region Resizing/Scale | 2193 | #region Resizing/Scale |
2194 | 2194 | ||
2195 | /// <summary> | 2195 | /// <summary> |
2196 | /// | 2196 | /// |
2197 | /// </summary> | 2197 | /// </summary> |
2198 | /// <param name="scale"></param> | 2198 | /// <param name="scale"></param> |
2199 | public void Resize(LLVector3 scale) | 2199 | public void Resize(LLVector3 scale) |
2200 | { | 2200 | { |
2201 | StoreUndoState(); | 2201 | StoreUndoState(); |
2202 | m_shape.Scale = scale; | 2202 | m_shape.Scale = scale; |
2203 | 2203 | ||
2204 | ScheduleFullUpdate(); | 2204 | ScheduleFullUpdate(); |
2205 | } | 2205 | } |
2206 | 2206 | ||
@@ -2261,7 +2261,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2261 | } | 2261 | } |
2262 | 2262 | ||
2263 | #region Client Update Methods | 2263 | #region Client Update Methods |
2264 | 2264 | ||
2265 | /// <summary> | 2265 | /// <summary> |
2266 | /// Tell all scene presences that they should send updates for this part to their clients | 2266 | /// Tell all scene presences that they should send updates for this part to their clients |
2267 | /// </summary> | 2267 | /// </summary> |
@@ -2287,7 +2287,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2287 | } | 2287 | } |
2288 | } | 2288 | } |
2289 | } | 2289 | } |
2290 | 2290 | ||
2291 | 2291 | ||
2292 | public void AddFullUpdateToAvatar(ScenePresence presence) | 2292 | public void AddFullUpdateToAvatar(ScenePresence presence) |
2293 | { | 2293 | { |
@@ -2295,7 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2295 | } | 2295 | } |
2296 | 2296 | ||
2297 | /// <summary> | 2297 | /// <summary> |
2298 | /// | 2298 | /// |
2299 | /// </summary> | 2299 | /// </summary> |
2300 | public void SendFullUpdateToAllClients() | 2300 | public void SendFullUpdateToAllClients() |
2301 | { | 2301 | { |
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2309 | } | 2309 | } |
2310 | 2310 | ||
2311 | /// <summary> | 2311 | /// <summary> |
2312 | /// | 2312 | /// |
2313 | /// </summary> | 2313 | /// </summary> |
2314 | /// <param name="remoteClient"></param> | 2314 | /// <param name="remoteClient"></param> |
2315 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | 2315 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) |
@@ -2328,7 +2328,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2328 | lPos = OffsetPosition; | 2328 | lPos = OffsetPosition; |
2329 | SendFullUpdateToClient(remoteClient, lPos, clientflags); | 2329 | SendFullUpdateToClient(remoteClient, lPos, clientflags); |
2330 | } | 2330 | } |
2331 | 2331 | ||
2332 | /// <summary> | 2332 | /// <summary> |
2333 | /// Sends a full update to the client | 2333 | /// Sends a full update to the client |
2334 | /// </summary> | 2334 | /// </summary> |
@@ -2338,7 +2338,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2338 | public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags) | 2338 | public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags) |
2339 | { | 2339 | { |
2340 | clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected; | 2340 | clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected; |
2341 | 2341 | ||
2342 | if (remoteClient.AgentId == OwnerID) | 2342 | if (remoteClient.AgentId == OwnerID) |
2343 | { | 2343 | { |
2344 | if ((uint) (Flags & LLObject.ObjectFlags.CreateSelected) != 0) | 2344 | if ((uint) (Flags & LLObject.ObjectFlags.CreateSelected) != 0) |
@@ -2351,7 +2351,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2351 | 2351 | ||
2352 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; | 2352 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; |
2353 | remoteClient.SendPrimitiveToClient( | 2353 | remoteClient.SendPrimitiveToClient( |
2354 | m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, | 2354 | m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, |
2355 | lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, | 2355 | lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, |
2356 | OwnerID, | 2356 | OwnerID, |
2357 | m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, m_attachmentPoint,fromAssetID); | 2357 | m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, m_attachmentPoint,fromAssetID); |
@@ -2373,7 +2373,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2373 | } | 2373 | } |
2374 | 2374 | ||
2375 | /// <summary> | 2375 | /// <summary> |
2376 | /// | 2376 | /// |
2377 | /// </summary> | 2377 | /// </summary> |
2378 | public void SendTerseUpdateToAllClients() | 2378 | public void SendTerseUpdateToAllClients() |
2379 | { | 2379 | { |
@@ -2451,7 +2451,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2451 | m_parentGroup.AbsolutePosition = newpos; | 2451 | m_parentGroup.AbsolutePosition = newpos; |
2452 | return; | 2452 | return; |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | } | 2455 | } |
2456 | ScheduleTerseUpdate(); | 2456 | ScheduleTerseUpdate(); |
2457 | 2457 | ||
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 28507cd..ba8bbd9 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -40,7 +40,7 @@ using OpenSim.Region.Physics.Manager; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.Environment.Scenes | 41 | namespace OpenSim.Region.Environment.Scenes |
42 | { | 42 | { |
43 | enum ScriptControlled : int | 43 | enum ScriptControlled : int |
44 | { | 44 | { |
45 | CONTROL_ZERO = 0, | 45 | CONTROL_ZERO = 0, |
46 | CONTROL_FWD = 1, | 46 | CONTROL_FWD = 1, |
@@ -63,14 +63,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
63 | public ScriptControlled eventControls; | 63 | public ScriptControlled eventControls; |
64 | } | 64 | } |
65 | 65 | ||
66 | [Serializable] | 66 | [Serializable] |
67 | public class ScenePresence : EntityBase, ISerializable | 67 | public class ScenePresence : EntityBase, ISerializable |
68 | { | 68 | { |
69 | // ~ScenePresence() | 69 | // ~ScenePresence() |
70 | // { | 70 | // { |
71 | // System.Console.WriteLine("[ScenePresence] Destructor called"); | 71 | // System.Console.WriteLine("[ScenePresence] Destructor called"); |
72 | // } | 72 | // } |
73 | 73 | ||
74 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 74 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
75 | 75 | ||
76 | public static byte[] DefaultTexture; | 76 | public static byte[] DefaultTexture; |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
92 | private LLVector3 m_requestedSitOffset = new LLVector3(); | 92 | private LLVector3 m_requestedSitOffset = new LLVector3(); |
93 | private float m_sitAvatarHeight = 2.0f; | 93 | private float m_sitAvatarHeight = 2.0f; |
94 | private float m_godlevel = 0; | 94 | private float m_godlevel = 0; |
95 | 95 | ||
96 | private bool m_invulnerable = true; | 96 | private bool m_invulnerable = true; |
97 | 97 | ||
98 | private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); | 98 | private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); |
@@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
114 | private float m_health = 100f; | 114 | private float m_health = 100f; |
115 | 115 | ||
116 | private LLVector3 m_lastVelocity = LLVector3.Zero; | 116 | private LLVector3 m_lastVelocity = LLVector3.Zero; |
117 | 117 | ||
118 | // Default AV Height | 118 | // Default AV Height |
119 | private float m_avHeight = 127.0f; | 119 | private float m_avHeight = 127.0f; |
120 | 120 | ||
@@ -213,10 +213,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
213 | get { return m_invulnerable; } | 213 | get { return m_invulnerable; } |
214 | } | 214 | } |
215 | 215 | ||
216 | public float GodLevel | 216 | public float GodLevel |
217 | { | 217 | { |
218 | get { return m_godlevel; } | 218 | get { return m_godlevel; } |
219 | } | 219 | } |
220 | 220 | ||
221 | private readonly ulong m_regionHandle; | 221 | private readonly ulong m_regionHandle; |
222 | 222 | ||
@@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
260 | /// <summary> | 260 | /// <summary> |
261 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | 261 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager |
262 | /// </summary> | 262 | /// </summary> |
263 | private IClientAPI m_controllingClient; | 263 | private IClientAPI m_controllingClient; |
264 | 264 | ||
265 | protected PhysicsActor m_physicsActor; | 265 | protected PhysicsActor m_physicsActor; |
266 | 266 | ||
@@ -350,7 +350,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
350 | /// <summary> | 350 | /// <summary> |
351 | /// If this is true, agent doesn't have a representation in this scene. | 351 | /// If this is true, agent doesn't have a representation in this scene. |
352 | /// this is an agent 'looking into' this scene from a nearby scene(region) | 352 | /// this is an agent 'looking into' this scene from a nearby scene(region) |
353 | /// | 353 | /// |
354 | /// if False, this agent has a representation in this scene | 354 | /// if False, this agent has a representation in this scene |
355 | /// </summary> | 355 | /// </summary> |
356 | private bool m_isChildAgent = true; | 356 | private bool m_isChildAgent = true; |
@@ -482,7 +482,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
482 | } | 482 | } |
483 | 483 | ||
484 | /// <summary> | 484 | /// <summary> |
485 | /// Send updates to the client about prims which have been placed on the update queue. We don't | 485 | /// Send updates to the client about prims which have been placed on the update queue. We don't |
486 | /// necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent | 486 | /// necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent |
487 | /// timestamp has already been sent. | 487 | /// timestamp has already been sent. |
488 | /// </summary> | 488 | /// </summary> |
@@ -498,12 +498,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
498 | if (!m_gotAllObjectsInScene) | 498 | if (!m_gotAllObjectsInScene) |
499 | { | 499 | { |
500 | if (!m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) | 500 | if (!m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) |
501 | { | 501 | { |
502 | m_scene.SendAllSceneObjectsToClient(this); | 502 | m_scene.SendAllSceneObjectsToClient(this); |
503 | m_gotAllObjectsInScene = true; | 503 | m_gotAllObjectsInScene = true; |
504 | } | 504 | } |
505 | } | 505 | } |
506 | 506 | ||
507 | if (m_partsUpdateQueue.Count > 0) | 507 | if (m_partsUpdateQueue.Count > 0) |
508 | { | 508 | { |
509 | bool runUpdate = true; | 509 | bool runUpdate = true; |
@@ -520,12 +520,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
520 | if (update.LastFullUpdateTime < part.TimeStampFull) | 520 | if (update.LastFullUpdateTime < part.TimeStampFull) |
521 | { | 521 | { |
522 | // m_log.DebugFormat( | 522 | // m_log.DebugFormat( |
523 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", | 523 | // "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", |
524 | // part.Name, part.UUID, part.TimeStampFull); | 524 | // part.Name, part.UUID, part.TimeStampFull); |
525 | 525 | ||
526 | part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); | 526 | part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); |
527 | 527 | ||
528 | // We'll update to the part's timestamp rather than the current time to | 528 | // We'll update to the part's timestamp rather than the current time to |
529 | // avoid the race condition whereby the next tick occurs while we are | 529 | // avoid the race condition whereby the next tick occurs while we are |
530 | // doing this update. If this happened, then subsequent updates which occurred | 530 | // doing this update. If this happened, then subsequent updates which occurred |
531 | // on the same tick or the next tick of the last update would be ignored. | 531 | // on the same tick or the next tick of the last update would be ignored. |
@@ -536,9 +536,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
536 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) | 536 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) |
537 | { | 537 | { |
538 | // m_log.DebugFormat( | 538 | // m_log.DebugFormat( |
539 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", | 539 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", |
540 | // part.Name, part.UUID, part.TimeStampTerse); | 540 | // part.Name, part.UUID, part.TimeStampTerse); |
541 | 541 | ||
542 | part.SendTerseUpdate(ControllingClient); | 542 | part.SendTerseUpdate(ControllingClient); |
543 | 543 | ||
544 | update.LastTerseUpdateTime = part.TimeStampTerse; | 544 | update.LastTerseUpdateTime = part.TimeStampTerse; |
@@ -575,15 +575,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
575 | 575 | ||
576 | /// <summary> | 576 | /// <summary> |
577 | /// This turns a child agent, into a root agent | 577 | /// This turns a child agent, into a root agent |
578 | /// This is called when an agent teleports into a region, or if an | 578 | /// This is called when an agent teleports into a region, or if an |
579 | /// agent crosses into this region from a neighbor over the border | 579 | /// agent crosses into this region from a neighbor over the border |
580 | /// </summary> | 580 | /// </summary> |
581 | public void MakeRootAgent(LLVector3 pos, bool isFlying) | 581 | public void MakeRootAgent(LLVector3 pos, bool isFlying) |
582 | { | 582 | { |
583 | // m_log.DebugFormat( | 583 | // m_log.DebugFormat( |
584 | // "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}", | 584 | // "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}", |
585 | // Name, UUID, m_scene.RegionInfo.RegionName); | 585 | // Name, UUID, m_scene.RegionInfo.RegionName); |
586 | 586 | ||
587 | m_isChildAgent = false; | 587 | m_isChildAgent = false; |
588 | 588 | ||
589 | AbsolutePosition = pos; | 589 | AbsolutePosition = pos; |
@@ -599,7 +599,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
599 | //{ | 599 | //{ |
600 | m_scene.SendAllSceneObjectsToClient(this); | 600 | m_scene.SendAllSceneObjectsToClient(this); |
601 | m_scene.LandChannel.SendLandUpdate(this, true); | 601 | m_scene.LandChannel.SendLandUpdate(this, true); |
602 | 602 | ||
603 | //m_gotAllObjectsInScene = true; | 603 | //m_gotAllObjectsInScene = true; |
604 | //} | 604 | //} |
605 | } | 605 | } |
@@ -607,8 +607,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
607 | /// <summary> | 607 | /// <summary> |
608 | /// This turns a root agent into a child agent | 608 | /// This turns a root agent into a child agent |
609 | /// when an agent departs this region for a neighbor, this gets called. | 609 | /// when an agent departs this region for a neighbor, this gets called. |
610 | /// | 610 | /// |
611 | /// It doesn't get called for a teleport. Reason being, an agent that | 611 | /// It doesn't get called for a teleport. Reason being, an agent that |
612 | /// teleports out may not be anywhere near this region | 612 | /// teleports out may not be anywhere near this region |
613 | /// </summary> | 613 | /// </summary> |
614 | public void MakeChildAgent() | 614 | public void MakeChildAgent() |
@@ -616,15 +616,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
616 | m_animations.Clear(); | 616 | m_animations.Clear(); |
617 | 617 | ||
618 | // m_log.DebugFormat( | 618 | // m_log.DebugFormat( |
619 | // "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", | 619 | // "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", |
620 | // Name, UUID, m_scene.RegionInfo.RegionName); | 620 | // Name, UUID, m_scene.RegionInfo.RegionName); |
621 | 621 | ||
622 | Velocity = new LLVector3(0, 0, 0); | 622 | Velocity = new LLVector3(0, 0, 0); |
623 | m_isChildAgent = true; | 623 | m_isChildAgent = true; |
624 | m_scene.SwapRootAgentCount(true); | 624 | m_scene.SwapRootAgentCount(true); |
625 | RemoveFromPhysicalScene(); | 625 | RemoveFromPhysicalScene(); |
626 | m_scene.EventManager.TriggerOnMakeChildAgent(this); | 626 | m_scene.EventManager.TriggerOnMakeChildAgent(this); |
627 | //this.Pos = new LLVector3(128, 128, 70); | 627 | //this.Pos = new LLVector3(128, 128, 70); |
628 | } | 628 | } |
629 | 629 | ||
630 | /// <summary> | 630 | /// <summary> |
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
643 | } | 643 | } |
644 | 644 | ||
645 | /// <summary> | 645 | /// <summary> |
646 | /// | 646 | /// |
647 | /// </summary> | 647 | /// </summary> |
648 | /// <param name="pos"></param> | 648 | /// <param name="pos"></param> |
649 | public void Teleport(LLVector3 pos) | 649 | public void Teleport(LLVector3 pos) |
@@ -656,7 +656,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
656 | } | 656 | } |
657 | 657 | ||
658 | /// <summary> | 658 | /// <summary> |
659 | /// | 659 | /// |
660 | /// </summary> | 660 | /// </summary> |
661 | public void StopMovement() | 661 | public void StopMovement() |
662 | { | 662 | { |
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
762 | uint flags = agentData.ControlFlags; | 762 | uint flags = agentData.ControlFlags; |
763 | LLQuaternion bodyRotation = agentData.BodyRotation; | 763 | LLQuaternion bodyRotation = agentData.BodyRotation; |
764 | 764 | ||
765 | // Camera location in world. We'll need to raytrace | 765 | // Camera location in world. We'll need to raytrace |
766 | // from this location from time to time. | 766 | // from this location from time to time. |
767 | m_CameraCenter.x = agentData.CameraCenter.X; | 767 | m_CameraCenter.x = agentData.CameraCenter.X; |
768 | m_CameraCenter.y = agentData.CameraCenter.Y; | 768 | m_CameraCenter.y = agentData.CameraCenter.Y; |
@@ -815,7 +815,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
815 | // m_AgentControlFlags = flags; | 815 | // m_AgentControlFlags = flags; |
816 | // m_headrotation = agentData.AgentData.HeadRotation; | 816 | // m_headrotation = agentData.AgentData.HeadRotation; |
817 | // m_state = agentData.AgentData.State; | 817 | // m_state = agentData.AgentData.State; |
818 | 818 | ||
819 | if (m_allowMovement) | 819 | if (m_allowMovement) |
820 | { | 820 | { |
821 | int i = 0; | 821 | int i = 0; |
@@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
870 | i++; | 870 | i++; |
871 | } | 871 | } |
872 | } | 872 | } |
873 | // Cause the avatar to stop flying if it's colliding | 873 | // Cause the avatar to stop flying if it's colliding |
874 | // with something with the down arrow pressed. | 874 | // with something with the down arrow pressed. |
875 | 875 | ||
876 | // Skip if there's no physicsactor | 876 | // Skip if there's no physicsactor |
@@ -886,7 +886,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
886 | // Are the collision requirements fulfilled? | 886 | // Are the collision requirements fulfilled? |
887 | bool colliding = (m_physicsActor.IsColliding == true); | 887 | bool colliding = (m_physicsActor.IsColliding == true); |
888 | 888 | ||
889 | 889 | ||
890 | 890 | ||
891 | if (m_physicsActor.Flying && colliding && controlland) | 891 | if (m_physicsActor.Flying && colliding && controlland) |
892 | { | 892 | { |
@@ -903,9 +903,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
903 | UpdateMovementAnimations(); | 903 | UpdateMovementAnimations(); |
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | m_scene.EventManager.TriggerOnClientMovement(this); | 907 | m_scene.EventManager.TriggerOnClientMovement(this); |
908 | 908 | ||
909 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 909 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
910 | } | 910 | } |
911 | 911 | ||
@@ -934,7 +934,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
934 | 934 | ||
935 | m_pos += m_parentPosition + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); | 935 | m_pos += m_parentPosition + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); |
936 | m_parentPosition = new LLVector3(); | 936 | m_parentPosition = new LLVector3(); |
937 | 937 | ||
938 | m_parentID = 0; | 938 | m_parentID = 0; |
939 | SendFullUpdateToAllClients(); | 939 | SendFullUpdateToAllClients(); |
940 | 940 | ||
@@ -949,10 +949,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
949 | 949 | ||
950 | private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) | 950 | private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) |
951 | { | 951 | { |
952 | |||
953 | 952 | ||
954 | 953 | ||
955 | 954 | ||
955 | |||
956 | bool autopilot = true; | 956 | bool autopilot = true; |
957 | LLVector3 pos = new LLVector3(); | 957 | LLVector3 pos = new LLVector3(); |
958 | LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); | 958 | LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); |
@@ -1008,10 +1008,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false); | 1010 | ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false); |
1011 | 1011 | ||
1012 | // This calls HandleAgentSit twice, once from here, and the client calls | 1012 | // This calls HandleAgentSit twice, once from here, and the client calls |
1013 | // HandleAgentSit itself after it gets to the location | 1013 | // HandleAgentSit itself after it gets to the location |
1014 | // It doesn't get to the location until we've moved them there though | 1014 | // It doesn't get to the location until we've moved them there though |
1015 | // which happens in HandleAgentSit :P | 1015 | // which happens in HandleAgentSit :P |
1016 | if (!autopilot) | 1016 | if (!autopilot) |
1017 | HandleAgentSit(remoteClient, UUID); | 1017 | HandleAgentSit(remoteClient, UUID); |
@@ -1256,7 +1256,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | m_perfMonMS = System.Environment.TickCount; | 1258 | m_perfMonMS = System.Environment.TickCount; |
1259 | 1259 | ||
1260 | m_rotation = rotation; | 1260 | m_rotation = rotation; |
1261 | NewForce newVelocity = new NewForce(); | 1261 | NewForce newVelocity = new NewForce(); |
1262 | Vector3 direc = rotation*vec; | 1262 | Vector3 direc = rotation*vec; |
@@ -1268,9 +1268,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1268 | direc *= 4; | 1268 | direc *= 4; |
1269 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); | 1269 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); |
1270 | //bool colliding = (m_physicsActor.IsColliding==true); | 1270 | //bool colliding = (m_physicsActor.IsColliding==true); |
1271 | //if (controlland) | 1271 | //if (controlland) |
1272 | // m_log.Info("[AGENT]: landCommand"); | 1272 | // m_log.Info("[AGENT]: landCommand"); |
1273 | //if (colliding) | 1273 | //if (colliding) |
1274 | // m_log.Info("[AGENT]: colliding"); | 1274 | // m_log.Info("[AGENT]: colliding"); |
1275 | //if (m_physicsActor.Flying && colliding && controlland) | 1275 | //if (m_physicsActor.Flying && colliding && controlland) |
1276 | //{ | 1276 | //{ |
@@ -1306,7 +1306,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1306 | #region Overridden Methods | 1306 | #region Overridden Methods |
1307 | 1307 | ||
1308 | /// <summary> | 1308 | /// <summary> |
1309 | /// | 1309 | /// |
1310 | /// </summary> | 1310 | /// </summary> |
1311 | public override void Update() | 1311 | public override void Update() |
1312 | { | 1312 | { |
@@ -1383,7 +1383,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1383 | lastPhysPos = AbsolutePosition; | 1383 | lastPhysPos = AbsolutePosition; |
1384 | 1384 | ||
1385 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 1385 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
1386 | 1386 | ||
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | public void SendCoarseLocations() | 1389 | public void SendCoarseLocations() |
@@ -1433,7 +1433,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1433 | foreach (ScenePresence avatar in avatars) | 1433 | foreach (ScenePresence avatar in avatars) |
1434 | { | 1434 | { |
1435 | SendFullUpdateToOtherClient(avatar); | 1435 | SendFullUpdateToOtherClient(avatar); |
1436 | 1436 | ||
1437 | if (avatar.LocalId != LocalId) | 1437 | if (avatar.LocalId != LocalId) |
1438 | { | 1438 | { |
1439 | if (!avatar.m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) | 1439 | if (!avatar.m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) |
@@ -1448,7 +1448,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1448 | } | 1448 | } |
1449 | 1449 | ||
1450 | /// <summary> | 1450 | /// <summary> |
1451 | /// | 1451 | /// |
1452 | /// </summary> | 1452 | /// </summary> |
1453 | public void SendInitialData() | 1453 | public void SendInitialData() |
1454 | { | 1454 | { |
@@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | /// <summary> | 1474 | /// <summary> |
1475 | /// | 1475 | /// |
1476 | /// </summary> | 1476 | /// </summary> |
1477 | /// <param name="client"></param> | 1477 | /// <param name="client"></param> |
1478 | public void SendOwnAppearance() | 1478 | public void SendOwnAppearance() |
@@ -1481,7 +1481,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | /// <summary> | 1483 | /// <summary> |
1484 | /// | 1484 | /// |
1485 | /// </summary> | 1485 | /// </summary> |
1486 | public void SendAppearanceToAllOtherAgents() | 1486 | public void SendAppearanceToAllOtherAgents() |
1487 | { | 1487 | { |
@@ -1498,7 +1498,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1498 | } | 1498 | } |
1499 | 1499 | ||
1500 | public void SendAppearanceToOtherAgent(ScenePresence avatar) | 1500 | public void SendAppearanceToOtherAgent(ScenePresence avatar) |
1501 | { | 1501 | { |
1502 | avatar.ControllingClient.SendAppearance( | 1502 | avatar.ControllingClient.SendAppearance( |
1503 | m_appearance.Owner, | 1503 | m_appearance.Owner, |
1504 | m_appearance.VisualParams, | 1504 | m_appearance.VisualParams, |
@@ -1522,7 +1522,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1522 | } | 1522 | } |
1523 | 1523 | ||
1524 | /// <summary> | 1524 | /// <summary> |
1525 | /// | 1525 | /// |
1526 | /// </summary> | 1526 | /// </summary> |
1527 | /// <param name="animations"></param> | 1527 | /// <param name="animations"></param> |
1528 | /// <param name="seqs"></param> | 1528 | /// <param name="seqs"></param> |
@@ -1536,7 +1536,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1536 | } | 1536 | } |
1537 | 1537 | ||
1538 | /// <summary> | 1538 | /// <summary> |
1539 | /// | 1539 | /// |
1540 | /// </summary> | 1540 | /// </summary> |
1541 | public void SendAnimPack() | 1541 | public void SendAnimPack() |
1542 | { | 1542 | { |
@@ -1568,7 +1568,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m | 1570 | // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m |
1571 | if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) | 1571 | if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) |
1572 | { | 1572 | { |
1573 | ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); | 1573 | ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); |
1574 | cadu.ActiveGroupID=LLUUID.Zero.UUID; | 1574 | cadu.ActiveGroupID=LLUUID.Zero.UUID; |
@@ -1593,14 +1593,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1593 | multiplier = 0.25f; | 1593 | multiplier = 0.25f; |
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); | 1596 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); |
1597 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); | 1597 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); |
1598 | |||
1599 | 1598 | ||
1600 | |||
1601 | 1599 | ||
1602 | 1600 | ||
1603 | cadu.Velocity = new sLLVector3(Velocity); | 1601 | |
1602 | |||
1603 | cadu.Velocity = new sLLVector3(Velocity); | ||
1604 | m_scene.SendOutChildAgentUpdates(cadu,this); | 1604 | m_scene.SendOutChildAgentUpdates(cadu,this); |
1605 | m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; | 1605 | m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; |
1606 | m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; | 1606 | m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; |
@@ -1681,9 +1681,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1681 | ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); | 1681 | ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); |
1682 | SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); | 1682 | SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); |
1683 | if (neighbourRegion != null) | 1683 | if (neighbourRegion != null) |
1684 | { | 1684 | { |
1685 | // When the neighbour is informed of the border crossing, it will set up CAPS handlers for the avatar | 1685 | // When the neighbour is informed of the border crossing, it will set up CAPS handlers for the avatar |
1686 | // This means we need to remove the current caps handler here and possibly compensate later, | 1686 | // This means we need to remove the current caps handler here and possibly compensate later, |
1687 | // in case both scenes are being hosted on the same region server. Messy | 1687 | // in case both scenes are being hosted on the same region server. Messy |
1688 | m_scene.RemoveCapsHandler(UUID); | 1688 | m_scene.RemoveCapsHandler(UUID); |
1689 | newpos = newpos + (vel); | 1689 | newpos = newpos + (vel); |
@@ -1691,17 +1691,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
1691 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, | 1691 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, |
1692 | m_physicsActor.Flying); | 1692 | m_physicsActor.Flying); |
1693 | if (res) | 1693 | if (res) |
1694 | { | 1694 | { |
1695 | AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); | 1695 | AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); |
1696 | 1696 | ||
1697 | // TODO Should construct this behind a method | 1697 | // TODO Should construct this behind a method |
1698 | string capsPath = | 1698 | string capsPath = |
1699 | "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort | 1699 | "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort |
1700 | + "/CAPS/" + circuitdata.CapsPath + "0000/"; | 1700 | + "/CAPS/" + circuitdata.CapsPath + "0000/"; |
1701 | 1701 | ||
1702 | m_log.DebugFormat( | 1702 | m_log.DebugFormat( |
1703 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, m_uuid); | 1703 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, m_uuid); |
1704 | 1704 | ||
1705 | m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, | 1705 | m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, |
1706 | capsPath); | 1706 | capsPath); |
1707 | MakeChildAgent(); | 1707 | MakeChildAgent(); |
@@ -1742,17 +1742,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
1742 | /// </summary> | 1742 | /// </summary> |
1743 | public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) | 1743 | public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) |
1744 | { | 1744 | { |
1745 | // | 1745 | // |
1746 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; | 1746 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; |
1747 | int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; | 1747 | int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; |
1748 | 1748 | ||
1749 | m_DrawDistance = cAgentData.drawdistance; | 1749 | m_DrawDistance = cAgentData.drawdistance; |
1750 | m_pos = new LLVector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); | 1750 | m_pos = new LLVector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); |
1751 | 1751 | ||
1752 | // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region | 1752 | // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region |
1753 | m_CameraCenter = | 1753 | m_CameraCenter = |
1754 | new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); | 1754 | new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); |
1755 | 1755 | ||
1756 | 1756 | ||
1757 | m_godlevel = cAgentData.godlevel; | 1757 | m_godlevel = cAgentData.godlevel; |
1758 | SetHeight(cAgentData.AVHeight); | 1758 | SetHeight(cAgentData.AVHeight); |
@@ -1793,8 +1793,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1793 | } | 1793 | } |
1794 | catch (NullReferenceException) | 1794 | catch (NullReferenceException) |
1795 | { | 1795 | { |
1796 | // Under extreme load, this returns a NullReference Exception that we can ignore. | 1796 | // Under extreme load, this returns a NullReference Exception that we can ignore. |
1797 | // Ignoring this causes no movement to be sent to the physics engine... | 1797 | // Ignoring this causes no movement to be sent to the physics engine... |
1798 | // which when the scene is moving at 1 frame every 10 seconds, it doesn't really matter! | 1798 | // which when the scene is moving at 1 frame every 10 seconds, it doesn't really matter! |
1799 | } | 1799 | } |
1800 | m_newForce = true; | 1800 | m_newForce = true; |
@@ -1809,12 +1809,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1809 | 1809 | ||
1810 | static ScenePresence() | 1810 | static ScenePresence() |
1811 | { | 1811 | { |
1812 | 1812 | ||
1813 | LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); | 1813 | LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); |
1814 | DefaultTexture = textu.ToBytes(); | 1814 | DefaultTexture = textu.ToBytes(); |
1815 | } | 1815 | } |
1816 | 1816 | ||
1817 | [Serializable] | 1817 | [Serializable] |
1818 | public class NewForce | 1818 | public class NewForce |
1819 | { | 1819 | { |
1820 | public float X; | 1820 | public float X; |
@@ -1826,8 +1826,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1826 | } | 1826 | } |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | [Serializable] | 1829 | [Serializable] |
1830 | public class ScenePartUpdate : ISerializable | 1830 | public class ScenePartUpdate : ISerializable |
1831 | { | 1831 | { |
1832 | public LLUUID FullID; | 1832 | public LLUUID FullID; |
1833 | public uint LastFullUpdateTime; | 1833 | public uint LastFullUpdateTime; |
@@ -1883,7 +1883,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1883 | public void AddToPhysicalScene() | 1883 | public void AddToPhysicalScene() |
1884 | { | 1884 | { |
1885 | PhysicsScene scene = m_scene.PhysicsScene; | 1885 | PhysicsScene scene = m_scene.PhysicsScene; |
1886 | 1886 | ||
1887 | PhysicsVector pVec = | 1887 | PhysicsVector pVec = |
1888 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, | 1888 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, |
1889 | AbsolutePosition.Z); | 1889 | AbsolutePosition.Z); |
@@ -1936,7 +1936,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1936 | if (m_health <= 0) | 1936 | if (m_health <= 0) |
1937 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); | 1937 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); |
1938 | } | 1938 | } |
1939 | 1939 | ||
1940 | if (Velocity.X > 0 || Velocity.Y > 0) | 1940 | if (Velocity.X > 0 || Velocity.Y > 0) |
1941 | UpdateMovementAnimations(); | 1941 | UpdateMovementAnimations(); |
1942 | } | 1942 | } |
@@ -2161,7 +2161,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2161 | // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); | 2161 | // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); |
2162 | 2162 | ||
2163 | /* | 2163 | /* |
2164 | Dictionary<Guid, ScenePartUpdate> updateTimes_work | 2164 | Dictionary<Guid, ScenePartUpdate> updateTimes_work |
2165 | = (Dictionary<Guid, ScenePartUpdate>)info.GetValue("m_updateTimes", typeof(Dictionary<Guid, ScenePartUpdate>)); | 2165 | = (Dictionary<Guid, ScenePartUpdate>)info.GetValue("m_updateTimes", typeof(Dictionary<Guid, ScenePartUpdate>)); |
2166 | 2166 | ||
2167 | foreach (Guid id in updateTimes_work.Keys) | 2167 | foreach (Guid id in updateTimes_work.Keys) |
@@ -2188,7 +2188,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2188 | (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), | 2188 | (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), |
2189 | (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), | 2189 | (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), |
2190 | (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); | 2190 | (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); |
2191 | 2191 | ||
2192 | sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); | 2192 | sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); |
2193 | 2193 | ||
2194 | m_LastChildAgentUpdatePosition | 2194 | m_LastChildAgentUpdatePosition |
@@ -2196,7 +2196,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2196 | (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), | 2196 | (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), |
2197 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), | 2197 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), |
2198 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); | 2198 | (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); |
2199 | 2199 | ||
2200 | m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); | 2200 | m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); |
2201 | m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); | 2201 | m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); |
2202 | 2202 | ||
@@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2246 | info.AddValue("m_sitAvatarHeight", m_sitAvatarHeight); | 2246 | info.AddValue("m_sitAvatarHeight", m_sitAvatarHeight); |
2247 | info.AddValue("m_godlevel", m_godlevel); | 2247 | info.AddValue("m_godlevel", m_godlevel); |
2248 | info.AddValue("m_setAlwaysRun", m_setAlwaysRun); | 2248 | info.AddValue("m_setAlwaysRun", m_setAlwaysRun); |
2249 | 2249 | ||
2250 | // Quaternion | 2250 | // Quaternion |
2251 | info.AddValue("m_bodyRot.w", m_bodyRot.w); | 2251 | info.AddValue("m_bodyRot.w", m_bodyRot.w); |
2252 | info.AddValue("m_bodyRot.x", m_bodyRot.x); | 2252 | info.AddValue("m_bodyRot.x", m_bodyRot.x); |
@@ -2374,7 +2374,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2374 | 2374 | ||
2375 | public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, LLUUID Script_item_LLUUID) | 2375 | public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, LLUUID Script_item_LLUUID) |
2376 | { | 2376 | { |
2377 | 2377 | ||
2378 | ScriptControllers obj = new ScriptControllers(); | 2378 | ScriptControllers obj = new ScriptControllers(); |
2379 | obj.ignoreControls = ScriptControlled.CONTROL_ZERO; | 2379 | obj.ignoreControls = ScriptControlled.CONTROL_ZERO; |
2380 | obj.eventControls = ScriptControlled.CONTROL_ZERO; | 2380 | obj.eventControls = ScriptControlled.CONTROL_ZERO; |
@@ -2386,7 +2386,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2386 | IgnoredControls |= (ScriptControlled)controls; | 2386 | IgnoredControls |= (ScriptControlled)controls; |
2387 | obj.ignoreControls = (ScriptControlled)controls; | 2387 | obj.ignoreControls = (ScriptControlled)controls; |
2388 | } | 2388 | } |
2389 | 2389 | ||
2390 | if (pass_on == 0 && accept == 1) | 2390 | if (pass_on == 0 && accept == 1) |
2391 | { | 2391 | { |
2392 | IgnoredControls |= (ScriptControlled)controls; | 2392 | IgnoredControls |= (ScriptControlled)controls; |
@@ -2432,7 +2432,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2432 | lock (scriptedcontrols) | 2432 | lock (scriptedcontrols) |
2433 | { | 2433 | { |
2434 | scriptedcontrols.Clear(); | 2434 | scriptedcontrols.Clear(); |
2435 | } | 2435 | } |
2436 | ControllingClient.SendTakeControls(int.MaxValue, false, false); | 2436 | ControllingClient.SendTakeControls(int.MaxValue, false, false); |
2437 | } | 2437 | } |
2438 | 2438 | ||
@@ -2454,7 +2454,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2454 | 2454 | ||
2455 | internal void SendControlToScripts(uint flags, ScriptControlled lastFlags) | 2455 | internal void SendControlToScripts(uint flags, ScriptControlled lastFlags) |
2456 | { | 2456 | { |
2457 | 2457 | ||
2458 | ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; | 2458 | ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; |
2459 | 2459 | ||
2460 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) | 2460 | if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) |
@@ -2497,10 +2497,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2497 | { | 2497 | { |
2498 | allflags |= ScriptControlled.CONTROL_LBUTTON; | 2498 | allflags |= ScriptControlled.CONTROL_LBUTTON; |
2499 | } | 2499 | } |
2500 | 2500 | ||
2501 | ScriptControlled held = ScriptControlled.CONTROL_ZERO; | 2501 | ScriptControlled held = ScriptControlled.CONTROL_ZERO; |
2502 | ScriptControlled change = ScriptControlled.CONTROL_ZERO; | 2502 | ScriptControlled change = ScriptControlled.CONTROL_ZERO; |
2503 | 2503 | ||
2504 | foreach (ScriptControlled DCF in Enum.GetValues(typeof (ScriptControlled))) | 2504 | foreach (ScriptControlled DCF in Enum.GetValues(typeof (ScriptControlled))) |
2505 | { | 2505 | { |
2506 | // Held | 2506 | // Held |
@@ -2539,7 +2539,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2539 | } | 2539 | } |
2540 | } | 2540 | } |
2541 | LastCommands = allflags; | 2541 | LastCommands = allflags; |
2542 | 2542 | ||
2543 | } | 2543 | } |
2544 | internal uint RemoveIgnoredControls(uint flags, ScriptControlled Ignored) | 2544 | internal uint RemoveIgnoredControls(uint flags, ScriptControlled Ignored) |
2545 | { | 2545 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index 8390f64..7d048a3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | obj.ResetIDs(); | 70 | obj.ResetIDs(); |
71 | } | 71 | } |
72 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes | 72 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes |
73 | //obj.RegenerateFullIDs(); | 73 | //obj.RegenerateFullIDs(); |
74 | m_innerScene.AddEntity(obj); | 74 | m_innerScene.AddEntity(obj); |
75 | 75 | ||
76 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 76 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
143 | { | 143 | { |
144 | XmlDocument doc = new XmlDocument(); | 144 | XmlDocument doc = new XmlDocument(); |
145 | XmlNode rootNode; | 145 | XmlNode rootNode; |
146 | 146 | ||
147 | XmlTextReader reader = new XmlTextReader(new StringReader(xmlString)); | 147 | XmlTextReader reader = new XmlTextReader(new StringReader(xmlString)); |
148 | reader.WhitespaceHandling = WhitespaceHandling.None; | 148 | reader.WhitespaceHandling = WhitespaceHandling.None; |
149 | doc.Load(reader); | 149 | doc.Load(reader); |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
153 | { | 153 | { |
154 | CreatePrimFromXml(aPrimNode.OuterXml); | 154 | CreatePrimFromXml(aPrimNode.OuterXml); |
155 | } | 155 | } |
156 | 156 | ||
157 | } | 157 | } |
158 | 158 | ||
159 | public void LoadPrimsFromXml2(string fileName) | 159 | public void LoadPrimsFromXml2(string fileName) |
@@ -206,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
206 | rootPart.PhysActor.LocalID = rootPart.LocalId; | 206 | rootPart.PhysActor.LocalID = rootPart.LocalId; |
207 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 207 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
208 | } | 208 | } |
209 | rootPart.Velocity = receivedVelocity; | 209 | rootPart.Velocity = receivedVelocity; |
210 | } | 210 | } |
211 | 211 | ||
212 | obj.ScheduleGroupForFullUpdate(); | 212 | obj.ScheduleGroupForFullUpdate(); |
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index a150164..90a971f 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -97,12 +97,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
97 | private int m_scriptLinesPerSecond = 0; | 97 | private int m_scriptLinesPerSecond = 0; |
98 | 98 | ||
99 | private int objectCapacity = 45000; | 99 | private int objectCapacity = 45000; |
100 | 100 | ||
101 | 101 | ||
102 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21]; | 102 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21]; |
103 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); | 103 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); |
104 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); | 104 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); |
105 | 105 | ||
106 | 106 | ||
107 | private RegionInfo ReportingRegion; | 107 | private RegionInfo ReportingRegion; |
108 | 108 | ||
@@ -138,8 +138,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
138 | lock (m_report) | 138 | lock (m_report) |
139 | { | 139 | { |
140 | // Packet is already initialized and ready for data insert | 140 | // Packet is already initialized and ready for data insert |
141 | 141 | ||
142 | 142 | ||
143 | statpack.Region = rb; | 143 | statpack.Region = rb; |
144 | statpack.Region.RegionX = ReportingRegion.RegionLocX; | 144 | statpack.Region.RegionX = ReportingRegion.RegionLocX; |
145 | statpack.Region.RegionY = ReportingRegion.RegionLocY; | 145 | statpack.Region.RegionY = ReportingRegion.RegionLocY; |
@@ -152,99 +152,99 @@ namespace OpenSim.Region.Environment.Scenes | |||
152 | statpack.Region.RegionFlags = (uint) 0; | 152 | statpack.Region.RegionFlags = (uint) 0; |
153 | } | 153 | } |
154 | statpack.Region.ObjectCapacity = (uint) objectCapacity; | 154 | statpack.Region.ObjectCapacity = (uint) objectCapacity; |
155 | 155 | ||
156 | #region various statistic googly moogly | 156 | #region various statistic googly moogly |
157 | 157 | ||
158 | // Our FPS is actually 10fps, so multiplying by 5 to get the amount that people expect there | 158 | // Our FPS is actually 10fps, so multiplying by 5 to get the amount that people expect there |
159 | // 0-50 is pretty close to 0-45 | 159 | // 0-50 is pretty close to 0-45 |
160 | float simfps = (int) ((m_fps * 5)); | 160 | float simfps = (int) ((m_fps * 5)); |
161 | 161 | ||
162 | //if (simfps > 45) | 162 | //if (simfps > 45) |
163 | //simfps = simfps - (simfps - 45); | 163 | //simfps = simfps - (simfps - 45); |
164 | //if (simfps < 0) | 164 | //if (simfps < 0) |
165 | //simfps = 0; | 165 | //simfps = 0; |
166 | 166 | ||
167 | // | 167 | // |
168 | float physfps = ((m_pfps / 1000)); | 168 | float physfps = ((m_pfps / 1000)); |
169 | 169 | ||
170 | //if (physfps > 600) | 170 | //if (physfps > 600) |
171 | //physfps = physfps - (physfps - 600); | 171 | //physfps = physfps - (physfps - 600); |
172 | 172 | ||
173 | if (physfps < 0) | 173 | if (physfps < 0) |
174 | physfps = 0; | 174 | physfps = 0; |
175 | 175 | ||
176 | #endregion | 176 | #endregion |
177 | 177 | ||
178 | //Our time dilation is 0.91 when we're running a full speed, | 178 | //Our time dilation is 0.91 when we're running a full speed, |
179 | // therefore to make sure we get an appropriate range, | 179 | // therefore to make sure we get an appropriate range, |
180 | // we have to factor in our error. (0.10f * statsUpdateFactor) | 180 | // we have to factor in our error. (0.10f * statsUpdateFactor) |
181 | // multiplies the fix for the error times the amount of times it'll occur a second | 181 | // multiplies the fix for the error times the amount of times it'll occur a second |
182 | // / 10 divides the value by the number of times the sim heartbeat runs (10fps) | 182 | // / 10 divides the value by the number of times the sim heartbeat runs (10fps) |
183 | // Then we divide the whole amount by the amount of seconds pass in between stats updates. | 183 | // Then we divide the whole amount by the amount of seconds pass in between stats updates. |
184 | 184 | ||
185 | sb[0].StatID = (uint) Stats.TimeDilation; | 185 | sb[0].StatID = (uint) Stats.TimeDilation; |
186 | sb[0].StatValue = m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor)); | 186 | sb[0].StatValue = m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor)); |
187 | 187 | ||
188 | sb[1].StatID = (uint) Stats.SimFPS; | 188 | sb[1].StatID = (uint) Stats.SimFPS; |
189 | sb[1].StatValue = simfps/statsUpdateFactor; | 189 | sb[1].StatValue = simfps/statsUpdateFactor; |
190 | 190 | ||
191 | sb[2].StatID = (uint) Stats.PhysicsFPS; | 191 | sb[2].StatID = (uint) Stats.PhysicsFPS; |
192 | sb[2].StatValue = physfps / statsUpdateFactor; | 192 | sb[2].StatValue = physfps / statsUpdateFactor; |
193 | 193 | ||
194 | sb[3].StatID = (uint) Stats.AgentUpdates; | 194 | sb[3].StatID = (uint) Stats.AgentUpdates; |
195 | sb[3].StatValue = (m_agentUpdates / statsUpdateFactor); | 195 | sb[3].StatValue = (m_agentUpdates / statsUpdateFactor); |
196 | 196 | ||
197 | sb[4].StatID = (uint) Stats.Agents; | 197 | sb[4].StatID = (uint) Stats.Agents; |
198 | sb[4].StatValue = m_rootAgents; | 198 | sb[4].StatValue = m_rootAgents; |
199 | 199 | ||
200 | sb[5].StatID = (uint) Stats.ChildAgents; | 200 | sb[5].StatID = (uint) Stats.ChildAgents; |
201 | sb[5].StatValue = m_childAgents; | 201 | sb[5].StatValue = m_childAgents; |
202 | 202 | ||
203 | sb[6].StatID = (uint) Stats.TotalPrim; | 203 | sb[6].StatID = (uint) Stats.TotalPrim; |
204 | sb[6].StatValue = m_numPrim; | 204 | sb[6].StatValue = m_numPrim; |
205 | 205 | ||
206 | sb[7].StatID = (uint) Stats.ActivePrim; | 206 | sb[7].StatID = (uint) Stats.ActivePrim; |
207 | sb[7].StatValue = m_activePrim; | 207 | sb[7].StatValue = m_activePrim; |
208 | 208 | ||
209 | sb[8].StatID = (uint)Stats.FrameMS; | 209 | sb[8].StatID = (uint)Stats.FrameMS; |
210 | sb[8].StatValue = m_frameMS / statsUpdateFactor; | 210 | sb[8].StatValue = m_frameMS / statsUpdateFactor; |
211 | 211 | ||
212 | sb[9].StatID = (uint)Stats.NetMS; | 212 | sb[9].StatID = (uint)Stats.NetMS; |
213 | sb[9].StatValue = m_netMS / statsUpdateFactor; | 213 | sb[9].StatValue = m_netMS / statsUpdateFactor; |
214 | 214 | ||
215 | sb[10].StatID = (uint)Stats.PhysicsMS; | 215 | sb[10].StatID = (uint)Stats.PhysicsMS; |
216 | sb[10].StatValue = m_physicsMS / statsUpdateFactor; | 216 | sb[10].StatValue = m_physicsMS / statsUpdateFactor; |
217 | 217 | ||
218 | sb[11].StatID = (uint)Stats.ImageMS ; | 218 | sb[11].StatID = (uint)Stats.ImageMS ; |
219 | sb[11].StatValue = m_imageMS / statsUpdateFactor; | 219 | sb[11].StatValue = m_imageMS / statsUpdateFactor; |
220 | 220 | ||
221 | sb[12].StatID = (uint)Stats.OtherMS; | 221 | sb[12].StatID = (uint)Stats.OtherMS; |
222 | sb[12].StatValue = m_otherMS / statsUpdateFactor; | 222 | sb[12].StatValue = m_otherMS / statsUpdateFactor; |
223 | 223 | ||
224 | sb[13].StatID = (uint)Stats.InPacketsPerSecond; | 224 | sb[13].StatID = (uint)Stats.InPacketsPerSecond; |
225 | sb[13].StatValue = (m_inPacketsPerSecond); | 225 | sb[13].StatValue = (m_inPacketsPerSecond); |
226 | 226 | ||
227 | sb[14].StatID = (uint)Stats.OutPacketsPerSecond; | 227 | sb[14].StatID = (uint)Stats.OutPacketsPerSecond; |
228 | sb[14].StatValue = (m_outPacketsPerSecond / statsUpdateFactor); | 228 | sb[14].StatValue = (m_outPacketsPerSecond / statsUpdateFactor); |
229 | 229 | ||
230 | sb[15].StatID = (uint)Stats.UnAckedBytes; | 230 | sb[15].StatID = (uint)Stats.UnAckedBytes; |
231 | sb[15].StatValue = m_unAckedBytes; | 231 | sb[15].StatValue = m_unAckedBytes; |
232 | 232 | ||
233 | sb[16].StatID = (uint)Stats.AgentMS; | 233 | sb[16].StatID = (uint)Stats.AgentMS; |
234 | sb[16].StatValue = m_agentMS / statsUpdateFactor; | 234 | sb[16].StatValue = m_agentMS / statsUpdateFactor; |
235 | 235 | ||
236 | sb[17].StatID = (uint)Stats.PendingDownloads; | 236 | sb[17].StatID = (uint)Stats.PendingDownloads; |
237 | sb[17].StatValue = m_pendingDownloads; | 237 | sb[17].StatValue = m_pendingDownloads; |
238 | 238 | ||
239 | sb[18].StatID = (uint)Stats.PendingUploads; | 239 | sb[18].StatID = (uint)Stats.PendingUploads; |
240 | sb[18].StatValue = m_pendingUploads; | 240 | sb[18].StatValue = m_pendingUploads; |
241 | 241 | ||
242 | sb[19].StatID = (uint)Stats.ActiveScripts; | 242 | sb[19].StatID = (uint)Stats.ActiveScripts; |
243 | sb[19].StatValue = m_activeScripts; | 243 | sb[19].StatValue = m_activeScripts; |
244 | 244 | ||
245 | sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; | 245 | sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; |
246 | sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; | 246 | sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; |
247 | 247 | ||
248 | statpack.Stat = sb; | 248 | statpack.Stat = sb; |
249 | 249 | ||
250 | handlerSendStatResult = OnSendStatsResult; | 250 | handlerSendStatResult = OnSendStatsResult; |
@@ -255,7 +255,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
255 | resetvalues(); | 255 | resetvalues(); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | private void resetvalues() | 259 | private void resetvalues() |
260 | { | 260 | { |
261 | m_timeDilation = 0; | 261 | m_timeDilation = 0; |
@@ -274,13 +274,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
274 | m_imageMS = 0; | 274 | m_imageMS = 0; |
275 | m_otherMS = 0; | 275 | m_otherMS = 0; |
276 | 276 | ||
277 | //Ckrinke This variable is not used, so comment to remove compiler warning until it is used. | 277 | //Ckrinke This variable is not used, so comment to remove compiler warning until it is used. |
278 | //Ckrinke m_scriptMS = 0; | 278 | //Ckrinke m_scriptMS = 0; |
279 | } | 279 | } |
280 | 280 | ||
281 | # region methods called from Scene | 281 | # region methods called from Scene |
282 | // The majority of these functions are additive | 282 | // The majority of these functions are additive |
283 | // so that you can easily change the amount of | 283 | // so that you can easily change the amount of |
284 | // seconds in between sim stats updates | 284 | // seconds in between sim stats updates |
285 | 285 | ||
286 | public void AddTimeDilation(float td) | 286 | public void AddTimeDilation(float td) |
@@ -368,14 +368,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
368 | { | 368 | { |
369 | m_otherMS += ms; | 369 | m_otherMS += ms; |
370 | } | 370 | } |
371 | 371 | ||
372 | // private static readonly log4net.ILog m_log | 372 | // private static readonly log4net.ILog m_log |
373 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 373 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
374 | 374 | ||
375 | public void addPendingDownload(int count) | 375 | public void addPendingDownload(int count) |
376 | { | 376 | { |
377 | m_pendingDownloads += count; | 377 | m_pendingDownloads += count; |
378 | //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads); | 378 | //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads); |
379 | } | 379 | } |
380 | 380 | ||
381 | public void addScriptLines(int count) | 381 | public void addScriptLines(int count) |
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index ec1ffd2..e9133ac 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs | |||
@@ -34,8 +34,8 @@ using OpenSim.Region.Environment.Scenes; | |||
34 | 34 | ||
35 | namespace OpenSim.Region.Environment.Types | 35 | namespace OpenSim.Region.Environment.Types |
36 | { | 36 | { |
37 | [Serializable] | 37 | [Serializable] |
38 | public class UpdateQueue : ISerializable | 38 | public class UpdateQueue : ISerializable |
39 | { | 39 | { |
40 | private Queue<SceneObjectPart> m_queue; | 40 | private Queue<SceneObjectPart> m_queue; |
41 | 41 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 6087857..78b5d1f 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
292 | return new byte[0]; | 292 | return new byte[0]; |
293 | } | 293 | } |
294 | 294 | ||
295 | 295 | ||
296 | public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) | 296 | public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) |
297 | { | 297 | { |
298 | } | 298 | } |
@@ -311,12 +311,12 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
311 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) | 311 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) |
312 | { | 312 | { |
313 | } | 313 | } |
314 | 314 | ||
315 | public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, | 315 | public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, |
316 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, | 316 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, |
317 | byte[] binaryBucket) | 317 | byte[] binaryBucket) |
318 | { | 318 | { |
319 | } | 319 | } |
320 | 320 | ||
321 | public virtual void SendLayerData(float[] map) | 321 | public virtual void SendLayerData(float[] map) |
322 | { | 322 | { |
@@ -396,7 +396,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
396 | } | 396 | } |
397 | 397 | ||
398 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, | 398 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, |
399 | PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, | 399 | PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, |
400 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, | 400 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, |
401 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 401 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
402 | uint parentID, | 402 | uint parentID, |
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
404 | { | 404 | { |
405 | } | 405 | } |
406 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, | 406 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, |
407 | PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, | 407 | PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, |
408 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, | 408 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, |
409 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 409 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
410 | uint parentID, | 410 | uint parentID, |
@@ -443,10 +443,10 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
443 | public virtual void SendRemoveInventoryItem(LLUUID itemID) | 443 | public virtual void SendRemoveInventoryItem(LLUUID itemID) |
444 | { | 444 | { |
445 | } | 445 | } |
446 | 446 | ||
447 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 447 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> |
448 | public virtual void SendBulkUpdateInventory(InventoryItemBase item) | 448 | public virtual void SendBulkUpdateInventory(InventoryItemBase item) |
449 | { | 449 | { |
450 | } | 450 | } |
451 | 451 | ||
452 | public LLUUID GetDefaultAnimation(string name) | 452 | public LLUUID GetDefaultAnimation(string name) |
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
550 | 550 | ||
551 | public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, | 551 | public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, |
552 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, | 552 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, |
553 | uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, | 553 | uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, |
554 | LLUUID LastOwnerID, string ObjectName, string Description) | 554 | LLUUID LastOwnerID, string ObjectName, string Description) |
555 | { | 555 | { |
556 | } | 556 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs index e0e8fd9..4c0c0a0 100644 --- a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | [assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")] | 34 | [assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")] |
@@ -40,8 +40,8 @@ using System.Runtime.InteropServices; | |||
40 | [assembly: AssemblyTrademark("")] | 40 | [assembly: AssemblyTrademark("")] |
41 | [assembly: AssemblyCulture("")] | 41 | [assembly: AssemblyCulture("")] |
42 | 42 | ||
43 | // Setting ComVisible to false makes the types in this assembly not visible | 43 | // Setting ComVisible to false makes the types in this assembly not visible |
44 | // to COM components. If you need to access a type in this assembly from | 44 | // to COM components. If you need to access a type in this assembly from |
45 | // COM, set the ComVisible attribute to true on that type. | 45 | // COM, set the ComVisible attribute to true on that type. |
46 | [assembly: ComVisible(false)] | 46 | [assembly: ComVisible(false)] |
47 | 47 | ||
@@ -51,11 +51,11 @@ using System.Runtime.InteropServices; | |||
51 | // Version information for an assembly consists of the following four values: | 51 | // Version information for an assembly consists of the following four values: |
52 | // | 52 | // |
53 | // Major Version | 53 | // Major Version |
54 | // Minor Version | 54 | // Minor Version |
55 | // Build Number | 55 | // Build Number |
56 | // Revision | 56 | // Revision |
57 | // | 57 | // |
58 | // You can specify all the values or you can default the Build and Revision Numbers | 58 | // You can specify all the values or you can default the Build and Revision Numbers |
59 | // by using the '*' as shown below: | 59 | // by using the '*' as shown below: |
60 | // [assembly: AssemblyVersion("1.0.*")] | 60 | // [assembly: AssemblyVersion("1.0.*")] |
61 | [assembly: AssemblyVersion("1.0.0.0")] | 61 | [assembly: AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 4c933d6..bac2252 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
101 | else | 101 | else |
102 | { | 102 | { |
103 | // BUG: !? (Reduced from 5000 to 500 by Adam) | 103 | // BUG: !? (Reduced from 5000 to 500 by Adam) |
104 | Thread.Sleep(500); //why is this here? | 104 | Thread.Sleep(500); //why is this here? |
105 | 105 | ||
106 | //this is the first thread to request this appearance | 106 | //this is the first thread to request this appearance |
107 | //so let it check the db and if not found then create a default appearance | 107 | //so let it check the db and if not found then create a default appearance |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
279 | { | 279 | { |
280 | if (profile.RootFolder != null) | 280 | if (profile.RootFolder != null) |
281 | { | 281 | { |
282 | 282 | ||
283 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | 283 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) |
284 | { | 284 | { |
285 | if (wear.Type < 13) | 285 | if (wear.Type < 13) |
@@ -292,9 +292,9 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
292 | else | 292 | else |
293 | { | 293 | { |
294 | LLUUID assetId; | 294 | LLUUID assetId; |
295 | 295 | ||
296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); | 296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); |
297 | 297 | ||
298 | if (baseItem != null) | 298 | if (baseItem != null) |
299 | { | 299 | { |
300 | assetId = baseItem.AssetID; | 300 | assetId = baseItem.AssetID; |
diff --git a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs index a9fe53e..640b0b0 100644 --- a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | [assembly: AssemblyTitle("OpenSim.Region.Modules.AvatarFactory")] | 34 | [assembly: AssemblyTitle("OpenSim.Region.Modules.AvatarFactory")] |
@@ -40,8 +40,8 @@ using System.Runtime.InteropServices; | |||
40 | [assembly: AssemblyTrademark("")] | 40 | [assembly: AssemblyTrademark("")] |
41 | [assembly: AssemblyCulture("")] | 41 | [assembly: AssemblyCulture("")] |
42 | 42 | ||
43 | // Setting ComVisible to false makes the types in this assembly not visible | 43 | // Setting ComVisible to false makes the types in this assembly not visible |
44 | // to COM components. If you need to access a type in this assembly from | 44 | // to COM components. If you need to access a type in this assembly from |
45 | // COM, set the ComVisible attribute to true on that type. | 45 | // COM, set the ComVisible attribute to true on that type. |
46 | [assembly: ComVisible(false)] | 46 | [assembly: ComVisible(false)] |
47 | 47 | ||
@@ -51,11 +51,11 @@ using System.Runtime.InteropServices; | |||
51 | // Version information for an assembly consists of the following four values: | 51 | // Version information for an assembly consists of the following four values: |
52 | // | 52 | // |
53 | // Major Version | 53 | // Major Version |
54 | // Minor Version | 54 | // Minor Version |
55 | // Build Number | 55 | // Build Number |
56 | // Revision | 56 | // Revision |
57 | // | 57 | // |
58 | // You can specify all the values or you can default the Build and Revision Numbers | 58 | // You can specify all the values or you can default the Build and Revision Numbers |
59 | // by using the '*' as shown below: | 59 | // by using the '*' as shown below: |
60 | // [assembly: AssemblyVersion("1.0.*")] | 60 | // [assembly: AssemblyVersion("1.0.*")] |
61 | [assembly: AssemblyVersion("1.0.0.0")] | 61 | [assembly: AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs index 0839267..a54ddda 100644 --- a/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs | |||
@@ -2,7 +2,7 @@ | |||
2 | using System.Runtime.CompilerServices; | 2 | using System.Runtime.CompilerServices; |
3 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
4 | 4 | ||
5 | // General Information about an assembly is controlled through the following | 5 | // General information about an assembly is controlled through the following |
6 | // set of attributes. Change these attribute values to modify the information | 6 | // set of attributes. Change these attribute values to modify the information |
7 | // associated with an assembly. | 7 | // associated with an assembly. |
8 | [assembly: AssemblyTitle("Python")] | 8 | [assembly: AssemblyTitle("Python")] |
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices; | |||
14 | [assembly: AssemblyTrademark("")] | 14 | [assembly: AssemblyTrademark("")] |
15 | [assembly: AssemblyCulture("")] | 15 | [assembly: AssemblyCulture("")] |
16 | 16 | ||
17 | // Setting ComVisible to false makes the types in this assembly not visible | 17 | // Setting ComVisible to false makes the types in this assembly not visible |
18 | // to COM components. If you need to access a type in this assembly from | 18 | // to COM components. If you need to access a type in this assembly from |
19 | // COM, set the ComVisible attribute to true on that type. | 19 | // COM, set the ComVisible attribute to true on that type. |
20 | [assembly: ComVisible(false)] | 20 | [assembly: ComVisible(false)] |
21 | 21 | ||
@@ -25,11 +25,11 @@ using System.Runtime.InteropServices; | |||
25 | // Version information for an assembly consists of the following four values: | 25 | // Version information for an assembly consists of the following four values: |
26 | // | 26 | // |
27 | // Major Version | 27 | // Major Version |
28 | // Minor Version | 28 | // Minor Version |
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | // You can specify all the values or you can default the Build and Revision Numbers | 32 | // You can specify all the values or you can default the Build and Revision Numbers |
33 | // by using the '*' as shown below: | 33 | // by using the '*' as shown below: |
34 | // [assembly: AssemblyVersion("1.0.*")] | 34 | // [assembly: AssemblyVersion("1.0.*")] |
35 | [assembly: AssemblyVersion("1.0.0.0")] | 35 | [assembly: AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs index c9f8423..165fcea 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | [assembly: AssemblyTitle("SvnSerialiser")] | 34 | [assembly: AssemblyTitle("SvnSerialiser")] |
@@ -40,8 +40,8 @@ using System.Runtime.InteropServices; | |||
40 | [assembly: AssemblyTrademark("")] | 40 | [assembly: AssemblyTrademark("")] |
41 | [assembly: AssemblyCulture("")] | 41 | [assembly: AssemblyCulture("")] |
42 | 42 | ||
43 | // Setting ComVisible to false makes the types in this assembly not visible | 43 | // Setting ComVisible to false makes the types in this assembly not visible |
44 | // to COM components. If you need to access a type in this assembly from | 44 | // to COM components. If you need to access a type in this assembly from |
45 | // COM, set the ComVisible attribute to true on that type. | 45 | // COM, set the ComVisible attribute to true on that type. |
46 | [assembly: ComVisible(false)] | 46 | [assembly: ComVisible(false)] |
47 | 47 | ||
@@ -51,11 +51,11 @@ using System.Runtime.InteropServices; | |||
51 | // Version information for an assembly consists of the following four values: | 51 | // Version information for an assembly consists of the following four values: |
52 | // | 52 | // |
53 | // Major Version | 53 | // Major Version |
54 | // Minor Version | 54 | // Minor Version |
55 | // Build Number | 55 | // Build Number |
56 | // Revision | 56 | // Revision |
57 | // | 57 | // |
58 | // You can specify all the values or you can default the Build and Revision Numbers | 58 | // You can specify all the values or you can default the Build and Revision Numbers |
59 | // by using the '*' as shown below: | 59 | // by using the '*' as shown below: |
60 | // [assembly: AssemblyVersion("1.0.*")] | 60 | // [assembly: AssemblyVersion("1.0.*")] |
61 | [assembly: AssemblyVersion("1.0.0.0")] | 61 | [assembly: AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 9415fff..5ced2d1 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -282,9 +282,9 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
282 | bool needsCollision;// = base.NeedsCollision(bodyA, bodyB); | 282 | bool needsCollision;// = base.NeedsCollision(bodyA, bodyB); |
283 | int c1 = 3; | 283 | int c1 = 3; |
284 | int c2 = 3; | 284 | int c2 = 3; |
285 | 285 | ||
286 | //////////////////////////////////////////////////////// | 286 | //////////////////////////////////////////////////////// |
287 | //BulletX Mesh Collisions | 287 | //BulletX Mesh Collisions |
288 | //added by Jed zhu | 288 | //added by Jed zhu |
289 | //data: May 07,2005 | 289 | //data: May 07,2005 |
290 | //////////////////////////////////////////////////////// | 290 | //////////////////////////////////////////////////////// |
@@ -302,9 +302,9 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
302 | else | 302 | else |
303 | needsCollision = base.NeedsCollision(bodyA, bodyB); | 303 | needsCollision = base.NeedsCollision(bodyA, bodyB); |
304 | 304 | ||
305 | 305 | ||
306 | #endregion | 306 | #endregion |
307 | 307 | ||
308 | 308 | ||
309 | //m_log.DebugFormat("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, | 309 | //m_log.DebugFormat("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, |
310 | //needsCollision); | 310 | //needsCollision); |
@@ -705,7 +705,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
705 | } | 705 | } |
706 | foreach (BulletXPrim prim in _prims.Values) | 706 | foreach (BulletXPrim prim in _prims.Values) |
707 | { | 707 | { |
708 | //_height = HeightValue(prim.RigidBodyPosition); | 708 | //_height = HeightValue(prim.RigidBodyPosition); |
709 | _height = _simFlatPlanet.HeightValue(prim.RigidBodyPosition); | 709 | _height = _simFlatPlanet.HeightValue(prim.RigidBodyPosition); |
710 | prim.ValidateHeight(_height); | 710 | prim.ValidateHeight(_height); |
711 | //if (_simFlatPlanet.heightIsNotValid(prim.RigidBodyPosition, out _height)) prim.ValidateHeight(_height); | 711 | //if (_simFlatPlanet.heightIsNotValid(prim.RigidBodyPosition, out _height)) prim.ValidateHeight(_height); |
@@ -741,8 +741,8 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
741 | 741 | ||
742 | public override bool IsThreaded | 742 | public override bool IsThreaded |
743 | { | 743 | { |
744 | get | 744 | get |
745 | { | 745 | { |
746 | return (false); // for now we won't be multithreaded | 746 | return (false); // for now we won't be multithreaded |
747 | } | 747 | } |
748 | } | 748 | } |
@@ -1380,17 +1380,17 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
1380 | /// </summary> | 1380 | /// </summary> |
1381 | public class BulletXPrim : BulletXActor | 1381 | public class BulletXPrim : BulletXActor |
1382 | { | 1382 | { |
1383 | //Density it will depends of material. | 1383 | //Density it will depends of material. |
1384 | //For now all prims have the same density, all prims are made of water. Be water my friend! :D | 1384 | //For now all prims have the same density, all prims are made of water. Be water my friend! :D |
1385 | private const float _density = 1000.0f; | 1385 | private const float _density = 1000.0f; |
1386 | private BulletXScene _parent_scene; | 1386 | private BulletXScene _parent_scene; |
1387 | private PhysicsVector m_prev_position = new PhysicsVector(0, 0, 0); | 1387 | private PhysicsVector m_prev_position = new PhysicsVector(0, 0, 0); |
1388 | private bool m_lastUpdateSent = false; | 1388 | private bool m_lastUpdateSent = false; |
1389 | //added by jed zhu | 1389 | //added by jed zhu |
1390 | private IMesh _mesh; | 1390 | private IMesh _mesh; |
1391 | public IMesh GetMesh() { return _mesh; } | 1391 | public IMesh GetMesh() { return _mesh; } |
1392 | 1392 | ||
1393 | 1393 | ||
1394 | 1394 | ||
1395 | public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector size, | 1395 | public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector size, |
1396 | AxiomQuaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical) | 1396 | AxiomQuaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical) |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs b/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs index 0902077..637cf6e 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs | |||
@@ -20,8 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | This file contains a class TriangleIndexVertexArray. I tried using the class with the same name | 23 | This file contains a class TriangleIndexVertexArray. I tried using the class with the same name |
24 | from the BulletX implementation and found it unusable for the purpose of using triangle meshes | 24 | from the BulletX implementation and found it unusable for the purpose of using triangle meshes |
25 | within BulletX as the implementation was painfully incomplete. | 25 | within BulletX as the implementation was painfully incomplete. |
26 | The attempt to derive from the original class failed as viable members were hidden. | 26 | The attempt to derive from the original class failed as viable members were hidden. |
27 | Fiddling around with BulletX itself was not my intention. | 27 | Fiddling around with BulletX itself was not my intention. |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index c1dc91b..3cf2646 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Physics.Manager | |||
140 | // a race condition if the last subscriber unsubscribes | 140 | // a race condition if the last subscriber unsubscribes |
141 | // immediately after the null check and before the event is raised. | 141 | // immediately after the null check and before the event is raised. |
142 | RequestTerseUpdate handler = OnRequestTerseUpdate; | 142 | RequestTerseUpdate handler = OnRequestTerseUpdate; |
143 | 143 | ||
144 | if (handler != null) | 144 | if (handler != null) |
145 | { | 145 | { |
146 | handler(); | 146 | handler(); |
@@ -163,9 +163,9 @@ namespace OpenSim.Region.Physics.Manager | |||
163 | public virtual void SendCollisionUpdate(EventArgs e) | 163 | public virtual void SendCollisionUpdate(EventArgs e) |
164 | { | 164 | { |
165 | CollisionUpdate handler = OnCollisionUpdate; | 165 | CollisionUpdate handler = OnCollisionUpdate; |
166 | 166 | ||
167 | if (handler != null) | 167 | if (handler != null) |
168 | { | 168 | { |
169 | handler(e); | 169 | handler(e); |
170 | } | 170 | } |
171 | } | 171 | } |
@@ -205,9 +205,9 @@ namespace OpenSim.Region.Physics.Manager | |||
205 | 205 | ||
206 | public class NullPhysicsActor : PhysicsActor | 206 | public class NullPhysicsActor : PhysicsActor |
207 | { | 207 | { |
208 | public override bool Stopped | 208 | public override bool Stopped |
209 | { | 209 | { |
210 | get{ return false; } | 210 | get{ return false; } |
211 | } | 211 | } |
212 | 212 | ||
213 | public override PhysicsVector Position | 213 | public override PhysicsVector Position |
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Physics.Manager | |||
222 | set { return; } | 222 | set { return; } |
223 | } | 223 | } |
224 | 224 | ||
225 | public override uint LocalID | 225 | public override uint LocalID |
226 | { | 226 | { |
227 | set { return; } | 227 | set { return; } |
228 | } | 228 | } |
@@ -240,14 +240,14 @@ namespace OpenSim.Region.Physics.Manager | |||
240 | public override float Buoyancy | 240 | public override float Buoyancy |
241 | { | 241 | { |
242 | get { return 0f; } | 242 | get { return 0f; } |
243 | set { return; } | 243 | set { return; } |
244 | } | 244 | } |
245 | 245 | ||
246 | public override bool FloatOnWater | 246 | public override bool FloatOnWater |
247 | { | 247 | { |
248 | set { return; } | 248 | set { return; } |
249 | } | 249 | } |
250 | 250 | ||
251 | public override bool CollidingGround | 251 | public override bool CollidingGround |
252 | { | 252 | { |
253 | get { return false; } | 253 | get { return false; } |
@@ -297,7 +297,7 @@ namespace OpenSim.Region.Physics.Manager | |||
297 | set { return; } | 297 | set { return; } |
298 | } | 298 | } |
299 | 299 | ||
300 | public override float CollisionScore | 300 | public override float CollisionScore |
301 | { | 301 | { |
302 | get { return 0f; } | 302 | get { return 0f; } |
303 | } | 303 | } |
@@ -385,7 +385,7 @@ namespace OpenSim.Region.Physics.Manager | |||
385 | 385 | ||
386 | public override void SubscribeEvents(int ms) | 386 | public override void SubscribeEvents(int ms) |
387 | { | 387 | { |
388 | 388 | ||
389 | } | 389 | } |
390 | public override void UnSubscribeEvents() | 390 | public override void UnSubscribeEvents() |
391 | { | 391 | { |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index b8ca180..6a71581 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Physics.Manager | |||
94 | _MeshPlugins.Add(plugHard.GetName(), plugHard); | 94 | _MeshPlugins.Add(plugHard.GetName(), plugHard); |
95 | m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); | 95 | m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); |
96 | 96 | ||
97 | // And now walk all assemblies (DLLs effectively) and see if they are home | 97 | // And now walk all assemblies (DLLs effectively) and see if they are home |
98 | // of a plugin that is of interest for us | 98 | // of a plugin that is of interest for us |
99 | string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Physics"); | 99 | string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Physics"); |
100 | string[] pluginFiles = Directory.GetFiles(path, "*.dll"); | 100 | string[] pluginFiles = Directory.GetFiles(path, "*.dll"); |
@@ -108,11 +108,11 @@ namespace OpenSim.Region.Physics.Manager | |||
108 | private void AddPlugin(string FileName) | 108 | private void AddPlugin(string FileName) |
109 | { | 109 | { |
110 | // TODO / NOTE | 110 | // TODO / NOTE |
111 | // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from | 111 | // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from |
112 | // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll' | 112 | // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll' |
113 | // using the LoadFrom context. The use of this context can result in unexpected behavior | 113 | // using the LoadFrom context. The use of this context can result in unexpected behavior |
114 | // for serialization, casting and dependency resolution. In almost all cases, it is recommended | 114 | // for serialization, casting and dependency resolution. In almost all cases, it is recommended |
115 | // that the LoadFrom context be avoided. This can be done by installing assemblies in the | 115 | // that the LoadFrom context be avoided. This can be done by installing assemblies in the |
116 | // Global Assembly Cache or in the ApplicationBase directory and using Assembly. | 116 | // Global Assembly Cache or in the ApplicationBase directory and using Assembly. |
117 | // Load when explicitly loading assemblies. | 117 | // Load when explicitly loading assemblies. |
118 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 118 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs index ce53108..add741b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Physics.Manager | |||
35 | { | 35 | { |
36 | NONE = 0, | 36 | NONE = 0, |
37 | AGENT = 1, | 37 | AGENT = 1, |
38 | ACTIVE = 2, | 38 | ACTIVE = 2, |
39 | PASSIVE = 3, | 39 | PASSIVE = 3, |
40 | SCRIPTED = 4 | 40 | SCRIPTED = 4 |
41 | } | 41 | } |
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index b98cb35..b759213 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs | |||
@@ -31,9 +31,9 @@ using OpenSim.Framework; | |||
31 | /* | 31 | /* |
32 | * This is the zero mesher. | 32 | * This is the zero mesher. |
33 | * Whatever you want him to mesh, he can't, telling you that by responding with a null pointer. | 33 | * Whatever you want him to mesh, he can't, telling you that by responding with a null pointer. |
34 | * Effectivly this is for switching off meshing and for testing as each physics machine should deal | 34 | * Effectivly this is for switching off meshing and for testing as each physics machine should deal |
35 | * with the null pointer situation. | 35 | * with the null pointer situation. |
36 | * But it's also a convenience thing, as physics machines can rely on having a mesher in any situation, even | 36 | * But it's also a convenience thing, as physics machines can rely on having a mesher in any situation, even |
37 | * if it's a dump one like this. | 37 | * if it's a dump one like this. |
38 | * Note, that this mesher is *not* living in a module but in the manager itself, so | 38 | * Note, that this mesher is *not* living in a module but in the manager itself, so |
39 | * it's always availabe and thus the default in case of configuration errors | 39 | * it's always availabe and thus the default in case of configuration errors |
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index efc5968..584133c 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs | |||
@@ -49,7 +49,7 @@ public class Quaternion | |||
49 | } | 49 | } |
50 | public Quaternion(Vertex axis, float angle) | 50 | public Quaternion(Vertex axis, float angle) |
51 | { | 51 | { |
52 | // using (* 0.5) instead of (/2) | 52 | // using (* 0.5) instead of (/2) |
53 | w = (float)Math.Cos(angle * 0.5f); | 53 | w = (float)Math.Cos(angle * 0.5f); |
54 | x = axis.X * (float)Math.Sin(angle * 0.5f); | 54 | x = axis.X * (float)Math.Sin(angle * 0.5f); |
55 | y = axis.Y * (float)Math.Sin(angle * 0.5f); | 55 | y = axis.Y * (float)Math.Sin(angle * 0.5f); |
@@ -65,8 +65,8 @@ public class Quaternion | |||
65 | c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z; | 65 | c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z; |
66 | return c; | 66 | return c; |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | public Matrix4 computeMatrix() | 70 | public Matrix4 computeMatrix() |
71 | { | 71 | { |
72 | return new Matrix4(this); | 72 | return new Matrix4(this); |
@@ -74,7 +74,7 @@ public class Quaternion | |||
74 | public void normalize() | 74 | public void normalize() |
75 | { | 75 | { |
76 | float mag = length(); | 76 | float mag = length(); |
77 | 77 | ||
78 | w /= mag; | 78 | w /= mag; |
79 | x /= mag; | 79 | x /= mag; |
80 | y /= mag; | 80 | y /= mag; |
@@ -367,7 +367,7 @@ public class Triangle | |||
367 | // It is assumed, that the triangles vertices are already set correctly | 367 | // It is assumed, that the triangles vertices are already set correctly |
368 | double p1x, p2x, p1y, p2y, p3x, p3y; | 368 | double p1x, p2x, p1y, p2y, p3x, p3y; |
369 | 369 | ||
370 | // Deviation of this routine: | 370 | // Deviation of this routine: |
371 | // A circle has the general equation (M-p)^2=r^2, where M and p are vectors | 371 | // A circle has the general equation (M-p)^2=r^2, where M and p are vectors |
372 | // this gives us three equations f(p)=r^2, each for one point p1, p2, p3 | 372 | // this gives us three equations f(p)=r^2, each for one point p1, p2, p3 |
373 | // putting respectively two equations together gives two equations | 373 | // putting respectively two equations together gives two equations |
@@ -378,7 +378,7 @@ public class Triangle | |||
378 | // Now using the equations that are formed by the components of the vectors | 378 | // Now using the equations that are formed by the components of the vectors |
379 | // and isolate Mx lets you make one equation that only holds My | 379 | // and isolate Mx lets you make one equation that only holds My |
380 | // The rest is straight forward and eaasy :-) | 380 | // The rest is straight forward and eaasy :-) |
381 | // | 381 | // |
382 | 382 | ||
383 | /* helping variables for temporary results */ | 383 | /* helping variables for temporary results */ |
384 | double c1, c2; | 384 | double c1, c2; |
@@ -496,7 +496,7 @@ public class Triangle | |||
496 | v2 = vt; | 496 | v2 = vt; |
497 | } | 497 | } |
498 | 498 | ||
499 | // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and | 499 | // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and |
500 | // debugging purposes | 500 | // debugging purposes |
501 | public String ToStringRaw() | 501 | public String ToStringRaw() |
502 | { | 502 | { |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 2e7ec15..4bf12c9 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
115 | for (iCurrentVertex = usedForSeed; iCurrentVertex < iMaxVertex; iCurrentVertex++) | 115 | for (iCurrentVertex = usedForSeed; iCurrentVertex < iMaxVertex; iCurrentVertex++) |
116 | { | 116 | { |
117 | // Background: A triangle mesh fulfills the delaunay condition if (iff!) | 117 | // Background: A triangle mesh fulfills the delaunay condition if (iff!) |
118 | // each circumlocutory circle (i.e. the circle that touches all three corners) | 118 | // each circumlocutory circle (i.e. the circle that touches all three corners) |
119 | // of each triangle is empty of other vertices. | 119 | // of each triangle is empty of other vertices. |
120 | // Obviously a single (seeding) triangle fulfills this condition. | 120 | // Obviously a single (seeding) triangle fulfills this condition. |
121 | // If we now add one vertex, we need to reconstruct all triangles, that | 121 | // If we now add one vertex, we need to reconstruct all triangles, that |
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
132 | // Reconstruction phase. First step, dissolve each triangle into it's simplices, | 132 | // Reconstruction phase. First step, dissolve each triangle into it's simplices, |
133 | // i.e. it's "border lines" | 133 | // i.e. it's "border lines" |
134 | // Goal is to find "inner" borders and delete them, while the hull gets conserved. | 134 | // Goal is to find "inner" borders and delete them, while the hull gets conserved. |
135 | // Inner borders are special in the way that they always come twice, which is how we detect them | 135 | // Inner borders are special in the way that they always come twice, which is how we detect them |
136 | foreach (Triangle t in influencedTriangles) | 136 | foreach (Triangle t in influencedTriangles) |
137 | { | 137 | { |
138 | List<Simplex> newSimplices = t.GetSimplices(); | 138 | List<Simplex> newSimplices = t.GetSimplices(); |
@@ -142,8 +142,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
142 | // Now sort the simplices. That will make identical ones reside side by side in the list | 142 | // Now sort the simplices. That will make identical ones reside side by side in the list |
143 | simplices.Sort(); | 143 | simplices.Sort(); |
144 | 144 | ||
145 | // Look for duplicate simplices here. | 145 | // Look for duplicate simplices here. |
146 | // Remember, they are directly side by side in the list right now, | 146 | // Remember, they are directly side by side in the list right now, |
147 | // So we only check directly neighbours | 147 | // So we only check directly neighbours |
148 | int iSimplex; | 148 | int iSimplex; |
149 | List<Simplex> innerSimplices = new List<Simplex>(); | 149 | List<Simplex> innerSimplices = new List<Simplex>(); |
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
162 | } | 162 | } |
163 | 163 | ||
164 | // each simplex still in the list belongs to the hull of the region in question | 164 | // each simplex still in the list belongs to the hull of the region in question |
165 | // The new vertex (yes, we still deal with verices here :-)) forms a triangle | 165 | // The new vertex (yes, we still deal with verices here :-)) forms a triangle |
166 | // with each of these simplices. Build the new triangles and add them to the list | 166 | // with each of these simplices. Build the new triangles and add them to the list |
167 | foreach (Simplex s in simplices) | 167 | foreach (Simplex s in simplices) |
168 | { | 168 | { |
@@ -206,14 +206,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
206 | } | 206 | } |
207 | break; | 207 | break; |
208 | 208 | ||
209 | 209 | ||
210 | default: | 210 | default: |
211 | if (hshape == HollowShape.Same) | 211 | if (hshape == HollowShape.Same) |
212 | hshape= HollowShape.Square; | 212 | hshape= HollowShape.Square; |
213 | break; | 213 | break; |
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
217 | SimpleHull holeHull = null; | 217 | SimpleHull holeHull = null; |
218 | 218 | ||
219 | if (hshape == HollowShape.Square) | 219 | if (hshape == HollowShape.Square) |
@@ -428,13 +428,13 @@ namespace OpenSim.Region.Physics.Meshing | |||
428 | UInt16 pathShearY = primShape.PathShearY; | 428 | UInt16 pathShearY = primShape.PathShearY; |
429 | Int16 twistTop = primShape.PathTwistBegin; | 429 | Int16 twistTop = primShape.PathTwistBegin; |
430 | Int16 twistBot = primShape.PathTwist; | 430 | Int16 twistBot = primShape.PathTwist; |
431 | 431 | ||
432 | 432 | ||
433 | //m_log.Error("pathShear:" + primShape.PathShearX.ToString() + "," + primShape.PathShearY.ToString()); | 433 | //m_log.Error("pathShear:" + primShape.PathShearX.ToString() + "," + primShape.PathShearY.ToString()); |
434 | //m_log.Error("pathTaper:" + primShape.PathTaperX.ToString() + "," + primShape.PathTaperY.ToString()); | 434 | //m_log.Error("pathTaper:" + primShape.PathTaperX.ToString() + "," + primShape.PathTaperY.ToString()); |
435 | //m_log.Error("ProfileBegin:" + primShape.ProfileBegin.ToString() + "," + primShape.ProfileBegin.ToString()); | 435 | //m_log.Error("ProfileBegin:" + primShape.ProfileBegin.ToString() + "," + primShape.ProfileBegin.ToString()); |
436 | //m_log.Error("PathScale:" + primShape.PathScaleX.ToString() + "," + primShape.PathScaleY.ToString()); | 436 | //m_log.Error("PathScale:" + primShape.PathScaleX.ToString() + "," + primShape.PathScaleY.ToString()); |
437 | 437 | ||
438 | // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface | 438 | // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface |
439 | // of a block are basically the same | 439 | // of a block are basically the same |
440 | // They may be warped differently but the shape is identical | 440 | // They may be warped differently but the shape is identical |
@@ -469,7 +469,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
469 | if (fProfileBeginAngle < fProfileEndAngle) | 469 | if (fProfileBeginAngle < fProfileEndAngle) |
470 | fProfileEndAngle -= 360.0; | 470 | fProfileEndAngle -= 360.0; |
471 | 471 | ||
472 | // Note, that we don't want to cut out a triangle, even if this is a | 472 | // Note, that we don't want to cut out a triangle, even if this is a |
473 | // good approximation for small cuts. Indeed we want to cut out an arc | 473 | // good approximation for small cuts. Indeed we want to cut out an arc |
474 | // and we approximate this arc by a polygon chain | 474 | // and we approximate this arc by a polygon chain |
475 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space | 475 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space |
@@ -559,7 +559,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
559 | extr.taperBotFactorX = 1.0f - ((100 - (float)taperX) / 100); | 559 | extr.taperBotFactorX = 1.0f - ((100 - (float)taperX) / 100); |
560 | //m_log.Warn("taperBotFactorX: " + extr.taperBotFactorX.ToString()); | 560 | //m_log.Warn("taperBotFactorX: " + extr.taperBotFactorX.ToString()); |
561 | } | 561 | } |
562 | 562 | ||
563 | } | 563 | } |
564 | 564 | ||
565 | if (taperY != 100) | 565 | if (taperY != 100) |
@@ -575,8 +575,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
575 | //m_log.Warn("taperBotFactorY: " + extr.taperBotFactorY.ToString()); | 575 | //m_log.Warn("taperBotFactorY: " + extr.taperBotFactorY.ToString()); |
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | 579 | ||
580 | if (pathShearX != 0) | 580 | if (pathShearX != 0) |
581 | { | 581 | { |
582 | if (pathShearX > 50) | 582 | if (pathShearX > 50) |
@@ -585,7 +585,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
585 | extr.pushX = (((float)(256 - pathShearX) / 100) * -1f); | 585 | extr.pushX = (((float)(256 - pathShearX) / 100) * -1f); |
586 | // m_log.Warn("pushX: " + extr.pushX); | 586 | // m_log.Warn("pushX: " + extr.pushX); |
587 | } | 587 | } |
588 | else | 588 | else |
589 | { | 589 | { |
590 | extr.pushX = (float)pathShearX / 100; | 590 | extr.pushX = (float)pathShearX / 100; |
591 | // m_log.Warn("pushX: " + extr.pushX); | 591 | // m_log.Warn("pushX: " + extr.pushX); |
@@ -600,7 +600,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
600 | extr.pushY = (((float)(256 - pathShearY) / 100) * -1f); | 600 | extr.pushY = (((float)(256 - pathShearY) / 100) * -1f); |
601 | //m_log.Warn("pushY: " + extr.pushY); | 601 | //m_log.Warn("pushY: " + extr.pushY); |
602 | } | 602 | } |
603 | else | 603 | else |
604 | { | 604 | { |
605 | extr.pushY = (float)pathShearY / 100; | 605 | extr.pushY = (float)pathShearY / 100; |
606 | //m_log.Warn("pushY: " + extr.pushY); | 606 | //m_log.Warn("pushY: " + extr.pushY); |
@@ -615,7 +615,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
615 | extr.twistTop = 360 - (-1 * extr.twistTop); | 615 | extr.twistTop = 360 - (-1 * extr.twistTop); |
616 | 616 | ||
617 | } | 617 | } |
618 | 618 | ||
619 | 619 | ||
620 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); | 620 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); |
621 | } | 621 | } |
@@ -660,7 +660,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
660 | UInt16 pathShearY = primShape.PathShearY; | 660 | UInt16 pathShearY = primShape.PathShearY; |
661 | Int16 twistBot = primShape.PathTwist; | 661 | Int16 twistBot = primShape.PathTwist; |
662 | Int16 twistTop = primShape.PathTwistBegin; | 662 | Int16 twistTop = primShape.PathTwistBegin; |
663 | 663 | ||
664 | 664 | ||
665 | // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface | 665 | // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface |
666 | // of a block are basically the same | 666 | // of a block are basically the same |
@@ -715,7 +715,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
715 | //Vertex Q1Q12 = new Vertex(-0.46f, -0.18f, 0.0f); | 715 | //Vertex Q1Q12 = new Vertex(-0.46f, -0.18f, 0.0f); |
716 | //Vertex Q1Q13 = new Vertex(-0.43f, -0.24f, 0.0f); | 716 | //Vertex Q1Q13 = new Vertex(-0.43f, -0.24f, 0.0f); |
717 | //Vertex Q1Q14 = new Vertex(-0.40f, -0.30f, 0.0f); | 717 | //Vertex Q1Q14 = new Vertex(-0.40f, -0.30f, 0.0f); |
718 | 718 | ||
719 | SimpleHull outerHull = new SimpleHull(); | 719 | SimpleHull outerHull = new SimpleHull(); |
720 | //Clockwise around the quadrants | 720 | //Clockwise around the quadrants |
721 | //outerHull.AddVertex(Q1Q15); | 721 | //outerHull.AddVertex(Q1Q15); |
@@ -803,7 +803,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
803 | if (fProfileBeginAngle < fProfileEndAngle) | 803 | if (fProfileBeginAngle < fProfileEndAngle) |
804 | fProfileEndAngle -= 360.0; | 804 | fProfileEndAngle -= 360.0; |
805 | 805 | ||
806 | // Note, that we don't want to cut out a triangle, even if this is a | 806 | // Note, that we don't want to cut out a triangle, even if this is a |
807 | // good approximation for small cuts. Indeed we want to cut out an arc | 807 | // good approximation for small cuts. Indeed we want to cut out an arc |
808 | // and we approximate this arc by a polygon chain | 808 | // and we approximate this arc by a polygon chain |
809 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space | 809 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space |
@@ -940,7 +940,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
940 | extr.pushY = (float)pathShearY / 100; | 940 | extr.pushY = (float)pathShearY / 100; |
941 | //m_log.Warn("pushY: " + extr.pushY); | 941 | //m_log.Warn("pushY: " + extr.pushY); |
942 | } | 942 | } |
943 | 943 | ||
944 | } | 944 | } |
945 | 945 | ||
946 | if (twistTop != 0) | 946 | if (twistTop != 0) |
@@ -949,9 +949,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
949 | if (extr.twistTop > 0) | 949 | if (extr.twistTop > 0) |
950 | { | 950 | { |
951 | extr.twistTop = 360 - (-1 * extr.twistTop); | 951 | extr.twistTop = 360 - (-1 * extr.twistTop); |
952 | 952 | ||
953 | } | 953 | } |
954 | 954 | ||
955 | 955 | ||
956 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); | 956 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); |
957 | } | 957 | } |
@@ -967,7 +967,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
967 | } | 967 | } |
968 | extr.twistMid = (float)(extr.twistMid * DEG_TO_RAD); | 968 | extr.twistMid = (float)(extr.twistMid * DEG_TO_RAD); |
969 | } | 969 | } |
970 | 970 | ||
971 | if (twistBot != 0) | 971 | if (twistBot != 0) |
972 | { | 972 | { |
973 | extr.twistBot = 180 * ((float)twistBot / 100); | 973 | extr.twistBot = 180 * ((float)twistBot / 100); |
@@ -1013,7 +1013,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1013 | Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); | 1013 | Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); |
1014 | Vertex PM = new Vertex(+0.5f, 0f, 0.0f); | 1014 | Vertex PM = new Vertex(+0.5f, 0f, 0.0f); |
1015 | Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); | 1015 | Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); |
1016 | 1016 | ||
1017 | 1017 | ||
1018 | SimpleHull outerHull = new SimpleHull(); | 1018 | SimpleHull outerHull = new SimpleHull(); |
1019 | //outerHull.AddVertex(MM); | 1019 | //outerHull.AddVertex(MM); |
@@ -1022,7 +1022,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1022 | outerHull.AddVertex(PP); | 1022 | outerHull.AddVertex(PP); |
1023 | outerHull.AddVertex(MM); | 1023 | outerHull.AddVertex(MM); |
1024 | outerHull.AddVertex(PM); | 1024 | outerHull.AddVertex(PM); |
1025 | 1025 | ||
1026 | // Deal with cuts now | 1026 | // Deal with cuts now |
1027 | if ((profileBegin != 0) || (profileEnd != 0)) | 1027 | if ((profileBegin != 0) || (profileEnd != 0)) |
1028 | { | 1028 | { |
@@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1034 | if (fProfileBeginAngle < fProfileEndAngle) | 1034 | if (fProfileBeginAngle < fProfileEndAngle) |
1035 | fProfileEndAngle -= 360.0; | 1035 | fProfileEndAngle -= 360.0; |
1036 | 1036 | ||
1037 | // Note, that we don't want to cut out a triangle, even if this is a | 1037 | // Note, that we don't want to cut out a triangle, even if this is a |
1038 | // good approximation for small cuts. Indeed we want to cut out an arc | 1038 | // good approximation for small cuts. Indeed we want to cut out an arc |
1039 | // and we approximate this arc by a polygon chain | 1039 | // and we approximate this arc by a polygon chain |
1040 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space | 1040 | // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space |
@@ -1177,7 +1177,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1177 | extr.twistTop = 360 - (-1 * extr.twistTop); | 1177 | extr.twistTop = 360 - (-1 * extr.twistTop); |
1178 | 1178 | ||
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | 1181 | ||
1182 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); | 1182 | extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); |
1183 | } | 1183 | } |
@@ -1255,7 +1255,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1255 | 1255 | ||
1256 | 1256 | ||
1257 | // Base Faces of the Icosahedron (20) | 1257 | // Base Faces of the Icosahedron (20) |
1258 | SphereLODTriangle(v1, v2, v3, diameter, LOD, m); | 1258 | SphereLODTriangle(v1, v2, v3, diameter, LOD, m); |
1259 | SphereLODTriangle(v4, v3, v2, diameter, LOD, m); | 1259 | SphereLODTriangle(v4, v3, v2, diameter, LOD, m); |
1260 | SphereLODTriangle(v4, v5, v6, diameter, LOD, m); | 1260 | SphereLODTriangle(v4, v5, v6, diameter, LOD, m); |
1261 | SphereLODTriangle(v4, v9, v5, diameter, LOD, m); | 1261 | SphereLODTriangle(v4, v9, v5, diameter, LOD, m); |
@@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1284 | v.Z *= size.Z; | 1284 | v.Z *= size.Z; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | // This was built with the normals pointing inside.. | 1287 | // This was built with the normals pointing inside.. |
1288 | // therefore we have to invert the normals | 1288 | // therefore we have to invert the normals |
1289 | foreach (Triangle t in m.triangles) | 1289 | foreach (Triangle t in m.triangles) |
1290 | { | 1290 | { |
@@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1308 | v.Y *= size.Y; | 1308 | v.Y *= size.Y; |
1309 | v.Z *= size.Z; | 1309 | v.Z *= size.Z; |
1310 | } | 1310 | } |
1311 | // This was built with the normals pointing inside.. | 1311 | // This was built with the normals pointing inside.. |
1312 | // therefore we have to invert the normals | 1312 | // therefore we have to invert the normals |
1313 | foreach (Triangle t in sm.triangles) | 1313 | foreach (Triangle t in sm.triangles) |
1314 | { | 1314 | { |
@@ -1462,7 +1462,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1462 | default: | 1462 | default: |
1463 | mesh = CreateBoxMesh(primName, primShape, size); | 1463 | mesh = CreateBoxMesh(primName, primShape, size); |
1464 | CalcNormals(mesh); | 1464 | CalcNormals(mesh); |
1465 | //Set default mesh to cube otherwise it'll return | 1465 | //Set default mesh to cube otherwise it'll return |
1466 | // null and crash on the 'setMesh' method in the physics plugins. | 1466 | // null and crash on the 'setMesh' method in the physics plugins. |
1467 | //mesh = null; | 1467 | //mesh = null; |
1468 | break; | 1468 | break; |
@@ -1472,6 +1472,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
1472 | return mesh; | 1472 | return mesh; |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | 1475 | ||
1476 | } | 1476 | } |
1477 | } | 1477 | } |
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index 2896d3b..5eeadae 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs | |||
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
337 | } | 337 | } |
338 | 338 | ||
339 | 339 | ||
340 | if (baseStartVertex == null) // i.e. no simplex fulfilled the "outside" condition. | 340 | if (baseStartVertex == null) // i.e. no simplex fulfilled the "outside" condition. |
341 | // In otherwords, subtractHull completely embraces baseHull | 341 | // In otherwords, subtractHull completely embraces baseHull |
342 | { | 342 | { |
343 | return result; | 343 | return result; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 4165484..5024b5d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
36 | /// <summary> | 36 | /// <summary> |
37 | /// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves. | 37 | /// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves. |
38 | /// </summary> | 38 | /// </summary> |
39 | 39 | ||
40 | public enum dParam : int | 40 | public enum dParam : int |
41 | { | 41 | { |
42 | LowStop = 0, | 42 | LowStop = 0, |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
106 | private CollisionCategories m_collisionFlags = (CollisionCategories.Geom | 106 | private CollisionCategories m_collisionFlags = (CollisionCategories.Geom |
107 | | CollisionCategories.Space | 107 | | CollisionCategories.Space |
108 | | CollisionCategories.Body | 108 | | CollisionCategories.Body |
109 | | CollisionCategories.Character | 109 | | CollisionCategories.Character |
110 | | CollisionCategories.Land); | 110 | | CollisionCategories.Land); |
111 | public IntPtr Body; | 111 | public IntPtr Body; |
112 | private OdeScene _parent_scene; | 112 | private OdeScene _parent_scene; |
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
145 | { | 145 | { |
146 | m_colliderarr[i] = false; | 146 | m_colliderarr[i] = false; |
147 | } | 147 | } |
148 | CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); | 148 | CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); |
149 | 149 | ||
150 | lock (OdeScene.OdeLock) | 150 | lock (OdeScene.OdeLock) |
151 | { | 151 | { |
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /// <summary> | 340 | /// <summary> |
341 | /// turn the PID controller on or off. | 341 | /// turn the PID controller on or off. |
342 | /// The PID Controller will turn on all by itself in many situations | 342 | /// The PID Controller will turn on all by itself in many situations |
343 | /// </summary> | 343 | /// </summary> |
344 | /// <param name="status"></param> | 344 | /// <param name="status"></param> |
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
354 | 354 | ||
355 | /// <summary> | 355 | /// <summary> |
356 | /// This 'puts' an avatar somewhere in the physics space. | 356 | /// This 'puts' an avatar somewhere in the physics space. |
357 | /// Not really a good choice unless you 'know' it's a good | 357 | /// Not really a good choice unless you 'know' it's a good |
358 | /// spot otherwise you're likely to orbit the avatar. | 358 | /// spot otherwise you're likely to orbit the avatar. |
359 | /// </summary> | 359 | /// </summary> |
360 | public override PhysicsVector Position | 360 | public override PhysicsVector Position |
@@ -389,7 +389,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
389 | lock (OdeScene.OdeLock) | 389 | lock (OdeScene.OdeLock) |
390 | { | 390 | { |
391 | d.JointDestroy(Amotor); | 391 | d.JointDestroy(Amotor); |
392 | 392 | ||
393 | PhysicsVector SetSize = value; | 393 | PhysicsVector SetSize = value; |
394 | float prevCapsule = CAPSULE_LENGTH; | 394 | float prevCapsule = CAPSULE_LENGTH; |
395 | float capsuleradius = CAPSULE_RADIUS; | 395 | float capsuleradius = CAPSULE_RADIUS; |
@@ -405,7 +405,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
405 | AvatarGeomAndBodyCreation(_position.X, _position.Y, | 405 | AvatarGeomAndBodyCreation(_position.X, _position.Y, |
406 | _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); | 406 | _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); |
407 | Velocity = new PhysicsVector(0f, 0f, 0f); | 407 | Velocity = new PhysicsVector(0f, 0f, 0f); |
408 | 408 | ||
409 | } | 409 | } |
410 | _parent_scene.geom_name_map[Shell] = m_name; | 410 | _parent_scene.geom_name_map[Shell] = m_name; |
411 | _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; | 411 | _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; |
@@ -423,7 +423,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
423 | int dAMotorEuler = 1; | 423 | int dAMotorEuler = 1; |
424 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); | 424 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); |
425 | Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); | 425 | Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); |
426 | 426 | ||
427 | d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); | 427 | d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); |
428 | d.GeomSetCollideBits(Shell, (int)m_collisionFlags); | 428 | d.GeomSetCollideBits(Shell, (int)m_collisionFlags); |
429 | 429 | ||
@@ -442,8 +442,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
442 | 442 | ||
443 | d.GeomSetBody(Shell, Body); | 443 | d.GeomSetBody(Shell, Body); |
444 | 444 | ||
445 | 445 | ||
446 | // The purpose of the AMotor here is to keep the avatar's physical | 446 | // The purpose of the AMotor here is to keep the avatar's physical |
447 | // surrogate from rotating while moving | 447 | // surrogate from rotating while moving |
448 | Amotor = d.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); | 448 | Amotor = d.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); |
449 | d.JointAttach(Amotor, Body, IntPtr.Zero); | 449 | d.JointAttach(Amotor, Body, IntPtr.Zero); |
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
455 | d.JointSetAMotorAngle(Amotor, 0, 0); | 455 | d.JointSetAMotorAngle(Amotor, 0, 0); |
456 | d.JointSetAMotorAngle(Amotor, 1, 0); | 456 | d.JointSetAMotorAngle(Amotor, 1, 0); |
457 | d.JointSetAMotorAngle(Amotor, 2, 0); | 457 | d.JointSetAMotorAngle(Amotor, 2, 0); |
458 | 458 | ||
459 | // These lowstops and high stops are effectively (no wiggle room) | 459 | // These lowstops and high stops are effectively (no wiggle room) |
460 | d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, -0.000000000001f); | 460 | d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, -0.000000000001f); |
461 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0.000000000001f); | 461 | d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0.000000000001f); |
@@ -464,23 +464,23 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
464 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); | 464 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); |
465 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); | 465 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); |
466 | 466 | ||
467 | // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the | 467 | // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the |
468 | // capped cyllinder will fall over | 468 | // capped cyllinder will fall over |
469 | d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); | 469 | d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); |
470 | d.JointSetAMotorParam(Amotor, (int)dParam.FMax, tensor); | 470 | d.JointSetAMotorParam(Amotor, (int)dParam.FMax, tensor); |
471 | 471 | ||
472 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); | 472 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); |
473 | //d.QfromR( | 473 | //d.QfromR( |
474 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, | 474 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, |
475 | // | 475 | // |
476 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); | 476 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); |
477 | //standupStraight(); | 477 | //standupStraight(); |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | } | 481 | } |
482 | 482 | ||
483 | // | 483 | // |
484 | /// <summary> | 484 | /// <summary> |
485 | /// Uses the capped cyllinder volume formula to calculate the avatar's mass. | 485 | /// Uses the capped cyllinder volume formula to calculate the avatar's mass. |
486 | /// This may be used in calculations in the scene/scenepresence | 486 | /// This may be used in calculations in the scene/scenepresence |
@@ -508,13 +508,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
508 | 508 | ||
509 | } | 509 | } |
510 | 510 | ||
511 | // This code is very useful. Written by DanX0r. We're just not using it right now. | 511 | // This code is very useful. Written by DanX0r. We're just not using it right now. |
512 | // Commented out to prevent a warning. | 512 | // Commented out to prevent a warning. |
513 | // | 513 | // |
514 | // private void standupStraight() | 514 | // private void standupStraight() |
515 | // { | 515 | // { |
516 | // // The purpose of this routine here is to quickly stabilize the Body while it's popped up in the air. | 516 | // // The purpose of this routine here is to quickly stabilize the Body while it's popped up in the air. |
517 | // // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you | 517 | // // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you |
518 | // // change appearance and when you enter the simulator | 518 | // // change appearance and when you enter the simulator |
519 | // // After this routine is done, the amotor stabilizes much quicker | 519 | // // After this routine is done, the amotor stabilizes much quicker |
520 | // d.Vector3 feet; | 520 | // d.Vector3 feet; |
@@ -558,7 +558,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
558 | if (_zeroFlag) | 558 | if (_zeroFlag) |
559 | return new PhysicsVector(0f, 0f, 0f); | 559 | return new PhysicsVector(0f, 0f, 0f); |
560 | m_lastUpdateSent = false; | 560 | m_lastUpdateSent = false; |
561 | return _velocity; | 561 | return _velocity; |
562 | } | 562 | } |
563 | set | 563 | set |
564 | { | 564 | { |
@@ -601,7 +601,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
601 | } | 601 | } |
602 | 602 | ||
603 | /// <summary> | 603 | /// <summary> |
604 | /// Adds the force supplied to the Target Velocity | 604 | /// Adds the force supplied to the Target Velocity |
605 | /// The PID controller takes this target velocity and tries to make it a reality | 605 | /// The PID controller takes this target velocity and tries to make it a reality |
606 | /// </summary> | 606 | /// </summary> |
607 | /// <param name="force"></param> | 607 | /// <param name="force"></param> |
@@ -616,7 +616,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
616 | // _target_velocity.Y += force.Y; | 616 | // _target_velocity.Y += force.Y; |
617 | //_target_velocity.Z += force.Z; | 617 | //_target_velocity.Z += force.Z; |
618 | } | 618 | } |
619 | else | 619 | else |
620 | { | 620 | { |
621 | m_pidControllerActive = true; | 621 | m_pidControllerActive = true; |
622 | _target_velocity.X += force.X; | 622 | _target_velocity.X += force.X; |
@@ -637,7 +637,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
637 | d.BodyAddForce(Body, force.X, force.Y, force.Z); | 637 | d.BodyAddForce(Body, force.X, force.Y, force.Z); |
638 | //d.BodySetRotation(Body, ref m_StandUpRotation); | 638 | //d.BodySetRotation(Body, ref m_StandUpRotation); |
639 | //standupStraight(); | 639 | //standupStraight(); |
640 | 640 | ||
641 | } | 641 | } |
642 | } | 642 | } |
643 | 643 | ||
@@ -655,16 +655,16 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
655 | { | 655 | { |
656 | // no lock; for now it's only called from within Simulate() | 656 | // no lock; for now it's only called from within Simulate() |
657 | 657 | ||
658 | // If the PID Controller isn't active then we set our force | 658 | // If the PID Controller isn't active then we set our force |
659 | // calculating base velocity to the current position | 659 | // calculating base velocity to the current position |
660 | 660 | ||
661 | 661 | ||
662 | if (m_pidControllerActive == false) | 662 | if (m_pidControllerActive == false) |
663 | { | 663 | { |
664 | _zeroPosition = d.BodyGetPosition(Body); | 664 | _zeroPosition = d.BodyGetPosition(Body); |
665 | } | 665 | } |
666 | //PidStatus = true; | 666 | //PidStatus = true; |
667 | 667 | ||
668 | PhysicsVector vec = new PhysicsVector(); | 668 | PhysicsVector vec = new PhysicsVector(); |
669 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 669 | d.Vector3 vel = d.BodyGetLinearVel(Body); |
670 | float movementdivisor = 1f; | 670 | float movementdivisor = 1f; |
@@ -798,13 +798,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
798 | _velocity.X = 0.0f; | 798 | _velocity.X = 0.0f; |
799 | _velocity.Y = 0.0f; | 799 | _velocity.Y = 0.0f; |
800 | _velocity.Z = 0.0f; | 800 | _velocity.Z = 0.0f; |
801 | 801 | ||
802 | // Did we send out the 'stopped' message? | 802 | // Did we send out the 'stopped' message? |
803 | if (!m_lastUpdateSent) | 803 | if (!m_lastUpdateSent) |
804 | { | 804 | { |
805 | m_lastUpdateSent = true; | 805 | m_lastUpdateSent = true; |
806 | //base.RequestPhysicsterseUpdate(); | 806 | //base.RequestPhysicsterseUpdate(); |
807 | 807 | ||
808 | } | 808 | } |
809 | } | 809 | } |
810 | else | 810 | else |
@@ -815,7 +815,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
815 | _velocity.Y = (vec.Y); | 815 | _velocity.Y = (vec.Y); |
816 | 816 | ||
817 | _velocity.Z = (vec.Z); | 817 | _velocity.Z = (vec.Z); |
818 | 818 | ||
819 | if (_velocity.Z < -6 && !m_hackSentFall) | 819 | if (_velocity.Z < -6 && !m_hackSentFall) |
820 | { | 820 | { |
821 | m_hackSentFall = true; | 821 | m_hackSentFall = true; |
@@ -849,7 +849,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
849 | 849 | ||
850 | d.GeomDestroy(Shell); | 850 | d.GeomDestroy(Shell); |
851 | _parent_scene.geom_name_map.Remove(Shell); | 851 | _parent_scene.geom_name_map.Remove(Shell); |
852 | 852 | ||
853 | //kill the body | 853 | //kill the body |
854 | d.BodyDestroy(Body); | 854 | d.BodyDestroy(Body); |
855 | } | 855 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 37a8b77..f1886e4 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
111 | private IntPtr _linkJointGroup = (IntPtr)0; | 111 | private IntPtr _linkJointGroup = (IntPtr)0; |
112 | private PhysicsActor _parent = null; | 112 | private PhysicsActor _parent = null; |
113 | private PhysicsActor m_taintparent = null; | 113 | private PhysicsActor m_taintparent = null; |
114 | 114 | ||
115 | private bool iscolliding = false; | 115 | private bool iscolliding = false; |
116 | private bool m_isphysical = false; | 116 | private bool m_isphysical = false; |
117 | private bool m_isSelected = false; | 117 | private bool m_isSelected = false; |
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
202 | m_taintadd = true; | 202 | m_taintadd = true; |
203 | _parent_scene.AddPhysicsActorTaint(this); | 203 | _parent_scene.AddPhysicsActorTaint(this); |
204 | // don't do .add() here; old geoms get recycled with the same hash | 204 | // don't do .add() here; old geoms get recycled with the same hash |
205 | 205 | ||
206 | } | 206 | } |
207 | 207 | ||
208 | public override int PhysicsActorType | 208 | public override int PhysicsActorType |
@@ -232,9 +232,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
232 | public override bool Selected | 232 | public override bool Selected |
233 | { | 233 | { |
234 | set { | 234 | set { |
235 | // This only makes the object not collidable if the object | 235 | // This only makes the object not collidable if the object |
236 | // is physical or the object is modified somehow *IN THE FUTURE* | 236 | // is physical or the object is modified somehow *IN THE FUTURE* |
237 | // without this, if an avatar selects prim, they can walk right | 237 | // without this, if an avatar selects prim, they can walk right |
238 | // through it while it's selected | 238 | // through it while it's selected |
239 | 239 | ||
240 | if ((m_isphysical && !_zeroFlag) || !value) | 240 | if ((m_isphysical && !_zeroFlag) || !value) |
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
262 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); | 262 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); |
263 | } | 263 | } |
264 | //m_log.Warn("Setting Geom to: " + prim_geom); | 264 | //m_log.Warn("Setting Geom to: " + prim_geom); |
265 | 265 | ||
266 | } | 266 | } |
267 | 267 | ||
268 | public void enableBodySoft() | 268 | public void enableBodySoft() |
@@ -277,7 +277,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
277 | public void disableBodySoft() | 277 | public void disableBodySoft() |
278 | { | 278 | { |
279 | m_disabled = true; | 279 | m_disabled = true; |
280 | 280 | ||
281 | if (m_isphysical) | 281 | if (m_isphysical) |
282 | if (Body != (IntPtr)0) | 282 | if (Body != (IntPtr)0) |
283 | d.BodyDisable(Body); | 283 | d.BodyDisable(Body); |
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
307 | 307 | ||
308 | d.BodySetAutoDisableFlag(Body, true); | 308 | d.BodySetAutoDisableFlag(Body, true); |
309 | d.BodySetAutoDisableSteps(Body, 20); | 309 | d.BodySetAutoDisableSteps(Body, 20); |
310 | 310 | ||
311 | m_interpenetrationcount = 0; | 311 | m_interpenetrationcount = 0; |
312 | m_collisionscore = 0; | 312 | m_collisionscore = 0; |
313 | m_disabled = false; | 313 | m_disabled = false; |
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
327 | { | 327 | { |
328 | float volume = 0; | 328 | float volume = 0; |
329 | 329 | ||
330 | // No material is passed to the physics engines yet.. soo.. | 330 | // No material is passed to the physics engines yet.. soo.. |
331 | // we're using the m_density constant in the class definition | 331 | // we're using the m_density constant in the class definition |
332 | 332 | ||
333 | 333 | ||
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
340 | 340 | ||
341 | volume = _size.X*_size.Y*_size.Z; | 341 | volume = _size.X*_size.Y*_size.Z; |
342 | 342 | ||
343 | // If the user has 'hollowed out' | 343 | // If the user has 'hollowed out' |
344 | // ProfileHollow is one of those 0 to 50000 values :P | 344 | // ProfileHollow is one of those 0 to 50000 values :P |
345 | // we like percentages better.. so turning into a percentage | 345 | // we like percentages better.. so turning into a percentage |
346 | 346 | ||
@@ -415,7 +415,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
415 | // We don't know what the shape is yet, so use default | 415 | // We don't know what the shape is yet, so use default |
416 | volume = _size.X * _size.Y * _size.Z; | 416 | volume = _size.X * _size.Y * _size.Z; |
417 | } | 417 | } |
418 | // If the user has 'hollowed out' | 418 | // If the user has 'hollowed out' |
419 | // ProfileHollow is one of those 0 to 50000 values :P | 419 | // ProfileHollow is one of those 0 to 50000 values :P |
420 | // we like percentages better.. so turning into a percentage | 420 | // we like percentages better.. so turning into a percentage |
421 | 421 | ||
@@ -427,8 +427,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
427 | float hollowVolume = 0; | 427 | float hollowVolume = 0; |
428 | switch (_pbs.HollowShape) | 428 | switch (_pbs.HollowShape) |
429 | { | 429 | { |
430 | 430 | ||
431 | case HollowShape.Same: | 431 | case HollowShape.Same: |
432 | case HollowShape.Circle: | 432 | case HollowShape.Circle: |
433 | // Hollow shape is a perfect cyllinder in respect to the cube's scale | 433 | // Hollow shape is a perfect cyllinder in respect to the cube's scale |
434 | // Cyllinder hollow volume calculation | 434 | // Cyllinder hollow volume calculation |
@@ -447,7 +447,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
447 | hollowVolume = hollowsizex * hollowsizey * hollowsizez; | 447 | hollowVolume = hollowsizex * hollowsizey * hollowsizez; |
448 | break; | 448 | break; |
449 | 449 | ||
450 | 450 | ||
451 | 451 | ||
452 | case HollowShape.Triangle: | 452 | case HollowShape.Triangle: |
453 | // Equilateral Triangular Prism volume hollow calculation | 453 | // Equilateral Triangular Prism volume hollow calculation |
@@ -465,7 +465,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
465 | volume = volume - hollowVolume; | 465 | volume = volume - hollowVolume; |
466 | } | 466 | } |
467 | break; | 467 | break; |
468 | 468 | ||
469 | case ProfileShape.HalfCircle: | 469 | case ProfileShape.HalfCircle: |
470 | if (_pbs.PathCurve == (byte)Extrusion.Curve1) | 470 | if (_pbs.PathCurve == (byte)Extrusion.Curve1) |
471 | { | 471 | { |
@@ -490,13 +490,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
490 | } | 490 | } |
491 | break; | 491 | break; |
492 | case ProfileShape.EquilateralTriangle: | 492 | case ProfileShape.EquilateralTriangle: |
493 | /* | 493 | /* |
494 | v = (abs((xB*yA-xA*yB)+(xC*yB-xB*yC)+(xA*yC-xC*yA))/2) * h | 494 | v = (abs((xB*yA-xA*yB)+(xC*yB-xB*yC)+(xA*yC-xC*yA))/2) * h |
495 | 495 | ||
496 | // seed mesh | 496 | // seed mesh |
497 | Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); | 497 | Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); |
498 | Vertex PM = new Vertex(+0.5f, 0f, 0.0f); | 498 | Vertex PM = new Vertex(+0.5f, 0f, 0.0f); |
499 | Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); | 499 | Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); |
500 | */ | 500 | */ |
501 | float xA = -0.25f * _size.X; | 501 | float xA = -0.25f * _size.X; |
502 | float yA = -0.45f * _size.Y; | 502 | float yA = -0.45f * _size.Y; |
@@ -509,7 +509,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
509 | 509 | ||
510 | volume = (float)((Math.Abs((xB * yA - xA * yB) + (xC * yB - xB * yC) + (xA * yC - xC * yA)) / 2) * _size.Z); | 510 | volume = (float)((Math.Abs((xB * yA - xA * yB) + (xC * yB - xB * yC) + (xA * yC - xC * yA)) / 2) * _size.Z); |
511 | 511 | ||
512 | // If the user has 'hollowed out' | 512 | // If the user has 'hollowed out' |
513 | // ProfileHollow is one of those 0 to 50000 values :P | 513 | // ProfileHollow is one of those 0 to 50000 values :P |
514 | // we like percentages better.. so turning into a percentage | 514 | // we like percentages better.. so turning into a percentage |
515 | float fhollowFactor = ((float)_pbs.ProfileHollow / 1.9f); | 515 | float fhollowFactor = ((float)_pbs.ProfileHollow / 1.9f); |
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
521 | float hollowVolume = 0; | 521 | float hollowVolume = 0; |
522 | switch (_pbs.HollowShape) | 522 | switch (_pbs.HollowShape) |
523 | { | 523 | { |
524 | 524 | ||
525 | case HollowShape.Same: | 525 | case HollowShape.Same: |
526 | case HollowShape.Triangle: | 526 | case HollowShape.Triangle: |
527 | // Equilateral Triangular Prism volume hollow calculation | 527 | // Equilateral Triangular Prism volume hollow calculation |
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
550 | hollowVolume = ((float)((Math.PI * Math.Pow(hRadius, 2) * hLength)/2) * hollowAmount); | 550 | hollowVolume = ((float)((Math.PI * Math.Pow(hRadius, 2) * hLength)/2) * hollowAmount); |
551 | break; | 551 | break; |
552 | 552 | ||
553 | 553 | ||
554 | default: | 554 | default: |
555 | hollowVolume = 0; | 555 | hollowVolume = 0; |
556 | break; | 556 | break; |
@@ -560,7 +560,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
560 | break; | 560 | break; |
561 | 561 | ||
562 | default: | 562 | default: |
563 | // we don't have all of the volume formulas yet so | 563 | // we don't have all of the volume formulas yet so |
564 | // use the common volume formula for all | 564 | // use the common volume formula for all |
565 | volume = _size.X*_size.Y*_size.Z; | 565 | volume = _size.X*_size.Y*_size.Z; |
566 | break; | 566 | break; |
@@ -568,7 +568,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
568 | 568 | ||
569 | // Calculate Path cut effect on volume | 569 | // Calculate Path cut effect on volume |
570 | // Not exact, in the triangle hollow example | 570 | // Not exact, in the triangle hollow example |
571 | // They should never be zero or less then zero.. | 571 | // They should never be zero or less then zero.. |
572 | // we'll ignore it if it's less then zero | 572 | // we'll ignore it if it's less then zero |
573 | 573 | ||
574 | // ProfileEnd and ProfileBegin are values | 574 | // ProfileEnd and ProfileBegin are values |
@@ -672,11 +672,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
672 | 672 | ||
673 | public void setMesh(OdeScene parent_scene, IMesh mesh) | 673 | public void setMesh(OdeScene parent_scene, IMesh mesh) |
674 | { | 674 | { |
675 | // This sleeper is there to moderate how long it takes between | 675 | // This sleeper is there to moderate how long it takes between |
676 | // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object | 676 | // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object |
677 | 677 | ||
678 | Thread.Sleep(10); | 678 | Thread.Sleep(10); |
679 | 679 | ||
680 | //Kill Body so that mesh can re-make the geom | 680 | //Kill Body so that mesh can re-make the geom |
681 | if (IsPhysical && Body != (IntPtr) 0) | 681 | if (IsPhysical && Body != (IntPtr) 0) |
682 | { | 682 | { |
@@ -694,9 +694,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
694 | 3*sizeof (int)); | 694 | 3*sizeof (int)); |
695 | d.GeomTriMeshDataPreprocess(_triMeshData); | 695 | d.GeomTriMeshDataPreprocess(_triMeshData); |
696 | 696 | ||
697 | 697 | ||
698 | _parent_scene.waitForSpaceUnlock(m_targetSpace); | 698 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
699 | 699 | ||
700 | try | 700 | try |
701 | { | 701 | { |
702 | if (prim_geom == (IntPtr)0) | 702 | if (prim_geom == (IntPtr)0) |
@@ -706,7 +706,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
706 | } | 706 | } |
707 | catch (AccessViolationException) | 707 | catch (AccessViolationException) |
708 | { | 708 | { |
709 | 709 | ||
710 | m_log.Error("[PHYSICS]: MESH LOCKED"); | 710 | m_log.Error("[PHYSICS]: MESH LOCKED"); |
711 | return; | 711 | return; |
712 | } | 712 | } |
@@ -715,7 +715,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
715 | // Recreate the body | 715 | // Recreate the body |
716 | m_interpenetrationcount = 0; | 716 | m_interpenetrationcount = 0; |
717 | m_collisionscore = 0; | 717 | m_collisionscore = 0; |
718 | 718 | ||
719 | enableBody(); | 719 | enableBody(); |
720 | 720 | ||
721 | } | 721 | } |
@@ -724,7 +724,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
724 | public void ProcessTaints(float timestep) | 724 | public void ProcessTaints(float timestep) |
725 | { | 725 | { |
726 | 726 | ||
727 | 727 | ||
728 | if (m_taintadd) | 728 | if (m_taintadd) |
729 | { | 729 | { |
730 | changeadd(timestep); | 730 | changeadd(timestep); |
@@ -779,7 +779,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
779 | } | 779 | } |
780 | 780 | ||
781 | private void changeAngularLock(float timestep) | 781 | private void changeAngularLock(float timestep) |
782 | { | 782 | { |
783 | // do we have a Physical object? | 783 | // do we have a Physical object? |
784 | if (Body != IntPtr.Zero) | 784 | if (Body != IntPtr.Zero) |
785 | { | 785 | { |
@@ -809,7 +809,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
809 | 809 | ||
810 | private void changelink(float timestep) | 810 | private void changelink(float timestep) |
811 | { | 811 | { |
812 | 812 | ||
813 | if (_parent == null && m_taintparent != null) | 813 | if (_parent == null && m_taintparent != null) |
814 | { | 814 | { |
815 | if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) | 815 | if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) |
@@ -834,14 +834,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
834 | m_linkJoint = (IntPtr)0; | 834 | m_linkJoint = (IntPtr)0; |
835 | 835 | ||
836 | } | 836 | } |
837 | 837 | ||
838 | 838 | ||
839 | _parent = m_taintparent; | 839 | _parent = m_taintparent; |
840 | } | 840 | } |
841 | 841 | ||
842 | private void changeSelectedStatus(float timestep) | 842 | private void changeSelectedStatus(float timestep) |
843 | { | 843 | { |
844 | 844 | ||
845 | if (m_taintselected) | 845 | if (m_taintselected) |
846 | { | 846 | { |
847 | 847 | ||
@@ -849,9 +849,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
849 | m_collisionCategories = CollisionCategories.Selected; | 849 | m_collisionCategories = CollisionCategories.Selected; |
850 | m_collisionFlags = (CollisionCategories.Sensor | CollisionCategories.Space); | 850 | m_collisionFlags = (CollisionCategories.Sensor | CollisionCategories.Space); |
851 | 851 | ||
852 | // We do the body disable soft twice because 'in theory' a collision could have happened | 852 | // We do the body disable soft twice because 'in theory' a collision could have happened |
853 | // in between the disabling and the collision properties setting | 853 | // in between the disabling and the collision properties setting |
854 | // which would wake the physical body up from a soft disabling and potentially cause it to fall | 854 | // which would wake the physical body up from a soft disabling and potentially cause it to fall |
855 | // through the ground. | 855 | // through the ground. |
856 | 856 | ||
857 | if (m_isphysical) | 857 | if (m_isphysical) |
@@ -873,9 +873,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
873 | } | 873 | } |
874 | else | 874 | else |
875 | { | 875 | { |
876 | 876 | ||
877 | m_collisionCategories = CollisionCategories.Geom; | 877 | m_collisionCategories = CollisionCategories.Geom; |
878 | 878 | ||
879 | if (m_isphysical) | 879 | if (m_isphysical) |
880 | m_collisionCategories |= CollisionCategories.Body; | 880 | m_collisionCategories |= CollisionCategories.Body; |
881 | 881 | ||
@@ -898,10 +898,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
898 | enableBodySoft(); | 898 | enableBodySoft(); |
899 | } | 899 | } |
900 | 900 | ||
901 | 901 | ||
902 | } | 902 | } |
903 | 903 | ||
904 | 904 | ||
905 | resetCollisionAccounting(); | 905 | resetCollisionAccounting(); |
906 | m_isSelected = m_taintselected; | 906 | m_isSelected = m_taintselected; |
907 | } | 907 | } |
@@ -918,21 +918,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
918 | m_taintselected = m_isSelected; | 918 | m_taintselected = m_isSelected; |
919 | 919 | ||
920 | m_taintsize = _size; | 920 | m_taintsize = _size; |
921 | 921 | ||
922 | 922 | ||
923 | m_taintshape = false; | 923 | m_taintshape = false; |
924 | 924 | ||
925 | m_taintforce = false; | 925 | m_taintforce = false; |
926 | 926 | ||
927 | m_taintdisable = false; | 927 | m_taintdisable = false; |
928 | 928 | ||
929 | m_taintVelocity = PhysicsVector.Zero; | 929 | m_taintVelocity = PhysicsVector.Zero; |
930 | } | 930 | } |
931 | public void changeadd(float timestep) | 931 | public void changeadd(float timestep) |
932 | { | 932 | { |
933 | 933 | ||
934 | 934 | ||
935 | 935 | ||
936 | int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); | 936 | int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); |
937 | IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); | 937 | IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); |
938 | 938 | ||
@@ -941,7 +941,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
941 | 941 | ||
942 | m_targetSpace = targetspace; | 942 | m_targetSpace = targetspace; |
943 | 943 | ||
944 | 944 | ||
945 | 945 | ||
946 | if (_mesh != null) | 946 | if (_mesh != null) |
947 | { | 947 | { |
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1010 | { | 1010 | { |
1011 | m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); | 1011 | m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); |
1012 | ode.dunlock(_parent_scene.world); | 1012 | ode.dunlock(_parent_scene.world); |
1013 | return; | 1013 | return; |
1014 | } | 1014 | } |
1015 | } | 1015 | } |
1016 | } | 1016 | } |
@@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1060 | 1060 | ||
1061 | 1061 | ||
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | _parent_scene.geom_name_map[prim_geom] = this.m_primName; | 1064 | _parent_scene.geom_name_map[prim_geom] = this.m_primName; |
1065 | _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this; | 1065 | _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this; |
1066 | 1066 | ||
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1072 | } | 1072 | } |
1073 | public void changemove(float timestep) | 1073 | public void changemove(float timestep) |
1074 | { | 1074 | { |
1075 | 1075 | ||
1076 | 1076 | ||
1077 | 1077 | ||
1078 | if (m_isphysical) | 1078 | if (m_isphysical) |
@@ -1080,7 +1080,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1080 | // This is a fallback.. May no longer be necessary. | 1080 | // This is a fallback.. May no longer be necessary. |
1081 | if (Body == (IntPtr) 0) | 1081 | if (Body == (IntPtr) 0) |
1082 | enableBody(); | 1082 | enableBody(); |
1083 | //Prim auto disable after 20 frames, | 1083 | //Prim auto disable after 20 frames, |
1084 | //if you move it, re-enable the prim manually. | 1084 | //if you move it, re-enable the prim manually. |
1085 | if (_parent != null) | 1085 | if (_parent != null) |
1086 | { | 1086 | { |
@@ -1102,7 +1102,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1102 | } | 1102 | } |
1103 | } | 1103 | } |
1104 | d.BodyEnable(Body); | 1104 | d.BodyEnable(Body); |
1105 | 1105 | ||
1106 | } | 1106 | } |
1107 | else | 1107 | else |
1108 | { | 1108 | { |
@@ -1122,10 +1122,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1122 | d.SpaceAdd(m_targetSpace, prim_geom); | 1122 | d.SpaceAdd(m_targetSpace, prim_geom); |
1123 | } | 1123 | } |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | 1126 | ||
1127 | changeSelectedStatus(timestep); | 1127 | changeSelectedStatus(timestep); |
1128 | 1128 | ||
1129 | resetCollisionAccounting(); | 1129 | resetCollisionAccounting(); |
1130 | m_taintposition = _position; | 1130 | m_taintposition = _position; |
1131 | } | 1131 | } |
@@ -1140,42 +1140,42 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1140 | { | 1140 | { |
1141 | float PID_D = 2200.0f; | 1141 | float PID_D = 2200.0f; |
1142 | //float PID_P = 900.0f; | 1142 | //float PID_P = 900.0f; |
1143 | 1143 | ||
1144 | 1144 | ||
1145 | float m_mass = CalculateMass(); | 1145 | float m_mass = CalculateMass(); |
1146 | 1146 | ||
1147 | fz = 0f; | 1147 | fz = 0f; |
1148 | //m_log.Info(m_collisionFlags.ToString()); | 1148 | //m_log.Info(m_collisionFlags.ToString()); |
1149 | 1149 | ||
1150 | 1150 | ||
1151 | 1151 | ||
1152 | 1152 | ||
1153 | if (m_buoyancy != 0) | 1153 | if (m_buoyancy != 0) |
1154 | { | 1154 | { |
1155 | 1155 | ||
1156 | if (m_buoyancy > 0) | 1156 | if (m_buoyancy > 0) |
1157 | { | 1157 | { |
1158 | fz = (((-1 * _parent_scene.gravityz) * m_buoyancy) * m_mass); | 1158 | fz = (((-1 * _parent_scene.gravityz) * m_buoyancy) * m_mass); |
1159 | 1159 | ||
1160 | //d.Vector3 l_velocity = d.BodyGetLinearVel(Body); | 1160 | //d.Vector3 l_velocity = d.BodyGetLinearVel(Body); |
1161 | //m_log.Info("Using Buoyancy: " + buoyancy + " G: " + (_parent_scene.gravityz * m_buoyancy) + "mass:" + m_mass + " Pos: " + Position.ToString()); | 1161 | //m_log.Info("Using Buoyancy: " + buoyancy + " G: " + (_parent_scene.gravityz * m_buoyancy) + "mass:" + m_mass + " Pos: " + Position.ToString()); |
1162 | } | 1162 | } |
1163 | else | 1163 | else |
1164 | { | 1164 | { |
1165 | fz = (-1 * (((-1 * _parent_scene.gravityz) * (-1 * m_buoyancy)) * m_mass)); | 1165 | fz = (-1 * (((-1 * _parent_scene.gravityz) * (-1 * m_buoyancy)) * m_mass)); |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | 1168 | ||
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | if (m_usePID) | 1171 | if (m_usePID) |
1172 | { | 1172 | { |
1173 | // If we're using the PID controller, then we have no gravity | 1173 | // If we're using the PID controller, then we have no gravity |
1174 | fz = (-1 * _parent_scene.gravityz) * this.Mass; | 1174 | fz = (-1 * _parent_scene.gravityz) * this.Mass; |
1175 | 1175 | ||
1176 | // no lock; for now it's only called from within Simulate() | 1176 | // no lock; for now it's only called from within Simulate() |
1177 | 1177 | ||
1178 | // If the PID Controller isn't active then we set our force | 1178 | // If the PID Controller isn't active then we set our force |
1179 | // calculating base velocity to the current position | 1179 | // calculating base velocity to the current position |
1180 | if (Environment.OSVersion.Platform == PlatformID.Unix) | 1180 | if (Environment.OSVersion.Platform == PlatformID.Unix) |
1181 | { | 1181 | { |
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1189 | } | 1189 | } |
1190 | PID_D = 35f; | 1190 | PID_D = 35f; |
1191 | 1191 | ||
1192 | 1192 | ||
1193 | //PID_P = 1.0f; | 1193 | //PID_P = 1.0f; |
1194 | float PID_G = 25; | 1194 | float PID_G = 25; |
1195 | 1195 | ||
@@ -1197,7 +1197,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1197 | { | 1197 | { |
1198 | PID_G = PID_G / m_PIDTau; | 1198 | PID_G = PID_G / m_PIDTau; |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | 1201 | ||
1202 | if ((PID_G - m_PIDTau) <= 0) | 1202 | if ((PID_G - m_PIDTau) <= 0) |
1203 | { | 1203 | { |
@@ -1205,15 +1205,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1205 | } | 1205 | } |
1206 | //PidStatus = true; | 1206 | //PidStatus = true; |
1207 | 1207 | ||
1208 | 1208 | ||
1209 | 1209 | ||
1210 | 1210 | ||
1211 | PhysicsVector vec = new PhysicsVector(); | 1211 | PhysicsVector vec = new PhysicsVector(); |
1212 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 1212 | d.Vector3 vel = d.BodyGetLinearVel(Body); |
1213 | 1213 | ||
1214 | 1214 | ||
1215 | d.Vector3 pos = d.BodyGetPosition(Body); | 1215 | d.Vector3 pos = d.BodyGetPosition(Body); |
1216 | _target_velocity = | 1216 | _target_velocity = |
1217 | new PhysicsVector( | 1217 | new PhysicsVector( |
1218 | (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), | 1218 | (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), |
1219 | (m_PIDTarget.Y - pos.Y) * ((PID_G - m_PIDTau) * timestep), | 1219 | (m_PIDTarget.Y - pos.Y) * ((PID_G - m_PIDTau) * timestep), |
@@ -1222,18 +1222,18 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1222 | 1222 | ||
1223 | 1223 | ||
1224 | // if velocity is zero, use position control; otherwise, velocity control | 1224 | // if velocity is zero, use position control; otherwise, velocity control |
1225 | 1225 | ||
1226 | if (_target_velocity.IsIdentical(PhysicsVector.Zero,0.1f)) | 1226 | if (_target_velocity.IsIdentical(PhysicsVector.Zero,0.1f)) |
1227 | { | 1227 | { |
1228 | // keep track of where we stopped. No more slippin' & slidin' | 1228 | // keep track of where we stopped. No more slippin' & slidin' |
1229 | 1229 | ||
1230 | 1230 | ||
1231 | // We only want to deactivate the PID Controller if we think we want to have our surrogate | 1231 | // We only want to deactivate the PID Controller if we think we want to have our surrogate |
1232 | // react to the physics scene by moving it's position. | 1232 | // react to the physics scene by moving it's position. |
1233 | // Avatar to Avatar collisions | 1233 | // Avatar to Avatar collisions |
1234 | // Prim to avatar collisions | 1234 | // Prim to avatar collisions |
1235 | 1235 | ||
1236 | 1236 | ||
1237 | //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); | 1237 | //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); |
1238 | //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); | 1238 | //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); |
1239 | //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; | 1239 | //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; |
@@ -1245,27 +1245,27 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1245 | } | 1245 | } |
1246 | else | 1246 | else |
1247 | { | 1247 | { |
1248 | 1248 | ||
1249 | _zeroFlag = false; | 1249 | _zeroFlag = false; |
1250 | 1250 | ||
1251 | // We're flying and colliding with something | 1251 | // We're flying and colliding with something |
1252 | fx = ((_target_velocity.X) - vel.X) * (PID_D); | 1252 | fx = ((_target_velocity.X) - vel.X) * (PID_D); |
1253 | fy = ((_target_velocity.Y) - vel.Y) * (PID_D); | 1253 | fy = ((_target_velocity.Y) - vel.Y) * (PID_D); |
1254 | |||
1255 | 1254 | ||
1256 | 1255 | ||
1257 | 1256 | ||
1257 | |||
1258 | // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; | 1258 | // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; |
1259 | 1259 | ||
1260 | fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); | 1260 | fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | } | 1263 | } |
1264 | 1264 | ||
1265 | fx *= m_mass; | 1265 | fx *= m_mass; |
1266 | fy *= m_mass; | 1266 | fy *= m_mass; |
1267 | //fz *= m_mass; | 1267 | //fz *= m_mass; |
1268 | 1268 | ||
1269 | //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); | 1269 | //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); |
1270 | if (fx != 0 || fy != 0 || fz != 0) | 1270 | if (fx != 0 || fy != 0 || fz != 0) |
1271 | { | 1271 | { |
@@ -1285,7 +1285,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1285 | 1285 | ||
1286 | public void rotate(float timestep) | 1286 | public void rotate(float timestep) |
1287 | { | 1287 | { |
1288 | 1288 | ||
1289 | 1289 | ||
1290 | d.Quaternion myrot = new d.Quaternion(); | 1290 | d.Quaternion myrot = new d.Quaternion(); |
1291 | myrot.W = _orientation.w; | 1291 | myrot.W = _orientation.w; |
@@ -1299,7 +1299,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1299 | if (!m_angularlock.IsIdentical(new PhysicsVector(1, 1, 1), 0)) | 1299 | if (!m_angularlock.IsIdentical(new PhysicsVector(1, 1, 1), 0)) |
1300 | createAMotor(m_angularlock); | 1300 | createAMotor(m_angularlock); |
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | resetCollisionAccounting(); | 1303 | resetCollisionAccounting(); |
1304 | m_taintrot = _orientation; | 1304 | m_taintrot = _orientation; |
1305 | } | 1305 | } |
@@ -1313,21 +1313,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1313 | 1313 | ||
1314 | public void changedisable(float timestep) | 1314 | public void changedisable(float timestep) |
1315 | { | 1315 | { |
1316 | 1316 | ||
1317 | m_disabled = true; | 1317 | m_disabled = true; |
1318 | if (Body != (IntPtr)0) | 1318 | if (Body != (IntPtr)0) |
1319 | { | 1319 | { |
1320 | d.BodyDisable(Body); | 1320 | d.BodyDisable(Body); |
1321 | Body = (IntPtr)0; | 1321 | Body = (IntPtr)0; |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | 1324 | ||
1325 | m_taintdisable = false; | 1325 | m_taintdisable = false; |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | public void changePhysicsStatus(float timestep) | 1328 | public void changePhysicsStatus(float timestep) |
1329 | { | 1329 | { |
1330 | 1330 | ||
1331 | 1331 | ||
1332 | if (m_isphysical == true) | 1332 | if (m_isphysical == true) |
1333 | { | 1333 | { |
@@ -1352,7 +1352,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1352 | 1352 | ||
1353 | public void changesize(float timestamp) | 1353 | public void changesize(float timestamp) |
1354 | { | 1354 | { |
1355 | 1355 | ||
1356 | //if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) | 1356 | //if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) |
1357 | //{ | 1357 | //{ |
1358 | // m_taintsize = _size; | 1358 | // m_taintsize = _size; |
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1369 | { | 1369 | { |
1370 | // Cleanup meshing here | 1370 | // Cleanup meshing here |
1371 | } | 1371 | } |
1372 | //kill body to rebuild | 1372 | //kill body to rebuild |
1373 | if (IsPhysical && Body != (IntPtr) 0) | 1373 | if (IsPhysical && Body != (IntPtr) 0) |
1374 | { | 1374 | { |
1375 | disableBody(); | 1375 | disableBody(); |
@@ -1531,7 +1531,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1531 | { | 1531 | { |
1532 | m_collisionFlags |= CollisionCategories.Water; | 1532 | m_collisionFlags |= CollisionCategories.Water; |
1533 | } | 1533 | } |
1534 | else | 1534 | else |
1535 | { | 1535 | { |
1536 | m_collisionFlags &= ~CollisionCategories.Water; | 1536 | m_collisionFlags &= ~CollisionCategories.Water; |
1537 | } | 1537 | } |
@@ -1541,7 +1541,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1541 | 1541 | ||
1542 | public void changeshape(float timestamp) | 1542 | public void changeshape(float timestamp) |
1543 | { | 1543 | { |
1544 | 1544 | ||
1545 | string oldname = _parent_scene.geom_name_map[prim_geom]; | 1545 | string oldname = _parent_scene.geom_name_map[prim_geom]; |
1546 | 1546 | ||
1547 | // Cleanup of old prim geometry and Bodies | 1547 | // Cleanup of old prim geometry and Bodies |
@@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1579 | // Re creates body on size. | 1579 | // Re creates body on size. |
1580 | // EnableBody also does setMass() | 1580 | // EnableBody also does setMass() |
1581 | enableBody(); | 1581 | enableBody(); |
1582 | 1582 | ||
1583 | } | 1583 | } |
1584 | } | 1584 | } |
1585 | else | 1585 | else |
@@ -1684,7 +1684,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1684 | d.BodyEnable(Body); | 1684 | d.BodyEnable(Body); |
1685 | } | 1685 | } |
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | 1688 | ||
1689 | _parent_scene.geom_name_map[prim_geom] = oldname; | 1689 | _parent_scene.geom_name_map[prim_geom] = oldname; |
1690 | 1690 | ||
@@ -1698,7 +1698,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1698 | { | 1698 | { |
1699 | if (!m_isSelected) | 1699 | if (!m_isSelected) |
1700 | { | 1700 | { |
1701 | 1701 | ||
1702 | 1702 | ||
1703 | 1703 | ||
1704 | lock (m_forcelist) | 1704 | lock (m_forcelist) |
@@ -1728,7 +1728,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1728 | { | 1728 | { |
1729 | if (!m_isSelected) | 1729 | if (!m_isSelected) |
1730 | { | 1730 | { |
1731 | 1731 | ||
1732 | 1732 | ||
1733 | Thread.Sleep(20); | 1733 | Thread.Sleep(20); |
1734 | if (IsPhysical) | 1734 | if (IsPhysical) |
@@ -1737,8 +1737,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1737 | { | 1737 | { |
1738 | d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); | 1738 | d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); |
1739 | } | 1739 | } |
1740 | } | 1740 | } |
1741 | 1741 | ||
1742 | //resetCollisionAccounting(); | 1742 | //resetCollisionAccounting(); |
1743 | } | 1743 | } |
1744 | m_taintVelocity = PhysicsVector.Zero; | 1744 | m_taintVelocity = PhysicsVector.Zero; |
@@ -1794,7 +1794,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1794 | { | 1794 | { |
1795 | get { return _position; } | 1795 | get { return _position; } |
1796 | 1796 | ||
1797 | set { _position = value; | 1797 | set { _position = value; |
1798 | //m_log.Info("[PHYSICS]: " + _position.ToString()); | 1798 | //m_log.Info("[PHYSICS]: " + _position.ToString()); |
1799 | } | 1799 | } |
1800 | } | 1800 | } |
@@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1838 | { | 1838 | { |
1839 | get | 1839 | get |
1840 | { | 1840 | { |
1841 | // Averate previous velocity with the new one so | 1841 | // Averate previous velocity with the new one so |
1842 | // client object interpolation works a 'little' better | 1842 | // client object interpolation works a 'little' better |
1843 | PhysicsVector returnVelocity = new PhysicsVector(); | 1843 | PhysicsVector returnVelocity = new PhysicsVector(); |
1844 | returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; | 1844 | returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; |
@@ -1849,7 +1849,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1849 | set | 1849 | set |
1850 | { | 1850 | { |
1851 | _velocity = value; | 1851 | _velocity = value; |
1852 | 1852 | ||
1853 | m_taintVelocity = value; | 1853 | m_taintVelocity = value; |
1854 | _parent_scene.AddPhysicsActorTaint(this); | 1854 | _parent_scene.AddPhysicsActorTaint(this); |
1855 | } | 1855 | } |
@@ -1898,11 +1898,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1898 | if (_zeroFlag) | 1898 | if (_zeroFlag) |
1899 | return pv; | 1899 | return pv; |
1900 | m_lastUpdateSent = false; | 1900 | m_lastUpdateSent = false; |
1901 | 1901 | ||
1902 | if (m_rotationalVelocity.IsIdentical(pv, 0.2f)) | 1902 | if (m_rotationalVelocity.IsIdentical(pv, 0.2f)) |
1903 | return pv; | 1903 | return pv; |
1904 | 1904 | ||
1905 | return m_rotationalVelocity; | 1905 | return m_rotationalVelocity; |
1906 | } | 1906 | } |
1907 | set { m_rotationalVelocity = value; } | 1907 | set { m_rotationalVelocity = value; } |
1908 | } | 1908 | } |
@@ -1948,7 +1948,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | public void UpdatePositionAndVelocity() | 1950 | public void UpdatePositionAndVelocity() |
1951 | { | 1951 | { |
1952 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! | 1952 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! |
1953 | if (_parent != null) | 1953 | if (_parent != null) |
1954 | { | 1954 | { |
@@ -1963,7 +1963,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1963 | d.Quaternion ori = d.BodyGetQuaternion(Body); | 1963 | d.Quaternion ori = d.BodyGetQuaternion(Body); |
1964 | d.Vector3 vel = d.BodyGetLinearVel(Body); | 1964 | d.Vector3 vel = d.BodyGetLinearVel(Body); |
1965 | d.Vector3 rotvel = d.BodyGetAngularVel(Body); | 1965 | d.Vector3 rotvel = d.BodyGetAngularVel(Body); |
1966 | 1966 | ||
1967 | PhysicsVector l_position = new PhysicsVector(); | 1967 | PhysicsVector l_position = new PhysicsVector(); |
1968 | 1968 | ||
1969 | // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!) | 1969 | // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!) |
@@ -2000,16 +2000,16 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2000 | 2000 | ||
2001 | if (l_position.Z < 0) | 2001 | if (l_position.Z < 0) |
2002 | { | 2002 | { |
2003 | // This is so prim that get lost underground don't fall forever and suck up | 2003 | // This is so prim that get lost underground don't fall forever and suck up |
2004 | // | 2004 | // |
2005 | // Sim resources and memory. | 2005 | // Sim resources and memory. |
2006 | // Disables the prim's movement physics.... | 2006 | // Disables the prim's movement physics.... |
2007 | // It's a hack and will generate a console message if it fails. | 2007 | // It's a hack and will generate a console message if it fails. |
2008 | 2008 | ||
2009 | //IsPhysical = false; | 2009 | //IsPhysical = false; |
2010 | if (_parent == null) | 2010 | if (_parent == null) |
2011 | base.RaiseOutOfBounds(_position); | 2011 | base.RaiseOutOfBounds(_position); |
2012 | 2012 | ||
2013 | _acceleration.X = 0; | 2013 | _acceleration.X = 0; |
2014 | _acceleration.Y = 0; | 2014 | _acceleration.Y = 0; |
2015 | _acceleration.Z = 0; | 2015 | _acceleration.Z = 0; |
@@ -2020,10 +2020,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2020 | m_rotationalVelocity.X = 0; | 2020 | m_rotationalVelocity.X = 0; |
2021 | m_rotationalVelocity.Y = 0; | 2021 | m_rotationalVelocity.Y = 0; |
2022 | m_rotationalVelocity.Z = 0; | 2022 | m_rotationalVelocity.Z = 0; |
2023 | 2023 | ||
2024 | if (_parent == null) | 2024 | if (_parent == null) |
2025 | base.RequestPhysicsterseUpdate(); | 2025 | base.RequestPhysicsterseUpdate(); |
2026 | 2026 | ||
2027 | m_throttleUpdates = false; | 2027 | m_throttleUpdates = false; |
2028 | throttleCounter = 0; | 2028 | throttleCounter = 0; |
2029 | _zeroFlag = true; | 2029 | _zeroFlag = true; |
@@ -2065,10 +2065,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2065 | m_throttleUpdates = false; | 2065 | m_throttleUpdates = false; |
2066 | throttleCounter = 0; | 2066 | throttleCounter = 0; |
2067 | m_rotationalVelocity = pv; | 2067 | m_rotationalVelocity = pv; |
2068 | 2068 | ||
2069 | if (_parent == null) | 2069 | if (_parent == null) |
2070 | base.RequestPhysicsterseUpdate(); | 2070 | base.RequestPhysicsterseUpdate(); |
2071 | 2071 | ||
2072 | m_lastUpdateSent = true; | 2072 | m_lastUpdateSent = true; |
2073 | } | 2073 | } |
2074 | } | 2074 | } |
@@ -2087,11 +2087,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2087 | _velocity.X = vel.X; | 2087 | _velocity.X = vel.X; |
2088 | _velocity.Y = vel.Y; | 2088 | _velocity.Y = vel.Y; |
2089 | _velocity.Z = vel.Z; | 2089 | _velocity.Z = vel.Z; |
2090 | 2090 | ||
2091 | _acceleration = ((_velocity - m_lastVelocity) / 0.1f); | 2091 | _acceleration = ((_velocity - m_lastVelocity) / 0.1f); |
2092 | _acceleration = new PhysicsVector(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); | 2092 | _acceleration = new PhysicsVector(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); |
2093 | //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); | 2093 | //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); |
2094 | 2094 | ||
2095 | if (_velocity.IsIdentical(pv, 0.5f)) | 2095 | if (_velocity.IsIdentical(pv, 0.5f)) |
2096 | { | 2096 | { |
2097 | m_rotationalVelocity = pv; | 2097 | m_rotationalVelocity = pv; |
@@ -2173,7 +2173,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2173 | { | 2173 | { |
2174 | m_tensor = 5f; | 2174 | m_tensor = 5f; |
2175 | } | 2175 | } |
2176 | 2176 | ||
2177 | float axisnum = 3; | 2177 | float axisnum = 3; |
2178 | 2178 | ||
2179 | axisnum = (axisnum - (axis.X + axis.Y + axis.Z)); | 2179 | axisnum = (axisnum - (axis.X + axis.Y + axis.Z)); |
@@ -2222,7 +2222,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2222 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); | 2222 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); |
2223 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); | 2223 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); |
2224 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); | 2224 | d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); |
2225 | 2225 | ||
2226 | d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); | 2226 | d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); |
2227 | d.JointSetAMotorParam(Amotor, (int)dParam.FMax, m_tensor); | 2227 | d.JointSetAMotorParam(Amotor, (int)dParam.FMax, m_tensor); |
2228 | } | 2228 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index d795e45..c663fb0 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -42,7 +42,7 @@ using OpenSim.Region.Physics.Manager; | |||
42 | namespace OpenSim.Region.Physics.OdePlugin | 42 | namespace OpenSim.Region.Physics.OdePlugin |
43 | { | 43 | { |
44 | /// <summary> | 44 | /// <summary> |
45 | /// ODE plugin | 45 | /// ODE plugin |
46 | /// </summary> | 46 | /// </summary> |
47 | public class OdePlugin : IPhysicsPlugin | 47 | public class OdePlugin : IPhysicsPlugin |
48 | { | 48 | { |
@@ -51,7 +51,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
51 | private CollisionLocker ode; | 51 | private CollisionLocker ode; |
52 | private OdeScene _mScene; | 52 | private OdeScene _mScene; |
53 | 53 | ||
54 | |||
55 | public OdePlugin() | 54 | public OdePlugin() |
56 | { | 55 | { |
57 | ode = new CollisionLocker(); | 56 | ode = new CollisionLocker(); |
@@ -81,15 +80,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
84 | 83 | public enum StatusIndicators : int | |
85 | public enum StatusIndicators : int | ||
86 | { | 84 | { |
87 | Generic = 0, | 85 | Generic = 0, |
88 | Start = 1, | 86 | Start = 1, |
89 | End = 2 | 87 | End = 2 |
90 | } | 88 | } |
91 | 89 | ||
92 | |||
93 | public struct sCollisionData | 90 | public struct sCollisionData |
94 | { | 91 | { |
95 | public uint ColliderLocalId; | 92 | public uint ColliderLocalId; |
@@ -165,7 +162,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
165 | private float mAvatarObjectContactFriction = 75f; | 162 | private float mAvatarObjectContactFriction = 75f; |
166 | private float mAvatarObjectContactBounce = 0.1f; | 163 | private float mAvatarObjectContactBounce = 0.1f; |
167 | 164 | ||
168 | |||
169 | private float avPIDD = 3200f; | 165 | private float avPIDD = 3200f; |
170 | private float avPIDP = 1400f; | 166 | private float avPIDP = 1400f; |
171 | private float avCapRadius = 0.37f; | 167 | private float avCapRadius = 0.37f; |
@@ -175,13 +171,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
175 | private float avMovementDivisorWalk = 1.3f; | 171 | private float avMovementDivisorWalk = 1.3f; |
176 | private float avMovementDivisorRun = 0.8f; | 172 | private float avMovementDivisorRun = 0.8f; |
177 | 173 | ||
178 | |||
179 | private float[] _heightmap; | 174 | private float[] _heightmap; |
180 | 175 | ||
181 | private float[] _watermap; | 176 | private float[] _watermap; |
182 | 177 | ||
183 | private float[] _origheightmap; | 178 | private float[] _origheightmap; |
184 | 179 | ||
185 | private d.NearCallback nearCallback; | 180 | private d.NearCallback nearCallback; |
186 | public d.TriCallback triCallback; | 181 | public d.TriCallback triCallback; |
187 | public d.TriArrayCallback triArrayCallback; | 182 | public d.TriArrayCallback triArrayCallback; |
@@ -200,7 +195,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
200 | private d.Contact AvatarMovementTerrainContact; | 195 | private d.Contact AvatarMovementTerrainContact; |
201 | private d.Contact WaterContact; | 196 | private d.Contact WaterContact; |
202 | 197 | ||
203 | |||
204 | //Ckrinke: Comment out until used. We declare it, initialize it, but do not use it | 198 | //Ckrinke: Comment out until used. We declare it, initialize it, but do not use it |
205 | //Ckrinke private int m_randomizeWater = 200; | 199 | //Ckrinke private int m_randomizeWater = 200; |
206 | private int m_physicsiterations = 10; | 200 | private int m_physicsiterations = 10; |
@@ -233,7 +227,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
233 | 227 | ||
234 | private IConfigSource m_config; | 228 | private IConfigSource m_config; |
235 | 229 | ||
236 | |||
237 | /// <summary> | 230 | /// <summary> |
238 | /// Initiailizes the scene | 231 | /// Initiailizes the scene |
239 | /// Sets many properties that ODE requires to be stable | 232 | /// Sets many properties that ODE requires to be stable |
@@ -245,44 +238,34 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
245 | nearCallback = near; | 238 | nearCallback = near; |
246 | triCallback = TriCallback; | 239 | triCallback = TriCallback; |
247 | triArrayCallback = TriArrayCallback; | 240 | triArrayCallback = TriArrayCallback; |
248 | |||
249 | |||
250 | |||
251 | 241 | ||
252 | lock (OdeLock) | 242 | lock (OdeLock) |
253 | { | 243 | { |
254 | 244 | // Create the world and the first space | |
255 | // Creat the world and the first space | ||
256 | world = d.WorldCreate(); | 245 | world = d.WorldCreate(); |
257 | space = d.HashSpaceCreate(IntPtr.Zero); | 246 | space = d.HashSpaceCreate(IntPtr.Zero); |
258 | 247 | ||
259 | contactgroup = d.JointGroupCreate(0); | 248 | contactgroup = d.JointGroupCreate(0); |
260 | //contactgroup | 249 | //contactgroup |
261 | 250 | ||
262 | |||
263 | |||
264 | |||
265 | d.WorldSetAutoDisableFlag(world, false); | 251 | d.WorldSetAutoDisableFlag(world, false); |
266 | |||
267 | } | 252 | } |
268 | 253 | ||
269 | // zero out a heightmap array float array (single dimention [flattened])) | 254 | // zero out a heightmap array float array (single dimention [flattened])) |
270 | _heightmap = new float[514*514]; | 255 | _heightmap = new float[514*514]; |
271 | _watermap = new float[258 * 258]; | 256 | _watermap = new float[258 * 258]; |
272 | 257 | ||
273 | // Zero out the prim spaces array (we split our space into smaller spaces so | 258 | // Zero out the prim spaces array (we split our space into smaller spaces so |
274 | // we can hit test less. | 259 | // we can hit test less. |
275 | |||
276 | } | 260 | } |
277 | 261 | ||
278 | |||
279 | // Initialize the mesh plugin | 262 | // Initialize the mesh plugin |
280 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | 263 | public override void Initialise(IMesher meshmerizer, IConfigSource config) |
281 | { | 264 | { |
282 | mesher = meshmerizer; | 265 | mesher = meshmerizer; |
283 | m_config = config; | 266 | m_config = config; |
284 | // Defaults | 267 | // Defaults |
285 | 268 | ||
286 | if (Environment.OSVersion.Platform == PlatformID.Unix) | 269 | if (Environment.OSVersion.Platform == PlatformID.Unix) |
287 | { | 270 | { |
288 | avPIDD = 3200.0f; | 271 | avPIDD = 3200.0f; |
@@ -349,10 +332,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
349 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f); | 332 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f); |
350 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f); | 333 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f); |
351 | } | 334 | } |
352 | |||
353 | |||
354 | } | 335 | } |
355 | |||
356 | } | 336 | } |
357 | 337 | ||
358 | staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; | 338 | staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; |
@@ -361,8 +341,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
361 | contact.surface.mu = nmAvatarObjectContactFriction; | 341 | contact.surface.mu = nmAvatarObjectContactFriction; |
362 | contact.surface.bounce = nmAvatarObjectContactBounce; | 342 | contact.surface.bounce = nmAvatarObjectContactBounce; |
363 | 343 | ||
364 | // Terrain contact friction and Bounce | 344 | // Terrain contact friction and Bounce |
365 | // This is the *non* moving version. Use this when an avatar | 345 | // This is the *non* moving version. Use this when an avatar |
366 | // isn't moving to keep it in place better | 346 | // isn't moving to keep it in place better |
367 | TerrainContact.surface.mode |= d.ContactFlags.SoftERP; | 347 | TerrainContact.surface.mode |= d.ContactFlags.SoftERP; |
368 | TerrainContact.surface.mu = nmTerrainContactFriction; | 348 | TerrainContact.surface.mu = nmTerrainContactFriction; |
@@ -376,7 +356,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
376 | WaterContact.surface.soft_erp = 0.010f; | 356 | WaterContact.surface.soft_erp = 0.010f; |
377 | 357 | ||
378 | // Prim contact friction and bounce | 358 | // Prim contact friction and bounce |
379 | // THis is the *non* moving version of friction and bounce | 359 | // THis is the *non* moving version of friction and bounce |
380 | // Use this when an avatar comes in contact with a prim | 360 | // Use this when an avatar comes in contact with a prim |
381 | // and is moving | 361 | // and is moving |
382 | AvatarMovementprimContact.surface.mu = mAvatarObjectContactFriction; | 362 | AvatarMovementprimContact.surface.mu = mAvatarObjectContactFriction; |
@@ -409,7 +389,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
409 | staticPrimspace[i, j] = IntPtr.Zero; | 389 | staticPrimspace[i, j] = IntPtr.Zero; |
410 | } | 390 | } |
411 | } | 391 | } |
412 | |||
413 | } | 392 | } |
414 | 393 | ||
415 | internal void waitForSpaceUnlock(IntPtr space) | 394 | internal void waitForSpaceUnlock(IntPtr space) |
@@ -439,17 +418,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
439 | private void near(IntPtr space, IntPtr g1, IntPtr g2) | 418 | private void near(IntPtr space, IntPtr g1, IntPtr g2) |
440 | { | 419 | { |
441 | // no lock here! It's invoked from within Simulate(), which is thread-locked | 420 | // no lock here! It's invoked from within Simulate(), which is thread-locked |
442 | 421 | ||
443 | // Test if we're collidng a geom with a space. | 422 | // Test if we're colliding a geom with a space. |
444 | // If so we have to drill down into the space recursively | 423 | // If so we have to drill down into the space recursively |
445 | 424 | ||
446 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) | 425 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) |
447 | { | 426 | { |
448 | if (g1 == (IntPtr)0 || g2 == (IntPtr)0) | 427 | if (g1 == (IntPtr)0 || g2 == (IntPtr)0) |
449 | return; | 428 | return; |
450 | // Separating static prim geometry spaces. | 429 | // Separating static prim geometry spaces. |
451 | // We'll be calling near recursivly if one | 430 | // We'll be calling near recursivly if one |
452 | // of them is a space to find all of the | 431 | // of them is a space to find all of the |
453 | // contact points in the space | 432 | // contact points in the space |
454 | try | 433 | try |
455 | { | 434 | { |
@@ -462,13 +441,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
462 | } | 441 | } |
463 | //Colliding a space or a geom with a space or a geom. so drill down | 442 | //Colliding a space or a geom with a space or a geom. so drill down |
464 | 443 | ||
465 | //Collide all geoms in each space.. | 444 | //Collide all geoms in each space.. |
466 | //if (d.GeomIsSpace(g1)) d.SpaceCollide(g1, IntPtr.Zero, nearCallback); | 445 | //if (d.GeomIsSpace(g1)) d.SpaceCollide(g1, IntPtr.Zero, nearCallback); |
467 | //if (d.GeomIsSpace(g2)) d.SpaceCollide(g2, IntPtr.Zero, nearCallback); | 446 | //if (d.GeomIsSpace(g2)) d.SpaceCollide(g2, IntPtr.Zero, nearCallback); |
468 | return; | 447 | return; |
469 | } | 448 | } |
470 | 449 | ||
471 | |||
472 | if (g1 == (IntPtr)0 || g2 == (IntPtr)0) | 450 | if (g1 == (IntPtr)0 || g2 == (IntPtr)0) |
473 | return; | 451 | return; |
474 | 452 | ||
@@ -499,23 +477,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
499 | int count = 0; | 477 | int count = 0; |
500 | try | 478 | try |
501 | { | 479 | { |
502 | |||
503 | // Colliding Geom To Geom | 480 | // Colliding Geom To Geom |
504 | // This portion of the function 'was' blatantly ripped off from BoxStack.cs | 481 | // This portion of the function 'was' blatantly ripped off from BoxStack.cs |
505 | |||
506 | |||
507 | |||
508 | 482 | ||
509 | if (g1 == g2) | 483 | if (g1 == g2) |
510 | return; // Can't collide with yourself | 484 | return; // Can't collide with yourself |
511 | 485 | ||
512 | if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) | 486 | if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) |
513 | return; | 487 | return; |
514 | 488 | ||
515 | lock (contacts) | 489 | lock (contacts) |
516 | { | 490 | { |
517 | |||
518 | |||
519 | count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.SizeOf); | 491 | count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.SizeOf); |
520 | } | 492 | } |
521 | } | 493 | } |
@@ -527,7 +499,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
527 | } | 499 | } |
528 | catch (AccessViolationException) | 500 | catch (AccessViolationException) |
529 | { | 501 | { |
530 | 502 | ||
531 | m_log.Warn("[PHYSICS]: Unable to collide test an object"); | 503 | m_log.Warn("[PHYSICS]: Unable to collide test an object"); |
532 | return; | 504 | return; |
533 | } | 505 | } |
@@ -539,6 +511,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
539 | { | 511 | { |
540 | p1 = PANull; | 512 | p1 = PANull; |
541 | } | 513 | } |
514 | |||
542 | if (!actor_name_map.TryGetValue(g2, out p2)) | 515 | if (!actor_name_map.TryGetValue(g2, out p2)) |
543 | { | 516 | { |
544 | p2 = PANull; | 517 | p2 = PANull; |
@@ -554,14 +527,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
554 | // If we're colliding with terrain, use 'TerrainContact' instead of contact. | 527 | // If we're colliding with terrain, use 'TerrainContact' instead of contact. |
555 | // allows us to have different settings | 528 | // allows us to have different settings |
556 | 529 | ||
557 | |||
558 | |||
559 | // We only need to test p2 for 'jump crouch purposes' | 530 | // We only need to test p2 for 'jump crouch purposes' |
560 | p2.IsColliding = true; | 531 | p2.IsColliding = true; |
561 | 532 | ||
562 | //if ((framecount % m_returncollisions) == 0) | 533 | //if ((framecount % m_returncollisions) == 0) |
563 | |||
564 | |||
565 | 534 | ||
566 | switch (p1.PhysicsActorType) | 535 | switch (p1.PhysicsActorType) |
567 | { | 536 | { |
@@ -588,41 +557,39 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
588 | { | 557 | { |
589 | //This is disabled at the moment only because it needs more tweaking | 558 | //This is disabled at the moment only because it needs more tweaking |
590 | //It will eventually be uncommented | 559 | //It will eventually be uncommented |
591 | 560 | ||
592 | if (contacts[i].depth >= 1.00f) | 561 | if (contacts[i].depth >= 1.00f) |
593 | { | 562 | { |
594 | //m_log.Debug("[PHYSICS]: " + contacts[i].depth.ToString()); | 563 | //m_log.Debug("[PHYSICS]: " + contacts[i].depth.ToString()); |
595 | } | 564 | } |
596 | 565 | ||
597 | //If you interpenetrate a prim with an agent | 566 | //If you interpenetrate a prim with an agent |
598 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && | 567 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && |
599 | p1.PhysicsActorType == (int) ActorTypes.Prim) || | 568 | p1.PhysicsActorType == (int) ActorTypes.Prim) || |
600 | (p1.PhysicsActorType == (int) ActorTypes.Agent && | 569 | (p1.PhysicsActorType == (int) ActorTypes.Agent && |
601 | p2.PhysicsActorType == (int) ActorTypes.Prim)) | 570 | p2.PhysicsActorType == (int) ActorTypes.Prim)) |
602 | { | 571 | { |
603 | |||
604 | |||
605 | # region disabled code1 | 572 | # region disabled code1 |
606 | //contacts[i].depth = contacts[i].depth * 4.15f; | 573 | //contacts[i].depth = contacts[i].depth * 4.15f; |
607 | /* | 574 | /* |
608 | if (p2.PhysicsActorType == (int) ActorTypes.Agent) | 575 | if (p2.PhysicsActorType == (int) ActorTypes.Agent) |
609 | { | 576 | { |
610 | p2.CollidingObj = true; | 577 | p2.CollidingObj = true; |
611 | contacts[i].depth = 0.003f; | 578 | contacts[i].depth = 0.003f; |
612 | p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); | 579 | p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); |
613 | OdeCharacter character = (OdeCharacter) p2; | 580 | OdeCharacter character = (OdeCharacter) p2; |
614 | character.SetPidStatus(true); | 581 | character.SetPidStatus(true); |
615 | contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); | 582 | contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); |
616 | 583 | ||
617 | } | 584 | } |
618 | else | 585 | else |
619 | { | 586 | { |
620 | 587 | ||
621 | //contacts[i].depth = 0.0000000f; | 588 | //contacts[i].depth = 0.0000000f; |
622 | } | 589 | } |
623 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) | 590 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) |
624 | { | 591 | { |
625 | 592 | ||
626 | p1.CollidingObj = true; | 593 | p1.CollidingObj = true; |
627 | contacts[i].depth = 0.003f; | 594 | contacts[i].depth = 0.003f; |
628 | p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); | 595 | p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); |
@@ -632,14 +599,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
632 | } | 599 | } |
633 | else | 600 | else |
634 | { | 601 | { |
635 | 602 | ||
636 | //contacts[i].depth = 0.0000000f; | 603 | //contacts[i].depth = 0.0000000f; |
637 | } | 604 | } |
638 | */ | 605 | */ |
639 | #endregion | 606 | #endregion |
640 | |||
641 | } | 607 | } |
642 | |||
643 | 608 | ||
644 | // If you interpenetrate a prim with another prim | 609 | // If you interpenetrate a prim with another prim |
645 | if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) | 610 | if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) |
@@ -649,7 +614,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
649 | //OdePrim op2 = (OdePrim)p2; | 614 | //OdePrim op2 = (OdePrim)p2; |
650 | //op1.m_collisionscore++; | 615 | //op1.m_collisionscore++; |
651 | //op2.m_collisionscore++; | 616 | //op2.m_collisionscore++; |
652 | |||
653 | 617 | ||
654 | //if (op1.m_collisionscore > 8000 || op2.m_collisionscore > 8000) | 618 | //if (op1.m_collisionscore > 8000 || op2.m_collisionscore > 8000) |
655 | //{ | 619 | //{ |
@@ -658,11 +622,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
658 | //op2.m_taintdisable = true; | 622 | //op2.m_taintdisable = true; |
659 | //AddPhysicsActorTaint(p2); | 623 | //AddPhysicsActorTaint(p2); |
660 | //} | 624 | //} |
661 | 625 | ||
662 | //if (contacts[i].depth >= 0.25f) | 626 | //if (contacts[i].depth >= 0.25f) |
663 | //{ | 627 | //{ |
664 | // Don't collide, one or both prim will expld. | 628 | // Don't collide, one or both prim will expld. |
665 | |||
666 | 629 | ||
667 | //op1.m_interpenetrationcount++; | 630 | //op1.m_interpenetrationcount++; |
668 | //op2.m_interpenetrationcount++; | 631 | //op2.m_interpenetrationcount++; |
@@ -678,17 +641,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
678 | //AddPhysicsActorTaint(p2); | 641 | //AddPhysicsActorTaint(p2); |
679 | //} | 642 | //} |
680 | 643 | ||
681 | |||
682 | //contacts[i].depth = contacts[i].depth / 8f; | 644 | //contacts[i].depth = contacts[i].depth / 8f; |
683 | //contacts[i].normal = new d.Vector3(0, 0, 1); | 645 | //contacts[i].normal = new d.Vector3(0, 0, 1); |
684 | //} | 646 | //} |
685 | //if (op1.m_disabled || op2.m_disabled) | 647 | //if (op1.m_disabled || op2.m_disabled) |
686 | //{ | 648 | //{ |
687 | //Manually disabled objects stay disabled | 649 | //Manually disabled objects stay disabled |
688 | //contacts[i].depth = 0f; | 650 | //contacts[i].depth = 0f; |
689 | //} | 651 | //} |
690 | #endregion | 652 | #endregion |
691 | } | 653 | } |
654 | |||
692 | if (contacts[i].depth >= 1.00f) | 655 | if (contacts[i].depth >= 1.00f) |
693 | { | 656 | { |
694 | //m_log.Info("[P]: " + contacts[i].depth.ToString()); | 657 | //m_log.Info("[P]: " + contacts[i].depth.ToString()); |
@@ -713,6 +676,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
713 | else | 676 | else |
714 | { | 677 | { |
715 | } | 678 | } |
679 | |||
716 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) | 680 | if (p1.PhysicsActorType == (int) ActorTypes.Agent) |
717 | { | 681 | { |
718 | OdeCharacter character = (OdeCharacter)p1; | 682 | OdeCharacter character = (OdeCharacter)p1; |
@@ -738,7 +702,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
738 | 702 | ||
739 | if (contacts[i].depth >= 0f) | 703 | if (contacts[i].depth >= 0f) |
740 | { | 704 | { |
741 | // If we're collidng against terrain | 705 | // If we're colliding against terrain |
742 | if (name1 == "Terrain" || name2 == "Terrain") | 706 | if (name1 == "Terrain" || name2 == "Terrain") |
743 | { | 707 | { |
744 | // If we're moving | 708 | // If we're moving |
@@ -760,12 +724,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
760 | { | 724 | { |
761 | if ((p2.PhysicsActorType == (int)ActorTypes.Prim)) | 725 | if ((p2.PhysicsActorType == (int)ActorTypes.Prim)) |
762 | { | 726 | { |
763 | |||
764 | } | 727 | } |
765 | else | 728 | else |
766 | { | 729 | { |
767 | |||
768 | } | 730 | } |
731 | |||
769 | //WaterContact.surface.soft_cfm = 0.0000f; | 732 | //WaterContact.surface.soft_cfm = 0.0000f; |
770 | //WaterContact.surface.soft_erp = 0.00000f; | 733 | //WaterContact.surface.soft_erp = 0.00000f; |
771 | if (contacts[i].depth > 0.1f) | 734 | if (contacts[i].depth > 0.1f) |
@@ -775,7 +738,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
775 | //contacts[i].pos = new d.Vector3(0, 0, contacts[i].pos.Z - 5f); | 738 | //contacts[i].pos = new d.Vector3(0, 0, contacts[i].pos.Z - 5f); |
776 | } | 739 | } |
777 | WaterContact.geom = contacts[i]; | 740 | WaterContact.geom = contacts[i]; |
778 | 741 | ||
779 | joint = d.JointCreateContact(world, contactgroup, ref WaterContact); | 742 | joint = d.JointCreateContact(world, contactgroup, ref WaterContact); |
780 | 743 | ||
781 | //m_log.Info("[PHYSICS]: Prim Water Contact" + contacts[i].depth); | 744 | //m_log.Info("[PHYSICS]: Prim Water Contact" + contacts[i].depth); |
@@ -806,7 +769,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
806 | { | 769 | { |
807 | // If there are more then 3 contact points, it's likely | 770 | // If there are more then 3 contact points, it's likely |
808 | // that we've got a pile of objects | 771 | // that we've got a pile of objects |
809 | // | 772 | // |
810 | // We don't want to send out hundreds of terse updates over and over again | 773 | // We don't want to send out hundreds of terse updates over and over again |
811 | // so lets throttle them and send them again after it's somewhat sorted out. | 774 | // so lets throttle them and send them again after it's somewhat sorted out. |
812 | p2.ThrottleUpdates = true; | 775 | p2.ThrottleUpdates = true; |
@@ -814,7 +777,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
814 | //System.Console.WriteLine(count.ToString()); | 777 | //System.Console.WriteLine(count.ToString()); |
815 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); | 778 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); |
816 | } | 779 | } |
817 | |||
818 | } | 780 | } |
819 | 781 | ||
820 | private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth) | 782 | private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth) |
@@ -831,7 +793,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
831 | { | 793 | { |
832 | case ActorTypes.Agent: | 794 | case ActorTypes.Agent: |
833 | cc2 = (OdeCharacter)p2; | 795 | cc2 = (OdeCharacter)p2; |
834 | 796 | ||
835 | obj1LocalID = cc2.m_localID; | 797 | obj1LocalID = cc2.m_localID; |
836 | switch ((ActorTypes)p1.PhysicsActorType) | 798 | switch ((ActorTypes)p1.PhysicsActorType) |
837 | { | 799 | { |
@@ -840,7 +802,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
840 | obj2LocalID = cc1.m_localID; | 802 | obj2LocalID = cc1.m_localID; |
841 | cc1.AddCollisionEvent(cc2.m_localID, collisiondepth); | 803 | cc1.AddCollisionEvent(cc2.m_localID, collisiondepth); |
842 | //ctype = (int)CollisionCategories.Character; | 804 | //ctype = (int)CollisionCategories.Character; |
843 | 805 | ||
844 | //if (cc1.CollidingObj) | 806 | //if (cc1.CollidingObj) |
845 | //cStartStop = (int)StatusIndicators.Generic; | 807 | //cStartStop = (int)StatusIndicators.Generic; |
846 | //else | 808 | //else |
@@ -858,7 +820,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
858 | //cStartStop = (int)StatusIndicators.Generic; | 820 | //cStartStop = (int)StatusIndicators.Generic; |
859 | //else | 821 | //else |
860 | //cStartStop = (int)StatusIndicators.Start; | 822 | //cStartStop = (int)StatusIndicators.Start; |
861 | 823 | ||
862 | //returncollisions = true; | 824 | //returncollisions = true; |
863 | break; | 825 | break; |
864 | 826 | ||
@@ -869,14 +831,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
869 | //returncollisions = true; | 831 | //returncollisions = true; |
870 | break; | 832 | break; |
871 | } | 833 | } |
872 | |||
873 | 834 | ||
874 | |||
875 | cc2.AddCollisionEvent(obj2LocalID, collisiondepth); | 835 | cc2.AddCollisionEvent(obj2LocalID, collisiondepth); |
876 | break; | 836 | break; |
877 | case ActorTypes.Prim: | 837 | case ActorTypes.Prim: |
878 | cp2 = (OdePrim)p2; | 838 | cp2 = (OdePrim)p2; |
879 | 839 | ||
880 | obj1LocalID = cp2.m_localID; | 840 | obj1LocalID = cp2.m_localID; |
881 | switch ((ActorTypes)p1.PhysicsActorType) | 841 | switch ((ActorTypes)p1.PhysicsActorType) |
882 | { | 842 | { |
@@ -891,7 +851,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
891 | //else | 851 | //else |
892 | //cStartStop = (int)StatusIndicators.Start; | 852 | //cStartStop = (int)StatusIndicators.Start; |
893 | //returncollisions = true; | 853 | //returncollisions = true; |
894 | 854 | ||
895 | break; | 855 | break; |
896 | case ActorTypes.Prim: | 856 | case ActorTypes.Prim: |
897 | cp1 = (OdePrim)p1; | 857 | cp1 = (OdePrim)p1; |
@@ -903,7 +863,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
903 | //cStartStop = (int)StatusIndicators.Generic; | 863 | //cStartStop = (int)StatusIndicators.Generic; |
904 | //else | 864 | //else |
905 | //cStartStop = (int)StatusIndicators.Start; | 865 | //cStartStop = (int)StatusIndicators.Start; |
906 | 866 | ||
907 | //returncollisions = true; | 867 | //returncollisions = true; |
908 | break; | 868 | break; |
909 | 869 | ||
@@ -911,11 +871,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
911 | case ActorTypes.Unknown: | 871 | case ActorTypes.Unknown: |
912 | obj2LocalID = 0; | 872 | obj2LocalID = 0; |
913 | //ctype = (int)CollisionCategories.Land; | 873 | //ctype = (int)CollisionCategories.Land; |
914 | 874 | ||
915 | //returncollisions = true; | 875 | //returncollisions = true; |
916 | break; | 876 | break; |
917 | } | 877 | } |
918 | 878 | ||
919 | cp2.AddCollisionEvent(obj2LocalID, collisiondepth); | 879 | cp2.AddCollisionEvent(obj2LocalID, collisiondepth); |
920 | break; | 880 | break; |
921 | } | 881 | } |
@@ -999,7 +959,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
999 | /// <param name="timeStep"></param> | 959 | /// <param name="timeStep"></param> |
1000 | private void collision_optimized(float timeStep) | 960 | private void collision_optimized(float timeStep) |
1001 | { | 961 | { |
1002 | 962 | ||
1003 | foreach (OdeCharacter chr in _characters) | 963 | foreach (OdeCharacter chr in _characters) |
1004 | { | 964 | { |
1005 | // Reset the collision values to false | 965 | // Reset the collision values to false |
@@ -1008,7 +968,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1008 | chr.IsColliding = false; | 968 | chr.IsColliding = false; |
1009 | chr.CollidingGround = false; | 969 | chr.CollidingGround = false; |
1010 | chr.CollidingObj = false; | 970 | chr.CollidingObj = false; |
1011 | 971 | ||
1012 | // test the avatar's geometry for collision with the space | 972 | // test the avatar's geometry for collision with the space |
1013 | // This will return near and the space that they are the closest to | 973 | // This will return near and the space that they are the closest to |
1014 | // And we'll run this again against the avatar and the space segment | 974 | // And we'll run this again against the avatar and the space segment |
@@ -1029,15 +989,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1029 | //forcedZ = true; | 989 | //forcedZ = true; |
1030 | //} | 990 | //} |
1031 | } | 991 | } |
1032 | |||
1033 | 992 | ||
1034 | |||
1035 | lock (_activeprims) | 993 | lock (_activeprims) |
1036 | { | 994 | { |
1037 | |||
1038 | foreach (OdePrim chr in _activeprims) | 995 | foreach (OdePrim chr in _activeprims) |
1039 | { | 996 | { |
1040 | |||
1041 | if (d.BodyIsEnabled(chr.Body) && (!chr.m_disabled)) | 997 | if (d.BodyIsEnabled(chr.Body) && (!chr.m_disabled)) |
1042 | { | 998 | { |
1043 | try | 999 | try |
@@ -1049,18 +1005,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1049 | else | 1005 | else |
1050 | m_log.Debug("[PHYSICS]: unable to collide test active prim against space. The space was zero, the geom was zero or it was in the process of being removed"); | 1006 | m_log.Debug("[PHYSICS]: unable to collide test active prim against space. The space was zero, the geom was zero or it was in the process of being removed"); |
1051 | } | 1007 | } |
1052 | |||
1053 | } | 1008 | } |
1054 | catch (AccessViolationException) | 1009 | catch (AccessViolationException) |
1055 | { | 1010 | { |
1056 | m_log.Warn("[PHYSICS]: Unable to space collide"); | 1011 | m_log.Warn("[PHYSICS]: Unable to space collide"); |
1057 | } | 1012 | } |
1058 | |||
1059 | } | 1013 | } |
1060 | |||
1061 | } | 1014 | } |
1062 | } | 1015 | } |
1063 | |||
1064 | } | 1016 | } |
1065 | 1017 | ||
1066 | #endregion | 1018 | #endregion |
@@ -1077,7 +1029,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1077 | { | 1029 | { |
1078 | if (!_collisionEventPrim.Contains(obj)) | 1030 | if (!_collisionEventPrim.Contains(obj)) |
1079 | _collisionEventPrim.Add(obj); | 1031 | _collisionEventPrim.Add(obj); |
1080 | |||
1081 | } | 1032 | } |
1082 | } | 1033 | } |
1083 | 1034 | ||
@@ -1090,7 +1041,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1090 | } | 1041 | } |
1091 | } | 1042 | } |
1092 | 1043 | ||
1093 | |||
1094 | #region Add/Remove Entities | 1044 | #region Add/Remove Entities |
1095 | 1045 | ||
1096 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 1046 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) |
@@ -1131,8 +1081,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1131 | rot.y = rotation.y; | 1081 | rot.y = rotation.y; |
1132 | rot.z = rotation.z; | 1082 | rot.z = rotation.z; |
1133 | 1083 | ||
1134 | |||
1135 | |||
1136 | OdePrim newPrim; | 1084 | OdePrim newPrim; |
1137 | lock (OdeLock) | 1085 | lock (OdeLock) |
1138 | { | 1086 | { |
@@ -1141,7 +1089,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1141 | _prims.Add(newPrim); | 1089 | _prims.Add(newPrim); |
1142 | } | 1090 | } |
1143 | 1091 | ||
1144 | |||
1145 | return newPrim; | 1092 | return newPrim; |
1146 | } | 1093 | } |
1147 | 1094 | ||
@@ -1178,11 +1125,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1178 | 1125 | ||
1179 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); | 1126 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); |
1180 | 1127 | ||
1181 | |||
1182 | return result; | 1128 | return result; |
1183 | } | 1129 | } |
1184 | 1130 | ||
1185 | |||
1186 | public void remActivePrim(OdePrim deactivatePrim) | 1131 | public void remActivePrim(OdePrim deactivatePrim) |
1187 | { | 1132 | { |
1188 | lock (_activeprims) | 1133 | lock (_activeprims) |
@@ -1210,8 +1155,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1210 | /// This is called from within simulate but outside the locked portion | 1155 | /// This is called from within simulate but outside the locked portion |
1211 | /// We need to do our own locking here | 1156 | /// We need to do our own locking here |
1212 | /// Essentially, we need to remove the prim from our space segment, whatever segment it's in. | 1157 | /// Essentially, we need to remove the prim from our space segment, whatever segment it's in. |
1213 | /// | 1158 | /// |
1214 | /// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory | 1159 | /// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory |
1215 | /// that the space was using. | 1160 | /// that the space was using. |
1216 | /// </summary> | 1161 | /// </summary> |
1217 | /// <param name="prim"></param> | 1162 | /// <param name="prim"></param> |
@@ -1226,7 +1171,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1226 | { | 1171 | { |
1227 | prim.ResetTaints(); | 1172 | prim.ResetTaints(); |
1228 | 1173 | ||
1229 | |||
1230 | if (prim.IsPhysical) | 1174 | if (prim.IsPhysical) |
1231 | { | 1175 | { |
1232 | prim.disableBody(); | 1176 | prim.disableBody(); |
@@ -1267,7 +1211,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1267 | { | 1211 | { |
1268 | m_log.Warn("[PHYSICS]: Unable to remove prim from physics scene"); | 1212 | m_log.Warn("[PHYSICS]: Unable to remove prim from physics scene"); |
1269 | } | 1213 | } |
1270 | |||
1271 | } | 1214 | } |
1272 | catch (AccessViolationException) | 1215 | catch (AccessViolationException) |
1273 | { | 1216 | { |
@@ -1297,8 +1240,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1297 | //} | 1240 | //} |
1298 | //} | 1241 | //} |
1299 | } | 1242 | } |
1300 | |||
1301 | |||
1302 | } | 1243 | } |
1303 | } | 1244 | } |
1304 | } | 1245 | } |
@@ -1337,12 +1278,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1337 | /// <returns>a pointer to the new space it's in</returns> | 1278 | /// <returns>a pointer to the new space it's in</returns> |
1338 | public IntPtr recalculateSpaceForGeom(IntPtr geom, PhysicsVector pos, IntPtr currentspace) | 1279 | public IntPtr recalculateSpaceForGeom(IntPtr geom, PhysicsVector pos, IntPtr currentspace) |
1339 | { | 1280 | { |
1340 | 1281 | // Called from setting the Position and Size of an ODEPrim so | |
1341 | // Called from setting the Position and Size of an ODEPrim so | ||
1342 | // it's already in locked space. | 1282 | // it's already in locked space. |
1343 | 1283 | ||
1344 | // we don't want to remove the main space | 1284 | // we don't want to remove the main space |
1345 | // we don't need to test physical here because this function should | 1285 | // we don't need to test physical here because this function should |
1346 | // never be called if the prim is physical(active) | 1286 | // never be called if the prim is physical(active) |
1347 | 1287 | ||
1348 | // All physical prim end up in the root space | 1288 | // All physical prim end up in the root space |
@@ -1399,7 +1339,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1399 | waitForSpaceUnlock(space); | 1339 | waitForSpaceUnlock(space); |
1400 | d.SpaceRemove(space, currentspace); | 1340 | d.SpaceRemove(space, currentspace); |
1401 | // free up memory used by the space. | 1341 | // free up memory used by the space. |
1402 | 1342 | ||
1403 | //d.SpaceDestroy(currentspace); | 1343 | //d.SpaceDestroy(currentspace); |
1404 | resetSpaceArrayItemToZero(currentspace); | 1344 | resetSpaceArrayItemToZero(currentspace); |
1405 | } | 1345 | } |
@@ -1418,7 +1358,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1418 | { | 1358 | { |
1419 | if (d.SpaceQuery(currentspace, geom)) | 1359 | if (d.SpaceQuery(currentspace, geom)) |
1420 | { | 1360 | { |
1421 | |||
1422 | if (d.GeomIsSpace(currentspace)) | 1361 | if (d.GeomIsSpace(currentspace)) |
1423 | { | 1362 | { |
1424 | waitForSpaceUnlock(currentspace); | 1363 | waitForSpaceUnlock(currentspace); |
@@ -1453,8 +1392,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1453 | } | 1392 | } |
1454 | } | 1393 | } |
1455 | 1394 | ||
1456 | // The routines in the Position and Size sections do the 'inserting' into the space, | 1395 | // The routines in the Position and Size sections do the 'inserting' into the space, |
1457 | // so all we have to do is make sure that the space that we're putting the prim into | 1396 | // so all we have to do is make sure that the space that we're putting the prim into |
1458 | // is in the 'main' space. | 1397 | // is in the 'main' space. |
1459 | int[] iprimspaceArrItem = calculateSpaceArrayItemFromPos(pos); | 1398 | int[] iprimspaceArrItem = calculateSpaceArrayItemFromPos(pos); |
1460 | IntPtr newspace = calculateSpaceForGeom(pos); | 1399 | IntPtr newspace = calculateSpaceForGeom(pos); |
@@ -1492,11 +1431,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1492 | public IntPtr calculateSpaceForGeom(PhysicsVector pos) | 1431 | public IntPtr calculateSpaceForGeom(PhysicsVector pos) |
1493 | { | 1432 | { |
1494 | IntPtr locationbasedspace =IntPtr.Zero; | 1433 | IntPtr locationbasedspace =IntPtr.Zero; |
1495 | 1434 | ||
1496 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); | 1435 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); |
1497 | //m_log.Info("[Physics]: Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); | 1436 | //m_log.Info("[Physics]: Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); |
1498 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; | 1437 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; |
1499 | 1438 | ||
1500 | //locationbasedspace = space; | 1439 | //locationbasedspace = space; |
1501 | return locationbasedspace; | 1440 | return locationbasedspace; |
1502 | } | 1441 | } |
@@ -1523,13 +1462,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1523 | if (returnint[1] < 0) | 1462 | if (returnint[1] < 0) |
1524 | returnint[1] = 0; | 1463 | returnint[1] = 0; |
1525 | 1464 | ||
1526 | |||
1527 | return returnint; | 1465 | return returnint; |
1528 | } | 1466 | } |
1529 | #endregion | ||
1530 | |||
1531 | |||
1532 | 1467 | ||
1468 | #endregion | ||
1533 | 1469 | ||
1534 | /// <summary> | 1470 | /// <summary> |
1535 | /// Routine to figure out if we need to mesh this prim with our mesher | 1471 | /// Routine to figure out if we need to mesh this prim with our mesher |
@@ -1564,7 +1500,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1564 | return false; | 1500 | return false; |
1565 | } | 1501 | } |
1566 | 1502 | ||
1567 | |||
1568 | /// <summary> | 1503 | /// <summary> |
1569 | /// Called after our prim properties are set Scale, position etc. | 1504 | /// Called after our prim properties are set Scale, position etc. |
1570 | /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex | 1505 | /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex |
@@ -1586,7 +1521,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1586 | 1521 | ||
1587 | /// <summary> | 1522 | /// <summary> |
1588 | /// This is our main simulate loop | 1523 | /// This is our main simulate loop |
1589 | /// It's thread locked by a Mutex in the scene. | 1524 | /// It's thread locked by a Mutex in the scene. |
1590 | /// It holds Collisions, it instructs ODE to step through the physical reactions | 1525 | /// It holds Collisions, it instructs ODE to step through the physical reactions |
1591 | /// It moves the objects around in memory | 1526 | /// It moves the objects around in memory |
1592 | /// It calls the methods that report back to the object owners.. (scenepresence, SceneObjectGroup) | 1527 | /// It calls the methods that report back to the object owners.. (scenepresence, SceneObjectGroup) |
@@ -1597,7 +1532,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1597 | { | 1532 | { |
1598 | if (framecount >= int.MaxValue) | 1533 | if (framecount >= int.MaxValue) |
1599 | framecount = 0; | 1534 | framecount = 0; |
1600 | 1535 | ||
1601 | framecount++; | 1536 | framecount++; |
1602 | 1537 | ||
1603 | float fps = 0; | 1538 | float fps = 0; |
@@ -1605,12 +1540,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1605 | step_time += timeStep; | 1540 | step_time += timeStep; |
1606 | 1541 | ||
1607 | 1542 | ||
1608 | // If We're loaded down by something else, | 1543 | // If We're loaded down by something else, |
1609 | // or debugging with the Visual Studio project on pause | 1544 | // or debugging with the Visual Studio project on pause |
1610 | // skip a few frames to catch up gracefully. | 1545 | // skip a few frames to catch up gracefully. |
1611 | // without shooting the physicsactors all over the place | 1546 | // without shooting the physicsactors all over the place |
1612 | 1547 | ||
1613 | |||
1614 | if (step_time >= m_SkipFramesAtms) | 1548 | if (step_time >= m_SkipFramesAtms) |
1615 | { | 1549 | { |
1616 | // Instead of trying to catch up, it'll do 5 physics frames only | 1550 | // Instead of trying to catch up, it'll do 5 physics frames only |
@@ -1623,7 +1557,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1623 | } | 1557 | } |
1624 | lock (OdeLock) | 1558 | lock (OdeLock) |
1625 | { | 1559 | { |
1626 | // Process 10 frames if the sim is running normal.. | 1560 | // Process 10 frames if the sim is running normal.. |
1627 | // process 5 frames if the sim is running slow | 1561 | // process 5 frames if the sim is running slow |
1628 | //try | 1562 | //try |
1629 | //{ | 1563 | //{ |
@@ -1642,13 +1576,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1642 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size | 1576 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size |
1643 | step_time = 0.09375f; | 1577 | step_time = 0.09375f; |
1644 | fps = (step_time/ODE_STEPSIZE) * 1000; | 1578 | fps = (step_time/ODE_STEPSIZE) * 1000; |
1645 | 1579 | ||
1646 | while (step_time > 0.0f) | 1580 | while (step_time > 0.0f) |
1647 | { | 1581 | { |
1648 | //lock (ode) | 1582 | //lock (ode) |
1649 | //{ | 1583 | //{ |
1650 | //if (!ode.lockquery()) | 1584 | //if (!ode.lockquery()) |
1651 | //{ | 1585 | //{ |
1652 | // ode.dlock(world); | 1586 | // ode.dlock(world); |
1653 | try | 1587 | try |
1654 | { | 1588 | { |
@@ -1661,9 +1595,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1661 | } | 1595 | } |
1662 | } | 1596 | } |
1663 | 1597 | ||
1664 | |||
1665 | bool processedtaints = false; | 1598 | bool processedtaints = false; |
1666 | 1599 | ||
1667 | lock (_taintedPrim) | 1600 | lock (_taintedPrim) |
1668 | { | 1601 | { |
1669 | foreach (OdePrim prim in _taintedPrim) | 1602 | foreach (OdePrim prim in _taintedPrim) |
@@ -1679,10 +1612,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1679 | processedtaints = true; | 1612 | processedtaints = true; |
1680 | prim.m_collisionscore = 0; | 1613 | prim.m_collisionscore = 0; |
1681 | } | 1614 | } |
1682 | 1615 | ||
1683 | if (processedtaints) | 1616 | if (processedtaints) |
1684 | _taintedPrim = new List<OdePrim>(); | 1617 | _taintedPrim = new List<OdePrim>(); |
1685 | |||
1686 | } | 1618 | } |
1687 | 1619 | ||
1688 | lock (_activeprims) | 1620 | lock (_activeprims) |
@@ -1696,7 +1628,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1696 | 1628 | ||
1697 | //if ((framecount % m_randomizeWater) == 0) | 1629 | //if ((framecount % m_randomizeWater) == 0) |
1698 | // randomizeWater(waterlevel); | 1630 | // randomizeWater(waterlevel); |
1699 | |||
1700 | 1631 | ||
1701 | collision_optimized(timeStep); | 1632 | collision_optimized(timeStep); |
1702 | 1633 | ||
@@ -1718,7 +1649,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1718 | pobj.SendCollisions(); | 1649 | pobj.SendCollisions(); |
1719 | break; | 1650 | break; |
1720 | } | 1651 | } |
1721 | |||
1722 | } | 1652 | } |
1723 | } | 1653 | } |
1724 | 1654 | ||
@@ -1726,13 +1656,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1726 | 1656 | ||
1727 | d.JointGroupEmpty(contactgroup); | 1657 | d.JointGroupEmpty(contactgroup); |
1728 | //ode.dunlock(world); | 1658 | //ode.dunlock(world); |
1729 | } | 1659 | } |
1730 | catch (Exception e) | 1660 | catch (Exception e) |
1731 | { | 1661 | { |
1732 | m_log.Error("[PHYSICS]: " + e.Message.ToString() + e.TargetSite.ToString()); | 1662 | m_log.Error("[PHYSICS]: " + e.Message.ToString() + e.TargetSite.ToString()); |
1733 | ode.dunlock(world); | 1663 | ode.dunlock(world); |
1734 | } | 1664 | } |
1735 | 1665 | ||
1736 | step_time -= ODE_STEPSIZE; | 1666 | step_time -= ODE_STEPSIZE; |
1737 | i++; | 1667 | i++; |
1738 | //} | 1668 | //} |
@@ -1765,7 +1695,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1765 | } | 1695 | } |
1766 | } | 1696 | } |
1767 | } | 1697 | } |
1768 | |||
1769 | } | 1698 | } |
1770 | return fps; | 1699 | return fps; |
1771 | } | 1700 | } |
@@ -1780,7 +1709,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1780 | get { return (false); } | 1709 | get { return (false); } |
1781 | } | 1710 | } |
1782 | 1711 | ||
1783 | #region ODE Specific Terrain Fixes | 1712 | #region ODE Specific Terrain Fixes |
1784 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) | 1713 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) |
1785 | { | 1714 | { |
1786 | float[] returnarr = new float[262144]; | 1715 | float[] returnarr = new float[262144]; |
@@ -1800,7 +1729,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1800 | // This particular way is quick but it only works on a multiple of the original | 1729 | // This particular way is quick but it only works on a multiple of the original |
1801 | 1730 | ||
1802 | // The idea behind this method can be described with the following diagrams | 1731 | // The idea behind this method can be described with the following diagrams |
1803 | // second pass and third pass happen in the same loop really.. just separated | 1732 | // second pass and third pass happen in the same loop really.. just separated |
1804 | // them to show what this does. | 1733 | // them to show what this does. |
1805 | 1734 | ||
1806 | // First Pass | 1735 | // First Pass |
@@ -1893,6 +1822,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1893 | 1822 | ||
1894 | return returnarr; | 1823 | return returnarr; |
1895 | } | 1824 | } |
1825 | |||
1896 | public float[] ResizeTerrain512Interpolation(float[] heightMap) | 1826 | public float[] ResizeTerrain512Interpolation(float[] heightMap) |
1897 | { | 1827 | { |
1898 | float[] returnarr = new float[262144]; | 1828 | float[] returnarr = new float[262144]; |
@@ -1912,7 +1842,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1912 | // This particular way is quick but it only works on a multiple of the original | 1842 | // This particular way is quick but it only works on a multiple of the original |
1913 | 1843 | ||
1914 | // The idea behind this method can be described with the following diagrams | 1844 | // The idea behind this method can be described with the following diagrams |
1915 | // second pass and third pass happen in the same loop really.. just separated | 1845 | // second pass and third pass happen in the same loop really.. just separated |
1916 | // them to show what this does. | 1846 | // them to show what this does. |
1917 | 1847 | ||
1918 | // First Pass | 1848 | // First Pass |
@@ -2139,7 +2069,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2139 | // m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f)); | 2069 | // m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f)); |
2140 | } | 2070 | } |
2141 | 2071 | ||
2142 | |||
2143 | lock (OdeLock) | 2072 | lock (OdeLock) |
2144 | { | 2073 | { |
2145 | if (!(WaterGeom == (IntPtr)0)) | 2074 | if (!(WaterGeom == (IntPtr)0)) |
@@ -2183,7 +2112,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2183 | { | 2112 | { |
2184 | lock (OdeLock) | 2113 | lock (OdeLock) |
2185 | { | 2114 | { |
2186 | |||
2187 | foreach (OdePrim prm in _prims) | 2115 | foreach (OdePrim prm in _prims) |
2188 | { | 2116 | { |
2189 | RemovePrim(prm); | 2117 | RemovePrim(prm); |
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 9ca1b23..82ce144 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |||
@@ -171,12 +171,12 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
171 | { | 171 | { |
172 | if (check_collision(c, _prims[i])) | 172 | if (check_collision(c, _prims[i])) |
173 | { | 173 | { |
174 | 174 | ||
175 | return true; | 175 | return true; |
176 | } | 176 | } |
177 | 177 | ||
178 | } | 178 | } |
179 | 179 | ||
180 | return false; | 180 | return false; |
181 | } | 181 | } |
182 | 182 | ||
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
234 | character.Position.Z += character._target_velocity.Z*timeStep; | 234 | character.Position.Z += character._target_velocity.Z*timeStep; |
235 | } | 235 | } |
236 | 236 | ||
237 | /// this is it -- the magic you've all been waiting for! Ladies and gentlemen -- | 237 | /// this is it -- the magic you've all been waiting for! Ladies and gentlemen -- |
238 | /// Completely Bogus Collision Detection!!! | 238 | /// Completely Bogus Collision Detection!!! |
239 | /// better known as the CBCD algorithm | 239 | /// better known as the CBCD algorithm |
240 | 240 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index afc3ff2..2c33b57 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
108 | public void state(string state) | 108 | public void state(string state) |
109 | { | 109 | { |
110 | State = state; | 110 | State = state; |
111 | 111 | ||
112 | } | 112 | } |
113 | 113 | ||
114 | public void Start(BuilIn_Commands LSL_Functions) | 114 | public void Start(BuilIn_Commands LSL_Functions) |
@@ -125,9 +125,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
125 | ads.ConfigurationFile | 125 | ads.ConfigurationFile |
126 | ); | 126 | ); |
127 | 127 | ||
128 | // Display the name of the calling AppDomain and the name | 128 | // Display the name of the calling AppDomain and the name |
129 | // of the second domain. | 129 | // of the second domain. |
130 | // NOTE: The application's thread has transitioned between | 130 | // NOTE: The application's thread has transitioned between |
131 | // AppDomains. | 131 | // AppDomains. |
132 | Console.WriteLine("Calling to '{0}'.", | 132 | Console.WriteLine("Calling to '{0}'.", |
133 | Thread.GetDomain().FriendlyName | 133 | Thread.GetDomain().FriendlyName |
diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs index 2e35b46..2887f1e 100644 --- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
42 | /// </summary> | 42 | /// </summary> |
43 | protected bool m_Running = true; | 43 | protected bool m_Running = true; |
44 | /// <summary> | 44 | /// <summary> |
45 | /// True indicates that the ScriptManager has stopped | 45 | /// True indicates that the ScriptManager has stopped |
46 | /// this script. This prevents a script that has been | 46 | /// this script. This prevents a script that has been |
47 | /// stopped as part of deactivation from being | 47 | /// stopped as part of deactivation from being |
48 | /// resumed by a pending llSetScriptState request. | 48 | /// resumed by a pending llSetScriptState request. |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d73a47a..ab91424 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
57 | internal uint m_localID; | 57 | internal uint m_localID; |
58 | internal LLUUID m_itemID; | 58 | internal LLUUID m_itemID; |
59 | internal bool throwErrorOnNotImplemented = true; | 59 | internal bool throwErrorOnNotImplemented = true; |
60 | 60 | ||
61 | public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) | 61 | public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) |
62 | { | 62 | { |
63 | m_ScriptEngine = ScriptEngine; | 63 | m_ScriptEngine = ScriptEngine; |
@@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
93 | try | 93 | try |
94 | { | 94 | { |
95 | int eventFlags = m_ScriptEngine.m_ScriptManager.GetStateEventFlags(m_localID, m_itemID); | 95 | int eventFlags = m_ScriptEngine.m_ScriptManager.GetStateEventFlags(m_localID, m_itemID); |
96 | m_host.SetScriptEvents(m_itemID, eventFlags); | 96 | m_host.SetScriptEvents(m_itemID, eventFlags); |
97 | m_ScriptEngine.m_EventManager.state_entry(m_localID); | 97 | m_ScriptEngine.m_EventManager.state_entry(m_localID); |
98 | } | 98 | } |
99 | catch (AppDomainUnloadedException) | 99 | catch (AppDomainUnloadedException) |
@@ -186,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
186 | World.EventManager.TriggerRequestChangeWaterHeight((float)height); | 186 | World.EventManager.TriggerRequestChangeWaterHeight((float)height); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | //These are the implementations of the various ll-functions used by the LSL scripts. | 190 | //These are the implementations of the various ll-functions used by the LSL scripts. |
191 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 | 191 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 |
192 | public double llSin(double f) | 192 | public double llSin(double f) |
@@ -331,9 +331,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
331 | // New and improved, now actually works as described. Prim rotates as expected as does llRot2Euler. | 331 | // New and improved, now actually works as described. Prim rotates as expected as does llRot2Euler. |
332 | 332 | ||
333 | /* From wiki: | 333 | /* From wiki: |
334 | The Euler angle vector (in radians) is converted to a rotation by doing the rotations around the 3 axes | 334 | The Euler angle vector (in radians) is converted to a rotation by doing the rotations around the 3 axes |
335 | in Z, Y, X order. So llEuler2Rot(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, | 335 | in Z, Y, X order. So llEuler2Rot(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, |
336 | a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting | 336 | a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting |
337 | vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis. | 337 | vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis. |
338 | */ | 338 | */ |
339 | 339 | ||
@@ -349,24 +349,24 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
349 | double sinX = Math.Sin(v.x); | 349 | double sinX = Math.Sin(v.x); |
350 | double sinY = Math.Sin(v.y); | 350 | double sinY = Math.Sin(v.y); |
351 | double sinZ = Math.Sin(v.z); | 351 | double sinZ = Math.Sin(v.z); |
352 | 352 | ||
353 | s = Math.Sqrt( cosY * cosZ - sinX * sinY * sinZ + cosX * cosZ + cosX * cosY + 1.0f) * 0.5f; | 353 | s = Math.Sqrt(cosY * cosZ - sinX * sinY * sinZ + cosX * cosZ + cosX * cosY + 1.0f) * 0.5f; |
354 | if (Math.Abs(s) < 0.00001) // null rotation | 354 | if (Math.Abs(s) < 0.00001) // null rotation |
355 | { | 355 | { |
356 | x = 0.0f; | 356 | x = 0.0f; |
357 | y = 1.0f; | 357 | y = 1.0f; |
358 | z = 0.0f; | 358 | z = 0.0f; |
359 | } | 359 | } |
360 | else | 360 | else |
361 | { | 361 | { |
362 | s_i = 1.0f / (4.0f * s); | 362 | s_i = 1.0f / (4.0f * s); |
363 | x = - ( -sinX * cosY - cosX * sinY * sinZ - sinX * cosZ) * s_i; | 363 | x = - (-sinX * cosY - cosX * sinY * sinZ - sinX * cosZ) * s_i; |
364 | y = - ( -cosX * sinY * cosZ + sinX * sinZ - sinY) * s_i; | 364 | y = - (-cosX * sinY * cosZ + sinX * sinZ - sinY) * s_i; |
365 | z = - ( -cosY * sinZ - sinX * sinY * cosZ - cosX * sinZ) * s_i; | 365 | z = - (-cosY * sinZ - sinX * sinY * cosZ - cosX * sinZ) * s_i; |
366 | } | 366 | } |
367 | return new LSL_Types.Quaternion(x, y, z, s); | 367 | return new LSL_Types.Quaternion(x, y, z, s); |
368 | } | 368 | } |
369 | 369 | ||
370 | 370 | ||
371 | public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) | 371 | public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) |
372 | { | 372 | { |
@@ -477,7 +477,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
477 | m_host.AddScriptLPS(1); | 477 | m_host.AddScriptLPS(1); |
478 | LLUUID keyID = LLUUID.Zero; | 478 | LLUUID keyID = LLUUID.Zero; |
479 | LLUUID.TryParse(id, out keyID); | 479 | LLUUID.TryParse(id, out keyID); |
480 | 480 | ||
481 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); | 481 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); |
482 | } | 482 | } |
483 | 483 | ||
@@ -625,7 +625,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
625 | 625 | ||
626 | 626 | ||
627 | return String.Empty; | 627 | return String.Empty; |
628 | 628 | ||
629 | } | 629 | } |
630 | 630 | ||
631 | public LSL_Types.LSLInteger llDetectedType(int number) | 631 | public LSL_Types.LSLInteger llDetectedType(int number) |
@@ -644,7 +644,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
644 | mask |= 0x04; // passive non-moving | 644 | mask |= 0x04; // passive non-moving |
645 | else | 645 | else |
646 | mask |= 0x02; // active moving | 646 | mask |= 0x02; // active moving |
647 | if (SensedObject is IScript) mask |= 0x08; // Scripted. It COULD have one hidden ... | 647 | if (SensedObject is IScript) mask |= 0x08; // Scripted. It COULD have one hidden ... |
648 | return mask; | 648 | return mask; |
649 | 649 | ||
650 | } | 650 | } |
@@ -655,7 +655,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
655 | EntityBase SensedObject = entityDetectedKey(number); | 655 | EntityBase SensedObject = entityDetectedKey(number); |
656 | if (SensedObject == null) | 656 | if (SensedObject == null) |
657 | return new LSL_Types.Vector3(0, 0, 0); | 657 | return new LSL_Types.Vector3(0, 0, 0); |
658 | 658 | ||
659 | return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); | 659 | return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); |
660 | } | 660 | } |
661 | 661 | ||
@@ -757,7 +757,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
757 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) | 757 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) |
758 | { | 758 | { |
759 | statusrotationaxis |= BuiltIn_Commands_BaseClass.STATUS_ROTATE_X; | 759 | statusrotationaxis |= BuiltIn_Commands_BaseClass.STATUS_ROTATE_X; |
760 | 760 | ||
761 | } | 761 | } |
762 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) | 762 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) |
763 | { | 763 | { |
@@ -824,9 +824,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
824 | 824 | ||
825 | if (m_host.GetDieAtEdge()) | 825 | if (m_host.GetDieAtEdge()) |
826 | return 1; | 826 | return 1; |
827 | else | 827 | else |
828 | return 0; | 828 | return 0; |
829 | 829 | ||
830 | case BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE: | 830 | case BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE: |
831 | NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); | 831 | NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); |
832 | return 0; | 832 | return 0; |
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1248 | { | 1248 | { |
1249 | m_host.AddScriptLPS(1); | 1249 | m_host.AddScriptLPS(1); |
1250 | return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); | 1250 | return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); |
1251 | 1251 | ||
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | public void llTargetRemove(int number) | 1254 | public void llTargetRemove(int number) |
@@ -1286,21 +1286,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1286 | { | 1286 | { |
1287 | m_host.AddScriptLPS(1); | 1287 | m_host.AddScriptLPS(1); |
1288 | //No energy force yet | 1288 | //No energy force yet |
1289 | 1289 | ||
1290 | if (force.x > 20000) | 1290 | if (force.x > 20000) |
1291 | force.x = 20000; | 1291 | force.x = 20000; |
1292 | if (force.y > 20000) | 1292 | if (force.y > 20000) |
1293 | force.y = 20000; | 1293 | force.y = 20000; |
1294 | if (force.z > 20000) | 1294 | if (force.z > 20000) |
1295 | force.z = 20000; | 1295 | force.z = 20000; |
1296 | 1296 | ||
1297 | if (local == 1) | 1297 | if (local == 1) |
1298 | { | 1298 | { |
1299 | m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), true); | 1299 | m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), true); |
1300 | } | 1300 | } |
1301 | else | 1301 | else |
1302 | { | 1302 | { |
1303 | 1303 | ||
1304 | m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z), false); | 1304 | m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z), false); |
1305 | } | 1305 | } |
1306 | } | 1306 | } |
@@ -1475,7 +1475,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1475 | } | 1475 | } |
1476 | // If end is positive, then it directly | 1476 | // If end is positive, then it directly |
1477 | // corresponds to the lengt of the substring | 1477 | // corresponds to the lengt of the substring |
1478 | // needed (plus one of course). BUT, it | 1478 | // needed (plus one of course). BUT, it |
1479 | // must be within bounds. | 1479 | // must be within bounds. |
1480 | if (end >= src.Length) | 1480 | if (end >= src.Length) |
1481 | { | 1481 | { |
@@ -1493,15 +1493,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1493 | // Inverted substring (end < start) | 1493 | // Inverted substring (end < start) |
1494 | else | 1494 | else |
1495 | { | 1495 | { |
1496 | // Implies both indices are below the | 1496 | // Implies both indices are below the |
1497 | // lower bound. In the inverted case, that | 1497 | // lower bound. In the inverted case, that |
1498 | // means the entire string will be returned | 1498 | // means the entire string will be returned |
1499 | // unchanged. | 1499 | // unchanged. |
1500 | if (start < 0) | 1500 | if (start < 0) |
1501 | { | 1501 | { |
1502 | return src; | 1502 | return src; |
1503 | } | 1503 | } |
1504 | // If both indices are greater than the upper | 1504 | // If both indices are greater than the upper |
1505 | // bound the result may seem initially counter | 1505 | // bound the result may seem initially counter |
1506 | // intuitive. | 1506 | // intuitive. |
1507 | if (end >= src.Length) | 1507 | if (end >= src.Length) |
@@ -1536,7 +1536,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1536 | 1536 | ||
1537 | /// <summary> | 1537 | /// <summary> |
1538 | /// Delete substring removes the specified substring bounded | 1538 | /// Delete substring removes the specified substring bounded |
1539 | /// by the inclusive indices start and end. Indices may be | 1539 | /// by the inclusive indices start and end. Indices may be |
1540 | /// negative (indicating end-relative) and may be inverted, | 1540 | /// negative (indicating end-relative) and may be inverted, |
1541 | /// i.e. end < start. | 1541 | /// i.e. end < start. |
1542 | /// </summary> | 1542 | /// </summary> |
@@ -1591,7 +1591,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1591 | { | 1591 | { |
1592 | return String.Empty; | 1592 | return String.Empty; |
1593 | } | 1593 | } |
1594 | 1594 | ||
1595 | if (end > 0) | 1595 | if (end > 0) |
1596 | { | 1596 | { |
1597 | if (start < src.Length) | 1597 | if (start < src.Length) |
@@ -1616,7 +1616,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1616 | } | 1616 | } |
1617 | } | 1617 | } |
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | /// <summary> | 1620 | /// <summary> |
1621 | /// Insert string inserts the specified string identified by src | 1621 | /// Insert string inserts the specified string identified by src |
1622 | /// at the index indicated by index. Index may be negative, in | 1622 | /// at the index indicated by index. Index may be negative, in |
@@ -1655,13 +1655,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1655 | 1655 | ||
1656 | // The index is in bounds. | 1656 | // The index is in bounds. |
1657 | // In this case the index refers to the index that will | 1657 | // In this case the index refers to the index that will |
1658 | // be assigned to the first character of the inserted string. | 1658 | // be assigned to the first character of the inserted string. |
1659 | // So unlike the other string operations, we do not add one | 1659 | // So unlike the other string operations, we do not add one |
1660 | // to get the correct string length. | 1660 | // to get the correct string length. |
1661 | return dest.Substring(0,index)+src+dest.Substring(index); | 1661 | return dest.Substring(0,index)+src+dest.Substring(index); |
1662 | 1662 | ||
1663 | } | 1663 | } |
1664 | 1664 | ||
1665 | public string llToUpper(string src) | 1665 | public string llToUpper(string src) |
1666 | { | 1666 | { |
1667 | m_host.AddScriptLPS(1); | 1667 | m_host.AddScriptLPS(1); |
@@ -1767,12 +1767,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1767 | return; // wiki says, if it's further away then 10m, silently fail. | 1767 | return; // wiki says, if it's further away then 10m, silently fail. |
1768 | 1768 | ||
1769 | LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); | 1769 | LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); |
1770 | 1770 | ||
1771 | // need the magnitude later | 1771 | // need the magnitude later |
1772 | float velmag = (float)Util.GetMagnitude(llvel); | 1772 | float velmag = (float)Util.GetMagnitude(llvel); |
1773 | 1773 | ||
1774 | SceneObjectGroup new_group = World.RezObject(inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); | 1774 | SceneObjectGroup new_group = World.RezObject(inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); |
1775 | 1775 | ||
1776 | // If either of these are null, then there was an unknown error. | 1776 | // If either of these are null, then there was an unknown error. |
1777 | if (new_group == null) | 1777 | if (new_group == null) |
1778 | continue; | 1778 | continue; |
@@ -1844,7 +1844,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1844 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) | 1844 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) |
1845 | { | 1845 | { |
1846 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); | 1846 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); |
1847 | 1847 | ||
1848 | if (presence != null) | 1848 | if (presence != null) |
1849 | { | 1849 | { |
1850 | if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) | 1850 | if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) |
@@ -1871,7 +1871,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1871 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) | 1871 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) |
1872 | { | 1872 | { |
1873 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); | 1873 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); |
1874 | 1874 | ||
1875 | if (presence != null) | 1875 | if (presence != null) |
1876 | { | 1876 | { |
1877 | if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) | 1877 | if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) |
@@ -1924,7 +1924,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1924 | // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent, | 1924 | // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent, |
1925 | // but I don't think we have a list of scenes available from here. | 1925 | // but I don't think we have a list of scenes available from here. |
1926 | // (We also don't want to duplicate the code in OnInstantMessage if we can avoid it.) | 1926 | // (We also don't want to duplicate the code in OnInstantMessage if we can avoid it.) |
1927 | 1927 | ||
1928 | // user is a UUID | 1928 | // user is a UUID |
1929 | 1929 | ||
1930 | // TODO: figure out values for client, fromSession, and imSessionID | 1930 | // TODO: figure out values for client, fromSession, and imSessionID |
@@ -1991,7 +1991,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1991 | } | 1991 | } |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | 1994 | ||
1995 | 1995 | ||
1996 | public void llSetHoverHeight(double height, int water, double tau) | 1996 | public void llSetHoverHeight(double height, int water, double tau) |
1997 | { | 1997 | { |
@@ -2050,7 +2050,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2050 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) | 2050 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) |
2051 | { | 2051 | { |
2052 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); | 2052 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); |
2053 | 2053 | ||
2054 | if (presence != null) | 2054 | if (presence != null) |
2055 | { | 2055 | { |
2056 | // Do NOT try to parse LLUUID, animations cannot be triggered by ID | 2056 | // Do NOT try to parse LLUUID, animations cannot be triggered by ID |
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2087 | return; | 2087 | return; |
2088 | 2088 | ||
2089 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); | 2089 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); |
2090 | 2090 | ||
2091 | if (presence != null) | 2091 | if (presence != null) |
2092 | { | 2092 | { |
2093 | if (animID == LLUUID.Zero) | 2093 | if (animID == LLUUID.Zero) |
@@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2194 | } | 2194 | } |
2195 | 2195 | ||
2196 | ScenePresence presence = World.GetScenePresence(agentID); | 2196 | ScenePresence presence = World.GetScenePresence(agentID); |
2197 | 2197 | ||
2198 | if (presence != null) | 2198 | if (presence != null) |
2199 | { | 2199 | { |
2200 | string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID); | 2200 | string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID); |
@@ -2467,7 +2467,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2467 | 2467 | ||
2468 | // These functions are supposed to be robust, | 2468 | // These functions are supposed to be robust, |
2469 | // so get the state one step at a time. | 2469 | // so get the state one step at a time. |
2470 | 2470 | ||
2471 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 2471 | if ((item = ScriptByName(name)) != LLUUID.Zero) |
2472 | { | 2472 | { |
2473 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 2473 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
@@ -2480,14 +2480,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2480 | } | 2480 | } |
2481 | } | 2481 | } |
2482 | } | 2482 | } |
2483 | } | 2483 | } |
2484 | 2484 | ||
2485 | // Required by SL | 2485 | // Required by SL |
2486 | 2486 | ||
2487 | if (script == null) | 2487 | if (script == null) |
2488 | ShoutError("llSetScriptState: script "+name+" not found"); | 2488 | ShoutError("llSetScriptState: script "+name+" not found"); |
2489 | 2489 | ||
2490 | // If we didn't find it, then it's safe to | 2490 | // If we didn't find it, then it's safe to |
2491 | // assume it is not running. | 2491 | // assume it is not running. |
2492 | } | 2492 | } |
2493 | 2493 | ||
@@ -2806,23 +2806,23 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2806 | 2806 | ||
2807 | 2807 | ||
2808 | /* The new / changed functions were tested with the following LSL script: | 2808 | /* The new / changed functions were tested with the following LSL script: |
2809 | 2809 | ||
2810 | default | 2810 | default |
2811 | { | 2811 | { |
2812 | state_entry() | 2812 | state_entry() |
2813 | { | 2813 | { |
2814 | rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); | 2814 | rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); |
2815 | 2815 | ||
2816 | llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot)); | 2816 | llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot)); |
2817 | llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); | 2817 | llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); |
2818 | 2818 | ||
2819 | // convert back and forth between quaternion <-> vector and angle | 2819 | // convert back and forth between quaternion <-> vector and angle |
2820 | 2820 | ||
2821 | rotation newrot = llAxisAngle2Rot(llRot2Axis(rot),llRot2Angle(rot)); | 2821 | rotation newrot = llAxisAngle2Rot(llRot2Axis(rot),llRot2Angle(rot)); |
2822 | 2822 | ||
2823 | llOwnerSay("Old rotation was: "+(string) rot); | 2823 | llOwnerSay("Old rotation was: "+(string) rot); |
2824 | llOwnerSay("re-converted rotation is: "+(string) newrot); | 2824 | llOwnerSay("re-converted rotation is: "+(string) newrot); |
2825 | 2825 | ||
2826 | llSetRot(rot); // to check the parameters in the prim | 2826 | llSetRot(rot); // to check the parameters in the prim |
2827 | } | 2827 | } |
2828 | } | 2828 | } |
@@ -2832,7 +2832,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2832 | 2832 | ||
2833 | // Xantor 29/apr/2008 | 2833 | // Xantor 29/apr/2008 |
2834 | // Returns rotation described by rotating angle radians about axis. | 2834 | // Returns rotation described by rotating angle radians about axis. |
2835 | // q = cos(a/2) + i ( x * sin(a/2)) + j (y * sin(a/2)) + k ( z * sin(a/2)) | 2835 | // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) |
2836 | public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) | 2836 | public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) |
2837 | { | 2837 | { |
2838 | m_host.AddScriptLPS(1); | 2838 | m_host.AddScriptLPS(1); |
@@ -2849,7 +2849,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2849 | // NotImplemented("llAxisAngle2Rot"); | 2849 | // NotImplemented("llAxisAngle2Rot"); |
2850 | } | 2850 | } |
2851 | 2851 | ||
2852 | 2852 | ||
2853 | // Xantor 29/apr/2008 | 2853 | // Xantor 29/apr/2008 |
2854 | // converts a Quaternion to X,Y,Z axis rotations | 2854 | // converts a Quaternion to X,Y,Z axis rotations |
2855 | public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) | 2855 | public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) |
@@ -3264,7 +3264,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3264 | /// <summary> | 3264 | /// <summary> |
3265 | /// The supplied string is scanned for commas | 3265 | /// The supplied string is scanned for commas |
3266 | /// and converted into a list. Commas are only | 3266 | /// and converted into a list. Commas are only |
3267 | /// effective if they are encountered outside | 3267 | /// effective if they are encountered outside |
3268 | /// of '<' '>' delimiters. Any whitespace | 3268 | /// of '<' '>' delimiters. Any whitespace |
3269 | /// before or after an element is trimmed. | 3269 | /// before or after an element is trimmed. |
3270 | /// </summary> | 3270 | /// </summary> |
@@ -3314,7 +3314,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3314 | } | 3314 | } |
3315 | 3315 | ||
3316 | /// <summary> | 3316 | /// <summary> |
3317 | /// Randomizes the list, be arbitrarily reordering | 3317 | /// Randomizes the list, be arbitrarily reordering |
3318 | /// sublists of stride elements. As the stride approaches | 3318 | /// sublists of stride elements. As the stride approaches |
3319 | /// the size of the list, the options become very | 3319 | /// the size of the list, the options become very |
3320 | /// limited. | 3320 | /// limited. |
@@ -3323,7 +3323,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3323 | /// This could take a while for very large list | 3323 | /// This could take a while for very large list |
3324 | /// sizes. | 3324 | /// sizes. |
3325 | /// </remarks> | 3325 | /// </remarks> |
3326 | 3326 | ||
3327 | public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) | 3327 | public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) |
3328 | { | 3328 | { |
3329 | 3329 | ||
@@ -3344,7 +3344,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3344 | // Stride MUST be a factor of the list length | 3344 | // Stride MUST be a factor of the list length |
3345 | // If not, then return the src list. This also | 3345 | // If not, then return the src list. This also |
3346 | // traps those cases where stride > length. | 3346 | // traps those cases where stride > length. |
3347 | 3347 | ||
3348 | if (src.Length != stride && src.Length%stride == 0) | 3348 | if (src.Length != stride && src.Length%stride == 0) |
3349 | { | 3349 | { |
3350 | chunkk = src.Length/stride; | 3350 | chunkk = src.Length/stride; |
@@ -3384,7 +3384,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3384 | object[] array = new object[src.Length]; | 3384 | object[] array = new object[src.Length]; |
3385 | Array.Copy(src.Data, 0, array, 0, src.Length); | 3385 | Array.Copy(src.Data, 0, array, 0, src.Length); |
3386 | result = new LSL_Types.list(array); | 3386 | result = new LSL_Types.list(array); |
3387 | } | 3387 | } |
3388 | 3388 | ||
3389 | return result; | 3389 | return result; |
3390 | 3390 | ||
@@ -3394,10 +3394,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3394 | /// Elements in the source list starting with 0 and then | 3394 | /// Elements in the source list starting with 0 and then |
3395 | /// every i+stride. If the stride is negative then the scan | 3395 | /// every i+stride. If the stride is negative then the scan |
3396 | /// is backwards producing an inverted result. | 3396 | /// is backwards producing an inverted result. |
3397 | /// Only those elements that are also in the specified | 3397 | /// Only those elements that are also in the specified |
3398 | /// range are included in the result. | 3398 | /// range are included in the result. |
3399 | /// </summary> | 3399 | /// </summary> |
3400 | 3400 | ||
3401 | public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) | 3401 | public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) |
3402 | { | 3402 | { |
3403 | 3403 | ||
@@ -3415,7 +3415,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3415 | if (end < 0) | 3415 | if (end < 0) |
3416 | end = src.Length+end; | 3416 | end = src.Length+end; |
3417 | 3417 | ||
3418 | // Out of bounds indices are OK, just trim them | 3418 | // Out of bounds indices are OK, just trim them |
3419 | // accordingly | 3419 | // accordingly |
3420 | 3420 | ||
3421 | if (start > src.Length) | 3421 | if (start > src.Length) |
@@ -3429,7 +3429,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3429 | if (start != end) | 3429 | if (start != end) |
3430 | { | 3430 | { |
3431 | 3431 | ||
3432 | if (start <= end) | 3432 | if (start <= end) |
3433 | { | 3433 | { |
3434 | si[0] = start; | 3434 | si[0] = start; |
3435 | ei[0] = end; | 3435 | ei[0] = end; |
@@ -3448,8 +3448,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3448 | // fall within the specified sub-range. The specified | 3448 | // fall within the specified sub-range. The specified |
3449 | // range values are inclusive. | 3449 | // range values are inclusive. |
3450 | // A negative stride reverses the direction of the | 3450 | // A negative stride reverses the direction of the |
3451 | // scan producing an inverted list as a result. | 3451 | // scan producing an inverted list as a result. |
3452 | 3452 | ||
3453 | if (stride == 0) | 3453 | if (stride == 0) |
3454 | stride = 1; | 3454 | stride = 1; |
3455 | 3455 | ||
@@ -3492,7 +3492,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3492 | 3492 | ||
3493 | public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int index) | 3493 | public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int index) |
3494 | { | 3494 | { |
3495 | 3495 | ||
3496 | LSL_Types.list pref = null; | 3496 | LSL_Types.list pref = null; |
3497 | LSL_Types.list suff = null; | 3497 | LSL_Types.list suff = null; |
3498 | 3498 | ||
@@ -3539,7 +3539,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3539 | /// Returns the index of the first occurrence of test | 3539 | /// Returns the index of the first occurrence of test |
3540 | /// in src. | 3540 | /// in src. |
3541 | /// </summary> | 3541 | /// </summary> |
3542 | 3542 | ||
3543 | public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) | 3543 | public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) |
3544 | { | 3544 | { |
3545 | 3545 | ||
@@ -3568,7 +3568,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3568 | } | 3568 | } |
3569 | } | 3569 | } |
3570 | } | 3570 | } |
3571 | 3571 | ||
3572 | return index; | 3572 | return index; |
3573 | 3573 | ||
3574 | } | 3574 | } |
@@ -3632,12 +3632,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3632 | if (LLUUID.TryParse(id,out key)) | 3632 | if (LLUUID.TryParse(id,out key)) |
3633 | { | 3633 | { |
3634 | ScenePresence presence = World.GetScenePresence(key); | 3634 | ScenePresence presence = World.GetScenePresence(key); |
3635 | 3635 | ||
3636 | if (presence != null) | 3636 | if (presence != null) |
3637 | { | 3637 | { |
3638 | return presence.Name; | 3638 | return presence.Name; |
3639 | } | 3639 | } |
3640 | 3640 | ||
3641 | if (World.GetSceneObjectPart(key) != null) | 3641 | if (World.GetSceneObjectPart(key) != null) |
3642 | { | 3642 | { |
3643 | return World.GetSceneObjectPart(key).Name; | 3643 | return World.GetSceneObjectPart(key).Name; |
@@ -3646,18 +3646,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3646 | return String.Empty; | 3646 | return String.Empty; |
3647 | } | 3647 | } |
3648 | 3648 | ||
3649 | 3649 | ||
3650 | 3650 | ||
3651 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | 3651 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) |
3652 | { | 3652 | { |
3653 | m_host.AddScriptLPS(1); | 3653 | m_host.AddScriptLPS(1); |
3654 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); | 3654 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); |
3655 | pTexAnim.Flags =(uint) mode; | 3655 | pTexAnim.Flags =(uint) mode; |
3656 | 3656 | ||
3657 | //ALL_SIDES | 3657 | //ALL_SIDES |
3658 | if (face == -1) | 3658 | if (face == -1) |
3659 | face = 255; | 3659 | face = 255; |
3660 | 3660 | ||
3661 | pTexAnim.Face = (uint)face; | 3661 | pTexAnim.Face = (uint)face; |
3662 | pTexAnim.Length = (float)length; | 3662 | pTexAnim.Length = (float)length; |
3663 | pTexAnim.Rate = (float)rate; | 3663 | pTexAnim.Rate = (float)rate; |
@@ -3688,7 +3688,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3688 | LSL_Types.list ret = new LSL_Types.list(); | 3688 | LSL_Types.list ret = new LSL_Types.list(); |
3689 | object[] delimiters = new object[separators.Length + spacers.Length]; | 3689 | object[] delimiters = new object[separators.Length + spacers.Length]; |
3690 | separators.Data.CopyTo(delimiters, 0); | 3690 | separators.Data.CopyTo(delimiters, 0); |
3691 | spacers.Data.CopyTo(delimiters, separators.Length); | 3691 | spacers.Data.CopyTo(delimiters, separators.Length); |
3692 | bool dfound = false; | 3692 | bool dfound = false; |
3693 | do | 3693 | do |
3694 | { | 3694 | { |
@@ -3735,7 +3735,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3735 | 3735 | ||
3736 | public LSL_Types.LSLInteger llOverMyLand(string id) | 3736 | public LSL_Types.LSLInteger llOverMyLand(string id) |
3737 | { | 3737 | { |
3738 | 3738 | ||
3739 | m_host.AddScriptLPS(1); | 3739 | m_host.AddScriptLPS(1); |
3740 | LLUUID key = new LLUUID(); | 3740 | LLUUID key = new LLUUID(); |
3741 | if (LLUUID.TryParse(id,out key)) | 3741 | if (LLUUID.TryParse(id,out key)) |
@@ -3790,14 +3790,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3790 | 3790 | ||
3791 | LLUUID key = new LLUUID(); | 3791 | LLUUID key = new LLUUID(); |
3792 | if (LLUUID.TryParse(id, out key)) | 3792 | if (LLUUID.TryParse(id, out key)) |
3793 | { | 3793 | { |
3794 | ScenePresence av = World.GetScenePresence(key); | 3794 | ScenePresence av = World.GetScenePresence(key); |
3795 | 3795 | ||
3796 | if (av != null) | 3796 | if (av != null) |
3797 | { | 3797 | { |
3798 | if (llAvatarOnSitTarget() == id) | 3798 | if (llAvatarOnSitTarget() == id) |
3799 | { | 3799 | { |
3800 | // if the avatar is sitting on this object, then | 3800 | // if the avatar is sitting on this object, then |
3801 | // we can unsit them. We don't want random scripts unsitting random people | 3801 | // we can unsit them. We don't want random scripts unsitting random people |
3802 | // Lets avoid the popcorn avatar scenario. | 3802 | // Lets avoid the popcorn avatar scenario. |
3803 | av.StandUp(); | 3803 | av.StandUp(); |
@@ -3809,12 +3809,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3809 | // if the land is group owned and the object is group owned by the same group | 3809 | // if the land is group owned and the object is group owned by the same group |
3810 | // or | 3810 | // or |
3811 | // if the object is owned by a person with estate access. | 3811 | // if the object is owned by a person with estate access. |
3812 | 3812 | ||
3813 | ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); | 3813 | ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); |
3814 | if (parcel != null) | 3814 | if (parcel != null) |
3815 | { | 3815 | { |
3816 | if (m_host.ObjectOwner == parcel.landData.ownerID || | 3816 | if (m_host.ObjectOwner == parcel.landData.ownerID || |
3817 | (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID | 3817 | (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID |
3818 | && parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) | 3818 | && parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) |
3819 | { | 3819 | { |
3820 | av.StandUp(); | 3820 | av.StandUp(); |
@@ -3822,7 +3822,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3822 | } | 3822 | } |
3823 | } | 3823 | } |
3824 | } | 3824 | } |
3825 | 3825 | ||
3826 | } | 3826 | } |
3827 | 3827 | ||
3828 | } | 3828 | } |
@@ -3928,7 +3928,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3928 | m_host.AddScriptLPS(1); | 3928 | m_host.AddScriptLPS(1); |
3929 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); | 3929 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); |
3930 | LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); | 3930 | LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); |
3931 | 3931 | ||
3932 | float tempf = 0; | 3932 | float tempf = 0; |
3933 | 3933 | ||
3934 | for (int i = 0; i < rules.Length; i += 2) | 3934 | for (int i = 0; i < rules.Length; i += 2) |
@@ -3954,7 +3954,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3954 | case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: | 3954 | case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: |
3955 | tempv = (LSL_Types.Vector3)rules.Data[i + 1]; | 3955 | tempv = (LSL_Types.Vector3)rules.Data[i + 1]; |
3956 | //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); | 3956 | //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); |
3957 | 3957 | ||
3958 | prules.PartEndColor.R = (float)tempv.x; | 3958 | prules.PartEndColor.R = (float)tempv.x; |
3959 | prules.PartEndColor.G = (float)tempv.y; | 3959 | prules.PartEndColor.G = (float)tempv.y; |
3960 | prules.PartEndColor.B = (float)tempv.z; | 3960 | prules.PartEndColor.B = (float)tempv.z; |
@@ -3996,7 +3996,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3996 | 3996 | ||
3997 | // Xantor 03-May-2008 | 3997 | // Xantor 03-May-2008 |
3998 | // Wiki: PSYS_SRC_TEXTURE string inventory item name or key of the particle texture | 3998 | // Wiki: PSYS_SRC_TEXTURE string inventory item name or key of the particle texture |
3999 | // "" = default texture. | 3999 | // "" = default texture. |
4000 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TEXTURE: | 4000 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TEXTURE: |
4001 | LLUUID tkey = LLUUID.Zero; | 4001 | LLUUID tkey = LLUUID.Zero; |
4002 | 4002 | ||
@@ -4007,11 +4007,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4007 | } | 4007 | } |
4008 | // else try to locate the name in inventory of object. found returns key, | 4008 | // else try to locate the name in inventory of object. found returns key, |
4009 | // not found returns LLUUID.Zero which will translate to the default particle texture | 4009 | // not found returns LLUUID.Zero which will translate to the default particle texture |
4010 | else | 4010 | else |
4011 | { | 4011 | { |
4012 | prules.Texture = InventoryKey(rules.Data[i+1].ToString()); | 4012 | prules.Texture = InventoryKey(rules.Data[i+1].ToString()); |
4013 | } | 4013 | } |
4014 | break; | 4014 | break; |
4015 | 4015 | ||
4016 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_BURST_RATE: | 4016 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_BURST_RATE: |
4017 | tempf = Convert.ToSingle(rules.Data[i + 1].ToString()); | 4017 | tempf = Convert.ToSingle(rules.Data[i + 1].ToString()); |
@@ -4150,7 +4150,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4150 | m_host.AddScriptLPS(1); | 4150 | m_host.AddScriptLPS(1); |
4151 | return m_host.GetAvatarOnSitTarget().ToString(); | 4151 | return m_host.GetAvatarOnSitTarget().ToString(); |
4152 | //LLUUID AVID = m_host.GetAvatarOnSitTarget(); | 4152 | //LLUUID AVID = m_host.GetAvatarOnSitTarget(); |
4153 | 4153 | ||
4154 | //if (AVID != LLUUID.Zero) | 4154 | //if (AVID != LLUUID.Zero) |
4155 | // return AVID.ToString(); | 4155 | // return AVID.ToString(); |
4156 | //else | 4156 | //else |
@@ -4283,7 +4283,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4283 | 4283 | ||
4284 | // These functions are supposed to be robust, | 4284 | // These functions are supposed to be robust, |
4285 | // so get the state one step at a time. | 4285 | // so get the state one step at a time. |
4286 | 4286 | ||
4287 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 4287 | if ((item = ScriptByName(name)) != LLUUID.Zero) |
4288 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 4288 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
4289 | sm.ResetScript(m_localID, item); | 4289 | sm.ResetScript(m_localID, item); |
@@ -4293,7 +4293,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4293 | if (script == null) | 4293 | if (script == null) |
4294 | ShoutError("llResetOtherScript: script "+name+" not found"); | 4294 | ShoutError("llResetOtherScript: script "+name+" not found"); |
4295 | 4295 | ||
4296 | // If we didn't find it, then it's safe to | 4296 | // If we didn't find it, then it's safe to |
4297 | // assume it is not running. | 4297 | // assume it is not running. |
4298 | } | 4298 | } |
4299 | 4299 | ||
@@ -4307,7 +4307,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4307 | 4307 | ||
4308 | // These functions are supposed to be robust, | 4308 | // These functions are supposed to be robust, |
4309 | // so get the state one step at a time. | 4309 | // so get the state one step at a time. |
4310 | 4310 | ||
4311 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 4311 | if ((item = ScriptByName(name)) != LLUUID.Zero) |
4312 | { | 4312 | { |
4313 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 4313 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
@@ -4324,7 +4324,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4324 | if (script == null) | 4324 | if (script == null) |
4325 | ShoutError("llGetScriptState: script "+name+" not found"); | 4325 | ShoutError("llGetScriptState: script "+name+" not found"); |
4326 | 4326 | ||
4327 | // If we didn't find it, then it's safe to | 4327 | // If we didn't find it, then it's safe to |
4328 | // assume it is not running. | 4328 | // assume it is not running. |
4329 | 4329 | ||
4330 | return 0; | 4330 | return 0; |
@@ -4586,7 +4586,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4586 | { | 4586 | { |
4587 | return; | 4587 | return; |
4588 | } | 4588 | } |
4589 | 4589 | ||
4590 | if (landowner != m_host.ObjectOwner) | 4590 | if (landowner != m_host.ObjectOwner) |
4591 | { | 4591 | { |
4592 | return; | 4592 | return; |
@@ -4857,7 +4857,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4857 | 4857 | ||
4858 | case 21: // PRIM_FLEXIBLE | 4858 | case 21: // PRIM_FLEXIBLE |
4859 | PrimitiveBaseShape shape = m_host.Shape; | 4859 | PrimitiveBaseShape shape = m_host.Shape; |
4860 | 4860 | ||
4861 | if (shape.FlexiEntry) | 4861 | if (shape.FlexiEntry) |
4862 | res.Add(new LSL_Types.LSLInteger(1)); // active | 4862 | res.Add(new LSL_Types.LSLInteger(1)); // active |
4863 | else | 4863 | else |
@@ -4885,7 +4885,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4885 | 4885 | ||
4886 | case 23: // PRIM_POINT_LIGHT: | 4886 | case 23: // PRIM_POINT_LIGHT: |
4887 | shape = m_host.Shape; | 4887 | shape = m_host.Shape; |
4888 | 4888 | ||
4889 | if (shape.LightEntry) | 4889 | if (shape.LightEntry) |
4890 | res.Add(new LSL_Types.LSLInteger(1)); // active | 4890 | res.Add(new LSL_Types.LSLInteger(1)); // active |
4891 | else | 4891 | else |
@@ -4932,12 +4932,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4932 | // </para> | 4932 | // </para> |
4933 | // <para> | 4933 | // <para> |
4934 | // Each point in a base-64 string represents | 4934 | // Each point in a base-64 string represents |
4935 | // a 6 bit value. A 32-bit integer can be | 4935 | // a 6 bit value. A 32-bit integer can be |
4936 | // represented using 6 characters (with some | 4936 | // represented using 6 characters (with some |
4937 | // redundancy). | 4937 | // redundancy). |
4938 | // </para> | 4938 | // </para> |
4939 | // <para> | 4939 | // <para> |
4940 | // LSL requires a base64 string to be 8 | 4940 | // LSL requires a base64 string to be 8 |
4941 | // characters in length. LSL also uses '/' | 4941 | // characters in length. LSL also uses '/' |
4942 | // rather than '-' (MIME compliant). | 4942 | // rather than '-' (MIME compliant). |
4943 | // </para> | 4943 | // </para> |
@@ -4948,7 +4948,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4948 | // <para> | 4948 | // <para> |
4949 | // SL do not record any kind of exception for | 4949 | // SL do not record any kind of exception for |
4950 | // these functions, so the string to integer | 4950 | // these functions, so the string to integer |
4951 | // conversion returns '0' if an invalid | 4951 | // conversion returns '0' if an invalid |
4952 | // character is encountered during conversion. | 4952 | // character is encountered during conversion. |
4953 | // </para> | 4953 | // </para> |
4954 | // <para> | 4954 | // <para> |
@@ -4962,13 +4962,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4962 | // </list> | 4962 | // </list> |
4963 | // </para> | 4963 | // </para> |
4964 | // </remarks> | 4964 | // </remarks> |
4965 | 4965 | ||
4966 | // <summary> | 4966 | // <summary> |
4967 | // Table for converting 6-bit integers into | 4967 | // Table for converting 6-bit integers into |
4968 | // base-64 characters | 4968 | // base-64 characters |
4969 | // </summary> | 4969 | // </summary> |
4970 | 4970 | ||
4971 | private static readonly char[] i2ctable = | 4971 | private static readonly char[] i2ctable = |
4972 | { | 4972 | { |
4973 | 'A','B','C','D','E','F','G','H', | 4973 | 'A','B','C','D','E','F','G','H', |
4974 | 'I','J','K','L','M','N','O','P', | 4974 | 'I','J','K','L','M','N','O','P', |
@@ -4992,7 +4992,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4992 | { | 4992 | { |
4993 | -1,-1,-1,-1,-1,-1,-1,-1, // 0x | 4993 | -1,-1,-1,-1,-1,-1,-1,-1, // 0x |
4994 | -1,-1,-1,-1,-1,-1,-1,-1, | 4994 | -1,-1,-1,-1,-1,-1,-1,-1, |
4995 | -1,-1,-1,-1,-1,-1,-1,-1, // 1x | 4995 | -1,-1,-1,-1,-1,-1,-1,-1, // 1x |
4996 | -1,-1,-1,-1,-1,-1,-1,-1, | 4996 | -1,-1,-1,-1,-1,-1,-1,-1, |
4997 | -1,-1,-1,-1,-1,-1,-1,-1, // 2x | 4997 | -1,-1,-1,-1,-1,-1,-1,-1, // 2x |
4998 | -1,-1,-1,63,-1,-1,-1,64, | 4998 | -1,-1,-1,63,-1,-1,-1,64, |
@@ -5070,25 +5070,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5070 | // length strings return zero. | 5070 | // length strings return zero. |
5071 | // </param> | 5071 | // </param> |
5072 | // <returns> | 5072 | // <returns> |
5073 | // Returns an integer representing the | 5073 | // Returns an integer representing the |
5074 | // encoded value providedint he 1st 6 | 5074 | // encoded value providedint he 1st 6 |
5075 | // characters of the string. | 5075 | // characters of the string. |
5076 | // </returns> | 5076 | // </returns> |
5077 | // <remarks> | 5077 | // <remarks> |
5078 | // This is coded to behave like LSL's | 5078 | // This is coded to behave like LSL's |
5079 | // implementation (I think), based upon the | 5079 | // implementation (I think), based upon the |
5080 | // information available at the Wiki. | 5080 | // information available at the Wiki. |
5081 | // If more than 8 characters are supplied, | 5081 | // If more than 8 characters are supplied, |
5082 | // zero is returned. | 5082 | // zero is returned. |
5083 | // If a NULL string is supplied, zero will | 5083 | // If a NULL string is supplied, zero will |
5084 | // be returned. | 5084 | // be returned. |
5085 | // If fewer than 6 characters are supplied, then | 5085 | // If fewer than 6 characters are supplied, then |
5086 | // the answer will reflect a partial | 5086 | // the answer will reflect a partial |
5087 | // accumulation. | 5087 | // accumulation. |
5088 | // <para> | 5088 | // <para> |
5089 | // The 6-bit segments are | 5089 | // The 6-bit segments are |
5090 | // extracted left-to-right in big-endian mode, | 5090 | // extracted left-to-right in big-endian mode, |
5091 | // which means that segment 6 only contains the | 5091 | // which means that segment 6 only contains the |
5092 | // two low-order bits of the 32 bit integer as | 5092 | // two low-order bits of the 32 bit integer as |
5093 | // its high order 2 bits. A short string therefore | 5093 | // its high order 2 bits. A short string therefore |
5094 | // means loss of low-order information. E.g. | 5094 | // means loss of low-order information. E.g. |
@@ -5126,39 +5126,39 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5126 | return digit<0?(int)0:number; | 5126 | return digit<0?(int)0:number; |
5127 | } | 5127 | } |
5128 | number += --digit<<26; | 5128 | number += --digit<<26; |
5129 | 5129 | ||
5130 | if ((digit=c2itable[str[1]])<=0) | 5130 | if ((digit=c2itable[str[1]])<=0) |
5131 | { | 5131 | { |
5132 | return digit<0?(int)0:number; | 5132 | return digit<0?(int)0:number; |
5133 | } | 5133 | } |
5134 | number += --digit<<20; | 5134 | number += --digit<<20; |
5135 | 5135 | ||
5136 | if ((digit=c2itable[str[2]])<=0) | 5136 | if ((digit=c2itable[str[2]])<=0) |
5137 | { | 5137 | { |
5138 | return digit<0?(int)0:number; | 5138 | return digit<0?(int)0:number; |
5139 | } | 5139 | } |
5140 | number += --digit<<14; | 5140 | number += --digit<<14; |
5141 | 5141 | ||
5142 | if ((digit=c2itable[str[3]])<=0) | 5142 | if ((digit=c2itable[str[3]])<=0) |
5143 | { | 5143 | { |
5144 | return digit<0?(int)0:number; | 5144 | return digit<0?(int)0:number; |
5145 | } | 5145 | } |
5146 | number += --digit<<8; | 5146 | number += --digit<<8; |
5147 | 5147 | ||
5148 | if ((digit=c2itable[str[4]])<=0) | 5148 | if ((digit=c2itable[str[4]])<=0) |
5149 | { | 5149 | { |
5150 | return digit<0?(int)0:number; | 5150 | return digit<0?(int)0:number; |
5151 | } | 5151 | } |
5152 | number += --digit<<2; | 5152 | number += --digit<<2; |
5153 | 5153 | ||
5154 | if ((digit=c2itable[str[5]])<=0) | 5154 | if ((digit=c2itable[str[5]])<=0) |
5155 | { | 5155 | { |
5156 | return digit<0?(int)0:number; | 5156 | return digit<0?(int)0:number; |
5157 | } | 5157 | } |
5158 | number += --digit>>4; | 5158 | number += --digit>>4; |
5159 | 5159 | ||
5160 | // ignore trailing padding | 5160 | // ignore trailing padding |
5161 | 5161 | ||
5162 | return number; | 5162 | return number; |
5163 | } | 5163 | } |
5164 | 5164 | ||
@@ -5182,8 +5182,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5182 | 5182 | ||
5183 | // <summary> | 5183 | // <summary> |
5184 | // Scan the string supplied in 'src' and | 5184 | // Scan the string supplied in 'src' and |
5185 | // tokenize it based upon two sets of | 5185 | // tokenize it based upon two sets of |
5186 | // tokenizers provided in two lists, | 5186 | // tokenizers provided in two lists, |
5187 | // separators and spacers. | 5187 | // separators and spacers. |
5188 | // </summary> | 5188 | // </summary> |
5189 | // | 5189 | // |
@@ -5196,38 +5196,38 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5196 | // Both separators and spacers may be arbitrarily | 5196 | // Both separators and spacers may be arbitrarily |
5197 | // long strings. i.e. ":::". | 5197 | // long strings. i.e. ":::". |
5198 | // | 5198 | // |
5199 | // The function returns an ordered list | 5199 | // The function returns an ordered list |
5200 | // representing the tokens found in the supplied | 5200 | // representing the tokens found in the supplied |
5201 | // sources string. If two successive tokenizers | 5201 | // sources string. If two successive tokenizers |
5202 | // are encountered, then a NULL entry is added | 5202 | // are encountered, then a NULL entry is added |
5203 | // to the list. | 5203 | // to the list. |
5204 | // | 5204 | // |
5205 | // It is a precondition that the source and | 5205 | // It is a precondition that the source and |
5206 | // toekizer lisst are non-null. If they are null, | 5206 | // toekizer lisst are non-null. If they are null, |
5207 | // then a null pointer exception will be thrown | 5207 | // then a null pointer exception will be thrown |
5208 | // while their lengths are being determined. | 5208 | // while their lengths are being determined. |
5209 | // | 5209 | // |
5210 | // A small amount of working memoryis required | 5210 | // A small amount of working memoryis required |
5211 | // of approximately 8*#tokenizers. | 5211 | // of approximately 8*#tokenizers. |
5212 | // | 5212 | // |
5213 | // There are many ways in which this function | 5213 | // There are many ways in which this function |
5214 | // can be implemented, this implementation is | 5214 | // can be implemented, this implementation is |
5215 | // fairly naive and assumes that when the | 5215 | // fairly naive and assumes that when the |
5216 | // function is invooked with a short source | 5216 | // function is invooked with a short source |
5217 | // string and/or short lists of tokenizers, then | 5217 | // string and/or short lists of tokenizers, then |
5218 | // performance will not be an issue. | 5218 | // performance will not be an issue. |
5219 | // | 5219 | // |
5220 | // In order to minimize the perofrmance | 5220 | // In order to minimize the perofrmance |
5221 | // effects of long strings, or large numbers | 5221 | // effects of long strings, or large numbers |
5222 | // of tokeizers, the function skips as far as | 5222 | // of tokeizers, the function skips as far as |
5223 | // possible whenever a toekenizer is found, | 5223 | // possible whenever a toekenizer is found, |
5224 | // and eliminates redundant tokenizers as soon | 5224 | // and eliminates redundant tokenizers as soon |
5225 | // as is possible. | 5225 | // as is possible. |
5226 | // | 5226 | // |
5227 | // The implementation tries to avoid any copying | 5227 | // The implementation tries to avoid any copying |
5228 | // of arrays or other objects. | 5228 | // of arrays or other objects. |
5229 | // </remarks> | 5229 | // </remarks> |
5230 | 5230 | ||
5231 | public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) | 5231 | public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) |
5232 | { | 5232 | { |
5233 | int beginning = 0; | 5233 | int beginning = 0; |
@@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5256 | active[i] = true; | 5256 | active[i] = true; |
5257 | 5257 | ||
5258 | offset[mlen] = srclen; | 5258 | offset[mlen] = srclen; |
5259 | 5259 | ||
5260 | while (beginning < srclen) | 5260 | while (beginning < srclen) |
5261 | { | 5261 | { |
5262 | 5262 | ||
@@ -5270,7 +5270,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5270 | { | 5270 | { |
5271 | // scan all of the markers | 5271 | // scan all of the markers |
5272 | if ((offset[j] = src.IndexOf((string)separray[j],beginning)) == -1) | 5272 | if ((offset[j] = src.IndexOf((string)separray[j],beginning)) == -1) |
5273 | { | 5273 | { |
5274 | // not present at all | 5274 | // not present at all |
5275 | active[j] = false; | 5275 | active[j] = false; |
5276 | } | 5276 | } |
@@ -5278,7 +5278,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5278 | { | 5278 | { |
5279 | // present and correct | 5279 | // present and correct |
5280 | if (offset[j] < offset[best]) | 5280 | if (offset[j] < offset[best]) |
5281 | { | 5281 | { |
5282 | // closest so far | 5282 | // closest so far |
5283 | best = j; | 5283 | best = j; |
5284 | if (offset[best] == beginning) | 5284 | if (offset[best] == beginning) |
@@ -5293,19 +5293,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5293 | if (offset[best] != beginning) | 5293 | if (offset[best] != beginning) |
5294 | { | 5294 | { |
5295 | for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) | 5295 | for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) |
5296 | { | 5296 | { |
5297 | if (active[j]) | 5297 | if (active[j]) |
5298 | { | 5298 | { |
5299 | // scan all of the markers | 5299 | // scan all of the markers |
5300 | if ((offset[j] = src.IndexOf((string)spcarray[j-seplen],beginning)) == -1) | 5300 | if ((offset[j] = src.IndexOf((string)spcarray[j-seplen],beginning)) == -1) |
5301 | { | 5301 | { |
5302 | // not present at all | 5302 | // not present at all |
5303 | active[j] = false; | 5303 | active[j] = false; |
5304 | } else | 5304 | } else |
5305 | { | 5305 | { |
5306 | // present and correct | 5306 | // present and correct |
5307 | if (offset[j] < offset[best]) | 5307 | if (offset[j] < offset[best]) |
5308 | { | 5308 | { |
5309 | // closest so far | 5309 | // closest so far |
5310 | best = j; | 5310 | best = j; |
5311 | } | 5311 | } |
@@ -5317,7 +5317,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5317 | // This is the normal exit from the scanning loop | 5317 | // This is the normal exit from the scanning loop |
5318 | 5318 | ||
5319 | if (best == mlen) | 5319 | if (best == mlen) |
5320 | { | 5320 | { |
5321 | // no markers were found on this pass | 5321 | // no markers were found on this pass |
5322 | // so we're pretty much done | 5322 | // so we're pretty much done |
5323 | tokens.Add(src.Substring(beginning, srclen-beginning)); | 5323 | tokens.Add(src.Substring(beginning, srclen-beginning)); |
@@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5478 | //should be similar to : llInstantMessage(llGetOwner(),msg) | 5478 | //should be similar to : llInstantMessage(llGetOwner(),msg) |
5479 | // llGetOwner ==> m_host.ObjectOwner.ToString() | 5479 | // llGetOwner ==> m_host.ObjectOwner.ToString() |
5480 | llInstantMessage(m_host.ObjectOwner.ToString(),msg); | 5480 | llInstantMessage(m_host.ObjectOwner.ToString(),msg); |
5481 | 5481 | ||
5482 | //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); | 5482 | //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); |
5483 | //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 5483 | //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
5484 | //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); | 5484 | //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); |
@@ -5509,19 +5509,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5509 | 5509 | ||
5510 | /// <summary> | 5510 | /// <summary> |
5511 | /// illListReplaceList removes the sub-list defined by the inclusive indices | 5511 | /// illListReplaceList removes the sub-list defined by the inclusive indices |
5512 | /// start and end and inserts the src list in its place. The inclusive | 5512 | /// start and end and inserts the src list in its place. The inclusive |
5513 | /// nature of the indices means that at least one element must be deleted | 5513 | /// nature of the indices means that at least one element must be deleted |
5514 | /// if the indices are within the bounds of the existing list. I.e. 2,2 | 5514 | /// if the indices are within the bounds of the existing list. I.e. 2,2 |
5515 | /// will remove the element at index 2 and replace it with the source | 5515 | /// will remove the element at index 2 and replace it with the source |
5516 | /// list. Both indices may be negative, with the usual interpretation. An | 5516 | /// list. Both indices may be negative, with the usual interpretation. An |
5517 | /// interesting case is where end is lower than start. As these indices | 5517 | /// interesting case is where end is lower than start. As these indices |
5518 | /// bound the list to be removed, then 0->end, and start->lim are removed | 5518 | /// bound the list to be removed, then 0->end, and start->lim are removed |
5519 | /// and the source list is added as a suffix. | 5519 | /// and the source list is added as a suffix. |
5520 | /// </summary> | 5520 | /// </summary> |
5521 | 5521 | ||
5522 | public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) | 5522 | public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) |
5523 | { | 5523 | { |
5524 | 5524 | ||
5525 | LSL_Types.list pref = null; | 5525 | LSL_Types.list pref = null; |
5526 | 5526 | ||
5527 | m_host.AddScriptLPS(1); | 5527 | m_host.AddScriptLPS(1); |
@@ -5542,9 +5542,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5542 | // list. | 5542 | // list. |
5543 | if (start <= end) | 5543 | if (start <= end) |
5544 | { | 5544 | { |
5545 | // If greater than zero, then there is going to be a | 5545 | // If greater than zero, then there is going to be a |
5546 | // surviving prefix. Otherwise the inclusive nature | 5546 | // surviving prefix. Otherwise the inclusive nature |
5547 | // of the indices mean that we're going to add the | 5547 | // of the indices mean that we're going to add the |
5548 | // source list as a prefix. | 5548 | // source list as a prefix. |
5549 | if (start > 0) | 5549 | if (start > 0) |
5550 | { | 5550 | { |
@@ -5580,7 +5580,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5580 | } | 5580 | } |
5581 | // Finally, if start > end, we strip away a prefix and | 5581 | // Finally, if start > end, we strip away a prefix and |
5582 | // a suffix, to leave the list that sits <between> ens | 5582 | // a suffix, to leave the list that sits <between> ens |
5583 | // and start, and then tag on the src list. AT least | 5583 | // and start, and then tag on the src list. AT least |
5584 | // that's my interpretation. We can get sublist to do | 5584 | // that's my interpretation. We can get sublist to do |
5585 | // this for us. Note that one, or both of the indices | 5585 | // this for us. Note that one, or both of the indices |
5586 | // might have been negative. | 5586 | // might have been negative. |
@@ -6084,7 +6084,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6084 | if (LLUUID.TryParse(id, out key)) | 6084 | if (LLUUID.TryParse(id, out key)) |
6085 | { | 6085 | { |
6086 | ScenePresence av = World.GetScenePresence(key); | 6086 | ScenePresence av = World.GetScenePresence(key); |
6087 | 6087 | ||
6088 | if (av != null) | 6088 | if (av != null) |
6089 | { | 6089 | { |
6090 | foreach (object o in args.Data) | 6090 | foreach (object o in args.Data) |
@@ -6103,7 +6103,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6103 | case "4": | 6103 | case "4": |
6104 | ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); | 6104 | ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); |
6105 | break; | 6105 | break; |
6106 | case "5": | 6106 | case "5": |
6107 | ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); | 6107 | ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); |
6108 | break; | 6108 | break; |
6109 | case "6": | 6109 | case "6": |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index e031c01..c8c51f8 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -493,7 +493,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
493 | 493 | ||
494 | // now, this makes the math easier | 494 | // now, this makes the math easier |
495 | int remove=end+1-start; | 495 | int remove=end+1-start; |
496 | 496 | ||
497 | ret=new Object[m_data.Length-remove]; | 497 | ret=new Object[m_data.Length-remove]; |
498 | if (ret.Length == 0) | 498 | if (ret.Length == 0) |
499 | return new list(ret); | 499 | return new list(ret); |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
519 | // NOTE that either index may still be negative after | 519 | // NOTE that either index may still be negative after |
520 | // adding the length, so we must take additional | 520 | // adding the length, so we must take additional |
521 | // measures to protect against this. Note also that | 521 | // measures to protect against this. Note also that |
522 | // after normalisation the negative indices are no | 522 | // after normalisation the negative indices are no |
523 | // longer relative to the end of the list. | 523 | // longer relative to the end of the list. |
524 | 524 | ||
525 | if (start < 0) | 525 | if (start < 0) |
@@ -533,7 +533,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
533 | } | 533 | } |
534 | 534 | ||
535 | // The conventional case is start <= end | 535 | // The conventional case is start <= end |
536 | // NOTE that the case of an empty list is | 536 | // NOTE that the case of an empty list is |
537 | // dealt with by the initial test. Start | 537 | // dealt with by the initial test. Start |
538 | // less than end is taken to be the most | 538 | // less than end is taken to be the most |
539 | // common case. | 539 | // common case. |
@@ -553,7 +553,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
553 | { | 553 | { |
554 | end = m_data.Length - 1; | 554 | end = m_data.Length - 1; |
555 | } | 555 | } |
556 | 556 | ||
557 | // Sublist still starts before the beginning of the list | 557 | // Sublist still starts before the beginning of the list |
558 | if (start < 0) | 558 | if (start < 0) |
559 | { | 559 | { |
@@ -561,7 +561,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
561 | } | 561 | } |
562 | 562 | ||
563 | ret = new object[end - start + 1]; | 563 | ret = new object[end - start + 1]; |
564 | 564 | ||
565 | Array.Copy(m_data, start, ret, 0, end - start + 1); | 565 | Array.Copy(m_data, start, ret, 0, end - start + 1); |
566 | 566 | ||
567 | return new list(ret); | 567 | return new list(ret); |
@@ -580,7 +580,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
580 | { | 580 | { |
581 | result = new list(); | 581 | result = new list(); |
582 | // If start is still negative, then the whole of | 582 | // If start is still negative, then the whole of |
583 | // the existing list is returned. This case is | 583 | // the existing list is returned. This case is |
584 | // only admitted if end is also still negative. | 584 | // only admitted if end is also still negative. |
585 | if (start < 0) | 585 | if (start < 0) |
586 | { | 586 | { |
@@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
593 | result = GetSublist(0,end); | 593 | result = GetSublist(0,end); |
594 | } | 594 | } |
595 | 595 | ||
596 | // If start is outside of list, then just return | 596 | // If start is outside of list, then just return |
597 | // the prefix, whatever it is. | 597 | // the prefix, whatever it is. |
598 | if (start >= m_data.Length) | 598 | if (start >= m_data.Length) |
599 | { | 599 | { |
@@ -896,7 +896,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
896 | } | 896 | } |
897 | } | 897 | } |
898 | 898 | ||
899 | #endregion | 899 | #endregion |
900 | 900 | ||
901 | public string ToPrettyString() | 901 | public string ToPrettyString() |
902 | { | 902 | { |
@@ -962,7 +962,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
962 | } | 962 | } |
963 | 963 | ||
964 | // | 964 | // |
965 | // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) | 965 | // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) |
966 | // | 966 | // |
967 | 967 | ||
968 | public struct StringTest | 968 | public struct StringTest |
@@ -1103,7 +1103,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1103 | } | 1103 | } |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | 1106 | ||
1107 | 1107 | ||
1108 | static public implicit operator String(LSLString s) | 1108 | static public implicit operator String(LSLString s) |
1109 | { | 1109 | { |
@@ -1267,7 +1267,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1267 | i.value++; | 1267 | i.value++; |
1268 | return i; | 1268 | return i; |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | 1271 | ||
1272 | public static LSLInteger operator --(LSLInteger i) | 1272 | public static LSLInteger operator --(LSLInteger i) |
1273 | { | 1273 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 2b6f6d9..03d3a41 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -268,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
268 | return 0; | 268 | return 0; |
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | public double osTerrainGetHeight(int x, int y) | 272 | public double osTerrainGetHeight(int x, int y) |
273 | { | 273 | { |
274 | m_host.AddScriptLPS(1); | 274 | m_host.AddScriptLPS(1); |
@@ -448,7 +448,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | //Texture draw functions | 451 | //Texture draw functions |
452 | public string osMovePen(string drawList, int x, int y) | 452 | public string osMovePen(string drawList, int x, int y) |
453 | { | 453 | { |
454 | m_host.AddScriptLPS(1); | 454 | m_host.AddScriptLPS(1); |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 2d58b57..aa9c8c7 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
60 | string osSetPenSize(string drawList, int penSize); | 60 | string osSetPenSize(string drawList, int penSize); |
61 | string osSetPenColour(string drawList, string colour); | 61 | string osSetPenColour(string drawList, string colour); |
62 | string osDrawImage(string drawList, int width, int height, string imageUrl); | 62 | string osDrawImage(string drawList, int width, int height, string imageUrl); |
63 | void osSetStateEvents(int events); | 63 | void osSetStateEvents(int events); |
64 | 64 | ||
65 | } | 65 | } |
66 | } | 66 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs index f438120..335d1a0 100644 --- a/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index f3af621..2a0ed37 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs | |||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
115 | Thread.Sleep(cmdHandlerThreadCycleSleepms); | 115 | Thread.Sleep(cmdHandlerThreadCycleSleepms); |
116 | //lock (ScriptEngine.ScriptEngines) | 116 | //lock (ScriptEngine.ScriptEngines) |
117 | //{ | 117 | //{ |
118 | foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines)) | 118 | foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines)) |
119 | { | 119 | { |
120 | se.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass(); | 120 | se.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass(); |
121 | } | 121 | } |
@@ -176,7 +176,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
176 | 176 | ||
177 | #region Check llRemoteData channels | 177 | #region Check llRemoteData channels |
178 | 178 | ||
179 | 179 | ||
180 | #endregion | 180 | #endregion |
181 | 181 | ||
182 | #region Check llListeners | 182 | #region Check llListeners |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index 4311836..13c9d25 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -218,7 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
218 | objtype |= 0x04; // passive non-moving | 218 | objtype |= 0x04; // passive non-moving |
219 | else | 219 | else |
220 | objtype |= 0x02; // active moving | 220 | objtype |= 0x02; // active moving |
221 | if (ent is IScript) objtype |= 0x08; // Scripted. It COULD have one hidden ... | 221 | if (ent is IScript) objtype |= 0x08; // Scripted. It COULD have one hidden ... |
222 | 222 | ||
223 | if (((ts.type & objtype) != 0) || ((ts.type & objtype) == ts.type)) | 223 | if (((ts.type & objtype) != 0) || ((ts.type & objtype) == ts.type)) |
224 | { | 224 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 141e471..6f88e11 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | // Old method: Create new list | 97 | // Old method: Create new list |
98 | //List<TimerClass> NewTimers = new List<TimerClass>(); | 98 | //List<TimerClass> NewTimers = new List<TimerClass>(); |
99 | //foreach (TimerClass ts in Timers) | 99 | //foreach (TimerClass ts in Timers) |
100 | //{ | 100 | //{ |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 715e465..fc005ab 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class MaintenanceThread : iScriptEngineFunctionModule | 40 | public class MaintenanceThread : iScriptEngineFunctionModule |
41 | { | 41 | { |
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 | //public ScriptEngine m_ScriptEngine; | 45 | //public ScriptEngine m_ScriptEngine; |
@@ -238,6 +238,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
238 | // get { return _PleaseShutdown; } | 238 | // get { return _PleaseShutdown; } |
239 | // set { _PleaseShutdown = value; } | 239 | // set { _PleaseShutdown = value; } |
240 | //} | 240 | //} |
241 | //private bool _PleaseShutdown = false; | 241 | //private bool _PleaseShutdown = false; |
242 | } | 242 | } |
243 | } | 243 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index a7ad50d..b0c6314 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
38 | /// <summary> | 38 | /// <summary> |
39 | /// This is the root object for ScriptEngine. Objects access each other trough this class. | 39 | /// This is the root object for ScriptEngine. Objects access each other trough this class. |
40 | /// </summary> | 40 | /// </summary> |
41 | /// | 41 | /// |
42 | [Serializable] | 42 | [Serializable] |
43 | public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule | 43 | public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule |
44 | { | 44 | { |
@@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
154 | #region IRegionModule | 154 | #region IRegionModule |
155 | 155 | ||
156 | public abstract void Initialise(Scene scene, IConfigSource config); | 156 | public abstract void Initialise(Scene scene, IConfigSource config); |
157 | 157 | ||
158 | public void PostInitialise() | 158 | public void PostInitialise() |
159 | { | 159 | { |
160 | } | 160 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 2233913..c84975a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
41 | /// Compiles them if necessary | 41 | /// Compiles them if necessary |
42 | /// Execute functions for EventQueueManager (Sends them to script on other AppDomain for execution) | 42 | /// Execute functions for EventQueueManager (Sends them to script on other AppDomain for execution) |
43 | /// </summary> | 43 | /// </summary> |
44 | /// | 44 | /// |
45 | 45 | ||
46 | // This class is as close as you get to the script without being inside script class. It handles all the dirty work for other classes. | 46 | // This class is as close as you get to the script without being inside script class. It handles all the dirty work for other classes. |
47 | // * Keeps track of running scripts | 47 | // * Keeps track of running scripts |
@@ -212,7 +212,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
212 | if (LUQueue.Count > 0) | 212 | if (LUQueue.Count > 0) |
213 | { | 213 | { |
214 | LUStruct item = LUQueue.Dequeue(); | 214 | LUStruct item = LUQueue.Dequeue(); |
215 | 215 | ||
216 | if (item.Action == LUType.Unload) | 216 | if (item.Action == LUType.Unload) |
217 | { | 217 | { |
218 | _StopScript(item.localID, item.itemID); | 218 | _StopScript(item.localID, item.itemID); |
@@ -224,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | #endregion | 228 | #endregion |
229 | 229 | ||
230 | #region Helper functions | 230 | #region Helper functions |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index 55a20e7..26892a2 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs | |||
@@ -33,7 +33,7 @@ using System.Net.Sockets; | |||
33 | 33 | ||
34 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | 34 | namespace OpenSim.Region.ScriptEngine.Common.TRPC |
35 | { | 35 | { |
36 | public class TCPServer: TCPCommon.ServerInterface | 36 | public class TCPServer: TCPCommon.ServerInterface |
37 | { | 37 | { |
38 | public readonly int LocalPort; | 38 | public readonly int LocalPort; |
39 | public TCPServer(int localPort) | 39 | public TCPServer(int localPort) |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index c293ecb..a310978 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
44 | public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); | 44 | public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); |
45 | public event ReceiveCommandDelegate ReceiveCommand; | 45 | public event ReceiveCommandDelegate ReceiveCommand; |
46 | Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); | 46 | Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); |
47 | Type[] Types = | 47 | Type[] Types = |
48 | { | 48 | { |
49 | typeof(String), | 49 | typeof(String), |
50 | typeof(Int16), | 50 | typeof(Int16), |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 1d71182..f661162 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -39,9 +39,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
39 | { | 39 | { |
40 | public class Compiler | 40 | public class Compiler |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log | 42 | private static readonly log4net.ILog m_log |
43 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 43 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. | 45 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. |
46 | // * Compiles C#-code into an assembly | 46 | // * Compiles C#-code into an assembly |
47 | // * Returns assembly name ready for AppDomain load. | 47 | // * Returns assembly name ready for AppDomain load. |
@@ -278,8 +278,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
278 | 278 | ||
279 | if (enableCommanderLSL == true && l == enumCompileType.cs) | 279 | if (enableCommanderLSL == true && l == enumCompileType.cs) |
280 | { | 280 | { |
281 | foreach (KeyValuePair<string, | 281 | foreach (KeyValuePair<string, |
282 | ICommander> com | 282 | ICommander> com |
283 | in m_scriptEngine.World.GetCommanders()) | 283 | in m_scriptEngine.World.GetCommanders()) |
284 | { | 284 | { |
285 | compileScript = com.Value.GenerateRuntimeAPI() + compileScript; | 285 | compileScript = com.Value.GenerateRuntimeAPI() + compileScript; |
@@ -305,7 +305,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
305 | m_log.Debug("[ScriptEngine.DotNetEngine]: Preparing to compile the following LSL to C# translated code"); | 305 | m_log.Debug("[ScriptEngine.DotNetEngine]: Preparing to compile the following LSL to C# translated code"); |
306 | m_log.Debug(""); | 306 | m_log.Debug(""); |
307 | m_log.Debug(compileScript); | 307 | m_log.Debug(compileScript); |
308 | 308 | ||
309 | return CompileFromDotNetText(compileScript, l); | 309 | return CompileFromDotNetText(compileScript, l); |
310 | } | 310 | } |
311 | 311 | ||
@@ -322,7 +322,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
322 | 322 | ||
323 | private static string CreateCSCompilerScript(string compileScript) | 323 | private static string CreateCSCompilerScript(string compileScript) |
324 | { | 324 | { |
325 | 325 | ||
326 | 326 | ||
327 | compileScript = String.Empty + | 327 | compileScript = String.Empty + |
328 | "using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;\r\n" + | 328 | "using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;\r\n" + |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 2100900..1832864 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
@@ -32,17 +32,13 @@ using System.Text.RegularExpressions; | |||
32 | 32 | ||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
34 | { | 34 | { |
35 | |||
36 | public class LSL2CSConverter | 35 | public class LSL2CSConverter |
37 | { | 36 | { |
38 | |||
39 | |||
40 | // Uses regex to convert LSL code to C# code. | 37 | // Uses regex to convert LSL code to C# code. |
41 | 38 | ||
42 | //private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled); | 39 | //private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled); |
43 | private Dictionary<string, string> dataTypes = new Dictionary<string, string>(); | 40 | private Dictionary<string, string> dataTypes = new Dictionary<string, string>(); |
44 | private Dictionary<string, string> quotes = new Dictionary<string, string>(); | 41 | private Dictionary<string, string> quotes = new Dictionary<string, string>(); |
45 | |||
46 | 42 | ||
47 | public LSL2CSConverter() | 43 | public LSL2CSConverter() |
48 | { | 44 | { |
@@ -72,7 +68,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
72 | Script = Regex.Replace(Script, @"\r\n", "\n"); | 68 | Script = Regex.Replace(Script, @"\r\n", "\n"); |
73 | Script = Regex.Replace(Script, @"\n", "\r\n"); | 69 | Script = Regex.Replace(Script, @"\n", "\r\n"); |
74 | 70 | ||
75 | |||
76 | // QUOTE REPLACEMENT | 71 | // QUOTE REPLACEMENT |
77 | // temporarily replace quotes so we can work our magic on the script without | 72 | // temporarily replace quotes so we can work our magic on the script without |
78 | // always considering if we are inside our outside quotes's | 73 | // always considering if we are inside our outside quotes's |
@@ -86,21 +81,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
86 | bool last_was_escape = false; | 81 | bool last_was_escape = false; |
87 | int quote_replaced_count = 0; | 82 | int quote_replaced_count = 0; |
88 | 83 | ||
89 | |||
90 | |||
91 | string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft", | 84 | string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft", |
92 | "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql", | 85 | "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql", |
93 | "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet", | 86 | "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet", |
94 | "PumaCode","RAIL","XMLRPC","System"}; | 87 | "PumaCode","RAIL","XMLRPC","System"}; |
95 | |||
96 | 88 | ||
97 | for (int p = 0; p < blocked.Length;p++) | 89 | for (int p = 0; p < blocked.Length;p++) |
98 | { | 90 | { |
99 | |||
100 | Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 91 | Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
101 | if (SecurityM.Success) | 92 | if (SecurityM.Success) |
102 | throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'"); | 93 | throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'"); |
103 | |||
104 | } | 94 | } |
105 | 95 | ||
106 | for (int p = 0; p < Script.Length; p++) | 96 | for (int p = 0; p < Script.Length; p++) |
@@ -166,7 +156,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
166 | // END OF QUOTE REPLACEMENT | 156 | // END OF QUOTE REPLACEMENT |
167 | // | 157 | // |
168 | 158 | ||
169 | |||
170 | // | 159 | // |
171 | // PROCESS STATES | 160 | // PROCESS STATES |
172 | // Remove state definitions and add state names to start of each event within state | 161 | // Remove state definitions and add state names to start of each event within state |
@@ -194,7 +183,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
194 | // if level == 0, add to return | 183 | // if level == 0, add to return |
195 | if (ilevel == 1 && lastlevel == 0) | 184 | if (ilevel == 1 && lastlevel == 0) |
196 | { | 185 | { |
197 | // 0 => 1: Get last | 186 | // 0 => 1: Get last |
198 | Match m = | 187 | Match m = |
199 | //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", | 188 | //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", |
200 | Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?<statename>[a-zA-Z_][a-zA-Z_0-9]*)[^a-zA-Z_0-9\(\)]*{", | 189 | Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?<statename>[a-zA-Z_][a-zA-Z_0-9]*)[^a-zA-Z_0-9\(\)]*{", |
@@ -253,7 +242,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
253 | Script = ret; | 242 | Script = ret; |
254 | ret = String.Empty; | 243 | ret = String.Empty; |
255 | 244 | ||
256 | |||
257 | foreach (string key in dataTypes.Keys) | 245 | foreach (string key in dataTypes.Keys) |
258 | { | 246 | { |
259 | string val; | 247 | string val; |
@@ -291,7 +279,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
291 | Regex.Replace(Script, @"\[([^\]]*)\]", @"new LSL_Types.list($1)", | 279 | Regex.Replace(Script, @"\[([^\]]*)\]", @"new LSL_Types.list($1)", |
292 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 280 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
293 | 281 | ||
294 | |||
295 | // Replace (string) to .ToString() // | 282 | // Replace (string) to .ToString() // |
296 | Script = | 283 | Script = |
297 | Regex.Replace(Script, @"\(string\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.ToString()", | 284 | Regex.Replace(Script, @"\(string\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.ToString()", |
@@ -313,12 +300,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
313 | Script = Script.Replace(key, "\"" + val + "\""); | 300 | Script = Script.Replace(key, "\"" + val + "\""); |
314 | } | 301 | } |
315 | 302 | ||
316 | |||
317 | |||
318 | //System.Console.WriteLine(Script); | 303 | //System.Console.WriteLine(Script); |
319 | Return = String.Empty;// + | 304 | Return = String.Empty;// + |
320 | //"using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;"; | 305 | //"using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;"; |
321 | |||
322 | 306 | ||
323 | //Return += String.Empty + | 307 | //Return += String.Empty + |
324 | // "namespace SecondLife { "; | 308 | // "namespace SecondLife { "; |
@@ -328,13 +312,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
328 | //Return += @"public Script() { } "; | 312 | //Return += @"public Script() { } "; |
329 | Return += Script; | 313 | Return += Script; |
330 | //Return += "} }\r\n"; | 314 | //Return += "} }\r\n"; |
331 | 315 | ||
332 | quotes.Clear(); | 316 | quotes.Clear(); |
333 | 317 | ||
334 | return Return; | 318 | return Return; |
335 | } | 319 | } |
336 | |||
337 | } | 320 | } |
338 | |||
339 | |||
340 | } | 321 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs index bce9cfc..799aa92 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index ed2c0a3..55289d9 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
102 | 102 | ||
103 | // Fire the first start-event | 103 | // Fire the first start-event |
104 | int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); | 104 | int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); |
105 | m_host.SetScriptEvents(itemID, eventFlags); | 105 | m_host.SetScriptEvents(itemID, eventFlags); |
106 | m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); | 106 | m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); |
107 | } | 107 | } |
108 | catch (Exception e) // LEGIT: User Scripting | 108 | catch (Exception e) // LEGIT: User Scripting |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs index 0208350..f53772e 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs | |||
@@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
168 | Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); | 168 | Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); |
169 | //ConstructorBuilder constructor = typeBuilder.DefineConstructor( | 169 | //ConstructorBuilder constructor = typeBuilder.DefineConstructor( |
170 | // MethodAttributes.Public, | 170 | // MethodAttributes.Public, |
171 | // CallingConventions.Standard, | 171 | // CallingConventions.Standard, |
172 | // new Type[0]); | 172 | // new Type[0]); |
173 | ConstructorBuilder constructor = typeBuilder.DefineConstructor( | 173 | ConstructorBuilder constructor = typeBuilder.DefineConstructor( |
174 | MethodAttributes.Public | | 174 | MethodAttributes.Public | |
@@ -192,8 +192,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
192 | //// Create state object | 192 | //// Create state object |
193 | //FieldName = "State"; | 193 | //FieldName = "State"; |
194 | //FieldBuilder State_fb = typeBuilder.DefineField( | 194 | //FieldBuilder State_fb = typeBuilder.DefineField( |
195 | // FieldName, | 195 | // FieldName, |
196 | // typeof(UInt32), | 196 | // typeof(UInt32), |
197 | // FieldAttributes.Public); | 197 | // FieldAttributes.Public); |
198 | //il.Emit(OpCodes.Ldarg_0); | 198 | //il.Emit(OpCodes.Ldarg_0); |
199 | //il.Emit(OpCodes.Ldc_I4, 0); | 199 | //il.Emit(OpCodes.Ldc_I4, 0); |
@@ -206,8 +206,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
206 | 206 | ||
207 | //FieldName = "LSL_BuiltIns"; | 207 | //FieldName = "LSL_BuiltIns"; |
208 | //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( | 208 | //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( |
209 | // FieldName, | 209 | // FieldName, |
210 | // objType1, | 210 | // objType1, |
211 | // FieldAttributes.Public); | 211 | // FieldAttributes.Public); |
212 | 212 | ||
213 | ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); | 213 | ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs index 1b73311..7805aa3 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs | |||
@@ -34,9 +34,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
34 | // * | 34 | // * |
35 | // * These are internal "assembly" commands, | 35 | // * These are internal "assembly" commands, |
36 | // * basic operators like "ADD", "PUSH" and "POP" | 36 | // * basic operators like "ADD", "PUSH" and "POP" |
37 | // * | 37 | // * |
38 | // * It also contains managed stack and keeps track of internal variables, etc. | 38 | // * It also contains managed stack and keeps track of internal variables, etc. |
39 | // * | 39 | // * |
40 | // */ | 40 | // */ |
41 | 41 | ||
42 | 42 | ||
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs index 06ae1e9..b2a2f25 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | |||
@@ -69,14 +69,12 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
69 | fs.Close(); | 69 | fs.Close(); |
70 | } | 70 | } |
71 | 71 | ||
72 | |||
73 | /// <summary> | 72 | /// <summary> |
74 | /// Parse LSO file. | 73 | /// Parse LSO file. |
75 | /// </summary> | 74 | /// </summary> |
76 | public void Parse() | 75 | public void Parse() |
77 | { | 76 | { |
78 | // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. | 77 | // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. |
79 | |||
80 | 78 | ||
81 | // HEADER BLOCK | 79 | // HEADER BLOCK |
82 | Common.SendToDebug("Reading HEADER BLOCK at: 0"); | 80 | Common.SendToDebug("Reading HEADER BLOCK at: 0"); |
@@ -156,7 +154,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
156 | } | 154 | } |
157 | Common.SendToDebug("Number of Static Blocks read: " + StaticBlockCount); | 155 | Common.SendToDebug("Number of Static Blocks read: " + StaticBlockCount); |
158 | 156 | ||
159 | |||
160 | // FUNCTION BLOCK | 157 | // FUNCTION BLOCK |
161 | // Always right after STATIC BLOCK | 158 | // Always right after STATIC BLOCK |
162 | LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock(); | 159 | LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock(); |
@@ -186,7 +183,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
186 | } | 183 | } |
187 | } | 184 | } |
188 | 185 | ||
189 | |||
190 | // STATE FRAME BLOCK | 186 | // STATE FRAME BLOCK |
191 | // Always right after FUNCTION BLOCK | 187 | // Always right after FUNCTION BLOCK |
192 | Common.SendToDebug("Reading STATE BLOCK at: " + myHeader.SR); | 188 | Common.SendToDebug("Reading STATE BLOCK at: " + myHeader.SR); |
@@ -213,7 +209,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
213 | } | 209 | } |
214 | } | 210 | } |
215 | 211 | ||
216 | |||
217 | // STATE BLOCK | 212 | // STATE BLOCK |
218 | // For each StateFrameBlock there is one StateBlock with multiple event handlers | 213 | // For each StateFrameBlock there is one StateBlock with multiple event handlers |
219 | 214 | ||
@@ -239,7 +234,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
239 | 234 | ||
240 | // We need to count number of bits flagged in EventMask? | 235 | // We need to count number of bits flagged in EventMask? |
241 | 236 | ||
242 | |||
243 | // for each bit in myStateFrameBlock.StatePointer[i].EventMask | 237 | // for each bit in myStateFrameBlock.StatePointer[i].EventMask |
244 | 238 | ||
245 | // ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE | 239 | // ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE |
@@ -273,7 +267,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
273 | } | 267 | } |
274 | } | 268 | } |
275 | 269 | ||
276 | |||
277 | //// READ FUNCTION CODE CHUNKS | 270 | //// READ FUNCTION CODE CHUNKS |
278 | //// Functions + Function start pos (GFR) | 271 | //// Functions + Function start pos (GFR) |
279 | //// TODO: Somehow be able to identify and reference this | 272 | //// TODO: Somehow be able to identify and reference this |
@@ -293,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
293 | { | 286 | { |
294 | for (int i = 0; i < myStateFrameBlock.StateCount; i++) | 287 | for (int i = 0; i < myStateFrameBlock.StateCount; i++) |
295 | { | 288 | { |
296 | // TODO: Somehow organize events and functions so they can be found again, | 289 | // TODO: Somehow organize events and functions so they can be found again, |
297 | // two level search ain't no good | 290 | // two level search ain't no good |
298 | for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) | 291 | for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) |
299 | { | 292 | { |
@@ -320,7 +313,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
320 | } | 313 | } |
321 | } | 314 | } |
322 | 315 | ||
323 | |||
324 | if (Common.IL_CreateFunctionList) | 316 | if (Common.IL_CreateFunctionList) |
325 | IL_INSERT_FUNCTIONLIST(); | 317 | IL_INSERT_FUNCTIONLIST(); |
326 | } | 318 | } |
@@ -371,7 +363,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
371 | 363 | ||
372 | //private byte[] br_read_smallendian(int len) | 364 | //private byte[] br_read_smallendian(int len) |
373 | //{ | 365 | //{ |
374 | // byte[] bytes = new byte[len]; | 366 | // byte[] bytes = new byte[len]; |
375 | // br.Read(bytes,0, len); | 367 | // br.Read(bytes,0, len); |
376 | // return bytes; | 368 | // return bytes; |
377 | //} | 369 | //} |
@@ -459,7 +451,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
459 | Common.SendToDebug("Return type #" + myCodeChunk.ReturnType.ObjectType + ": " + | 451 | Common.SendToDebug("Return type #" + myCodeChunk.ReturnType.ObjectType + ": " + |
460 | ((LSO_Enums.Variable_Type_Codes) myCodeChunk.ReturnType.ObjectType).ToString()); | 452 | ((LSO_Enums.Variable_Type_Codes) myCodeChunk.ReturnType.ObjectType).ToString()); |
461 | 453 | ||
462 | |||
463 | // TODO: How to determine number of codechunks -- does this method work? | 454 | // TODO: How to determine number of codechunks -- does this method work? |
464 | myCodeChunk.CodeChunkArguments = new List<LSO_Struct.CodeChunkArgument>(); | 455 | myCodeChunk.CodeChunkArguments = new List<LSO_Struct.CodeChunkArgument>(); |
465 | byte reader = br_read(1)[0]; | 456 | byte reader = br_read(1)[0]; |
@@ -492,7 +483,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
492 | // End marker is 0x000 | 483 | // End marker is 0x000 |
493 | myCodeChunk.EndMarker = reader; | 484 | myCodeChunk.EndMarker = reader; |
494 | 485 | ||
495 | |||
496 | // | 486 | // |
497 | // Emit: START OF METHOD (FUNCTION) | 487 | // Emit: START OF METHOD (FUNCTION) |
498 | // | 488 | // |
@@ -515,11 +505,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
515 | Common.SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();"); | 505 | Common.SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();"); |
516 | ILGenerator il = methodBuilder.GetILGenerator(); | 506 | ILGenerator il = methodBuilder.GetILGenerator(); |
517 | 507 | ||
518 | |||
519 | if (Common.IL_UseTryCatch) | 508 | if (Common.IL_UseTryCatch) |
520 | IL_INSERT_TRY(il, eventname); | 509 | IL_INSERT_TRY(il, eventname); |
521 | 510 | ||
522 | |||
523 | // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!"); | 511 | // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!"); |
524 | //Common.SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); | 512 | //Common.SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); |
525 | //il.Emit(OpCodes.Call, typeof(Console).GetMethod | 513 | //il.Emit(OpCodes.Call, typeof(Console).GetMethod |
@@ -534,7 +522,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
534 | il.Emit(OpCodes.Ldarg, _ic); | 522 | il.Emit(OpCodes.Ldarg, _ic); |
535 | } | 523 | } |
536 | 524 | ||
537 | |||
538 | // | 525 | // |
539 | // CALLING OPCODE PROCESSOR, one command at the time TO GENERATE IL | 526 | // CALLING OPCODE PROCESSOR, one command at the time TO GENERATE IL |
540 | // | 527 | // |
@@ -544,7 +531,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
544 | FoundRet = LSL_PROCESS_OPCODE(il); | 531 | FoundRet = LSL_PROCESS_OPCODE(il); |
545 | } | 532 | } |
546 | 533 | ||
547 | |||
548 | if (Common.IL_UseTryCatch) | 534 | if (Common.IL_UseTryCatch) |
549 | IL_INSERT_END_TRY(il, eventname); | 535 | IL_INSERT_END_TRY(il, eventname); |
550 | 536 | ||
@@ -558,17 +544,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
558 | { | 544 | { |
559 | Common.SendToDebug("Creating function list"); | 545 | Common.SendToDebug("Creating function list"); |
560 | 546 | ||
561 | |||
562 | string eventname = "GetFunctions"; | 547 | string eventname = "GetFunctions"; |
563 | 548 | ||
564 | Common.SendToDebug("Creating IL " + eventname); | 549 | Common.SendToDebug("Creating IL " + eventname); |
565 | // Define a private String field. | 550 | // Define a private String field. |
566 | //FieldBuilder myField = myTypeBuilder.DefineField("EventList", typeof(String[]), FieldAttributes.Public); | 551 | //FieldBuilder myField = myTypeBuilder.DefineField("EventList", typeof(String[]), FieldAttributes.Public); |
567 | 552 | ||
568 | |||
569 | //FieldBuilder mem = typeBuilder.DefineField("mem", typeof(Array), FieldAttributes.Private); | 553 | //FieldBuilder mem = typeBuilder.DefineField("mem", typeof(Array), FieldAttributes.Private); |
570 | 554 | ||
571 | |||
572 | MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname, | 555 | MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname, |
573 | MethodAttributes.Public, | 556 | MethodAttributes.Public, |
574 | typeof (string[]), | 557 | typeof (string[]), |
@@ -579,7 +562,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
579 | 562 | ||
580 | ILGenerator il = methodBuilder.GetILGenerator(); | 563 | ILGenerator il = methodBuilder.GetILGenerator(); |
581 | 564 | ||
582 | |||
583 | // IL_INSERT_TRY(il, eventname); | 565 | // IL_INSERT_TRY(il, eventname); |
584 | 566 | ||
585 | // // Push string to stack | 567 | // // Push string to stack |
@@ -615,17 +597,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
615 | //il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("AddFunction", new Type[] { typeof(string) })); | 597 | //il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("AddFunction", new Type[] { typeof(string) })); |
616 | } | 598 | } |
617 | 599 | ||
618 | |||
619 | // IL_INSERT_END_TRY(il, eventname); | 600 | // IL_INSERT_END_TRY(il, eventname); |
620 | 601 | ||
621 | |||
622 | il.Emit(OpCodes.Ldloc_0); // Load local variable 0 onto stack | 602 | il.Emit(OpCodes.Ldloc_0); // Load local variable 0 onto stack |
623 | // il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("SetFunctionList", new Type[] { typeof(Array) })); | 603 | // il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("SetFunctionList", new Type[] { typeof(Array) })); |
624 | 604 | ||
625 | il.Emit(OpCodes.Ret); // Return | 605 | il.Emit(OpCodes.Ret); // Return |
626 | } | 606 | } |
627 | 607 | ||
628 | |||
629 | private void IL_INSERT_TRY(ILGenerator il, string eventname) | 608 | private void IL_INSERT_TRY(ILGenerator il, string eventname) |
630 | { | 609 | { |
631 | /* | 610 | /* |
@@ -687,7 +666,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO | |||
687 | { | 666 | { |
688 | Common.SendToDebug("Found cached STATIC BLOCK"); | 667 | Common.SendToDebug("Found cached STATIC BLOCK"); |
689 | 668 | ||
690 | |||
691 | return StaticBlocks[pos]; | 669 | return StaticBlocks[pos]; |
692 | } | 670 | } |
693 | 671 | ||
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs index 78b44a0..5210ff0 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index 20d1a58..617d6f6 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
92 | 92 | ||
93 | // Fire the first start-event | 93 | // Fire the first start-event |
94 | int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); | 94 | int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); |
95 | m_host.SetScriptEvents(itemID, eventFlags); | 95 | m_host.SetScriptEvents(itemID, eventFlags); |
96 | m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); | 96 | m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); |
97 | } | 97 | } |
98 | catch (Exception e) // LEGIT - User Script Compilation | 98 | catch (Exception e) // LEGIT - User Script Compilation |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs index 70a84f1..77d9b10 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | 30 | ||
31 | // General Information about an assembly is controlled through the following | 31 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 32 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 33 | // associated with an assembly. |
34 | 34 | ||
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly : AssemblyTrademark("")] | 41 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 42 | [assembly : AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | 47 | ||
48 | [assembly : ComVisible(false)] | 48 | [assembly : ComVisible(false)] |
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices; | |||
54 | // Version information for an assembly consists of the following four values: | 54 | // Version information for an assembly consists of the following four values: |
55 | // | 55 | // |
56 | // Major Version | 56 | // Major Version |
57 | // Minor Version | 57 | // Minor Version |
58 | // Build Number | 58 | // Build Number |
59 | // Revision | 59 | // Revision |
60 | // | 60 | // |
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index c33cfd1..8754516 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
39 | /// <summary> | 39 | /// <summary> |
40 | /// This is the root object for RemoteServer. Objects access each other trough this class. | 40 | /// This is the root object for RemoteServer. Objects access each other trough this class. |
41 | /// </summary> | 41 | /// </summary> |
42 | /// | 42 | /// |
43 | [Serializable] | 43 | [Serializable] |
44 | public class ScriptEngine : IRegionModule | 44 | public class ScriptEngine : IRegionModule |
45 | { | 45 | { |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs index c0fc890..0416779 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.CompilerServices; | 29 | using System.Runtime.CompilerServices; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | [assembly: AssemblyTitle("OpenSim.DataStore.DB4o")] | 35 | [assembly: AssemblyTitle("OpenSim.DataStore.DB4o")] |
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly: AssemblyTrademark("")] | 41 | [assembly: AssemblyTrademark("")] |
42 | [assembly: AssemblyCulture("")] | 42 | [assembly: AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | [assembly: ComVisible(false)] | 47 | [assembly: ComVisible(false)] |
48 | 48 | ||
@@ -52,11 +52,11 @@ using System.Runtime.InteropServices; | |||
52 | // Version information for an assembly consists of the following four values: | 52 | // Version information for an assembly consists of the following four values: |
53 | // | 53 | // |
54 | // Major Version | 54 | // Major Version |
55 | // Minor Version | 55 | // Minor Version |
56 | // Build Number | 56 | // Build Number |
57 | // Revision | 57 | // Revision |
58 | // | 58 | // |
59 | // You can specify all the values or you can default the Revision and Build Numbers | 59 | // You can specify all the values or you can default the Revision and Build Numbers |
60 | // by using the '*' as shown below: | 60 | // by using the '*' as shown below: |
61 | [assembly: AssemblyVersion("1.0.0.0")] | 61 | [assembly: AssemblyVersion("1.0.0.0")] |
62 | [assembly: AssemblyFileVersion("1.0.0.0")] | 62 | [assembly: AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index c917e1e..fa0d0b6 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.DataStore.MSSQL | |||
142 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 142 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
143 | { | 143 | { |
144 | m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 144 | m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); |
145 | 145 | ||
146 | DataTable prims = ds.Tables["prims"]; | 146 | DataTable prims = ds.Tables["prims"]; |
147 | DataTable shapes = ds.Tables["primshapes"]; | 147 | DataTable shapes = ds.Tables["primshapes"]; |
148 | 148 | ||
@@ -332,7 +332,7 @@ namespace OpenSim.DataStore.MSSQL | |||
332 | /*********************************************************************** | 332 | /*********************************************************************** |
333 | * | 333 | * |
334 | * Database Definition Functions | 334 | * Database Definition Functions |
335 | * | 335 | * |
336 | * This should be db agnostic as we define them in ADO.NET terms | 336 | * This should be db agnostic as we define them in ADO.NET terms |
337 | * | 337 | * |
338 | **********************************************************************/ | 338 | **********************************************************************/ |
@@ -460,7 +460,7 @@ namespace OpenSim.DataStore.MSSQL | |||
460 | } | 460 | } |
461 | 461 | ||
462 | /*********************************************************************** | 462 | /*********************************************************************** |
463 | * | 463 | * |
464 | * Convert between ADO.NET <=> OpenSim Objects | 464 | * Convert between ADO.NET <=> OpenSim Objects |
465 | * | 465 | * |
466 | * These should be database independant | 466 | * These should be database independant |
@@ -650,7 +650,7 @@ namespace OpenSim.DataStore.MSSQL | |||
650 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 650 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
651 | 651 | ||
652 | // text TODO: this isn't right] = but I'm not sure the right | 652 | // text TODO: this isn't right] = but I'm not sure the right |
653 | // way to specify this as a blob atm | 653 | // way to specify this as a blob atm |
654 | byte[] textureEntry = (byte[]) row["Texture"]; | 654 | byte[] textureEntry = (byte[]) row["Texture"]; |
655 | s.TextureEntry = textureEntry; | 655 | s.TextureEntry = textureEntry; |
656 | 656 | ||
@@ -695,7 +695,7 @@ namespace OpenSim.DataStore.MSSQL | |||
695 | // way to specify this as a blob atm | 695 | // way to specify this as a blob atm |
696 | 696 | ||
697 | // And I couldn't work out how to save binary data either | 697 | // And I couldn't work out how to save binary data either |
698 | // seems that the texture colum is being treated as a string in the Datarow | 698 | // seems that the texture colum is being treated as a string in the Datarow |
699 | // if you do a .getType() on it, it returns string, while the other columns return correct type | 699 | // if you do a .getType() on it, it returns string, while the other columns return correct type |
700 | // MW[10-08-07] | 700 | // MW[10-08-07] |
701 | // Added following xml hack but not really ideal , also ExtraParams isn't currently part of the database | 701 | // Added following xml hack but not really ideal , also ExtraParams isn't currently part of the database |
@@ -738,7 +738,7 @@ namespace OpenSim.DataStore.MSSQL | |||
738 | fillShapeRow(shapeRow, prim); | 738 | fillShapeRow(shapeRow, prim); |
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | // see IRegionDatastore | 742 | // see IRegionDatastore |
743 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 743 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
744 | { | 744 | { |
@@ -868,7 +868,7 @@ namespace OpenSim.DataStore.MSSQL | |||
868 | /// This is a convenience function that collapses 5 repetitive | 868 | /// This is a convenience function that collapses 5 repetitive |
869 | /// lines for defining SqlParameters to 2 parameters: | 869 | /// lines for defining SqlParameters to 2 parameters: |
870 | /// column name and database type. | 870 | /// column name and database type. |
871 | /// | 871 | /// |
872 | /// It assumes certain conventions like :param as the param | 872 | /// It assumes certain conventions like :param as the param |
873 | /// name to replace in parametrized queries, and that source | 873 | /// name to replace in parametrized queries, and that source |
874 | /// version is always current version, both of which are fine | 874 | /// version is always current version, both of which are fine |
diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 3d6b54c..a7bbe80 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs | |||
@@ -54,13 +54,13 @@ namespace OpenSim.TestSuite | |||
54 | 54 | ||
55 | protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here | 55 | protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here |
56 | 56 | ||
57 | 57 | ||
58 | //New instance of a SecondLife client | 58 | //New instance of a SecondLife client |
59 | public SecondLife client = new SecondLife(); | 59 | public SecondLife client = new SecondLife(); |
60 | 60 | ||
61 | protected string[] talkarray; | 61 | protected string[] talkarray; |
62 | /// <summary> | 62 | /// <summary> |
63 | /// | 63 | /// |
64 | /// </summary> | 64 | /// </summary> |
65 | /// <param name="bsconfig">nini config for the bot</param> | 65 | /// <param name="bsconfig">nini config for the bot</param> |
66 | public PhysicsBot(IConfig bsconfig) | 66 | public PhysicsBot(IConfig bsconfig) |
@@ -70,7 +70,7 @@ namespace OpenSim.TestSuite | |||
70 | talkarray = readexcuses(); | 70 | talkarray = readexcuses(); |
71 | } | 71 | } |
72 | 72 | ||
73 | //We do our actions here. This is where one would | 73 | //We do our actions here. This is where one would |
74 | //add additional steps and/or things the bot should do | 74 | //add additional steps and/or things the bot should do |
75 | 75 | ||
76 | void m_action_Elapsed(object sender, ElapsedEventArgs e) | 76 | void m_action_Elapsed(object sender, ElapsedEventArgs e) |
diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs index c82391b..5823af4 100644 --- a/OpenSim/TestSuite/Util.cs +++ b/OpenSim/TestSuite/Util.cs | |||
@@ -36,13 +36,13 @@ namespace OpenSim.TestSuite | |||
36 | Pass = 1, | 36 | Pass = 1, |
37 | Skip = 3 | 37 | Skip = 3 |
38 | } | 38 | } |
39 | 39 | ||
40 | private static String ResultToString(Result r) | 40 | private static String ResultToString(Result r) |
41 | { | 41 | { |
42 | if (r == Result.Pass) | 42 | if (r == Result.Pass) |
43 | { | 43 | { |
44 | return "PASS"; | 44 | return "PASS"; |
45 | } | 45 | } |
46 | else if (r == Result.Fail) | 46 | else if (r == Result.Fail) |
47 | { | 47 | { |
48 | return "FAIL"; | 48 | return "FAIL"; |
@@ -51,30 +51,30 @@ namespace OpenSim.TestSuite | |||
51 | { | 51 | { |
52 | return "SKIP"; | 52 | return "SKIP"; |
53 | } | 53 | } |
54 | else | 54 | else |
55 | { | 55 | { |
56 | return "UNKNOWN"; | 56 | return "UNKNOWN"; |
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
60 | private static void TestResult(Result r, String msg) | 60 | private static void TestResult(Result r, String msg) |
61 | { | 61 | { |
62 | Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); | 62 | Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); |
63 | } | 63 | } |
64 | 64 | ||
65 | public static void TestFail(String msg) | 65 | public static void TestFail(String msg) |
66 | { | 66 | { |
67 | TestResult(Result.Fail, msg); | 67 | TestResult(Result.Fail, msg); |
68 | } | 68 | } |
69 | 69 | ||
70 | public static void TestPass(String msg) | 70 | public static void TestPass(String msg) |
71 | { | 71 | { |
72 | TestResult(Result.Pass, msg); | 72 | TestResult(Result.Pass, msg); |
73 | } | 73 | } |
74 | 74 | ||
75 | public static void TestSkip(String msg) | 75 | public static void TestSkip(String msg) |
76 | { | 76 | { |
77 | TestResult(Result.Skip, msg); | 77 | TestResult(Result.Skip, msg); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | } | 80 | } |
diff --git a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs index a766549..c7a6ecc 100644 --- a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs +++ b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs | |||
@@ -39,9 +39,9 @@ namespace OpenSim.Tests.Common | |||
39 | { | 39 | { |
40 | _baseValue = baseValue; | 40 | _baseValue = baseValue; |
41 | } | 41 | } |
42 | 42 | ||
43 | ///<summary> | 43 | ///<summary> |
44 | ///Test whether the constraint is satisfied by a given value | 44 | ///Test whether the constraint is satisfied by a given value |
45 | ///</summary> | 45 | ///</summary> |
46 | ///<param name="valueToBeTested">The value to be tested</param> | 46 | ///<param name="valueToBeTested">The value to be tested</param> |
47 | ///<returns> | 47 | ///<returns> |
@@ -70,7 +70,7 @@ namespace OpenSim.Tests.Common | |||
70 | 70 | ||
71 | public override void WriteActualValueTo(MessageWriter writer) | 71 | public override void WriteActualValueTo(MessageWriter writer) |
72 | { | 72 | { |
73 | writer.WriteActualValue(_valueToBeTested); | 73 | writer.WriteActualValue(_valueToBeTested); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } | 76 | } |
diff --git a/OpenSim/Tests/Common/VectorToleranceConstraint.cs b/OpenSim/Tests/Common/VectorToleranceConstraint.cs index 2b60db3..249fe09 100644 --- a/OpenSim/Tests/Common/VectorToleranceConstraint.cs +++ b/OpenSim/Tests/Common/VectorToleranceConstraint.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common | |||
42 | } | 42 | } |
43 | 43 | ||
44 | ///<summary> | 44 | ///<summary> |
45 | ///Test whether the constraint is satisfied by a given value | 45 | ///Test whether the constraint is satisfied by a given value |
46 | ///</summary> | 46 | ///</summary> |
47 | ///<param name="valueToBeTested">The value to be tested</param> | 47 | ///<param name="valueToBeTested">The value to be tested</param> |
48 | ///<returns> | 48 | ///<returns> |
diff --git a/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs b/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs index 76b30b7..eb4da1c 100644 --- a/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs +++ b/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.CompilerServices; | 29 | using System.Runtime.CompilerServices; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | [assembly: AssemblyTitle("Inventory")] | 35 | [assembly: AssemblyTitle("Inventory")] |
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly: AssemblyTrademark("")] | 41 | [assembly: AssemblyTrademark("")] |
42 | [assembly: AssemblyCulture("")] | 42 | [assembly: AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | [assembly: ComVisible(false)] | 47 | [assembly: ComVisible(false)] |
48 | 48 | ||
@@ -52,11 +52,11 @@ using System.Runtime.InteropServices; | |||
52 | // Version information for an assembly consists of the following four values: | 52 | // Version information for an assembly consists of the following four values: |
53 | // | 53 | // |
54 | // Major Version | 54 | // Major Version |
55 | // Minor Version | 55 | // Minor Version |
56 | // Build Number | 56 | // Build Number |
57 | // Revision | 57 | // Revision |
58 | // | 58 | // |
59 | // You can specify all the values or you can default the Revision and Build Numbers | 59 | // You can specify all the values or you can default the Revision and Build Numbers |
60 | // by using the '*' as shown below: | 60 | // by using the '*' as shown below: |
61 | [assembly: AssemblyVersion("1.0.0.0")] | 61 | [assembly: AssemblyVersion("1.0.0.0")] |
62 | [assembly: AssemblyFileVersion("1.0.0.0")] | 62 | [assembly: AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs index 711e8b4..99c7277 100644 --- a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs +++ b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.UserServer.Stress | |||
36 | public class UserServerStressTest | 36 | public class UserServerStressTest |
37 | { | 37 | { |
38 | public static void Main(string[] args) | 38 | public static void Main(string[] args) |
39 | { | 39 | { |
40 | XmlConfigurator.Configure(); | 40 | XmlConfigurator.Configure(); |
41 | 41 | ||
42 | Console.WriteLine("Aborting - not yet functional"); | 42 | Console.WriteLine("Aborting - not yet functional"); |
diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs index 62af735..797580d 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.CompilerServices; | 29 | using System.Runtime.CompilerServices; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | [assembly: AssemblyTitle("LaunchSLClient")] | 35 | [assembly: AssemblyTitle("LaunchSLClient")] |
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly: AssemblyTrademark("")] | 41 | [assembly: AssemblyTrademark("")] |
42 | [assembly: AssemblyCulture("")] | 42 | [assembly: AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | [assembly: ComVisible(false)] | 47 | [assembly: ComVisible(false)] |
48 | 48 | ||
@@ -52,7 +52,7 @@ using System.Runtime.InteropServices; | |||
52 | // Version information for an assembly consists of the following four values: | 52 | // Version information for an assembly consists of the following four values: |
53 | // | 53 | // |
54 | // Major Version | 54 | // Major Version |
55 | // Minor Version | 55 | // Minor Version |
56 | // Build Number | 56 | // Build Number |
57 | // Revision | 57 | // Revision |
58 | // | 58 | // |
diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs b/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs index 637fb09..74fedfa 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.CompilerServices; | 29 | using System.Runtime.CompilerServices; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | [assembly: AssemblyTitle("OpenSim.32BitLaunch")] | 35 | [assembly: AssemblyTitle("OpenSim.32BitLaunch")] |
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly: AssemblyTrademark("")] | 41 | [assembly: AssemblyTrademark("")] |
42 | [assembly: AssemblyCulture("")] | 42 | [assembly: AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | [assembly: ComVisible(false)] | 47 | [assembly: ComVisible(false)] |
48 | 48 | ||
@@ -52,11 +52,11 @@ using System.Runtime.InteropServices; | |||
52 | // Version information for an assembly consists of the following four values: | 52 | // Version information for an assembly consists of the following four values: |
53 | // | 53 | // |
54 | // Major Version | 54 | // Major Version |
55 | // Minor Version | 55 | // Minor Version |
56 | // Build Number | 56 | // Build Number |
57 | // Revision | 57 | // Revision |
58 | // | 58 | // |
59 | // You can specify all the values or you can default the Build and Revision Numbers | 59 | // You can specify all the values or you can default the Build and Revision Numbers |
60 | // by using the '*' as shown below: | 60 | // by using the '*' as shown below: |
61 | // [assembly: AssemblyVersion("1.0.*")] | 61 | // [assembly: AssemblyVersion("1.0.*")] |
62 | [assembly: AssemblyVersion("1.0.0.0")] | 62 | [assembly: AssemblyVersion("1.0.0.0")] |
diff --git a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs index e1481a2..af29bce 100644 --- a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs +++ b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs | |||
@@ -168,9 +168,9 @@ namespace OpenSim.GUI | |||
168 | this.tabAssetServer.SuspendLayout(); | 168 | this.tabAssetServer.SuspendLayout(); |
169 | this.tabGridServer.SuspendLayout(); | 169 | this.tabGridServer.SuspendLayout(); |
170 | this.SuspendLayout(); | 170 | this.SuspendLayout(); |
171 | // | 171 | // |
172 | // menuStrip1 | 172 | // menuStrip1 |
173 | // | 173 | // |
174 | this.menuStrip1.AutoSize = false; | 174 | this.menuStrip1.AutoSize = false; |
175 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | 175 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |
176 | this.fileToolStripMenuItem}); | 176 | this.fileToolStripMenuItem}); |
@@ -179,36 +179,36 @@ namespace OpenSim.GUI | |||
179 | this.menuStrip1.Size = new System.Drawing.Size(900, 20); | 179 | this.menuStrip1.Size = new System.Drawing.Size(900, 20); |
180 | this.menuStrip1.TabIndex = 7; | 180 | this.menuStrip1.TabIndex = 7; |
181 | this.menuStrip1.Text = "menuStrip1"; | 181 | this.menuStrip1.Text = "menuStrip1"; |
182 | // | 182 | // |
183 | // fileToolStripMenuItem | 183 | // fileToolStripMenuItem |
184 | // | 184 | // |
185 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { | 185 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
186 | this.exitToolStripMenuItem}); | 186 | this.exitToolStripMenuItem}); |
187 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; | 187 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; |
188 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 16); | 188 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 16); |
189 | this.fileToolStripMenuItem.Text = "File"; | 189 | this.fileToolStripMenuItem.Text = "File"; |
190 | // | 190 | // |
191 | // exitToolStripMenuItem | 191 | // exitToolStripMenuItem |
192 | // | 192 | // |
193 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; | 193 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; |
194 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(130, 22); | 194 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(130, 22); |
195 | this.exitToolStripMenuItem.Text = "Exit Cleanly"; | 195 | this.exitToolStripMenuItem.Text = "Exit Cleanly"; |
196 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); | 196 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); |
197 | // | 197 | // |
198 | // timer1 | 198 | // timer1 |
199 | // | 199 | // |
200 | this.timer1.Enabled = true; | 200 | this.timer1.Enabled = true; |
201 | // | 201 | // |
202 | // clientBox1 | 202 | // clientBox1 |
203 | // | 203 | // |
204 | this.clientBox1.Location = new System.Drawing.Point(680, 27); | 204 | this.clientBox1.Location = new System.Drawing.Point(680, 27); |
205 | this.clientBox1.Name = "clientBox1"; | 205 | this.clientBox1.Name = "clientBox1"; |
206 | this.clientBox1.Size = new System.Drawing.Size(213, 20); | 206 | this.clientBox1.Size = new System.Drawing.Size(213, 20); |
207 | this.clientBox1.TabIndex = 8; | 207 | this.clientBox1.TabIndex = 8; |
208 | this.clientBox1.Text = "C://Secondlife//"; | 208 | this.clientBox1.Text = "C://Secondlife//"; |
209 | // | 209 | // |
210 | // btnStart | 210 | // btnStart |
211 | // | 211 | // |
212 | this.btnStart.Location = new System.Drawing.Point(7, 366); | 212 | this.btnStart.Location = new System.Drawing.Point(7, 366); |
213 | this.btnStart.Name = "btnStart"; | 213 | this.btnStart.Name = "btnStart"; |
214 | this.btnStart.Size = new System.Drawing.Size(80, 23); | 214 | this.btnStart.Size = new System.Drawing.Size(80, 23); |
@@ -216,9 +216,9 @@ namespace OpenSim.GUI | |||
216 | this.btnStart.Text = "Start"; | 216 | this.btnStart.Text = "Start"; |
217 | this.btnStart.UseVisualStyleBackColor = true; | 217 | this.btnStart.UseVisualStyleBackColor = true; |
218 | this.btnStart.Click += new System.EventHandler(this.btnStart_Click); | 218 | this.btnStart.Click += new System.EventHandler(this.btnStart_Click); |
219 | // | 219 | // |
220 | // btnStop | 220 | // btnStop |
221 | // | 221 | // |
222 | this.btnStop.Location = new System.Drawing.Point(92, 366); | 222 | this.btnStop.Location = new System.Drawing.Point(92, 366); |
223 | this.btnStop.Name = "btnStop"; | 223 | this.btnStop.Name = "btnStop"; |
224 | this.btnStop.Size = new System.Drawing.Size(80, 23); | 224 | this.btnStop.Size = new System.Drawing.Size(80, 23); |
@@ -226,9 +226,9 @@ namespace OpenSim.GUI | |||
226 | this.btnStop.Text = "Stop"; | 226 | this.btnStop.Text = "Stop"; |
227 | this.btnStop.UseVisualStyleBackColor = true; | 227 | this.btnStop.UseVisualStyleBackColor = true; |
228 | this.btnStop.Click += new System.EventHandler(this.btnStop_Click); | 228 | this.btnStop.Click += new System.EventHandler(this.btnStop_Click); |
229 | // | 229 | // |
230 | // rbGridRegionMode | 230 | // rbGridRegionMode |
231 | // | 231 | // |
232 | this.rbGridRegionMode.AutoSize = true; | 232 | this.rbGridRegionMode.AutoSize = true; |
233 | this.rbGridRegionMode.Location = new System.Drawing.Point(96, 27); | 233 | this.rbGridRegionMode.Location = new System.Drawing.Point(96, 27); |
234 | this.rbGridRegionMode.Name = "rbGridRegionMode"; | 234 | this.rbGridRegionMode.Name = "rbGridRegionMode"; |
@@ -237,9 +237,9 @@ namespace OpenSim.GUI | |||
237 | this.rbGridRegionMode.Text = "Grid region"; | 237 | this.rbGridRegionMode.Text = "Grid region"; |
238 | this.rbGridRegionMode.UseVisualStyleBackColor = true; | 238 | this.rbGridRegionMode.UseVisualStyleBackColor = true; |
239 | this.rbGridRegionMode.CheckedChanged += new System.EventHandler(this.rbGridRegionMode_CheckedChanged); | 239 | this.rbGridRegionMode.CheckedChanged += new System.EventHandler(this.rbGridRegionMode_CheckedChanged); |
240 | // | 240 | // |
241 | // rbStandAloneMode | 241 | // rbStandAloneMode |
242 | // | 242 | // |
243 | this.rbStandAloneMode.AutoSize = true; | 243 | this.rbStandAloneMode.AutoSize = true; |
244 | this.rbStandAloneMode.Checked = true; | 244 | this.rbStandAloneMode.Checked = true; |
245 | this.rbStandAloneMode.Location = new System.Drawing.Point(8, 27); | 245 | this.rbStandAloneMode.Location = new System.Drawing.Point(8, 27); |
@@ -250,9 +250,9 @@ namespace OpenSim.GUI | |||
250 | this.rbStandAloneMode.Text = "Stand alone"; | 250 | this.rbStandAloneMode.Text = "Stand alone"; |
251 | this.rbStandAloneMode.UseVisualStyleBackColor = true; | 251 | this.rbStandAloneMode.UseVisualStyleBackColor = true; |
252 | this.rbStandAloneMode.CheckedChanged += new System.EventHandler(this.rbStandAloneMode_CheckedChanged); | 252 | this.rbStandAloneMode.CheckedChanged += new System.EventHandler(this.rbStandAloneMode_CheckedChanged); |
253 | // | 253 | // |
254 | // rbGridServer | 254 | // rbGridServer |
255 | // | 255 | // |
256 | this.rbGridServer.AutoSize = true; | 256 | this.rbGridServer.AutoSize = true; |
257 | this.rbGridServer.Location = new System.Drawing.Point(178, 27); | 257 | this.rbGridServer.Location = new System.Drawing.Point(178, 27); |
258 | this.rbGridServer.Name = "rbGridServer"; | 258 | this.rbGridServer.Name = "rbGridServer"; |
@@ -261,9 +261,9 @@ namespace OpenSim.GUI | |||
261 | this.rbGridServer.Text = "Grid server"; | 261 | this.rbGridServer.Text = "Grid server"; |
262 | this.rbGridServer.UseVisualStyleBackColor = true; | 262 | this.rbGridServer.UseVisualStyleBackColor = true; |
263 | this.rbGridServer.CheckedChanged += new System.EventHandler(this.rbGridServer_CheckedChanged); | 263 | this.rbGridServer.CheckedChanged += new System.EventHandler(this.rbGridServer_CheckedChanged); |
264 | // | 264 | // |
265 | // Launch1 | 265 | // Launch1 |
266 | // | 266 | // |
267 | this.Launch1.Location = new System.Drawing.Point(264, 366); | 267 | this.Launch1.Location = new System.Drawing.Point(264, 366); |
268 | this.Launch1.Name = "Launch1"; | 268 | this.Launch1.Name = "Launch1"; |
269 | this.Launch1.Size = new System.Drawing.Size(80, 23); | 269 | this.Launch1.Size = new System.Drawing.Size(80, 23); |
@@ -271,9 +271,9 @@ namespace OpenSim.GUI | |||
271 | this.Launch1.Text = "Client Launch"; | 271 | this.Launch1.Text = "Client Launch"; |
272 | this.Launch1.UseVisualStyleBackColor = true; | 272 | this.Launch1.UseVisualStyleBackColor = true; |
273 | this.Launch1.Click += new System.EventHandler(this.Launch1_Click); | 273 | this.Launch1.Click += new System.EventHandler(this.Launch1_Click); |
274 | // | 274 | // |
275 | // gbLog | 275 | // gbLog |
276 | // | 276 | // |
277 | this.gbLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 277 | this.gbLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
278 | | System.Windows.Forms.AnchorStyles.Left) | 278 | | System.Windows.Forms.AnchorStyles.Left) |
279 | | System.Windows.Forms.AnchorStyles.Right))); | 279 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -284,9 +284,9 @@ namespace OpenSim.GUI | |||
284 | this.gbLog.TabIndex = 1; | 284 | this.gbLog.TabIndex = 1; |
285 | this.gbLog.TabStop = false; | 285 | this.gbLog.TabStop = false; |
286 | this.gbLog.Text = "Logs"; | 286 | this.gbLog.Text = "Logs"; |
287 | // | 287 | // |
288 | // tabLogs | 288 | // tabLogs |
289 | // | 289 | // |
290 | this.tabLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 290 | this.tabLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
291 | | System.Windows.Forms.AnchorStyles.Left) | 291 | | System.Windows.Forms.AnchorStyles.Left) |
292 | | System.Windows.Forms.AnchorStyles.Right))); | 292 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -300,9 +300,9 @@ namespace OpenSim.GUI | |||
300 | this.tabLogs.SelectedIndex = 0; | 300 | this.tabLogs.SelectedIndex = 0; |
301 | this.tabLogs.Size = new System.Drawing.Size(333, 285); | 301 | this.tabLogs.Size = new System.Drawing.Size(333, 285); |
302 | this.tabLogs.TabIndex = 0; | 302 | this.tabLogs.TabIndex = 0; |
303 | // | 303 | // |
304 | // tabMainLog | 304 | // tabMainLog |
305 | // | 305 | // |
306 | this.tabMainLog.Controls.Add(this.txtMainLog); | 306 | this.tabMainLog.Controls.Add(this.txtMainLog); |
307 | this.tabMainLog.Location = new System.Drawing.Point(4, 22); | 307 | this.tabMainLog.Location = new System.Drawing.Point(4, 22); |
308 | this.tabMainLog.Name = "tabMainLog"; | 308 | this.tabMainLog.Name = "tabMainLog"; |
@@ -310,9 +310,9 @@ namespace OpenSim.GUI | |||
310 | this.tabMainLog.TabIndex = 4; | 310 | this.tabMainLog.TabIndex = 4; |
311 | this.tabMainLog.Text = "Main log"; | 311 | this.tabMainLog.Text = "Main log"; |
312 | this.tabMainLog.UseVisualStyleBackColor = true; | 312 | this.tabMainLog.UseVisualStyleBackColor = true; |
313 | // | 313 | // |
314 | // txtMainLog | 314 | // txtMainLog |
315 | // | 315 | // |
316 | this.txtMainLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 316 | this.txtMainLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
317 | | System.Windows.Forms.AnchorStyles.Left) | 317 | | System.Windows.Forms.AnchorStyles.Left) |
318 | | System.Windows.Forms.AnchorStyles.Right))); | 318 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -322,9 +322,9 @@ namespace OpenSim.GUI | |||
322 | this.txtMainLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; | 322 | this.txtMainLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
323 | this.txtMainLog.Size = new System.Drawing.Size(325, 259); | 323 | this.txtMainLog.Size = new System.Drawing.Size(325, 259); |
324 | this.txtMainLog.TabIndex = 1; | 324 | this.txtMainLog.TabIndex = 1; |
325 | // | 325 | // |
326 | // tabRegionServer | 326 | // tabRegionServer |
327 | // | 327 | // |
328 | this.tabRegionServer.Controls.Add(this.txtInputRegionServer); | 328 | this.tabRegionServer.Controls.Add(this.txtInputRegionServer); |
329 | this.tabRegionServer.Controls.Add(this.label1); | 329 | this.tabRegionServer.Controls.Add(this.label1); |
330 | this.tabRegionServer.Controls.Add(this.txtOpenSim); | 330 | this.tabRegionServer.Controls.Add(this.txtOpenSim); |
@@ -335,25 +335,25 @@ namespace OpenSim.GUI | |||
335 | this.tabRegionServer.TabIndex = 0; | 335 | this.tabRegionServer.TabIndex = 0; |
336 | this.tabRegionServer.Text = "Region server"; | 336 | this.tabRegionServer.Text = "Region server"; |
337 | this.tabRegionServer.UseVisualStyleBackColor = true; | 337 | this.tabRegionServer.UseVisualStyleBackColor = true; |
338 | // | 338 | // |
339 | // txtInputRegionServer | 339 | // txtInputRegionServer |
340 | // | 340 | // |
341 | this.txtInputRegionServer.Location = new System.Drawing.Point(53, 239); | 341 | this.txtInputRegionServer.Location = new System.Drawing.Point(53, 239); |
342 | this.txtInputRegionServer.Name = "txtInputRegionServer"; | 342 | this.txtInputRegionServer.Name = "txtInputRegionServer"; |
343 | this.txtInputRegionServer.Size = new System.Drawing.Size(272, 20); | 343 | this.txtInputRegionServer.Size = new System.Drawing.Size(272, 20); |
344 | this.txtInputRegionServer.TabIndex = 5; | 344 | this.txtInputRegionServer.TabIndex = 5; |
345 | // | 345 | // |
346 | // label1 | 346 | // label1 |
347 | // | 347 | // |
348 | this.label1.AutoSize = true; | 348 | this.label1.AutoSize = true; |
349 | this.label1.Location = new System.Drawing.Point(0, 242); | 349 | this.label1.Location = new System.Drawing.Point(0, 242); |
350 | this.label1.Name = "label1"; | 350 | this.label1.Name = "label1"; |
351 | this.label1.Size = new System.Drawing.Size(57, 13); | 351 | this.label1.Size = new System.Drawing.Size(57, 13); |
352 | this.label1.TabIndex = 4; | 352 | this.label1.TabIndex = 4; |
353 | this.label1.Text = "Command:"; | 353 | this.label1.Text = "Command:"; |
354 | // | 354 | // |
355 | // txtOpenSim | 355 | // txtOpenSim |
356 | // | 356 | // |
357 | this.txtOpenSim.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 357 | this.txtOpenSim.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
358 | | System.Windows.Forms.AnchorStyles.Left) | 358 | | System.Windows.Forms.AnchorStyles.Left) |
359 | | System.Windows.Forms.AnchorStyles.Right))); | 359 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -363,9 +363,9 @@ namespace OpenSim.GUI | |||
363 | this.txtOpenSim.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; | 363 | this.txtOpenSim.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
364 | this.txtOpenSim.Size = new System.Drawing.Size(325, 236); | 364 | this.txtOpenSim.Size = new System.Drawing.Size(325, 236); |
365 | this.txtOpenSim.TabIndex = 0; | 365 | this.txtOpenSim.TabIndex = 0; |
366 | // | 366 | // |
367 | // tabUserServer | 367 | // tabUserServer |
368 | // | 368 | // |
369 | this.tabUserServer.Controls.Add(this.txtInputUserServer); | 369 | this.tabUserServer.Controls.Add(this.txtInputUserServer); |
370 | this.tabUserServer.Controls.Add(this.label2); | 370 | this.tabUserServer.Controls.Add(this.label2); |
371 | this.tabUserServer.Controls.Add(this.txtUserServer); | 371 | this.tabUserServer.Controls.Add(this.txtUserServer); |
@@ -376,25 +376,25 @@ namespace OpenSim.GUI | |||
376 | this.tabUserServer.TabIndex = 1; | 376 | this.tabUserServer.TabIndex = 1; |
377 | this.tabUserServer.Text = "User server"; | 377 | this.tabUserServer.Text = "User server"; |
378 | this.tabUserServer.UseVisualStyleBackColor = true; | 378 | this.tabUserServer.UseVisualStyleBackColor = true; |
379 | // | 379 | // |
380 | // txtInputUserServer | 380 | // txtInputUserServer |
381 | // | 381 | // |
382 | this.txtInputUserServer.Location = new System.Drawing.Point(53, 239); | 382 | this.txtInputUserServer.Location = new System.Drawing.Point(53, 239); |
383 | this.txtInputUserServer.Name = "txtInputUserServer"; | 383 | this.txtInputUserServer.Name = "txtInputUserServer"; |
384 | this.txtInputUserServer.Size = new System.Drawing.Size(272, 20); | 384 | this.txtInputUserServer.Size = new System.Drawing.Size(272, 20); |
385 | this.txtInputUserServer.TabIndex = 7; | 385 | this.txtInputUserServer.TabIndex = 7; |
386 | // | 386 | // |
387 | // label2 | 387 | // label2 |
388 | // | 388 | // |
389 | this.label2.AutoSize = true; | 389 | this.label2.AutoSize = true; |
390 | this.label2.Location = new System.Drawing.Point(0, 242); | 390 | this.label2.Location = new System.Drawing.Point(0, 242); |
391 | this.label2.Name = "label2"; | 391 | this.label2.Name = "label2"; |
392 | this.label2.Size = new System.Drawing.Size(57, 13); | 392 | this.label2.Size = new System.Drawing.Size(57, 13); |
393 | this.label2.TabIndex = 6; | 393 | this.label2.TabIndex = 6; |
394 | this.label2.Text = "Command:"; | 394 | this.label2.Text = "Command:"; |
395 | // | 395 | // |
396 | // txtUserServer | 396 | // txtUserServer |
397 | // | 397 | // |
398 | this.txtUserServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 398 | this.txtUserServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
399 | | System.Windows.Forms.AnchorStyles.Left) | 399 | | System.Windows.Forms.AnchorStyles.Left) |
400 | | System.Windows.Forms.AnchorStyles.Right))); | 400 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -404,9 +404,9 @@ namespace OpenSim.GUI | |||
404 | this.txtUserServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; | 404 | this.txtUserServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
405 | this.txtUserServer.Size = new System.Drawing.Size(325, 236); | 405 | this.txtUserServer.Size = new System.Drawing.Size(325, 236); |
406 | this.txtUserServer.TabIndex = 1; | 406 | this.txtUserServer.TabIndex = 1; |
407 | // | 407 | // |
408 | // tabAssetServer | 408 | // tabAssetServer |
409 | // | 409 | // |
410 | this.tabAssetServer.Controls.Add(this.txtInputAssetServer); | 410 | this.tabAssetServer.Controls.Add(this.txtInputAssetServer); |
411 | this.tabAssetServer.Controls.Add(this.label3); | 411 | this.tabAssetServer.Controls.Add(this.label3); |
412 | this.tabAssetServer.Controls.Add(this.txtAssetServer); | 412 | this.tabAssetServer.Controls.Add(this.txtAssetServer); |
@@ -416,25 +416,25 @@ namespace OpenSim.GUI | |||
416 | this.tabAssetServer.TabIndex = 2; | 416 | this.tabAssetServer.TabIndex = 2; |
417 | this.tabAssetServer.Text = "Asset server"; | 417 | this.tabAssetServer.Text = "Asset server"; |
418 | this.tabAssetServer.UseVisualStyleBackColor = true; | 418 | this.tabAssetServer.UseVisualStyleBackColor = true; |
419 | // | 419 | // |
420 | // txtInputAssetServer | 420 | // txtInputAssetServer |
421 | // | 421 | // |
422 | this.txtInputAssetServer.Location = new System.Drawing.Point(53, 239); | 422 | this.txtInputAssetServer.Location = new System.Drawing.Point(53, 239); |
423 | this.txtInputAssetServer.Name = "txtInputAssetServer"; | 423 | this.txtInputAssetServer.Name = "txtInputAssetServer"; |
424 | this.txtInputAssetServer.Size = new System.Drawing.Size(272, 20); | 424 | this.txtInputAssetServer.Size = new System.Drawing.Size(272, 20); |
425 | this.txtInputAssetServer.TabIndex = 7; | 425 | this.txtInputAssetServer.TabIndex = 7; |
426 | // | 426 | // |
427 | // label3 | 427 | // label3 |
428 | // | 428 | // |
429 | this.label3.AutoSize = true; | 429 | this.label3.AutoSize = true; |
430 | this.label3.Location = new System.Drawing.Point(0, 242); | 430 | this.label3.Location = new System.Drawing.Point(0, 242); |
431 | this.label3.Name = "label3"; | 431 | this.label3.Name = "label3"; |
432 | this.label3.Size = new System.Drawing.Size(57, 13); | 432 | this.label3.Size = new System.Drawing.Size(57, 13); |
433 | this.label3.TabIndex = 6; | 433 | this.label3.TabIndex = 6; |
434 | this.label3.Text = "Command:"; | 434 | this.label3.Text = "Command:"; |
435 | // | 435 | // |
436 | // txtAssetServer | 436 | // txtAssetServer |
437 | // | 437 | // |
438 | this.txtAssetServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 438 | this.txtAssetServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
439 | | System.Windows.Forms.AnchorStyles.Left) | 439 | | System.Windows.Forms.AnchorStyles.Left) |
440 | | System.Windows.Forms.AnchorStyles.Right))); | 440 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -444,9 +444,9 @@ namespace OpenSim.GUI | |||
444 | this.txtAssetServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; | 444 | this.txtAssetServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
445 | this.txtAssetServer.Size = new System.Drawing.Size(325, 236); | 445 | this.txtAssetServer.Size = new System.Drawing.Size(325, 236); |
446 | this.txtAssetServer.TabIndex = 1; | 446 | this.txtAssetServer.TabIndex = 1; |
447 | // | 447 | // |
448 | // tabGridServer | 448 | // tabGridServer |
449 | // | 449 | // |
450 | this.tabGridServer.Controls.Add(this.txtInputGridServer); | 450 | this.tabGridServer.Controls.Add(this.txtInputGridServer); |
451 | this.tabGridServer.Controls.Add(this.label4); | 451 | this.tabGridServer.Controls.Add(this.label4); |
452 | this.tabGridServer.Controls.Add(this.txtGridServer); | 452 | this.tabGridServer.Controls.Add(this.txtGridServer); |
@@ -456,25 +456,25 @@ namespace OpenSim.GUI | |||
456 | this.tabGridServer.TabIndex = 3; | 456 | this.tabGridServer.TabIndex = 3; |
457 | this.tabGridServer.Text = "Grid server"; | 457 | this.tabGridServer.Text = "Grid server"; |
458 | this.tabGridServer.UseVisualStyleBackColor = true; | 458 | this.tabGridServer.UseVisualStyleBackColor = true; |
459 | // | 459 | // |
460 | // txtInputGridServer | 460 | // txtInputGridServer |
461 | // | 461 | // |
462 | this.txtInputGridServer.Location = new System.Drawing.Point(53, 239); | 462 | this.txtInputGridServer.Location = new System.Drawing.Point(53, 239); |
463 | this.txtInputGridServer.Name = "txtInputGridServer"; | 463 | this.txtInputGridServer.Name = "txtInputGridServer"; |
464 | this.txtInputGridServer.Size = new System.Drawing.Size(272, 20); | 464 | this.txtInputGridServer.Size = new System.Drawing.Size(272, 20); |
465 | this.txtInputGridServer.TabIndex = 7; | 465 | this.txtInputGridServer.TabIndex = 7; |
466 | // | 466 | // |
467 | // label4 | 467 | // label4 |
468 | // | 468 | // |
469 | this.label4.AutoSize = true; | 469 | this.label4.AutoSize = true; |
470 | this.label4.Location = new System.Drawing.Point(0, 242); | 470 | this.label4.Location = new System.Drawing.Point(0, 242); |
471 | this.label4.Name = "label4"; | 471 | this.label4.Name = "label4"; |
472 | this.label4.Size = new System.Drawing.Size(57, 13); | 472 | this.label4.Size = new System.Drawing.Size(57, 13); |
473 | this.label4.TabIndex = 6; | 473 | this.label4.TabIndex = 6; |
474 | this.label4.Text = "Command:"; | 474 | this.label4.Text = "Command:"; |
475 | // | 475 | // |
476 | // txtGridServer | 476 | // txtGridServer |
477 | // | 477 | // |
478 | this.txtGridServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 478 | this.txtGridServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
479 | | System.Windows.Forms.AnchorStyles.Left) | 479 | | System.Windows.Forms.AnchorStyles.Left) |
480 | | System.Windows.Forms.AnchorStyles.Right))); | 480 | | System.Windows.Forms.AnchorStyles.Right))); |
@@ -484,9 +484,9 @@ namespace OpenSim.GUI | |||
484 | this.txtGridServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; | 484 | this.txtGridServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
485 | this.txtGridServer.Size = new System.Drawing.Size(325, 236); | 485 | this.txtGridServer.Size = new System.Drawing.Size(325, 236); |
486 | this.txtGridServer.TabIndex = 1; | 486 | this.txtGridServer.TabIndex = 1; |
487 | // | 487 | // |
488 | // label5 | 488 | // label5 |
489 | // | 489 | // |
490 | this.label5.AutoSize = true; | 490 | this.label5.AutoSize = true; |
491 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); | 491 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
492 | this.label5.Location = new System.Drawing.Point(460, 55); | 492 | this.label5.Location = new System.Drawing.Point(460, 55); |
@@ -494,9 +494,9 @@ namespace OpenSim.GUI | |||
494 | this.label5.Size = new System.Drawing.Size(205, 20); | 494 | this.label5.Size = new System.Drawing.Size(205, 20); |
495 | this.label5.TabIndex = 11; | 495 | this.label5.TabIndex = 11; |
496 | this.label5.Text = "Command Line Switches"; | 496 | this.label5.Text = "Command Line Switches"; |
497 | // | 497 | // |
498 | // noProbe1 | 498 | // noProbe1 |
499 | // | 499 | // |
500 | this.noProbe1.AutoSize = true; | 500 | this.noProbe1.AutoSize = true; |
501 | this.noProbe1.Location = new System.Drawing.Point(359, 275); | 501 | this.noProbe1.Location = new System.Drawing.Point(359, 275); |
502 | this.noProbe1.Name = "noProbe1"; | 502 | this.noProbe1.Name = "noProbe1"; |
@@ -505,18 +505,18 @@ namespace OpenSim.GUI | |||
505 | this.noProbe1.Text = "-noprobe"; | 505 | this.noProbe1.Text = "-noprobe"; |
506 | this.toolTip1.SetToolTip(this.noProbe1, "disable hardware probe"); | 506 | this.toolTip1.SetToolTip(this.noProbe1, "disable hardware probe"); |
507 | this.noProbe1.UseVisualStyleBackColor = true; | 507 | this.noProbe1.UseVisualStyleBackColor = true; |
508 | // | 508 | // |
509 | // label6 | 509 | // label6 |
510 | // | 510 | // |
511 | this.label6.AutoSize = true; | 511 | this.label6.AutoSize = true; |
512 | this.label6.Location = new System.Drawing.Point(8, 415); | 512 | this.label6.Location = new System.Drawing.Point(8, 415); |
513 | this.label6.Name = "label6"; | 513 | this.label6.Name = "label6"; |
514 | this.label6.Size = new System.Drawing.Size(0, 13); | 514 | this.label6.Size = new System.Drawing.Size(0, 13); |
515 | this.label6.TabIndex = 14; | 515 | this.label6.TabIndex = 14; |
516 | this.label6.Click += new System.EventHandler(this.label6_Click); | 516 | this.label6.Click += new System.EventHandler(this.label6_Click); |
517 | // | 517 | // |
518 | // multiple1 | 518 | // multiple1 |
519 | // | 519 | // |
520 | this.multiple1.AutoSize = true; | 520 | this.multiple1.AutoSize = true; |
521 | this.multiple1.Location = new System.Drawing.Point(359, 185); | 521 | this.multiple1.Location = new System.Drawing.Point(359, 185); |
522 | this.multiple1.Name = "multiple1"; | 522 | this.multiple1.Name = "multiple1"; |
@@ -525,9 +525,9 @@ namespace OpenSim.GUI | |||
525 | this.multiple1.Text = "-multiple"; | 525 | this.multiple1.Text = "-multiple"; |
526 | this.toolTip1.SetToolTip(this.multiple1, "allow multiple viewers"); | 526 | this.toolTip1.SetToolTip(this.multiple1, "allow multiple viewers"); |
527 | this.multiple1.UseVisualStyleBackColor = true; | 527 | this.multiple1.UseVisualStyleBackColor = true; |
528 | // | 528 | // |
529 | // label7 | 529 | // label7 |
530 | // | 530 | // |
531 | this.label7.AutoSize = true; | 531 | this.label7.AutoSize = true; |
532 | this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); | 532 | this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
533 | this.label7.Location = new System.Drawing.Point(8, 396); | 533 | this.label7.Location = new System.Drawing.Point(8, 396); |
@@ -535,9 +535,9 @@ namespace OpenSim.GUI | |||
535 | this.label7.Size = new System.Drawing.Size(338, 13); | 535 | this.label7.Size = new System.Drawing.Size(338, 13); |
536 | this.label7.TabIndex = 16; | 536 | this.label7.TabIndex = 16; |
537 | this.label7.Text = "Client Command Line String Used and Program Messages :"; | 537 | this.label7.Text = "Client Command Line String Used and Program Messages :"; |
538 | // | 538 | // |
539 | // noMultiple1 | 539 | // noMultiple1 |
540 | // | 540 | // |
541 | this.noMultiple1.AutoSize = true; | 541 | this.noMultiple1.AutoSize = true; |
542 | this.noMultiple1.Location = new System.Drawing.Point(359, 260); | 542 | this.noMultiple1.Location = new System.Drawing.Point(359, 260); |
543 | this.noMultiple1.Name = "noMultiple1"; | 543 | this.noMultiple1.Name = "noMultiple1"; |
@@ -546,9 +546,9 @@ namespace OpenSim.GUI | |||
546 | this.noMultiple1.Text = "-nomultiple"; | 546 | this.noMultiple1.Text = "-nomultiple"; |
547 | this.toolTip1.SetToolTip(this.noMultiple1, "block multiple viewers (secondlife.exe instances)"); | 547 | this.toolTip1.SetToolTip(this.noMultiple1, "block multiple viewers (secondlife.exe instances)"); |
548 | this.noMultiple1.UseVisualStyleBackColor = true; | 548 | this.noMultiple1.UseVisualStyleBackColor = true; |
549 | // | 549 | // |
550 | // ignorepixeldepth1 | 550 | // ignorepixeldepth1 |
551 | // | 551 | // |
552 | this.ignorepixeldepth1.AutoSize = true; | 552 | this.ignorepixeldepth1.AutoSize = true; |
553 | this.ignorepixeldepth1.Location = new System.Drawing.Point(359, 125); | 553 | this.ignorepixeldepth1.Location = new System.Drawing.Point(359, 125); |
554 | this.ignorepixeldepth1.Name = "ignorepixeldepth1"; | 554 | this.ignorepixeldepth1.Name = "ignorepixeldepth1"; |
@@ -557,9 +557,9 @@ namespace OpenSim.GUI | |||
557 | this.ignorepixeldepth1.Text = "-ignorepixeldepth"; | 557 | this.ignorepixeldepth1.Text = "-ignorepixeldepth"; |
558 | this.toolTip1.SetToolTip(this.ignorepixeldepth1, "ignore pixel depth settings"); | 558 | this.toolTip1.SetToolTip(this.ignorepixeldepth1, "ignore pixel depth settings"); |
559 | this.ignorepixeldepth1.UseVisualStyleBackColor = true; | 559 | this.ignorepixeldepth1.UseVisualStyleBackColor = true; |
560 | // | 560 | // |
561 | // nothread1 | 561 | // nothread1 |
562 | // | 562 | // |
563 | this.nothread1.AutoSize = true; | 563 | this.nothread1.AutoSize = true; |
564 | this.nothread1.Location = new System.Drawing.Point(359, 305); | 564 | this.nothread1.Location = new System.Drawing.Point(359, 305); |
565 | this.nothread1.Name = "nothread1"; | 565 | this.nothread1.Name = "nothread1"; |
@@ -568,9 +568,9 @@ namespace OpenSim.GUI | |||
568 | this.nothread1.Text = "-nothread"; | 568 | this.nothread1.Text = "-nothread"; |
569 | this.toolTip1.SetToolTip(this.nothread1, "run VFS (Virtual File System) in single thread"); | 569 | this.toolTip1.SetToolTip(this.nothread1, "run VFS (Virtual File System) in single thread"); |
570 | this.nothread1.UseVisualStyleBackColor = true; | 570 | this.nothread1.UseVisualStyleBackColor = true; |
571 | // | 571 | // |
572 | // safe1 | 572 | // safe1 |
573 | // | 573 | // |
574 | this.safe1.AutoSize = true; | 574 | this.safe1.AutoSize = true; |
575 | this.safe1.Location = new System.Drawing.Point(359, 365); | 575 | this.safe1.Location = new System.Drawing.Point(359, 365); |
576 | this.safe1.Name = "safe1"; | 576 | this.safe1.Name = "safe1"; |
@@ -579,9 +579,9 @@ namespace OpenSim.GUI | |||
579 | this.safe1.Text = "-safe"; | 579 | this.safe1.Text = "-safe"; |
580 | this.toolTip1.SetToolTip(this.safe1, "reset preferences, run in safe mode"); | 580 | this.toolTip1.SetToolTip(this.safe1, "reset preferences, run in safe mode"); |
581 | this.safe1.UseVisualStyleBackColor = true; | 581 | this.safe1.UseVisualStyleBackColor = true; |
582 | // | 582 | // |
583 | // noconsole1 | 583 | // noconsole1 |
584 | // | 584 | // |
585 | this.noconsole1.AutoSize = true; | 585 | this.noconsole1.AutoSize = true; |
586 | this.noconsole1.Location = new System.Drawing.Point(359, 215); | 586 | this.noconsole1.Location = new System.Drawing.Point(359, 215); |
587 | this.noconsole1.Name = "noconsole1"; | 587 | this.noconsole1.Name = "noconsole1"; |
@@ -590,9 +590,9 @@ namespace OpenSim.GUI | |||
590 | this.noconsole1.Text = "-noconsole"; | 590 | this.noconsole1.Text = "-noconsole"; |
591 | this.toolTip1.SetToolTip(this.noconsole1, "hide the console if not already hidden"); | 591 | this.toolTip1.SetToolTip(this.noconsole1, "hide the console if not already hidden"); |
592 | this.noconsole1.UseVisualStyleBackColor = true; | 592 | this.noconsole1.UseVisualStyleBackColor = true; |
593 | // | 593 | // |
594 | // log1 | 594 | // log1 |
595 | // | 595 | // |
596 | this.log1.AutoSize = true; | 596 | this.log1.AutoSize = true; |
597 | this.log1.Location = new System.Drawing.Point(359, 170); | 597 | this.log1.Location = new System.Drawing.Point(359, 170); |
598 | this.log1.Name = "log1"; | 598 | this.log1.Name = "log1"; |
@@ -601,9 +601,9 @@ namespace OpenSim.GUI | |||
601 | this.log1.Text = "-log"; | 601 | this.log1.Text = "-log"; |
602 | this.toolTip1.SetToolTip(this.log1, "--no info avail--"); | 602 | this.toolTip1.SetToolTip(this.log1, "--no info avail--"); |
603 | this.log1.UseVisualStyleBackColor = true; | 603 | this.log1.UseVisualStyleBackColor = true; |
604 | // | 604 | // |
605 | // helperuri1 | 605 | // helperuri1 |
606 | // | 606 | // |
607 | this.helperuri1.AutoSize = true; | 607 | this.helperuri1.AutoSize = true; |
608 | this.helperuri1.Location = new System.Drawing.Point(359, 110); | 608 | this.helperuri1.Location = new System.Drawing.Point(359, 110); |
609 | this.helperuri1.Name = "helperuri1"; | 609 | this.helperuri1.Name = "helperuri1"; |
@@ -612,9 +612,9 @@ namespace OpenSim.GUI | |||
612 | this.helperuri1.Text = "-helperuri"; | 612 | this.helperuri1.Text = "-helperuri"; |
613 | this.toolTip1.SetToolTip(this.helperuri1, "--no info avail--"); | 613 | this.toolTip1.SetToolTip(this.helperuri1, "--no info avail--"); |
614 | this.helperuri1.UseVisualStyleBackColor = true; | 614 | this.helperuri1.UseVisualStyleBackColor = true; |
615 | // | 615 | // |
616 | // autologin1 | 616 | // autologin1 |
617 | // | 617 | // |
618 | this.autologin1.AutoSize = true; | 618 | this.autologin1.AutoSize = true; |
619 | this.autologin1.Location = new System.Drawing.Point(359, 65); | 619 | this.autologin1.Location = new System.Drawing.Point(359, 65); |
620 | this.autologin1.Name = "autologin1"; | 620 | this.autologin1.Name = "autologin1"; |
@@ -623,9 +623,9 @@ namespace OpenSim.GUI | |||
623 | this.autologin1.Text = "--autologin"; | 623 | this.autologin1.Text = "--autologin"; |
624 | this.toolTip1.SetToolTip(this.autologin1, "--no info avail--"); | 624 | this.toolTip1.SetToolTip(this.autologin1, "--no info avail--"); |
625 | this.autologin1.UseVisualStyleBackColor = true; | 625 | this.autologin1.UseVisualStyleBackColor = true; |
626 | // | 626 | // |
627 | // dialog1 | 627 | // dialog1 |
628 | // | 628 | // |
629 | this.dialog1.AutoSize = true; | 629 | this.dialog1.AutoSize = true; |
630 | this.dialog1.Location = new System.Drawing.Point(359, 95); | 630 | this.dialog1.Location = new System.Drawing.Point(359, 95); |
631 | this.dialog1.Name = "dialog1"; | 631 | this.dialog1.Name = "dialog1"; |
@@ -634,9 +634,9 @@ namespace OpenSim.GUI | |||
634 | this.dialog1.Text = "-dialog"; | 634 | this.dialog1.Text = "-dialog"; |
635 | this.toolTip1.SetToolTip(this.dialog1, "some arcane dialog box that is impossible to raise"); | 635 | this.toolTip1.SetToolTip(this.dialog1, "some arcane dialog box that is impossible to raise"); |
636 | this.dialog1.UseVisualStyleBackColor = true; | 636 | this.dialog1.UseVisualStyleBackColor = true; |
637 | // | 637 | // |
638 | // previous1 | 638 | // previous1 |
639 | // | 639 | // |
640 | this.previous1.AutoSize = true; | 640 | this.previous1.AutoSize = true; |
641 | this.previous1.Location = new System.Drawing.Point(359, 335); | 641 | this.previous1.Location = new System.Drawing.Point(359, 335); |
642 | this.previous1.Name = "previous1"; | 642 | this.previous1.Name = "previous1"; |
@@ -645,9 +645,9 @@ namespace OpenSim.GUI | |||
645 | this.previous1.Text = "-previous"; | 645 | this.previous1.Text = "-previous"; |
646 | this.toolTip1.SetToolTip(this.previous1, "--no info avail--"); | 646 | this.toolTip1.SetToolTip(this.previous1, "--no info avail--"); |
647 | this.previous1.UseVisualStyleBackColor = true; | 647 | this.previous1.UseVisualStyleBackColor = true; |
648 | // | 648 | // |
649 | // simple1 | 649 | // simple1 |
650 | // | 650 | // |
651 | this.simple1.AutoSize = true; | 651 | this.simple1.AutoSize = true; |
652 | this.simple1.Location = new System.Drawing.Point(359, 380); | 652 | this.simple1.Location = new System.Drawing.Point(359, 380); |
653 | this.simple1.Name = "simple1"; | 653 | this.simple1.Name = "simple1"; |
@@ -656,9 +656,9 @@ namespace OpenSim.GUI | |||
656 | this.simple1.Text = "-simple"; | 656 | this.simple1.Text = "-simple"; |
657 | this.toolTip1.SetToolTip(this.simple1, "--no info avail--"); | 657 | this.toolTip1.SetToolTip(this.simple1, "--no info avail--"); |
658 | this.simple1.UseVisualStyleBackColor = true; | 658 | this.simple1.UseVisualStyleBackColor = true; |
659 | // | 659 | // |
660 | // noinvlib1 | 660 | // noinvlib1 |
661 | // | 661 | // |
662 | this.noinvlib1.AutoSize = true; | 662 | this.noinvlib1.AutoSize = true; |
663 | this.noinvlib1.Location = new System.Drawing.Point(359, 245); | 663 | this.noinvlib1.Location = new System.Drawing.Point(359, 245); |
664 | this.noinvlib1.Name = "noinvlib1"; | 664 | this.noinvlib1.Name = "noinvlib1"; |
@@ -667,9 +667,9 @@ namespace OpenSim.GUI | |||
667 | this.noinvlib1.Text = "-noinvlib"; | 667 | this.noinvlib1.Text = "-noinvlib"; |
668 | this.toolTip1.SetToolTip(this.noinvlib1, "do not request inventory library"); | 668 | this.toolTip1.SetToolTip(this.noinvlib1, "do not request inventory library"); |
669 | this.noinvlib1.UseVisualStyleBackColor = true; | 669 | this.noinvlib1.UseVisualStyleBackColor = true; |
670 | // | 670 | // |
671 | // debugst1 | 671 | // debugst1 |
672 | // | 672 | // |
673 | this.debugst1.AutoSize = true; | 673 | this.debugst1.AutoSize = true; |
674 | this.debugst1.Location = new System.Drawing.Point(359, 80); | 674 | this.debugst1.Location = new System.Drawing.Point(359, 80); |
675 | this.debugst1.Name = "debugst1"; | 675 | this.debugst1.Name = "debugst1"; |
@@ -678,9 +678,9 @@ namespace OpenSim.GUI | |||
678 | this.debugst1.Text = "-debugst"; | 678 | this.debugst1.Text = "-debugst"; |
679 | this.toolTip1.SetToolTip(this.debugst1, "debug mask"); | 679 | this.toolTip1.SetToolTip(this.debugst1, "debug mask"); |
680 | this.debugst1.UseVisualStyleBackColor = true; | 680 | this.debugst1.UseVisualStyleBackColor = true; |
681 | // | 681 | // |
682 | // spanish1 | 682 | // spanish1 |
683 | // | 683 | // |
684 | this.spanish1.AutoSize = true; | 684 | this.spanish1.AutoSize = true; |
685 | this.spanish1.Location = new System.Drawing.Point(359, 395); | 685 | this.spanish1.Location = new System.Drawing.Point(359, 395); |
686 | this.spanish1.Name = "spanish1"; | 686 | this.spanish1.Name = "spanish1"; |
@@ -689,9 +689,9 @@ namespace OpenSim.GUI | |||
689 | this.spanish1.Text = "-spanish"; | 689 | this.spanish1.Text = "-spanish"; |
690 | this.toolTip1.SetToolTip(this.spanish1, "activate (incomplete) Spanish UI translation"); | 690 | this.toolTip1.SetToolTip(this.spanish1, "activate (incomplete) Spanish UI translation"); |
691 | this.spanish1.UseVisualStyleBackColor = true; | 691 | this.spanish1.UseVisualStyleBackColor = true; |
692 | // | 692 | // |
693 | // korean1 | 693 | // korean1 |
694 | // | 694 | // |
695 | this.korean1.AutoSize = true; | 695 | this.korean1.AutoSize = true; |
696 | this.korean1.Location = new System.Drawing.Point(359, 140); | 696 | this.korean1.Location = new System.Drawing.Point(359, 140); |
697 | this.korean1.Name = "korean1"; | 697 | this.korean1.Name = "korean1"; |
@@ -700,9 +700,9 @@ namespace OpenSim.GUI | |||
700 | this.korean1.Text = "-korean"; | 700 | this.korean1.Text = "-korean"; |
701 | this.toolTip1.SetToolTip(this.korean1, "activate (incomplete) Korean UI translation"); | 701 | this.toolTip1.SetToolTip(this.korean1, "activate (incomplete) Korean UI translation"); |
702 | this.korean1.UseVisualStyleBackColor = true; | 702 | this.korean1.UseVisualStyleBackColor = true; |
703 | // | 703 | // |
704 | // local1 | 704 | // local1 |
705 | // | 705 | // |
706 | this.local1.AutoSize = true; | 706 | this.local1.AutoSize = true; |
707 | this.local1.Location = new System.Drawing.Point(359, 155); | 707 | this.local1.Location = new System.Drawing.Point(359, 155); |
708 | this.local1.Name = "local1"; | 708 | this.local1.Name = "local1"; |
@@ -711,9 +711,9 @@ namespace OpenSim.GUI | |||
711 | this.local1.Text = "-local"; | 711 | this.local1.Text = "-local"; |
712 | this.toolTip1.SetToolTip(this.local1, "run without simulator"); | 712 | this.toolTip1.SetToolTip(this.local1, "run without simulator"); |
713 | this.local1.UseVisualStyleBackColor = true; | 713 | this.local1.UseVisualStyleBackColor = true; |
714 | // | 714 | // |
715 | // purge1 | 715 | // purge1 |
716 | // | 716 | // |
717 | this.purge1.AutoSize = true; | 717 | this.purge1.AutoSize = true; |
718 | this.purge1.Location = new System.Drawing.Point(359, 350); | 718 | this.purge1.Location = new System.Drawing.Point(359, 350); |
719 | this.purge1.Name = "purge1"; | 719 | this.purge1.Name = "purge1"; |
@@ -722,9 +722,9 @@ namespace OpenSim.GUI | |||
722 | this.purge1.Text = "-purge"; | 722 | this.purge1.Text = "-purge"; |
723 | this.toolTip1.SetToolTip(this.purge1, "delete files in cache"); | 723 | this.toolTip1.SetToolTip(this.purge1, "delete files in cache"); |
724 | this.purge1.UseVisualStyleBackColor = true; | 724 | this.purge1.UseVisualStyleBackColor = true; |
725 | // | 725 | // |
726 | // nofmod1 | 726 | // nofmod1 |
727 | // | 727 | // |
728 | this.nofmod1.AutoSize = true; | 728 | this.nofmod1.AutoSize = true; |
729 | this.nofmod1.Location = new System.Drawing.Point(359, 230); | 729 | this.nofmod1.Location = new System.Drawing.Point(359, 230); |
730 | this.nofmod1.Name = "nofmod1"; | 730 | this.nofmod1.Name = "nofmod1"; |
@@ -733,9 +733,9 @@ namespace OpenSim.GUI | |||
733 | this.nofmod1.Text = "-nofmod"; | 733 | this.nofmod1.Text = "-nofmod"; |
734 | this.toolTip1.SetToolTip(this.nofmod1, "FMOD is the API used to distort sound while moving"); | 734 | this.toolTip1.SetToolTip(this.nofmod1, "FMOD is the API used to distort sound while moving"); |
735 | this.nofmod1.UseVisualStyleBackColor = true; | 735 | this.nofmod1.UseVisualStyleBackColor = true; |
736 | // | 736 | // |
737 | // noaudio1 | 737 | // noaudio1 |
738 | // | 738 | // |
739 | this.noaudio1.AutoSize = true; | 739 | this.noaudio1.AutoSize = true; |
740 | this.noaudio1.Location = new System.Drawing.Point(359, 200); | 740 | this.noaudio1.Location = new System.Drawing.Point(359, 200); |
741 | this.noaudio1.Name = "noaudio1"; | 741 | this.noaudio1.Name = "noaudio1"; |
@@ -744,9 +744,9 @@ namespace OpenSim.GUI | |||
744 | this.noaudio1.Text = "-noaudio"; | 744 | this.noaudio1.Text = "-noaudio"; |
745 | this.toolTip1.SetToolTip(this.noaudio1, "no audio, different from -nosound?"); | 745 | this.toolTip1.SetToolTip(this.noaudio1, "no audio, different from -nosound?"); |
746 | this.noaudio1.UseVisualStyleBackColor = true; | 746 | this.noaudio1.UseVisualStyleBackColor = true; |
747 | // | 747 | // |
748 | // nosound1 | 748 | // nosound1 |
749 | // | 749 | // |
750 | this.nosound1.AutoSize = true; | 750 | this.nosound1.AutoSize = true; |
751 | this.nosound1.Location = new System.Drawing.Point(359, 290); | 751 | this.nosound1.Location = new System.Drawing.Point(359, 290); |
752 | this.nosound1.Name = "nosound1"; | 752 | this.nosound1.Name = "nosound1"; |
@@ -755,9 +755,9 @@ namespace OpenSim.GUI | |||
755 | this.nosound1.Text = "-nosound"; | 755 | this.nosound1.Text = "-nosound"; |
756 | this.toolTip1.SetToolTip(this.nosound1, "no sound, different from -noaudio?"); | 756 | this.toolTip1.SetToolTip(this.nosound1, "no sound, different from -noaudio?"); |
757 | this.nosound1.UseVisualStyleBackColor = true; | 757 | this.nosound1.UseVisualStyleBackColor = true; |
758 | // | 758 | // |
759 | // url1 | 759 | // url1 |
760 | // | 760 | // |
761 | this.url1.AutoSize = true; | 761 | this.url1.AutoSize = true; |
762 | this.url1.Location = new System.Drawing.Point(488, 245); | 762 | this.url1.Location = new System.Drawing.Point(488, 245); |
763 | this.url1.Name = "url1"; | 763 | this.url1.Name = "url1"; |
@@ -766,9 +766,9 @@ namespace OpenSim.GUI | |||
766 | this.url1.Text = "-url"; | 766 | this.url1.Text = "-url"; |
767 | this.toolTip1.SetToolTip(this.url1, "handles secondlife://sim/x/y/z URLs"); | 767 | this.toolTip1.SetToolTip(this.url1, "handles secondlife://sim/x/y/z URLs"); |
768 | this.url1.UseVisualStyleBackColor = true; | 768 | this.url1.UseVisualStyleBackColor = true; |
769 | // | 769 | // |
770 | // port1 | 770 | // port1 |
771 | // | 771 | // |
772 | this.port1.AutoSize = true; | 772 | this.port1.AutoSize = true; |
773 | this.port1.Location = new System.Drawing.Point(488, 171); | 773 | this.port1.Location = new System.Drawing.Point(488, 171); |
774 | this.port1.Name = "port1"; | 774 | this.port1.Name = "port1"; |
@@ -779,27 +779,27 @@ namespace OpenSim.GUI | |||
779 | "me local home network. Values that may work: 13000 and 13001 (Valid numbers are " + | 779 | "me local home network. Values that may work: 13000 and 13001 (Valid numbers are " + |
780 | "13000 to 13050)"); | 780 | "13000 to 13050)"); |
781 | this.port1.UseVisualStyleBackColor = true; | 781 | this.port1.UseVisualStyleBackColor = true; |
782 | // | 782 | // |
783 | // simBox1 | 783 | // simBox1 |
784 | // | 784 | // |
785 | this.simBox1.Location = new System.Drawing.Point(549, 243); | 785 | this.simBox1.Location = new System.Drawing.Point(549, 243); |
786 | this.simBox1.Name = "simBox1"; | 786 | this.simBox1.Name = "simBox1"; |
787 | this.simBox1.Size = new System.Drawing.Size(344, 20); | 787 | this.simBox1.Size = new System.Drawing.Size(344, 20); |
788 | this.simBox1.TabIndex = 66; | 788 | this.simBox1.TabIndex = 66; |
789 | this.simBox1.Text = "secondlife://lutra/127/128/60"; | 789 | this.simBox1.Text = "secondlife://lutra/127/128/60"; |
790 | this.toolTip1.SetToolTip(this.simBox1, "type URL here"); | 790 | this.toolTip1.SetToolTip(this.simBox1, "type URL here"); |
791 | // | 791 | // |
792 | // portBox1 | 792 | // portBox1 |
793 | // | 793 | // |
794 | this.portBox1.Location = new System.Drawing.Point(549, 169); | 794 | this.portBox1.Location = new System.Drawing.Point(549, 169); |
795 | this.portBox1.Name = "portBox1"; | 795 | this.portBox1.Name = "portBox1"; |
796 | this.portBox1.Size = new System.Drawing.Size(58, 20); | 796 | this.portBox1.Size = new System.Drawing.Size(58, 20); |
797 | this.portBox1.TabIndex = 67; | 797 | this.portBox1.TabIndex = 67; |
798 | this.portBox1.Text = "13000"; | 798 | this.portBox1.Text = "13000"; |
799 | this.toolTip1.SetToolTip(this.portBox1, "enter port number here"); | 799 | this.toolTip1.SetToolTip(this.portBox1, "enter port number here"); |
800 | // | 800 | // |
801 | // user1 | 801 | // user1 |
802 | // | 802 | // |
803 | this.user1.AutoSize = true; | 803 | this.user1.AutoSize = true; |
804 | this.user1.Location = new System.Drawing.Point(488, 191); | 804 | this.user1.Location = new System.Drawing.Point(488, 191); |
805 | this.user1.Name = "user1"; | 805 | this.user1.Name = "user1"; |
@@ -809,9 +809,9 @@ namespace OpenSim.GUI | |||
809 | this.user1.ThreeState = true; | 809 | this.user1.ThreeState = true; |
810 | this.toolTip1.SetToolTip(this.user1, "specify user server in dotted quad"); | 810 | this.toolTip1.SetToolTip(this.user1, "specify user server in dotted quad"); |
811 | this.user1.UseVisualStyleBackColor = true; | 811 | this.user1.UseVisualStyleBackColor = true; |
812 | // | 812 | // |
813 | // quitAfter1 | 813 | // quitAfter1 |
814 | // | 814 | // |
815 | this.quitAfter1.AutoSize = true; | 815 | this.quitAfter1.AutoSize = true; |
816 | this.quitAfter1.Location = new System.Drawing.Point(680, 65); | 816 | this.quitAfter1.Location = new System.Drawing.Point(680, 65); |
817 | this.quitAfter1.Name = "quitAfter1"; | 817 | this.quitAfter1.Name = "quitAfter1"; |
@@ -820,9 +820,9 @@ namespace OpenSim.GUI | |||
820 | this.quitAfter1.Text = "-quitafter"; | 820 | this.quitAfter1.Text = "-quitafter"; |
821 | this.toolTip1.SetToolTip(this.quitAfter1, "SL quits after elapsed time in seconds"); | 821 | this.toolTip1.SetToolTip(this.quitAfter1, "SL quits after elapsed time in seconds"); |
822 | this.quitAfter1.UseVisualStyleBackColor = true; | 822 | this.quitAfter1.UseVisualStyleBackColor = true; |
823 | // | 823 | // |
824 | // techTag1 | 824 | // techTag1 |
825 | // | 825 | // |
826 | this.techTag1.AutoSize = true; | 826 | this.techTag1.AutoSize = true; |
827 | this.techTag1.Location = new System.Drawing.Point(488, 211); | 827 | this.techTag1.Location = new System.Drawing.Point(488, 211); |
828 | this.techTag1.Name = "techTag1"; | 828 | this.techTag1.Name = "techTag1"; |
@@ -831,9 +831,9 @@ namespace OpenSim.GUI | |||
831 | this.techTag1.Text = "-techtag"; | 831 | this.techTag1.Text = "-techtag"; |
832 | this.toolTip1.SetToolTip(this.techTag1, "unknown (but requires a parameter)"); | 832 | this.toolTip1.SetToolTip(this.techTag1, "unknown (but requires a parameter)"); |
833 | this.techTag1.UseVisualStyleBackColor = true; | 833 | this.techTag1.UseVisualStyleBackColor = true; |
834 | // | 834 | // |
835 | // yield1 | 835 | // yield1 |
836 | // | 836 | // |
837 | this.yield1.AutoSize = true; | 837 | this.yield1.AutoSize = true; |
838 | this.yield1.Location = new System.Drawing.Point(488, 91); | 838 | this.yield1.Location = new System.Drawing.Point(488, 91); |
839 | this.yield1.Name = "yield1"; | 839 | this.yield1.Name = "yield1"; |
@@ -842,9 +842,9 @@ namespace OpenSim.GUI | |||
842 | this.yield1.Text = "-yield"; | 842 | this.yield1.Text = "-yield"; |
843 | this.toolTip1.SetToolTip(this.yield1, "yield some idle time to local host (changed from - cooperative)"); | 843 | this.toolTip1.SetToolTip(this.yield1, "yield some idle time to local host (changed from - cooperative)"); |
844 | this.yield1.UseVisualStyleBackColor = true; | 844 | this.yield1.UseVisualStyleBackColor = true; |
845 | // | 845 | // |
846 | // logfile1 | 846 | // logfile1 |
847 | // | 847 | // |
848 | this.logfile1.AutoSize = true; | 848 | this.logfile1.AutoSize = true; |
849 | this.logfile1.Location = new System.Drawing.Point(680, 125); | 849 | this.logfile1.Location = new System.Drawing.Point(680, 125); |
850 | this.logfile1.Name = "logfile1"; | 850 | this.logfile1.Name = "logfile1"; |
@@ -853,9 +853,9 @@ namespace OpenSim.GUI | |||
853 | this.logfile1.Text = "-logfile"; | 853 | this.logfile1.Text = "-logfile"; |
854 | this.toolTip1.SetToolTip(this.logfile1, "change the log filename"); | 854 | this.toolTip1.SetToolTip(this.logfile1, "change the log filename"); |
855 | this.logfile1.UseVisualStyleBackColor = true; | 855 | this.logfile1.UseVisualStyleBackColor = true; |
856 | // | 856 | // |
857 | // settings1 | 857 | // settings1 |
858 | // | 858 | // |
859 | this.settings1.AutoSize = true; | 859 | this.settings1.AutoSize = true; |
860 | this.settings1.Location = new System.Drawing.Point(680, 95); | 860 | this.settings1.Location = new System.Drawing.Point(680, 95); |
861 | this.settings1.Name = "settings1"; | 861 | this.settings1.Name = "settings1"; |
@@ -864,9 +864,9 @@ namespace OpenSim.GUI | |||
864 | this.settings1.Text = "-settings"; | 864 | this.settings1.Text = "-settings"; |
865 | this.toolTip1.SetToolTip(this.settings1, "specify configuration filename; default is \"settings.ini\""); | 865 | this.toolTip1.SetToolTip(this.settings1, "specify configuration filename; default is \"settings.ini\""); |
866 | this.settings1.UseVisualStyleBackColor = true; | 866 | this.settings1.UseVisualStyleBackColor = true; |
867 | // | 867 | // |
868 | // outbw1 | 868 | // outbw1 |
869 | // | 869 | // |
870 | this.outbw1.AutoSize = true; | 870 | this.outbw1.AutoSize = true; |
871 | this.outbw1.Location = new System.Drawing.Point(488, 111); | 871 | this.outbw1.Location = new System.Drawing.Point(488, 111); |
872 | this.outbw1.Name = "outbw1"; | 872 | this.outbw1.Name = "outbw1"; |
@@ -875,9 +875,9 @@ namespace OpenSim.GUI | |||
875 | this.outbw1.Text = "-outbw"; | 875 | this.outbw1.Text = "-outbw"; |
876 | this.toolTip1.SetToolTip(this.outbw1, "set outgoing bandwidth"); | 876 | this.toolTip1.SetToolTip(this.outbw1, "set outgoing bandwidth"); |
877 | this.outbw1.UseVisualStyleBackColor = true; | 877 | this.outbw1.UseVisualStyleBackColor = true; |
878 | // | 878 | // |
879 | // inbw1 | 879 | // inbw1 |
880 | // | 880 | // |
881 | this.inbw1.AutoSize = true; | 881 | this.inbw1.AutoSize = true; |
882 | this.inbw1.Location = new System.Drawing.Point(488, 131); | 882 | this.inbw1.Location = new System.Drawing.Point(488, 131); |
883 | this.inbw1.Name = "inbw1"; | 883 | this.inbw1.Name = "inbw1"; |
@@ -886,9 +886,9 @@ namespace OpenSim.GUI | |||
886 | this.inbw1.Text = "-inbw"; | 886 | this.inbw1.Text = "-inbw"; |
887 | this.toolTip1.SetToolTip(this.inbw1, "set incoming bandwidth"); | 887 | this.toolTip1.SetToolTip(this.inbw1, "set incoming bandwidth"); |
888 | this.inbw1.UseVisualStyleBackColor = true; | 888 | this.inbw1.UseVisualStyleBackColor = true; |
889 | // | 889 | // |
890 | // drop1 | 890 | // drop1 |
891 | // | 891 | // |
892 | this.drop1.AutoSize = true; | 892 | this.drop1.AutoSize = true; |
893 | this.drop1.Location = new System.Drawing.Point(488, 151); | 893 | this.drop1.Location = new System.Drawing.Point(488, 151); |
894 | this.drop1.Name = "drop1"; | 894 | this.drop1.Name = "drop1"; |
@@ -897,76 +897,76 @@ namespace OpenSim.GUI | |||
897 | this.drop1.Text = "-drop"; | 897 | this.drop1.Text = "-drop"; |
898 | this.toolTip1.SetToolTip(this.drop1, "drop number% of incoming network packets"); | 898 | this.toolTip1.SetToolTip(this.drop1, "drop number% of incoming network packets"); |
899 | this.drop1.UseVisualStyleBackColor = true; | 899 | this.drop1.UseVisualStyleBackColor = true; |
900 | // | 900 | // |
901 | // dropBox1 | 901 | // dropBox1 |
902 | // | 902 | // |
903 | this.dropBox1.Location = new System.Drawing.Point(549, 149); | 903 | this.dropBox1.Location = new System.Drawing.Point(549, 149); |
904 | this.dropBox1.Name = "dropBox1"; | 904 | this.dropBox1.Name = "dropBox1"; |
905 | this.dropBox1.Size = new System.Drawing.Size(58, 20); | 905 | this.dropBox1.Size = new System.Drawing.Size(58, 20); |
906 | this.dropBox1.TabIndex = 68; | 906 | this.dropBox1.TabIndex = 68; |
907 | this.dropBox1.Text = "0"; | 907 | this.dropBox1.Text = "0"; |
908 | this.toolTip1.SetToolTip(this.dropBox1, "enter percent of packets to drop"); | 908 | this.toolTip1.SetToolTip(this.dropBox1, "enter percent of packets to drop"); |
909 | // | 909 | // |
910 | // inbwBox1 | 910 | // inbwBox1 |
911 | // | 911 | // |
912 | this.inbwBox1.Location = new System.Drawing.Point(549, 129); | 912 | this.inbwBox1.Location = new System.Drawing.Point(549, 129); |
913 | this.inbwBox1.Name = "inbwBox1"; | 913 | this.inbwBox1.Name = "inbwBox1"; |
914 | this.inbwBox1.Size = new System.Drawing.Size(57, 20); | 914 | this.inbwBox1.Size = new System.Drawing.Size(57, 20); |
915 | this.inbwBox1.TabIndex = 69; | 915 | this.inbwBox1.TabIndex = 69; |
916 | this.toolTip1.SetToolTip(this.inbwBox1, "enter incoming cap"); | 916 | this.toolTip1.SetToolTip(this.inbwBox1, "enter incoming cap"); |
917 | // | 917 | // |
918 | // outbwBox1 | 918 | // outbwBox1 |
919 | // | 919 | // |
920 | this.outbwBox1.Location = new System.Drawing.Point(549, 109); | 920 | this.outbwBox1.Location = new System.Drawing.Point(549, 109); |
921 | this.outbwBox1.Name = "outbwBox1"; | 921 | this.outbwBox1.Name = "outbwBox1"; |
922 | this.outbwBox1.Size = new System.Drawing.Size(58, 20); | 922 | this.outbwBox1.Size = new System.Drawing.Size(58, 20); |
923 | this.outbwBox1.TabIndex = 70; | 923 | this.outbwBox1.TabIndex = 70; |
924 | this.toolTip1.SetToolTip(this.outbwBox1, "enter outgoing cap"); | 924 | this.toolTip1.SetToolTip(this.outbwBox1, "enter outgoing cap"); |
925 | // | 925 | // |
926 | // settingsBox1 | 926 | // settingsBox1 |
927 | // | 927 | // |
928 | this.settingsBox1.Location = new System.Drawing.Point(741, 93); | 928 | this.settingsBox1.Location = new System.Drawing.Point(741, 93); |
929 | this.settingsBox1.Name = "settingsBox1"; | 929 | this.settingsBox1.Name = "settingsBox1"; |
930 | this.settingsBox1.Size = new System.Drawing.Size(152, 20); | 930 | this.settingsBox1.Size = new System.Drawing.Size(152, 20); |
931 | this.settingsBox1.TabIndex = 71; | 931 | this.settingsBox1.TabIndex = 71; |
932 | this.settingsBox1.Text = "settings.ini"; | 932 | this.settingsBox1.Text = "settings.ini"; |
933 | this.toolTip1.SetToolTip(this.settingsBox1, "enter settings file name"); | 933 | this.toolTip1.SetToolTip(this.settingsBox1, "enter settings file name"); |
934 | // | 934 | // |
935 | // logfileBox1 | 935 | // logfileBox1 |
936 | // | 936 | // |
937 | this.logfileBox1.Location = new System.Drawing.Point(733, 123); | 937 | this.logfileBox1.Location = new System.Drawing.Point(733, 123); |
938 | this.logfileBox1.Name = "logfileBox1"; | 938 | this.logfileBox1.Name = "logfileBox1"; |
939 | this.logfileBox1.Size = new System.Drawing.Size(160, 20); | 939 | this.logfileBox1.Size = new System.Drawing.Size(160, 20); |
940 | this.logfileBox1.TabIndex = 72; | 940 | this.logfileBox1.TabIndex = 72; |
941 | this.logfileBox1.Text = "mylogfile.txt"; | 941 | this.logfileBox1.Text = "mylogfile.txt"; |
942 | this.toolTip1.SetToolTip(this.logfileBox1, "enter log file name here"); | 942 | this.toolTip1.SetToolTip(this.logfileBox1, "enter log file name here"); |
943 | // | 943 | // |
944 | // yieldBox1 | 944 | // yieldBox1 |
945 | // | 945 | // |
946 | this.yieldBox1.Location = new System.Drawing.Point(549, 89); | 946 | this.yieldBox1.Location = new System.Drawing.Point(549, 89); |
947 | this.yieldBox1.Name = "yieldBox1"; | 947 | this.yieldBox1.Name = "yieldBox1"; |
948 | this.yieldBox1.Size = new System.Drawing.Size(58, 20); | 948 | this.yieldBox1.Size = new System.Drawing.Size(58, 20); |
949 | this.yieldBox1.TabIndex = 73; | 949 | this.yieldBox1.TabIndex = 73; |
950 | this.toolTip1.SetToolTip(this.yieldBox1, "enter time to yield in <ms>"); | 950 | this.toolTip1.SetToolTip(this.yieldBox1, "enter time to yield in <ms>"); |
951 | // | 951 | // |
952 | // techtagBox1 | 952 | // techtagBox1 |
953 | // | 953 | // |
954 | this.techtagBox1.Location = new System.Drawing.Point(549, 209); | 954 | this.techtagBox1.Location = new System.Drawing.Point(549, 209); |
955 | this.techtagBox1.Name = "techtagBox1"; | 955 | this.techtagBox1.Name = "techtagBox1"; |
956 | this.techtagBox1.Size = new System.Drawing.Size(58, 20); | 956 | this.techtagBox1.Size = new System.Drawing.Size(58, 20); |
957 | this.techtagBox1.TabIndex = 74; | 957 | this.techtagBox1.TabIndex = 74; |
958 | this.toolTip1.SetToolTip(this.techtagBox1, "enter unknown param here"); | 958 | this.toolTip1.SetToolTip(this.techtagBox1, "enter unknown param here"); |
959 | // | 959 | // |
960 | // quitafterBox1 | 960 | // quitafterBox1 |
961 | // | 961 | // |
962 | this.quitafterBox1.Location = new System.Drawing.Point(745, 63); | 962 | this.quitafterBox1.Location = new System.Drawing.Point(745, 63); |
963 | this.quitafterBox1.Name = "quitafterBox1"; | 963 | this.quitafterBox1.Name = "quitafterBox1"; |
964 | this.quitafterBox1.Size = new System.Drawing.Size(148, 20); | 964 | this.quitafterBox1.Size = new System.Drawing.Size(148, 20); |
965 | this.quitafterBox1.TabIndex = 75; | 965 | this.quitafterBox1.TabIndex = 75; |
966 | this.toolTip1.SetToolTip(this.quitafterBox1, "enter time in seconds"); | 966 | this.toolTip1.SetToolTip(this.quitafterBox1, "enter time in seconds"); |
967 | // | 967 | // |
968 | // comboBox1 | 968 | // comboBox1 |
969 | // | 969 | // |
970 | this.comboBox1.FormattingEnabled = true; | 970 | this.comboBox1.FormattingEnabled = true; |
971 | this.comboBox1.Items.AddRange(new object[] { | 971 | this.comboBox1.Items.AddRange(new object[] { |
972 | "agni", | 972 | "agni", |
@@ -980,9 +980,9 @@ namespace OpenSim.GUI | |||
980 | this.comboBox1.TabIndex = 76; | 980 | this.comboBox1.TabIndex = 76; |
981 | this.comboBox1.Text = "agni"; | 981 | this.comboBox1.Text = "agni"; |
982 | this.toolTip1.SetToolTip(this.comboBox1, "select LL user server"); | 982 | this.toolTip1.SetToolTip(this.comboBox1, "select LL user server"); |
983 | // | 983 | // |
984 | // loginuri1 | 984 | // loginuri1 |
985 | // | 985 | // |
986 | this.loginuri1.AutoSize = true; | 986 | this.loginuri1.AutoSize = true; |
987 | this.loginuri1.Location = new System.Drawing.Point(488, 275); | 987 | this.loginuri1.Location = new System.Drawing.Point(488, 275); |
988 | this.loginuri1.Name = "loginuri1"; | 988 | this.loginuri1.Name = "loginuri1"; |
@@ -991,18 +991,18 @@ namespace OpenSim.GUI | |||
991 | this.loginuri1.Text = "-loginuri"; | 991 | this.loginuri1.Text = "-loginuri"; |
992 | this.toolTip1.SetToolTip(this.loginuri1, "login server and CGI script to use"); | 992 | this.toolTip1.SetToolTip(this.loginuri1, "login server and CGI script to use"); |
993 | this.loginuri1.UseVisualStyleBackColor = true; | 993 | this.loginuri1.UseVisualStyleBackColor = true; |
994 | // | 994 | // |
995 | // loginuriBox1 | 995 | // loginuriBox1 |
996 | // | 996 | // |
997 | this.loginuriBox1.Location = new System.Drawing.Point(549, 273); | 997 | this.loginuriBox1.Location = new System.Drawing.Point(549, 273); |
998 | this.loginuriBox1.Name = "loginuriBox1"; | 998 | this.loginuriBox1.Name = "loginuriBox1"; |
999 | this.loginuriBox1.Size = new System.Drawing.Size(344, 20); | 999 | this.loginuriBox1.Size = new System.Drawing.Size(344, 20); |
1000 | this.loginuriBox1.TabIndex = 78; | 1000 | this.loginuriBox1.TabIndex = 78; |
1001 | this.loginuriBox1.Text = "localhost:9000"; | 1001 | this.loginuriBox1.Text = "localhost:9000"; |
1002 | this.toolTip1.SetToolTip(this.loginuriBox1, "enter login url here"); | 1002 | this.toolTip1.SetToolTip(this.loginuriBox1, "enter login url here"); |
1003 | // | 1003 | // |
1004 | // set1 | 1004 | // set1 |
1005 | // | 1005 | // |
1006 | this.set1.AutoSize = true; | 1006 | this.set1.AutoSize = true; |
1007 | this.set1.Location = new System.Drawing.Point(636, 185); | 1007 | this.set1.Location = new System.Drawing.Point(636, 185); |
1008 | this.set1.Name = "set1"; | 1008 | this.set1.Name = "set1"; |
@@ -1012,18 +1012,18 @@ namespace OpenSim.GUI | |||
1012 | this.toolTip1.SetToolTip(this.set1, "specify value of a particular configuration variable; can be used multiple times " + | 1012 | this.toolTip1.SetToolTip(this.set1, "specify value of a particular configuration variable; can be used multiple times " + |
1013 | "in a single command-line"); | 1013 | "in a single command-line"); |
1014 | this.set1.UseVisualStyleBackColor = true; | 1014 | this.set1.UseVisualStyleBackColor = true; |
1015 | // | 1015 | // |
1016 | // setBox1 | 1016 | // setBox1 |
1017 | // | 1017 | // |
1018 | this.setBox1.Location = new System.Drawing.Point(680, 183); | 1018 | this.setBox1.Location = new System.Drawing.Point(680, 183); |
1019 | this.setBox1.Name = "setBox1"; | 1019 | this.setBox1.Name = "setBox1"; |
1020 | this.setBox1.Size = new System.Drawing.Size(213, 20); | 1020 | this.setBox1.Size = new System.Drawing.Size(213, 20); |
1021 | this.setBox1.TabIndex = 80; | 1021 | this.setBox1.TabIndex = 80; |
1022 | this.setBox1.Text = "SystemLanguage en-us"; | 1022 | this.setBox1.Text = "SystemLanguage en-us"; |
1023 | this.toolTip1.SetToolTip(this.setBox1, "enter params"); | 1023 | this.toolTip1.SetToolTip(this.setBox1, "enter params"); |
1024 | // | 1024 | // |
1025 | // errmask1 | 1025 | // errmask1 |
1026 | // | 1026 | // |
1027 | this.errmask1.AutoSize = true; | 1027 | this.errmask1.AutoSize = true; |
1028 | this.errmask1.Location = new System.Drawing.Point(636, 154); | 1028 | this.errmask1.Location = new System.Drawing.Point(636, 154); |
1029 | this.errmask1.Name = "errmask1"; | 1029 | this.errmask1.Name = "errmask1"; |
@@ -1032,9 +1032,9 @@ namespace OpenSim.GUI | |||
1032 | this.errmask1.Text = "-errmask"; | 1032 | this.errmask1.Text = "-errmask"; |
1033 | this.toolTip1.SetToolTip(this.errmask1, "32-bit bitmask for error type mask"); | 1033 | this.toolTip1.SetToolTip(this.errmask1, "32-bit bitmask for error type mask"); |
1034 | this.errmask1.UseVisualStyleBackColor = true; | 1034 | this.errmask1.UseVisualStyleBackColor = true; |
1035 | // | 1035 | // |
1036 | // skin1 | 1036 | // skin1 |
1037 | // | 1037 | // |
1038 | this.skin1.AutoSize = true; | 1038 | this.skin1.AutoSize = true; |
1039 | this.skin1.Location = new System.Drawing.Point(635, 215); | 1039 | this.skin1.Location = new System.Drawing.Point(635, 215); |
1040 | this.skin1.Name = "skin1"; | 1040 | this.skin1.Name = "skin1"; |
@@ -1043,9 +1043,9 @@ namespace OpenSim.GUI | |||
1043 | this.skin1.Text = "-skin"; | 1043 | this.skin1.Text = "-skin"; |
1044 | this.toolTip1.SetToolTip(this.skin1, "load skins/<directory>/skin.xml as the default UI appearance (incomplete)"); | 1044 | this.toolTip1.SetToolTip(this.skin1, "load skins/<directory>/skin.xml as the default UI appearance (incomplete)"); |
1045 | this.skin1.UseVisualStyleBackColor = true; | 1045 | this.skin1.UseVisualStyleBackColor = true; |
1046 | // | 1046 | // |
1047 | // login1 | 1047 | // login1 |
1048 | // | 1048 | // |
1049 | this.login1.AutoSize = true; | 1049 | this.login1.AutoSize = true; |
1050 | this.login1.Location = new System.Drawing.Point(457, 304); | 1050 | this.login1.Location = new System.Drawing.Point(457, 304); |
1051 | this.login1.Name = "login1"; | 1051 | this.login1.Name = "login1"; |
@@ -1054,44 +1054,44 @@ namespace OpenSim.GUI | |||
1054 | this.login1.Text = "-login"; | 1054 | this.login1.Text = "-login"; |
1055 | this.toolTip1.SetToolTip(this.login1, "log in as a user"); | 1055 | this.toolTip1.SetToolTip(this.login1, "log in as a user"); |
1056 | this.login1.UseVisualStyleBackColor = true; | 1056 | this.login1.UseVisualStyleBackColor = true; |
1057 | // | 1057 | // |
1058 | // errmaskBox1 | 1058 | // errmaskBox1 |
1059 | // | 1059 | // |
1060 | this.errmaskBox1.Location = new System.Drawing.Point(704, 153); | 1060 | this.errmaskBox1.Location = new System.Drawing.Point(704, 153); |
1061 | this.errmaskBox1.Name = "errmaskBox1"; | 1061 | this.errmaskBox1.Name = "errmaskBox1"; |
1062 | this.errmaskBox1.Size = new System.Drawing.Size(189, 20); | 1062 | this.errmaskBox1.Size = new System.Drawing.Size(189, 20); |
1063 | this.errmaskBox1.TabIndex = 84; | 1063 | this.errmaskBox1.TabIndex = 84; |
1064 | this.toolTip1.SetToolTip(this.errmaskBox1, "32-bit bitmask for error type mask"); | 1064 | this.toolTip1.SetToolTip(this.errmaskBox1, "32-bit bitmask for error type mask"); |
1065 | // | 1065 | // |
1066 | // skinBox1 | 1066 | // skinBox1 |
1067 | // | 1067 | // |
1068 | this.skinBox1.Location = new System.Drawing.Point(679, 213); | 1068 | this.skinBox1.Location = new System.Drawing.Point(679, 213); |
1069 | this.skinBox1.Name = "skinBox1"; | 1069 | this.skinBox1.Name = "skinBox1"; |
1070 | this.skinBox1.Size = new System.Drawing.Size(214, 20); | 1070 | this.skinBox1.Size = new System.Drawing.Size(214, 20); |
1071 | this.skinBox1.TabIndex = 85; | 1071 | this.skinBox1.TabIndex = 85; |
1072 | this.skinBox1.Text = "C://Secondlife//"; | 1072 | this.skinBox1.Text = "C://Secondlife//"; |
1073 | this.toolTip1.SetToolTip(this.skinBox1, "enter directory where skin.xml is"); | 1073 | this.toolTip1.SetToolTip(this.skinBox1, "enter directory where skin.xml is"); |
1074 | // | 1074 | // |
1075 | // firstBox1 | 1075 | // firstBox1 |
1076 | // | 1076 | // |
1077 | this.firstBox1.Location = new System.Drawing.Point(549, 303); | 1077 | this.firstBox1.Location = new System.Drawing.Point(549, 303); |
1078 | this.firstBox1.Name = "firstBox1"; | 1078 | this.firstBox1.Name = "firstBox1"; |
1079 | this.firstBox1.Size = new System.Drawing.Size(80, 20); | 1079 | this.firstBox1.Size = new System.Drawing.Size(80, 20); |
1080 | this.firstBox1.TabIndex = 86; | 1080 | this.firstBox1.TabIndex = 86; |
1081 | this.firstBox1.Text = "Test"; | 1081 | this.firstBox1.Text = "Test"; |
1082 | this.toolTip1.SetToolTip(this.firstBox1, "firstname"); | 1082 | this.toolTip1.SetToolTip(this.firstBox1, "firstname"); |
1083 | // | 1083 | // |
1084 | // lastBox1 | 1084 | // lastBox1 |
1085 | // | 1085 | // |
1086 | this.lastBox1.Location = new System.Drawing.Point(668, 303); | 1086 | this.lastBox1.Location = new System.Drawing.Point(668, 303); |
1087 | this.lastBox1.Name = "lastBox1"; | 1087 | this.lastBox1.Name = "lastBox1"; |
1088 | this.lastBox1.Size = new System.Drawing.Size(80, 20); | 1088 | this.lastBox1.Size = new System.Drawing.Size(80, 20); |
1089 | this.lastBox1.TabIndex = 92; | 1089 | this.lastBox1.TabIndex = 92; |
1090 | this.lastBox1.Text = "User"; | 1090 | this.lastBox1.Text = "User"; |
1091 | this.toolTip1.SetToolTip(this.lastBox1, "lastname"); | 1091 | this.toolTip1.SetToolTip(this.lastBox1, "lastname"); |
1092 | // | 1092 | // |
1093 | // noutc1 | 1093 | // noutc1 |
1094 | // | 1094 | // |
1095 | this.noutc1.AutoSize = true; | 1095 | this.noutc1.AutoSize = true; |
1096 | this.noutc1.Location = new System.Drawing.Point(359, 320); | 1096 | this.noutc1.Location = new System.Drawing.Point(359, 320); |
1097 | this.noutc1.Name = "noutc1"; | 1097 | this.noutc1.Name = "noutc1"; |
@@ -1100,18 +1100,18 @@ namespace OpenSim.GUI | |||
1100 | this.noutc1.Text = "-noutc"; | 1100 | this.noutc1.Text = "-noutc"; |
1101 | this.toolTip1.SetToolTip(this.noutc1, "logs in local time, not UTC"); | 1101 | this.toolTip1.SetToolTip(this.noutc1, "logs in local time, not UTC"); |
1102 | this.noutc1.UseVisualStyleBackColor = true; | 1102 | this.noutc1.UseVisualStyleBackColor = true; |
1103 | // | 1103 | // |
1104 | // passBox1 | 1104 | // passBox1 |
1105 | // | 1105 | // |
1106 | this.passBox1.Location = new System.Drawing.Point(790, 303); | 1106 | this.passBox1.Location = new System.Drawing.Point(790, 303); |
1107 | this.passBox1.Name = "passBox1"; | 1107 | this.passBox1.Name = "passBox1"; |
1108 | this.passBox1.Size = new System.Drawing.Size(103, 20); | 1108 | this.passBox1.Size = new System.Drawing.Size(103, 20); |
1109 | this.passBox1.TabIndex = 93; | 1109 | this.passBox1.TabIndex = 93; |
1110 | this.passBox1.Text = "test"; | 1110 | this.passBox1.Text = "test"; |
1111 | this.toolTip1.SetToolTip(this.passBox1, "password"); | 1111 | this.toolTip1.SetToolTip(this.passBox1, "password"); |
1112 | // | 1112 | // |
1113 | // raw1 | 1113 | // raw1 |
1114 | // | 1114 | // |
1115 | this.raw1.AutoSize = true; | 1115 | this.raw1.AutoSize = true; |
1116 | this.raw1.Location = new System.Drawing.Point(457, 336); | 1116 | this.raw1.Location = new System.Drawing.Point(457, 336); |
1117 | this.raw1.Name = "raw1"; | 1117 | this.raw1.Name = "raw1"; |
@@ -1120,17 +1120,17 @@ namespace OpenSim.GUI | |||
1120 | this.raw1.Text = "Raw CMD :"; | 1120 | this.raw1.Text = "Raw CMD :"; |
1121 | this.toolTip1.SetToolTip(this.raw1, "Raw CMD options, may crash everything"); | 1121 | this.toolTip1.SetToolTip(this.raw1, "Raw CMD options, may crash everything"); |
1122 | this.raw1.UseVisualStyleBackColor = true; | 1122 | this.raw1.UseVisualStyleBackColor = true; |
1123 | // | 1123 | // |
1124 | // rawBox1 | 1124 | // rawBox1 |
1125 | // | 1125 | // |
1126 | this.rawBox1.Location = new System.Drawing.Point(549, 333); | 1126 | this.rawBox1.Location = new System.Drawing.Point(549, 333); |
1127 | this.rawBox1.Name = "rawBox1"; | 1127 | this.rawBox1.Name = "rawBox1"; |
1128 | this.rawBox1.Size = new System.Drawing.Size(344, 20); | 1128 | this.rawBox1.Size = new System.Drawing.Size(344, 20); |
1129 | this.rawBox1.TabIndex = 95; | 1129 | this.rawBox1.TabIndex = 95; |
1130 | this.toolTip1.SetToolTip(this.rawBox1, "Raw CMD options, may crash everything"); | 1130 | this.toolTip1.SetToolTip(this.rawBox1, "Raw CMD options, may crash everything"); |
1131 | // | 1131 | // |
1132 | // clear1 | 1132 | // clear1 |
1133 | // | 1133 | // |
1134 | this.clear1.Location = new System.Drawing.Point(178, 366); | 1134 | this.clear1.Location = new System.Drawing.Point(178, 366); |
1135 | this.clear1.Name = "clear1"; | 1135 | this.clear1.Name = "clear1"; |
1136 | this.clear1.Size = new System.Drawing.Size(80, 23); | 1136 | this.clear1.Size = new System.Drawing.Size(80, 23); |
@@ -1139,18 +1139,18 @@ namespace OpenSim.GUI | |||
1139 | this.toolTip1.SetToolTip(this.clear1, "clear all switch boxes"); | 1139 | this.toolTip1.SetToolTip(this.clear1, "clear all switch boxes"); |
1140 | this.clear1.UseVisualStyleBackColor = true; | 1140 | this.clear1.UseVisualStyleBackColor = true; |
1141 | this.clear1.Click += new System.EventHandler(this.clear1_Click); | 1141 | this.clear1.Click += new System.EventHandler(this.clear1_Click); |
1142 | // | 1142 | // |
1143 | // nataddress1 | 1143 | // nataddress1 |
1144 | // | 1144 | // |
1145 | this.nataddress1.Location = new System.Drawing.Point(457, 389); | 1145 | this.nataddress1.Location = new System.Drawing.Point(457, 389); |
1146 | this.nataddress1.Name = "nataddress1"; | 1146 | this.nataddress1.Name = "nataddress1"; |
1147 | this.nataddress1.Size = new System.Drawing.Size(436, 20); | 1147 | this.nataddress1.Size = new System.Drawing.Size(436, 20); |
1148 | this.nataddress1.TabIndex = 58; | 1148 | this.nataddress1.TabIndex = 58; |
1149 | this.nataddress1.Text = "UNUSED ATM"; | 1149 | this.nataddress1.Text = "UNUSED ATM"; |
1150 | this.nataddress1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; | 1150 | this.nataddress1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; |
1151 | // | 1151 | // |
1152 | // label8 | 1152 | // label8 |
1153 | // | 1153 | // |
1154 | this.label8.AutoSize = true; | 1154 | this.label8.AutoSize = true; |
1155 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); | 1155 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
1156 | this.label8.Location = new System.Drawing.Point(588, 360); | 1156 | this.label8.Location = new System.Drawing.Point(588, 360); |
@@ -1158,9 +1158,9 @@ namespace OpenSim.GUI | |||
1158 | this.label8.Size = new System.Drawing.Size(175, 20); | 1158 | this.label8.Size = new System.Drawing.Size(175, 20); |
1159 | this.label8.TabIndex = 59; | 1159 | this.label8.TabIndex = 59; |
1160 | this.label8.Text = "World/NAT Address :"; | 1160 | this.label8.Text = "World/NAT Address :"; |
1161 | // | 1161 | // |
1162 | // label9 | 1162 | // label9 |
1163 | // | 1163 | // |
1164 | this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); | 1164 | this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
1165 | this.label9.Location = new System.Drawing.Point(633, 27); | 1165 | this.label9.Location = new System.Drawing.Point(633, 27); |
1166 | this.label9.Name = "label9"; | 1166 | this.label9.Name = "label9"; |
@@ -1168,17 +1168,17 @@ namespace OpenSim.GUI | |||
1168 | this.label9.TabIndex = 60; | 1168 | this.label9.TabIndex = 60; |
1169 | this.label9.Text = "Path :"; | 1169 | this.label9.Text = "Path :"; |
1170 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; | 1170 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
1171 | // | 1171 | // |
1172 | // exeBox1 | 1172 | // exeBox1 |
1173 | // | 1173 | // |
1174 | this.exeBox1.Location = new System.Drawing.Point(530, 27); | 1174 | this.exeBox1.Location = new System.Drawing.Point(530, 27); |
1175 | this.exeBox1.Name = "exeBox1"; | 1175 | this.exeBox1.Name = "exeBox1"; |
1176 | this.exeBox1.Size = new System.Drawing.Size(100, 20); | 1176 | this.exeBox1.Size = new System.Drawing.Size(100, 20); |
1177 | this.exeBox1.TabIndex = 61; | 1177 | this.exeBox1.TabIndex = 61; |
1178 | this.exeBox1.Text = "Secondlife.exe"; | 1178 | this.exeBox1.Text = "Secondlife.exe"; |
1179 | // | 1179 | // |
1180 | // label10 | 1180 | // label10 |
1181 | // | 1181 | // |
1182 | this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); | 1182 | this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
1183 | this.label10.Location = new System.Drawing.Point(392, 27); | 1183 | this.label10.Location = new System.Drawing.Point(392, 27); |
1184 | this.label10.Name = "label10"; | 1184 | this.label10.Name = "label10"; |
@@ -1186,36 +1186,36 @@ namespace OpenSim.GUI | |||
1186 | this.label10.TabIndex = 62; | 1186 | this.label10.TabIndex = 62; |
1187 | this.label10.Text = "Executable Name :"; | 1187 | this.label10.Text = "Executable Name :"; |
1188 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; | 1188 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
1189 | // | 1189 | // |
1190 | // label11 | 1190 | // label11 |
1191 | // | 1191 | // |
1192 | this.label11.AutoSize = true; | 1192 | this.label11.AutoSize = true; |
1193 | this.label11.Location = new System.Drawing.Point(514, 306); | 1193 | this.label11.Location = new System.Drawing.Point(514, 306); |
1194 | this.label11.Name = "label11"; | 1194 | this.label11.Name = "label11"; |
1195 | this.label11.Size = new System.Drawing.Size(32, 13); | 1195 | this.label11.Size = new System.Drawing.Size(32, 13); |
1196 | this.label11.TabIndex = 89; | 1196 | this.label11.TabIndex = 89; |
1197 | this.label11.Text = "First :"; | 1197 | this.label11.Text = "First :"; |
1198 | // | 1198 | // |
1199 | // label12 | 1199 | // label12 |
1200 | // | 1200 | // |
1201 | this.label12.AutoSize = true; | 1201 | this.label12.AutoSize = true; |
1202 | this.label12.Location = new System.Drawing.Point(632, 306); | 1202 | this.label12.Location = new System.Drawing.Point(632, 306); |
1203 | this.label12.Name = "label12"; | 1203 | this.label12.Name = "label12"; |
1204 | this.label12.Size = new System.Drawing.Size(33, 13); | 1204 | this.label12.Size = new System.Drawing.Size(33, 13); |
1205 | this.label12.TabIndex = 90; | 1205 | this.label12.TabIndex = 90; |
1206 | this.label12.Text = "Last :"; | 1206 | this.label12.Text = "Last :"; |
1207 | // | 1207 | // |
1208 | // label13 | 1208 | // label13 |
1209 | // | 1209 | // |
1210 | this.label13.AutoSize = true; | 1210 | this.label13.AutoSize = true; |
1211 | this.label13.Location = new System.Drawing.Point(751, 306); | 1211 | this.label13.Location = new System.Drawing.Point(751, 306); |
1212 | this.label13.Name = "label13"; | 1212 | this.label13.Name = "label13"; |
1213 | this.label13.Size = new System.Drawing.Size(36, 13); | 1213 | this.label13.Size = new System.Drawing.Size(36, 13); |
1214 | this.label13.TabIndex = 91; | 1214 | this.label13.TabIndex = 91; |
1215 | this.label13.Text = "Pass :"; | 1215 | this.label13.Text = "Pass :"; |
1216 | // | 1216 | // |
1217 | // Main | 1217 | // Main |
1218 | // | 1218 | // |
1219 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); | 1219 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
1220 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | 1220 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
1221 | this.ClientSize = new System.Drawing.Size(900, 431); | 1221 | this.ClientSize = new System.Drawing.Size(900, 431); |
diff --git a/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs b/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs index b89119c..8d4b3f5 100644 --- a/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs | |||
@@ -29,7 +29,7 @@ using System.Reflection; | |||
29 | using System.Runtime.CompilerServices; | 29 | using System.Runtime.CompilerServices; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
31 | 31 | ||
32 | // General Information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 34 | // associated with an assembly. |
35 | [assembly: AssemblyTitle("OpenSim.GUI")] | 35 | [assembly: AssemblyTitle("OpenSim.GUI")] |
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices; | |||
41 | [assembly: AssemblyTrademark("")] | 41 | [assembly: AssemblyTrademark("")] |
42 | [assembly: AssemblyCulture("")] | 42 | [assembly: AssemblyCulture("")] |
43 | 43 | ||
44 | // Setting ComVisible to false makes the types in this assembly not visible | 44 | // Setting ComVisible to false makes the types in this assembly not visible |
45 | // to COM components. If you need to access a type in this assembly from | 45 | // to COM components. If you need to access a type in this assembly from |
46 | // COM, set the ComVisible attribute to true on that type. | 46 | // COM, set the ComVisible attribute to true on that type. |
47 | [assembly: ComVisible(false)] | 47 | [assembly: ComVisible(false)] |
48 | 48 | ||
@@ -52,7 +52,7 @@ using System.Runtime.InteropServices; | |||
52 | // Version information for an assembly consists of the following four values: | 52 | // Version information for an assembly consists of the following four values: |
53 | // | 53 | // |
54 | // Major Version | 54 | // Major Version |
55 | // Minor Version | 55 | // Minor Version |
56 | // Build Number | 56 | // Build Number |
57 | // Revision | 57 | // Revision |
58 | // | 58 | // |
diff --git a/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs b/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs index ee9282e..4665dd9 100644 --- a/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs +++ b/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs | |||
@@ -58,18 +58,18 @@ namespace OpenSim.GUI | |||
58 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConfiguration)); | 58 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConfiguration)); |
59 | this.textBox1 = new System.Windows.Forms.TextBox(); | 59 | this.textBox1 = new System.Windows.Forms.TextBox(); |
60 | this.SuspendLayout(); | 60 | this.SuspendLayout(); |
61 | // | 61 | // |
62 | // textBox1 | 62 | // textBox1 |
63 | // | 63 | // |
64 | this.textBox1.Location = new System.Drawing.Point(12, 12); | 64 | this.textBox1.Location = new System.Drawing.Point(12, 12); |
65 | this.textBox1.Multiline = true; | 65 | this.textBox1.Multiline = true; |
66 | this.textBox1.Name = "textBox1"; | 66 | this.textBox1.Name = "textBox1"; |
67 | this.textBox1.Size = new System.Drawing.Size(570, 190); | 67 | this.textBox1.Size = new System.Drawing.Size(570, 190); |
68 | this.textBox1.TabIndex = 0; | 68 | this.textBox1.TabIndex = 0; |
69 | this.textBox1.Text = resources.GetString("textBox1.Text"); | 69 | this.textBox1.Text = resources.GetString("textBox1.Text"); |
70 | // | 70 | // |
71 | // frmConfiguration | 71 | // frmConfiguration |
72 | // | 72 | // |
73 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); | 73 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
74 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | 74 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
75 | this.ClientSize = new System.Drawing.Size(664, 413); | 75 | this.ClientSize = new System.Drawing.Size(664, 413); |
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 334f699..960be9b 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs | |||
@@ -59,7 +59,7 @@ namespace pCampBot | |||
59 | 59 | ||
60 | protected string[] talkarray; | 60 | protected string[] talkarray; |
61 | /// <summary> | 61 | /// <summary> |
62 | /// | 62 | /// |
63 | /// </summary> | 63 | /// </summary> |
64 | /// <param name="bsconfig">nini config for the bot</param> | 64 | /// <param name="bsconfig">nini config for the bot</param> |
65 | public PhysicsBot(IConfig bsconfig) | 65 | public PhysicsBot(IConfig bsconfig) |
@@ -69,7 +69,7 @@ namespace pCampBot | |||
69 | talkarray = readexcuses(); | 69 | talkarray = readexcuses(); |
70 | } | 70 | } |
71 | 71 | ||
72 | //We do our actions here. This is where one would | 72 | //We do our actions here. This is where one would |
73 | //add additional steps and/or things the bot should do | 73 | //add additional steps and/or things the bot should do |
74 | 74 | ||
75 | void m_action_Elapsed(object sender, ElapsedEventArgs e) | 75 | void m_action_Elapsed(object sender, ElapsedEventArgs e) |