aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs2
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs3
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/RegionInfo.cs69
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs12
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs10
-rw-r--r--OpenSim/Framework/TaskInventoryDictionary.cs10
-rw-r--r--OpenSim/Framework/UserProfileData.cs8
-rw-r--r--OpenSim/Framework/Util.cs24
10 files changed, 120 insertions, 22 deletions
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index b652299..57ca704 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -244,7 +244,6 @@ namespace OpenSim.Framework.Communications.Services
244 InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); 244 InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString();
245 ArrayList InventoryRoot = new ArrayList(); 245 ArrayList InventoryRoot = new ArrayList();
246 InventoryRoot.Add(InventoryRootHash); 246 InventoryRoot.Add(InventoryRootHash);
247 userProfile.RootInventoryFolderID = inventData.RootFolderID;
248 247
249 logResponse.InventoryRoot = InventoryRoot; 248 logResponse.InventoryRoot = InventoryRoot;
250 logResponse.InventorySkeleton = AgentInventoryArray; 249 logResponse.InventorySkeleton = AgentInventoryArray;
@@ -501,7 +500,6 @@ namespace OpenSim.Framework.Communications.Services
501 InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); 500 InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString();
502 ArrayList InventoryRoot = new ArrayList(); 501 ArrayList InventoryRoot = new ArrayList();
503 InventoryRoot.Add(InventoryRootHash); 502 InventoryRoot.Add(InventoryRootHash);
504 userProfile.RootInventoryFolderID = inventData.RootFolderID;
505 503
506 504
507 // Inventory Library Section 505 // Inventory Library Section
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index bf4f331..4f0af06 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -697,9 +697,6 @@ namespace OpenSim.Framework.Communications
697 // local service (standalone) 697 // local service (standalone)
698 m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory"); 698 m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory");
699 m_InventoryService.CreateUserInventory(userProf.ID); 699 m_InventoryService.CreateUserInventory(userProf.ID);
700 InventoryFolderBase rootfolder = m_InventoryService.GetRootFolder(userProf.ID);
701 if (rootfolder != null)
702 userProf.RootInventoryFolderID = rootfolder.ID;
703 } 700 }
704 else if (m_commsManager.InterServiceInventoryService != null) 701 else if (m_commsManager.InterServiceInventoryService != null)
705 { 702 {
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 04ba9c6..cb136e2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1077,7 +1077,7 @@ namespace OpenSim.Framework
1077 1077
1078 void SendInstantMessage(GridInstantMessage im); 1078 void SendInstantMessage(GridInstantMessage im);
1079 1079
1080 void SendGenericMessage(string method, List<string> message); 1080 void SendGenericMessage(string method, List<byte[]> message);
1081 1081
1082 void SendLayerData(float[] map); 1082 void SendLayerData(float[] map);
1083 void SendLayerData(int px, int py, float[] map); 1083 void SendLayerData(int px, int py, float[] map);
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 721233d..c39cc03 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -36,8 +36,59 @@ using OpenMetaverse;
36using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38 38
39
39namespace OpenSim.Framework 40namespace OpenSim.Framework
40{ 41{
42 public class RegionMeta7WindlightData
43 {
44 public UUID regionID = UUID.Zero;
45 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
46 public float waterFogDensityExponent = 4.0f;
47 public float underwaterFogModifier = 0.25f;
48 public Vector3 reflectionWaveletScale = new Vector3(2.0f,2.0f,2.0f);
49 public float fresnelScale = 0.40f;
50 public float fresnelOffset = 0.50f;
51 public float refractScaleAbove = 0.03f;
52 public float refractScaleBelow = 0.20f;
53 public float blurMultiplier = 0.040f;
54 public Vector2 bigWaveDirection = new Vector2(1.05f,-0.42f);
55 public Vector2 littleWaveDirection = new Vector2(1.11f,-1.16f);
56 public UUID normalMapTexture = new UUID("822ded49-9a6c-f61c-cb89-6df54f42cdf4");
57 public Vector4 horizon = new Vector4(0.26f, 0.24f, 0.34f, 0.33f);
58 public float hazeHorizon = 0.19f;
59 public Vector4 blueDensity = new Vector4(0.10f, 0.93f, 0.02f, 0.93f);
60 public float hazeDensity = 0.70f;
61 public float densityMultiplier = 0.18f;
62 public float distanceMultiplier = 0.8f;
63 public UInt16 maxAltitude = 1605;
64 public Vector4 sunMoonColor = new Vector4(0.24f, 0.26f, 0.30f, 0.30f);
65 public float sunMoonPosition = 0.335f;
66 public Vector4 ambient = new Vector4(0.35f,0.35f,0.35f,0.35f);
67 public float eastAngle = 0.0f;
68 public float sunGlowFocus = 0.10f;
69 public float sunGlowSize = 0.10f;
70 public float sceneGamma = 1.0f;
71 public float starBrightness = 0.0f;
72 public Vector4 cloudColor = new Vector4(0.41f, 0.41f, 0.41f, 0.41f);
73 public Vector3 cloudXYDensity = new Vector3(1.00f, 0.53f, 1.00f);
74 public float cloudCoverage = 0.27f;
75 public float cloudScale = 0.42f;
76 public Vector3 cloudDetailXYDensity = new Vector3(1.00f, 0.53f, 0.12f);
77 public float cloudScrollX = 0.20f;
78 public bool cloudScrollXLock = false;
79 public float cloudScrollY = 0.01f;
80 public bool cloudScrollYLock = false;
81 public bool drawClassicClouds = false;
82
83 public delegate void SaveDelegate(RegionMeta7WindlightData wl);
84 public event SaveDelegate OnSave;
85 public void Save()
86 {
87 if (OnSave != null)
88 OnSave(this);
89 }
90 }
91
41 [Serializable] 92 [Serializable]
42 public class SimpleRegionInfo 93 public class SimpleRegionInfo
43 { 94 {
@@ -304,8 +355,7 @@ namespace OpenSim.Framework
304 private bool m_clampPrimSize = false; 355 private bool m_clampPrimSize = false;
305 private int m_objectCapacity = 0; 356 private int m_objectCapacity = 0;
306 private string m_regionType = String.Empty; 357 private string m_regionType = String.Empty;
307 358 private RegionMeta7WindlightData m_windlight = new RegionMeta7WindlightData();
308
309 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 359 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
310 360
311 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be 361 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be
@@ -454,6 +504,21 @@ namespace OpenSim.Framework
454 set { m_regionSettings = value; } 504 set { m_regionSettings = value; }
455 } 505 }
456 506
507 public RegionMeta7WindlightData WindlightSettings
508 {
509 get
510 {
511 if (m_windlight == null)
512 {
513 m_windlight = new RegionMeta7WindlightData();
514 }
515
516 return m_windlight;
517 }
518
519 set { m_windlight = value; }
520 }
521
457 public int NonphysPrimMax 522 public int NonphysPrimMax
458 { 523 {
459 get { return m_nonphysPrimMax; } 524 get { return m_nonphysPrimMax; }
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 0d93ff7..655df9d 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -442,7 +442,7 @@ namespace OpenSim.Framework.Servers
442 if (File.Exists(gitCommitFileName)) 442 if (File.Exists(gitCommitFileName))
443 { 443 {
444 StreamReader CommitFile = File.OpenText(gitCommitFileName); 444 StreamReader CommitFile = File.OpenText(gitCommitFileName);
445 buildVersion = Environment.NewLine + "git# " + CommitFile.ReadLine(); 445 buildVersion = CommitFile.ReadLine();
446 CommitFile.Close(); 446 CommitFile.Close();
447 m_version += buildVersion ?? ""; 447 m_version += buildVersion ?? "";
448 } 448 }
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index bec5ed3..75cdeb4 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -724,12 +724,20 @@ namespace OpenSim.Framework.Servers.HttpServer
724 } 724 }
725 catch(Exception e) 725 catch(Exception e)
726 { 726 {
727 string errorMessage
728 = String.Format(
729 "Requested method [{0}] from {1} threw exception: {2} {3}",
730 methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace);
731
732 m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage);
733
727 // if the registered XmlRpc method threw an exception, we pass a fault-code along 734 // if the registered XmlRpc method threw an exception, we pass a fault-code along
728 xmlRpcResponse = new XmlRpcResponse(); 735 xmlRpcResponse = new XmlRpcResponse();
736
729 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php 737 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
730 xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}", 738 xmlRpcResponse.SetFault(-32603, errorMessage);
731 methodName, e.Message));
732 } 739 }
740
733 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here 741 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
734 response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; 742 response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
735 } 743 }
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index c53160f..bcfb0a4 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -188,7 +188,15 @@ namespace OpenSim.Framework.Servers.HttpServer
188 try 188 try
189 { 189 {
190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]); 190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]);
191 int port = Int32.Parse(req.Headers["remote_port"]); 191 // sometimes req.Headers["remote_port"] returns a comma separated list, so use
192 // the first one in the list and log it
193 string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' });
194 if (strPorts.Length > 1)
195 {
196 _log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring",
197 req.Headers["remote_addr"], req.Headers["remote_port"]);
198 }
199 int port = Int32.Parse(strPorts[0]);
192 _remoteIPEndPoint = new IPEndPoint(addr, port); 200 _remoteIPEndPoint = new IPEndPoint(addr, port);
193 } 201 }
194 catch (FormatException) 202 catch (FormatException)
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs
index efe5f0c..4b9a509 100644
--- a/OpenSim/Framework/TaskInventoryDictionary.cs
+++ b/OpenSim/Framework/TaskInventoryDictionary.cs
@@ -109,7 +109,10 @@ namespace OpenSim.Framework
109 } 109 }
110 else 110 else
111 { 111 {
112 m_itemLock.ExitReadLock(); 112 if (m_itemLock.RecursiveReadCount>0)
113 {
114 m_itemLock.ExitReadLock();
115 }
113 } 116 }
114 } 117 }
115 118
@@ -144,7 +147,10 @@ namespace OpenSim.Framework
144 } 147 }
145 else 148 else
146 { 149 {
147 m_itemLock.ExitWriteLock(); 150 if (m_itemLock.RecursiveWriteCount > 0)
151 {
152 m_itemLock.ExitWriteLock();
153 }
148 } 154 }
149 } 155 }
150 156
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
index 413f152..9bac739 100644
--- a/OpenSim/Framework/UserProfileData.cs
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -119,8 +119,6 @@ namespace OpenSim.Framework
119 /// </summary> 119 /// </summary>
120 private string m_profileUrl; 120 private string m_profileUrl;
121 121
122 private UUID m_rootInventoryFolderId;
123
124 /// <summary> 122 /// <summary>
125 /// The second component of a users account name 123 /// The second component of a users account name
126 /// </summary> 124 /// </summary>
@@ -312,12 +310,6 @@ namespace OpenSim.Framework
312 set { m_lastLogin = value; } 310 set { m_lastLogin = value; }
313 } 311 }
314 312
315 public UUID RootInventoryFolderID
316 {
317 get { return m_rootInventoryFolderId; }
318 set { m_rootInventoryFolderId = value; }
319 }
320
321 public string UserInventoryURI 313 public string UserInventoryURI
322 { 314 {
323 get { return m_userInventoryUri; } 315 get { return m_userInventoryUri; }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index c052745..b5e2872 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1390,5 +1390,29 @@ namespace OpenSim.Framework
1390 } 1390 }
1391 1391
1392 #endregion FireAndForget Threading Pattern 1392 #endregion FireAndForget Threading Pattern
1393 /// <summary>
1394 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
1395 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
1396 /// for the callers.
1397 /// This trims it to a 12 day interval so don't let your frame time get too long.
1398 /// </summary>
1399 /// <returns></returns>
1400 public static Int32 EnvironmentTickCount()
1401 {
1402 return Environment.TickCount & EnvironmentTickCountMask;
1403 }
1404 const Int32 EnvironmentTickCountMask = 0x3fffffff;
1405
1406 /// <summary>
1407 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
1408 /// and negative every 24.9 days. Subtracts the passed value (previously fetched by
1409 /// 'EnvironmentTickCount()') and accounts for any wrapping.
1410 /// </summary>
1411 /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
1412 public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
1413 {
1414 Int32 diff = EnvironmentTickCount() - prevValue;
1415 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
1416 }
1393 } 1417 }
1394} 1418}