diff options
author | Justin Clarke Casey | 2009-04-23 18:24:39 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-23 18:24:39 +0000 |
commit | ef9d140022b57b175f41602731ec73775bdf2d9c (patch) | |
tree | d7a561e3ce85b3064b3f84b06d2e3f2fb4f4301e /OpenSim/Framework/Communications/UserManagerBase.cs | |
parent | fix up contributors list to have 3 contributors sections (diff) | |
download | opensim-SC-ef9d140022b57b175f41602731ec73775bdf2d9c.zip opensim-SC-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.gz opensim-SC-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.bz2 opensim-SC-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.xz |
* Add user data plugin to store temporary profiles (which are distinct from cached)
* Plugin not yet used
* Existing functionality should not be affected in any way
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 9cd7658..b6a7362 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -208,7 +208,7 @@ namespace OpenSim.Framework.Communications | |||
208 | } | 208 | } |
209 | catch (Exception e) | 209 | catch (Exception e) |
210 | { | 210 | { |
211 | m_log.InfoFormat( | 211 | m_log.ErrorFormat( |
212 | "[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", | 212 | "[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", |
213 | data.FirstName, data.SurName, plugin.Name, e.ToString()); | 213 | data.FirstName, data.SurName, plugin.Name, e.ToString()); |
214 | } | 214 | } |
@@ -239,7 +239,7 @@ namespace OpenSim.Framework.Communications | |||
239 | } | 239 | } |
240 | catch (Exception e) | 240 | catch (Exception e) |
241 | { | 241 | { |
242 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); | 242 | m_log.Error("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
@@ -264,7 +264,7 @@ namespace OpenSim.Framework.Communications | |||
264 | } | 264 | } |
265 | catch (Exception e) | 265 | catch (Exception e) |
266 | { | 266 | { |
267 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); | 267 | m_log.Error("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); |
268 | } | 268 | } |
269 | } | 269 | } |
270 | 270 | ||
@@ -290,7 +290,7 @@ namespace OpenSim.Framework.Communications | |||
290 | } | 290 | } |
291 | catch (Exception e) | 291 | catch (Exception e) |
292 | { | 292 | { |
293 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); | 293 | m_log.Error("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")"); |
294 | } | 294 | } |
295 | } | 295 | } |
296 | 296 | ||
@@ -334,7 +334,7 @@ namespace OpenSim.Framework.Communications | |||
334 | } | 334 | } |
335 | catch (Exception e) | 335 | catch (Exception e) |
336 | { | 336 | { |
337 | m_log.Info("[USERSTORAGE]: Unable to GetFriendRegionInfos via " + plugin.Name + "(" + e.ToString() + ")"); | 337 | m_log.Error("[USERSTORAGE]: Unable to GetFriendRegionInfos via " + plugin.Name + "(" + e.ToString() + ")"); |
338 | } | 338 | } |
339 | } | 339 | } |
340 | 340 | ||
@@ -351,7 +351,7 @@ namespace OpenSim.Framework.Communications | |||
351 | } | 351 | } |
352 | catch (Exception e) | 352 | catch (Exception e) |
353 | { | 353 | { |
354 | m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Name + "(" + e.ToString() + ")"); | 354 | m_log.Error("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Name + "(" + e.ToString() + ")"); |
355 | } | 355 | } |
356 | } | 356 | } |
357 | } | 357 | } |
@@ -366,7 +366,7 @@ namespace OpenSim.Framework.Communications | |||
366 | } | 366 | } |
367 | catch (Exception e) | 367 | catch (Exception e) |
368 | { | 368 | { |
369 | m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Name + "(" + e.ToString() + ")"); | 369 | m_log.Error("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Name + "(" + e.ToString() + ")"); |
370 | } | 370 | } |
371 | } | 371 | } |
372 | } | 372 | } |
@@ -381,7 +381,7 @@ namespace OpenSim.Framework.Communications | |||
381 | } | 381 | } |
382 | catch (Exception e) | 382 | catch (Exception e) |
383 | { | 383 | { |
384 | m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Name + "(" + e.ToString() + ")"); | 384 | m_log.Error("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Name + "(" + e.ToString() + ")"); |
385 | } | 385 | } |
386 | } | 386 | } |
387 | } | 387 | } |
@@ -396,7 +396,7 @@ namespace OpenSim.Framework.Communications | |||
396 | } | 396 | } |
397 | catch (Exception e) | 397 | catch (Exception e) |
398 | { | 398 | { |
399 | m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Name + "(" + e.ToString() + ")"); | 399 | m_log.Error("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Name + "(" + e.ToString() + ")"); |
400 | } | 400 | } |
401 | } | 401 | } |
402 | } | 402 | } |
@@ -707,24 +707,30 @@ namespace OpenSim.Framework.Communications | |||
707 | public abstract UserProfileData SetupMasterUser(UUID uuid); | 707 | public abstract UserProfileData SetupMasterUser(UUID uuid); |
708 | 708 | ||
709 | /// <summary> | 709 | /// <summary> |
710 | /// Add agent to DB | 710 | /// Add an agent using data plugins. |
711 | /// </summary> | 711 | /// </summary> |
712 | /// <param name="agentdata">The agent data to be added</param> | 712 | /// <param name="agentdata">The agent data to be added</param> |
713 | /// <returns> | ||
714 | /// true if at least one plugin added the user agent. false if no plugin successfully added the agent | ||
715 | /// </returns> | ||
713 | public virtual bool AddUserAgent(UserAgentData agentdata) | 716 | public virtual bool AddUserAgent(UserAgentData agentdata) |
714 | { | 717 | { |
718 | bool result = false; | ||
719 | |||
715 | foreach (IUserDataPlugin plugin in m_plugins) | 720 | foreach (IUserDataPlugin plugin in m_plugins) |
716 | { | 721 | { |
717 | try | 722 | try |
718 | { | 723 | { |
719 | plugin.AddNewUserAgent(agentdata); | 724 | plugin.AddNewUserAgent(agentdata); |
720 | return true; | 725 | result = true; |
721 | } | 726 | } |
722 | catch (Exception e) | 727 | catch (Exception e) |
723 | { | 728 | { |
724 | m_log.Info("[USERSTORAGE]: Unable to add agent via " + plugin.Name + "(" + e.ToString() + ")"); | 729 | m_log.Error("[USERSTORAGE]: Unable to add agent via " + plugin.Name + "(" + e.ToString() + ")"); |
725 | } | 730 | } |
726 | } | 731 | } |
727 | return false; | 732 | |
733 | return result; | ||
728 | } | 734 | } |
729 | 735 | ||
730 | /// <summary> | 736 | /// <summary> |
@@ -745,7 +751,7 @@ namespace OpenSim.Framework.Communications | |||
745 | } | 751 | } |
746 | catch (Exception e) | 752 | catch (Exception e) |
747 | { | 753 | { |
748 | m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); | 754 | m_log.ErrorFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); |
749 | } | 755 | } |
750 | } | 756 | } |
751 | 757 | ||
@@ -762,7 +768,7 @@ namespace OpenSim.Framework.Communications | |||
762 | } | 768 | } |
763 | catch (Exception e) | 769 | catch (Exception e) |
764 | { | 770 | { |
765 | m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); | 771 | m_log.ErrorFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); |
766 | } | 772 | } |
767 | } | 773 | } |
768 | } | 774 | } |
@@ -811,10 +817,10 @@ namespace OpenSim.Framework.Communications | |||
811 | m_log.InfoFormat("[USERAUTH]: Successfully generated new auth key for user {0}", userID); | 817 | m_log.InfoFormat("[USERAUTH]: Successfully generated new auth key for user {0}", userID); |
812 | } | 818 | } |
813 | else | 819 | else |
814 | m_log.Info("[USERAUTH]: Unauthorized key generation request. Denying new key."); | 820 | m_log.Warn("[USERAUTH]: Unauthorized key generation request. Denying new key."); |
815 | } | 821 | } |
816 | else | 822 | else |
817 | m_log.Info("[USERAUTH]: User not found."); | 823 | m_log.Warn("[USERAUTH]: User not found."); |
818 | 824 | ||
819 | return url + newKey; | 825 | return url + newKey; |
820 | } | 826 | } |