aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-15 16:35:27 +0000
committerJustin Clarke Casey2008-10-15 16:35:27 +0000
commit9324c3f110d70d44ef91c18e570cffc59d067683 (patch)
tree6ce60aa08beca59e9e985868f7435ed89cabf59d
parent* minor: oops, small textual tweak (diff)
downloadopensim-SC_OLD-9324c3f110d70d44ef91c18e570cffc59d067683.zip
opensim-SC_OLD-9324c3f110d70d44ef91c18e570cffc59d067683.tar.gz
opensim-SC_OLD-9324c3f110d70d44ef91c18e570cffc59d067683.tar.bz2
opensim-SC_OLD-9324c3f110d70d44ef91c18e570cffc59d067683.tar.xz
* refactor: Move error logging from GetUserDetails up to callers, since there are some circumstances in which not finding a user is not an error
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs6
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs7
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs13
6 files changed, 59 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index cf6a74d..45102d8 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Communications.Cache
75 { 75 {
76 if (userID == UUID.Zero) 76 if (userID == UUID.Zero)
77 return; 77 return;
78
78 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); 79 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
79 GetUserDetails(userID); 80 GetUserDetails(userID);
80 } 81 }
@@ -133,8 +134,8 @@ namespace OpenSim.Framework.Communications.Cache
133 } 134 }
134 135
135 /// <summary> 136 /// <summary>
136 /// Get the details of the given user. A caller should try this method first if it isn't sure that 137 /// Get cached details of the given user. If the user isn't in cache then the user is requested from the
137 /// a user profile exists for the given user. 138 /// profile service.
138 /// </summary> 139 /// </summary>
139 /// <param name="userID"></param> 140 /// <param name="userID"></param>
140 /// <returns>null if no user details are found</returns> 141 /// <returns>null if no user details are found</returns>
@@ -160,7 +161,6 @@ namespace OpenSim.Framework.Communications.Cache
160 } 161 }
161 else 162 else
162 { 163 {
163 m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found.", userID);
164 return null; 164 return null;
165 } 165 }
166 } 166 }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index cb162ab..b826a12 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5044,8 +5044,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5044 { 5044 {
5045 CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 5045 CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
5046 if (userInfo == null) 5046 if (userInfo == null)
5047 break; 5047 {
5048 m_log.ErrorFormat(
5049 "[CLIENT]: Could not resolve user {0} for caps inventory update",
5050 AgentId);
5048 5051
5052 break;
5053 }
5054
5049 if (userInfo.RootFolder == null) 5055 if (userInfo.RootFolder == null)
5050 break; 5056 break;
5051 5057
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
index 5484ad5..2763831 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -244,6 +244,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
244 244
245 userInfo.UpdateItem(item); 245 userInfo.UpdateItem(item);
246 } 246 }
247 else
248 {
249 m_log.ErrorFormat(
250 "[ASSET TRANSACTIONS]: Could not find user {0} for inventory item update",
251 remoteClient.AgentId);
252 }
247 } 253 }
248 } 254 }
249 255
@@ -294,6 +300,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
294 userInfo.AddItem(item); 300 userInfo.AddItem(item);
295 ourClient.SendInventoryItemCreateUpdate(item); 301 ourClient.SendInventoryItemCreateUpdate(item);
296 } 302 }
303 else
304 {
305 m_log.ErrorFormat(
306 "[ASSET TRANSACTIONS]: Could not find user {0} for inventory item creation",
307 ourClient.AgentId);
308 }
297 } 309 }
298 310
299 /// <summary> 311 /// <summary>
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index a015c63..1f57fb5 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -604,6 +604,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
604 string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; 604 string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
605 return avatarname; 605 return avatarname;
606 } 606 }
607 else
608 {
609 m_log.ErrorFormat(
610 "[MONEY]: Could not resolve user {0}",
611 agentID);
612 }
613
607 return String.Empty; 614 return String.Empty;
608 } 615 }
609 616
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index abbf40e..b6a0c23 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -259,6 +259,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
259 if (profile.UserProfile.GodLevel >= 200) 259 if (profile.UserProfile.GodLevel >= 200)
260 return true; 260 return true;
261 } 261 }
262 else
263 {
264 m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
265 }
262 } 266 }
263 267
264 return false; 268 return false;
@@ -646,8 +650,13 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
646 { 650 {
647 CachedUserInfo userInfo = 651 CachedUserInfo userInfo =
648 scene.CommsManager.UserProfileCacheService.GetUserDetails(user); 652 scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
653
649 if (userInfo == null) 654 if (userInfo == null)
655 {
656 m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for edit notecard check", user);
650 return false; 657 return false;
658 }
659
651 660
652 if (userInfo.RootFolder == null) 661 if (userInfo.RootFolder == null)
653 return false; 662 return false;
@@ -1024,8 +1033,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
1024 { 1033 {
1025 CachedUserInfo userInfo = 1034 CachedUserInfo userInfo =
1026 scene.CommsManager.UserProfileCacheService.GetUserDetails(user); 1035 scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
1036
1027 if (userInfo == null) 1037 if (userInfo == null)
1038 {
1039 m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user);
1028 return false; 1040 return false;
1041 }
1029 1042
1030 if (userInfo.RootFolder == null) 1043 if (userInfo.RootFolder == null)
1031 return false; 1044 return false;
@@ -1102,8 +1115,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
1102 { 1115 {
1103 CachedUserInfo userInfo = 1116 CachedUserInfo userInfo =
1104 scene.CommsManager.UserProfileCacheService.GetUserDetails(user); 1117 scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
1118
1105 if (userInfo == null) 1119 if (userInfo == null)
1120 {
1121 m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for view notecard check", user);
1106 return false; 1122 return false;
1123 }
1107 1124
1108 if (userInfo.RootFolder == null) 1125 if (userInfo.RootFolder == null)
1109 return false; 1126 return false;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 55cc60a..226f39a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -143,6 +143,12 @@ namespace OpenSim.Region.Environment.Scenes
143 AddInventoryItem(remoteClient.AgentId, item); 143 AddInventoryItem(remoteClient.AgentId, item);
144 remoteClient.SendInventoryItemCreateUpdate(item); 144 remoteClient.SendInventoryItemCreateUpdate(item);
145 } 145 }
146 else
147 {
148 m_log.ErrorFormat(
149 "[AGENT INVENTORY]: Could not resolve user {0} for adding an inventory item",
150 remoteClient.AgentId);
151 }
146 } 152 }
147 153
148 /// <summary> 154 /// <summary>
@@ -194,6 +200,13 @@ namespace OpenSim.Region.Environment.Scenes
194 } 200 }
195 } 201 }
196 } 202 }
203 else
204 {
205 m_log.ErrorFormat(
206 "[AGENT INVENTORY]: Could not resolve user {0} for caps inventory update",
207 remoteClient.AgentId);
208 }
209
197 return UUID.Zero; 210 return UUID.Zero;
198 } 211 }
199 212