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/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.cs48
7 files changed, 51 insertions, 42 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/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 7b90239..b5e2872 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1389,30 +1389,30 @@ namespace OpenSim.Framework
1389 return null; 1389 return null;
1390 } 1390 }
1391 1391
1392 #endregion FireAndForget Threading Pattern 1392 #endregion FireAndForget Threading Pattern
1393 /// <summary> 1393 /// <summary>
1394 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 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 1395 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
1396 /// for the callers. 1396 /// for the callers.
1397 /// This trims it to a 12 day interval so don't let your frame time get too long. 1397 /// This trims it to a 12 day interval so don't let your frame time get too long.
1398 /// </summary> 1398 /// </summary>
1399 /// <returns></returns> 1399 /// <returns></returns>
1400 public static Int32 EnvironmentTickCount() 1400 public static Int32 EnvironmentTickCount()
1401 { 1401 {
1402 return Environment.TickCount & EnvironmentTickCountMask; 1402 return Environment.TickCount & EnvironmentTickCountMask;
1403 } 1403 }
1404 const Int32 EnvironmentTickCountMask = 0x3fffffff; 1404 const Int32 EnvironmentTickCountMask = 0x3fffffff;
1405 1405
1406 /// <summary> 1406 /// <summary>
1407 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 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 1408 /// and negative every 24.9 days. Subtracts the passed value (previously fetched by
1409 /// 'EnvironmentTickCount()') and accounts for any wrapping. 1409 /// 'EnvironmentTickCount()') and accounts for any wrapping.
1410 /// </summary> 1410 /// </summary>
1411 /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns> 1411 /// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
1412 public static Int32 EnvironmentTickCountSubtract(Int32 prevValue) 1412 public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
1413 { 1413 {
1414 Int32 diff = EnvironmentTickCount() - prevValue; 1414 Int32 diff = EnvironmentTickCount() - prevValue;
1415 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); 1415 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
1416 } 1416 }
1417 } 1417 }
1418} 1418}