diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteUserProfilesData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 84e56b1..70579af 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | |||
@@ -50,7 +50,6 @@ namespace OpenSim.Data.SQLite | |||
50 | private SqliteConnection m_connection; | 50 | private SqliteConnection m_connection; |
51 | private string m_connectionString; | 51 | private string m_connectionString; |
52 | 52 | ||
53 | private FieldInfo[] m_Fields; | ||
54 | private Dictionary<string, FieldInfo> m_FieldMap = | 53 | private Dictionary<string, FieldInfo> m_FieldMap = |
55 | new Dictionary<string, FieldInfo>(); | 54 | new Dictionary<string, FieldInfo>(); |
56 | 55 | ||
@@ -115,7 +114,7 @@ namespace OpenSim.Data.SQLite | |||
115 | } | 114 | } |
116 | catch (Exception e) | 115 | catch (Exception e) |
117 | { | 116 | { |
118 | m_log.DebugFormat("[PROFILES_DATA]" + | 117 | m_log.ErrorFormat("[PROFILES_DATA]" + |
119 | ": UserAccount exception {0}", e.Message); | 118 | ": UserAccount exception {0}", e.Message); |
120 | } | 119 | } |
121 | n.Add("classifieduuid", OSD.FromUUID(Id)); | 120 | n.Add("classifieduuid", OSD.FromUUID(Id)); |
@@ -218,7 +217,7 @@ namespace OpenSim.Data.SQLite | |||
218 | } | 217 | } |
219 | catch (Exception e) | 218 | catch (Exception e) |
220 | { | 219 | { |
221 | m_log.DebugFormat("[PROFILES_DATA]" + | 220 | m_log.ErrorFormat("[PROFILES_DATA]" + |
222 | ": ClassifiedesUpdate exception {0}", e.Message); | 221 | ": ClassifiedesUpdate exception {0}", e.Message); |
223 | result = e.Message; | 222 | result = e.Message; |
224 | return false; | 223 | return false; |
@@ -244,7 +243,7 @@ namespace OpenSim.Data.SQLite | |||
244 | } | 243 | } |
245 | catch (Exception e) | 244 | catch (Exception e) |
246 | { | 245 | { |
247 | m_log.DebugFormat("[PROFILES_DATA]" + | 246 | m_log.ErrorFormat("[PROFILES_DATA]" + |
248 | ": DeleteClassifiedRecord exception {0}", e.Message); | 247 | ": DeleteClassifiedRecord exception {0}", e.Message); |
249 | return false; | 248 | return false; |
250 | } | 249 | } |
@@ -290,7 +289,7 @@ namespace OpenSim.Data.SQLite | |||
290 | } | 289 | } |
291 | catch (Exception e) | 290 | catch (Exception e) |
292 | { | 291 | { |
293 | m_log.DebugFormat("[PROFILES_DATA]" + | 292 | m_log.ErrorFormat("[PROFILES_DATA]" + |
294 | ": GetPickInfo exception {0}", e.Message); | 293 | ": GetPickInfo exception {0}", e.Message); |
295 | } | 294 | } |
296 | return true; | 295 | return true; |
@@ -327,7 +326,7 @@ namespace OpenSim.Data.SQLite | |||
327 | } | 326 | } |
328 | catch (Exception e) | 327 | catch (Exception e) |
329 | { | 328 | { |
330 | m_log.DebugFormat("[PROFILES_DATA]" + | 329 | m_log.ErrorFormat("[PROFILES_DATA]" + |
331 | ": GetAvatarPicks exception {0}", e.Message); | 330 | ": GetAvatarPicks exception {0}", e.Message); |
332 | } | 331 | } |
333 | return data; | 332 | return data; |
@@ -369,7 +368,7 @@ namespace OpenSim.Data.SQLite | |||
369 | bool.TryParse((string)reader["enabled"].ToString(), out pick.Enabled); | 368 | bool.TryParse((string)reader["enabled"].ToString(), out pick.Enabled); |
370 | pick.Name = (string)reader["name"]; | 369 | pick.Name = (string)reader["name"]; |
371 | pick.Desc = description; | 370 | pick.Desc = description; |
372 | pick.User = (string)reader["user"]; | 371 | pick.ParcelName = (string)reader["user"]; |
373 | pick.OriginalName = (string)reader["originalname"]; | 372 | pick.OriginalName = (string)reader["originalname"]; |
374 | pick.SimName = (string)reader["simname"]; | 373 | pick.SimName = (string)reader["simname"]; |
375 | pick.SortOrder = (int)reader["sortorder"]; | 374 | pick.SortOrder = (int)reader["sortorder"]; |
@@ -379,7 +378,7 @@ namespace OpenSim.Data.SQLite | |||
379 | } | 378 | } |
380 | catch (Exception e) | 379 | catch (Exception e) |
381 | { | 380 | { |
382 | m_log.DebugFormat("[PROFILES_DATA]" + | 381 | m_log.ErrorFormat("[PROFILES_DATA]" + |
383 | ": GetPickInfo exception {0}", e.Message); | 382 | ": GetPickInfo exception {0}", e.Message); |
384 | } | 383 | } |
385 | return pick; | 384 | return pick; |
@@ -435,7 +434,7 @@ namespace OpenSim.Data.SQLite | |||
435 | cmd.Parameters.AddWithValue(":Name", pick.Name.ToString()); | 434 | cmd.Parameters.AddWithValue(":Name", pick.Name.ToString()); |
436 | cmd.Parameters.AddWithValue(":Desc", pick.Desc.ToString()); | 435 | cmd.Parameters.AddWithValue(":Desc", pick.Desc.ToString()); |
437 | cmd.Parameters.AddWithValue(":SnapshotId", pick.SnapshotId.ToString()); | 436 | cmd.Parameters.AddWithValue(":SnapshotId", pick.SnapshotId.ToString()); |
438 | cmd.Parameters.AddWithValue(":User", pick.User.ToString()); | 437 | cmd.Parameters.AddWithValue(":User", pick.ParcelName.ToString()); |
439 | cmd.Parameters.AddWithValue(":Original", pick.OriginalName.ToString()); | 438 | cmd.Parameters.AddWithValue(":Original", pick.OriginalName.ToString()); |
440 | cmd.Parameters.AddWithValue(":SimName",pick.SimName.ToString()); | 439 | cmd.Parameters.AddWithValue(":SimName",pick.SimName.ToString()); |
441 | cmd.Parameters.AddWithValue(":GlobalPos", pick.GlobalPos); | 440 | cmd.Parameters.AddWithValue(":GlobalPos", pick.GlobalPos); |
@@ -447,7 +446,7 @@ namespace OpenSim.Data.SQLite | |||
447 | } | 446 | } |
448 | catch (Exception e) | 447 | catch (Exception e) |
449 | { | 448 | { |
450 | m_log.DebugFormat("[PROFILES_DATA]" + | 449 | m_log.ErrorFormat("[PROFILES_DATA]" + |
451 | ": UpdateAvatarNotes exception {0}", e.Message); | 450 | ": UpdateAvatarNotes exception {0}", e.Message); |
452 | return false; | 451 | return false; |
453 | } | 452 | } |
@@ -472,7 +471,7 @@ namespace OpenSim.Data.SQLite | |||
472 | } | 471 | } |
473 | catch (Exception e) | 472 | catch (Exception e) |
474 | { | 473 | { |
475 | m_log.DebugFormat("[PROFILES_DATA]" + | 474 | m_log.ErrorFormat("[PROFILES_DATA]" + |
476 | ": DeleteUserPickRecord exception {0}", e.Message); | 475 | ": DeleteUserPickRecord exception {0}", e.Message); |
477 | return false; | 476 | return false; |
478 | } | 477 | } |
@@ -508,7 +507,7 @@ namespace OpenSim.Data.SQLite | |||
508 | } | 507 | } |
509 | catch (Exception e) | 508 | catch (Exception e) |
510 | { | 509 | { |
511 | m_log.DebugFormat("[PROFILES_DATA]" + | 510 | m_log.ErrorFormat("[PROFILES_DATA]" + |
512 | ": GetAvatarNotes exception {0}", e.Message); | 511 | ": GetAvatarNotes exception {0}", e.Message); |
513 | } | 512 | } |
514 | return true; | 513 | return true; |
@@ -551,7 +550,7 @@ namespace OpenSim.Data.SQLite | |||
551 | } | 550 | } |
552 | catch (Exception e) | 551 | catch (Exception e) |
553 | { | 552 | { |
554 | m_log.DebugFormat("[PROFILES_DATA]" + | 553 | m_log.ErrorFormat("[PROFILES_DATA]" + |
555 | ": UpdateAvatarNotes exception {0}", e.Message); | 554 | ": UpdateAvatarNotes exception {0}", e.Message); |
556 | return false; | 555 | return false; |
557 | } | 556 | } |
@@ -578,16 +577,13 @@ namespace OpenSim.Data.SQLite | |||
578 | } | 577 | } |
579 | catch(Exception e) | 578 | catch(Exception e) |
580 | { | 579 | { |
581 | m_log.DebugFormat("[PROFILES_DATA]" + | 580 | m_log.ErrorFormat("[PROFILES_DATA]" + |
582 | ": GetAvatarProperties exception {0}", e.Message); | 581 | ": GetAvatarProperties exception {0}", e.Message); |
583 | result = e.Message; | 582 | result = e.Message; |
584 | return false; | 583 | return false; |
585 | } | 584 | } |
586 | if(reader != null && reader.Read()) | 585 | if(reader != null && reader.Read()) |
587 | { | 586 | { |
588 | m_log.DebugFormat("[PROFILES_DATA]" + | ||
589 | ": Getting data for {0}.", props.UserId); | ||
590 | |||
591 | props.WebUrl = (string)reader["profileURL"]; | 587 | props.WebUrl = (string)reader["profileURL"]; |
592 | UUID.TryParse((string)reader["profileImage"], out props.ImageId); | 588 | UUID.TryParse((string)reader["profileImage"], out props.ImageId); |
593 | props.AboutText = (string)reader["profileAboutText"]; | 589 | props.AboutText = (string)reader["profileAboutText"]; |
@@ -602,9 +598,6 @@ namespace OpenSim.Data.SQLite | |||
602 | } | 598 | } |
603 | else | 599 | else |
604 | { | 600 | { |
605 | m_log.DebugFormat("[PROFILES_DATA]" + | ||
606 | ": No data for {0}", props.UserId); | ||
607 | |||
608 | props.WebUrl = string.Empty; | 601 | props.WebUrl = string.Empty; |
609 | props.ImageId = UUID.Zero; | 602 | props.ImageId = UUID.Zero; |
610 | props.AboutText = string.Empty; | 603 | props.AboutText = string.Empty; |
@@ -703,7 +696,7 @@ namespace OpenSim.Data.SQLite | |||
703 | } | 696 | } |
704 | catch (Exception e) | 697 | catch (Exception e) |
705 | { | 698 | { |
706 | m_log.DebugFormat("[PROFILES_DATA]" + | 699 | m_log.ErrorFormat("[PROFILES_DATA]" + |
707 | ": AgentPropertiesUpdate exception {0}", e.Message); | 700 | ": AgentPropertiesUpdate exception {0}", e.Message); |
708 | 701 | ||
709 | return false; | 702 | return false; |
@@ -740,7 +733,7 @@ namespace OpenSim.Data.SQLite | |||
740 | } | 733 | } |
741 | catch (Exception e) | 734 | catch (Exception e) |
742 | { | 735 | { |
743 | m_log.DebugFormat("[PROFILES_DATA]" + | 736 | m_log.ErrorFormat("[PROFILES_DATA]" + |
744 | ": AgentInterestsUpdate exception {0}", e.Message); | 737 | ": AgentInterestsUpdate exception {0}", e.Message); |
745 | result = e.Message; | 738 | result = e.Message; |
746 | return false; | 739 | return false; |
@@ -755,7 +748,8 @@ namespace OpenSim.Data.SQLite | |||
755 | 748 | ||
756 | query += "UPDATE usersettings SET "; | 749 | query += "UPDATE usersettings SET "; |
757 | query += "imviaemail=:ImViaEmail, "; | 750 | query += "imviaemail=:ImViaEmail, "; |
758 | query += "visible=:Visible "; | 751 | query += "visible=:Visible, "; |
752 | query += "email=:EMail "; | ||
759 | query += "WHERE useruuid=:uuid"; | 753 | query += "WHERE useruuid=:uuid"; |
760 | 754 | ||
761 | try | 755 | try |
@@ -765,6 +759,7 @@ namespace OpenSim.Data.SQLite | |||
765 | cmd.CommandText = query; | 759 | cmd.CommandText = query; |
766 | cmd.Parameters.AddWithValue(":ImViaEmail", pref.IMViaEmail); | 760 | cmd.Parameters.AddWithValue(":ImViaEmail", pref.IMViaEmail); |
767 | cmd.Parameters.AddWithValue(":Visible", pref.Visible); | 761 | cmd.Parameters.AddWithValue(":Visible", pref.Visible); |
762 | cmd.Parameters.AddWithValue(":EMail", pref.EMail); | ||
768 | cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); | 763 | cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); |
769 | 764 | ||
770 | cmd.ExecuteNonQuery(); | 765 | cmd.ExecuteNonQuery(); |
@@ -772,7 +767,7 @@ namespace OpenSim.Data.SQLite | |||
772 | } | 767 | } |
773 | catch (Exception e) | 768 | catch (Exception e) |
774 | { | 769 | { |
775 | m_log.DebugFormat("[PROFILES_DATA]" + | 770 | m_log.ErrorFormat("[PROFILES_DATA]" + |
776 | ": AgentInterestsUpdate exception {0}", e.Message); | 771 | ": AgentInterestsUpdate exception {0}", e.Message); |
777 | result = e.Message; | 772 | result = e.Message; |
778 | return false; | 773 | return false; |
@@ -824,7 +819,7 @@ namespace OpenSim.Data.SQLite | |||
824 | } | 819 | } |
825 | catch (Exception e) | 820 | catch (Exception e) |
826 | { | 821 | { |
827 | m_log.DebugFormat("[PROFILES_DATA]" + | 822 | m_log.ErrorFormat("[PROFILES_DATA]" + |
828 | ": Get preferences exception {0}", e.Message); | 823 | ": Get preferences exception {0}", e.Message); |
829 | result = e.Message; | 824 | result = e.Message; |
830 | return false; | 825 | return false; |
@@ -880,7 +875,7 @@ namespace OpenSim.Data.SQLite | |||
880 | } | 875 | } |
881 | catch (Exception e) | 876 | catch (Exception e) |
882 | { | 877 | { |
883 | m_log.DebugFormat("[PROFILES_DATA]" + | 878 | m_log.ErrorFormat("[PROFILES_DATA]" + |
884 | ": Requst application data exception {0}", e.Message); | 879 | ": Requst application data exception {0}", e.Message); |
885 | result = e.Message; | 880 | result = e.Message; |
886 | return false; | 881 | return false; |
@@ -913,7 +908,7 @@ namespace OpenSim.Data.SQLite | |||
913 | } | 908 | } |
914 | catch (Exception e) | 909 | catch (Exception e) |
915 | { | 910 | { |
916 | m_log.DebugFormat("[PROFILES_DATA]" + | 911 | m_log.ErrorFormat("[PROFILES_DATA]" + |
917 | ": SetUserData exception {0}", e.Message); | 912 | ": SetUserData exception {0}", e.Message); |
918 | return false; | 913 | return false; |
919 | } | 914 | } |
@@ -977,7 +972,7 @@ namespace OpenSim.Data.SQLite | |||
977 | } | 972 | } |
978 | catch (Exception e) | 973 | catch (Exception e) |
979 | { | 974 | { |
980 | m_log.DebugFormat("[PROFILES_DATA]" + | 975 | m_log.ErrorFormat("[PROFILES_DATA]" + |
981 | ": GetAvatarNotes exception {0}", e.Message); | 976 | ": GetAvatarNotes exception {0}", e.Message); |
982 | } | 977 | } |
983 | return data; | 978 | return data; |