diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Data/Null/NullEstateData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullFriendsData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullPresenceData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullUserAccountData.cs | 32 |
4 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs index 57592f1..9f22896 100755 --- a/OpenSim/Data/Null/NullEstateData.cs +++ b/OpenSim/Data/Null/NullEstateData.cs | |||
@@ -102,19 +102,19 @@ namespace OpenSim.Data.Null | |||
102 | { | 102 | { |
103 | return new EstateSettings(); | 103 | return new EstateSettings(); |
104 | } | 104 | } |
105 | 105 | ||
106 | public List<EstateSettings> LoadEstateSettingsAll() | 106 | public List<EstateSettings> LoadEstateSettingsAll() |
107 | { | 107 | { |
108 | List<EstateSettings> allEstateSettings = new List<EstateSettings>(); | 108 | List<EstateSettings> allEstateSettings = new List<EstateSettings>(); |
109 | allEstateSettings.Add(GetEstate()); | 109 | allEstateSettings.Add(GetEstate()); |
110 | return allEstateSettings; | 110 | return allEstateSettings; |
111 | } | 111 | } |
112 | 112 | ||
113 | public List<int> GetEstatesAll() | 113 | public List<int> GetEstatesAll() |
114 | { | 114 | { |
115 | List<int> result = new List<int>(); | 115 | List<int> result = new List<int>(); |
116 | result.Add((int)GetEstate().EstateID); | 116 | result.Add((int)GetEstate().EstateID); |
117 | return result; | 117 | return result; |
118 | } | 118 | } |
119 | 119 | ||
120 | public List<int> GetEstates(string search) | 120 | public List<int> GetEstates(string search) |
diff --git a/OpenSim/Data/Null/NullFriendsData.cs b/OpenSim/Data/Null/NullFriendsData.cs index 473999f..dc9cd38 100644 --- a/OpenSim/Data/Null/NullFriendsData.cs +++ b/OpenSim/Data/Null/NullFriendsData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Data.Null | |||
79 | { | 79 | { |
80 | return fdata.PrincipalID == userID.ToString(); | 80 | return fdata.PrincipalID == userID.ToString(); |
81 | }); | 81 | }); |
82 | 82 | ||
83 | if (lst != null) | 83 | if (lst != null) |
84 | { | 84 | { |
85 | lst.ForEach(f => | 85 | lst.ForEach(f => |
@@ -87,14 +87,14 @@ namespace OpenSim.Data.Null | |||
87 | FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID); | 87 | FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID); |
88 | if (f2 != null) | 88 | if (f2 != null) |
89 | f.Data["TheirFlags"] = f2.Data["Flags"]; | 89 | f.Data["TheirFlags"] = f2.Data["Flags"]; |
90 | 90 | ||
91 | // m_log.DebugFormat( | 91 | // m_log.DebugFormat( |
92 | // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}", | 92 | // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}", |
93 | // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID); | 93 | // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID); |
94 | }); | 94 | }); |
95 | 95 | ||
96 | // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID); | 96 | // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID); |
97 | 97 | ||
98 | return lst.ToArray(); | 98 | return lst.ToArray(); |
99 | } | 99 | } |
100 | } | 100 | } |
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Null | |||
134 | // m_log.DebugFormat( | 134 | // m_log.DebugFormat( |
135 | // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}", | 135 | // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}", |
136 | // friend.Friend, friend.Data["Flags"], friend.PrincipalID); | 136 | // friend.Friend, friend.Data["Flags"], friend.PrincipalID); |
137 | 137 | ||
138 | m_Data.Remove(friend); | 138 | m_Data.Remove(friend); |
139 | return true; | 139 | return true; |
140 | } | 140 | } |
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index aff0b0b..8c442c9 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Data.Null | |||
39 | public class NullPresenceData : IPresenceData | 39 | public class NullPresenceData : IPresenceData |
40 | { | 40 | { |
41 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | public static NullPresenceData Instance; | 43 | public static NullPresenceData Instance; |
44 | 44 | ||
45 | Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>(); | 45 | Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>(); |
@@ -100,7 +100,7 @@ namespace OpenSim.Data.Null | |||
100 | { | 100 | { |
101 | if (Instance != this) | 101 | if (Instance != this) |
102 | return Instance.ReportAgent(sessionID, regionID); | 102 | return Instance.ReportAgent(sessionID, regionID); |
103 | 103 | ||
104 | if (m_presenceData.ContainsKey(sessionID)) | 104 | if (m_presenceData.ContainsKey(sessionID)) |
105 | { | 105 | { |
106 | m_presenceData[sessionID].RegionID = regionID; | 106 | m_presenceData[sessionID].RegionID = regionID; |
@@ -129,7 +129,7 @@ namespace OpenSim.Data.Null | |||
129 | // Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); | 129 | // Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | return presences.ToArray(); | 133 | return presences.ToArray(); |
134 | } | 134 | } |
135 | else if (field == "SessionID") | 135 | else if (field == "SessionID") |
@@ -172,7 +172,7 @@ namespace OpenSim.Data.Null | |||
172 | { | 172 | { |
173 | // m_log.DebugFormat( | 173 | // m_log.DebugFormat( |
174 | // "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data); | 174 | // "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data); |
175 | 175 | ||
176 | if (Instance != this) | 176 | if (Instance != this) |
177 | return Instance.Delete(field, data); | 177 | return Instance.Delete(field, data); |
178 | 178 | ||
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs index 241616b..6d2e05a 100644 --- a/OpenSim/Data/Null/NullUserAccountData.cs +++ b/OpenSim/Data/Null/NullUserAccountData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null | |||
40 | public class NullUserAccountData : IUserAccountData | 40 | public class NullUserAccountData : IUserAccountData |
41 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>(); | 44 | private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>(); |
45 | private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>(); | 45 | private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>(); |
46 | private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>(); | 46 | private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>(); |
@@ -48,7 +48,7 @@ namespace OpenSim.Data.Null | |||
48 | public NullUserAccountData(string connectionString, string realm) | 48 | public NullUserAccountData(string connectionString, string realm) |
49 | { | 49 | { |
50 | // m_log.DebugFormat( | 50 | // m_log.DebugFormat( |
51 | // "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]", | 51 | // "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]", |
52 | // connectionString, realm); | 52 | // connectionString, realm); |
53 | } | 53 | } |
54 | 54 | ||
@@ -65,12 +65,12 @@ namespace OpenSim.Data.Null | |||
65 | // if (m_log.IsDebugEnabled) | 65 | // if (m_log.IsDebugEnabled) |
66 | // { | 66 | // { |
67 | // m_log.DebugFormat( | 67 | // m_log.DebugFormat( |
68 | // "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]", | 68 | // "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]", |
69 | // string.Join(", ", fields), string.Join(", ", values)); | 69 | // string.Join(", ", fields), string.Join(", ", values)); |
70 | // } | 70 | // } |
71 | 71 | ||
72 | UserAccountData[] userAccounts = new UserAccountData[0]; | 72 | UserAccountData[] userAccounts = new UserAccountData[0]; |
73 | 73 | ||
74 | List<string> fieldsLst = new List<string>(fields); | 74 | List<string> fieldsLst = new List<string>(fields); |
75 | if (fieldsLst.Contains("PrincipalID")) | 75 | if (fieldsLst.Contains("PrincipalID")) |
76 | { | 76 | { |
@@ -79,33 +79,33 @@ namespace OpenSim.Data.Null | |||
79 | if (UUID.TryParse(values[i], out id)) | 79 | if (UUID.TryParse(values[i], out id)) |
80 | if (m_DataByUUID.ContainsKey(id)) | 80 | if (m_DataByUUID.ContainsKey(id)) |
81 | userAccounts = new UserAccountData[] { m_DataByUUID[id] }; | 81 | userAccounts = new UserAccountData[] { m_DataByUUID[id] }; |
82 | } | 82 | } |
83 | else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName")) | 83 | else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName")) |
84 | { | 84 | { |
85 | int findex = fieldsLst.IndexOf("FirstName"); | 85 | int findex = fieldsLst.IndexOf("FirstName"); |
86 | int lindex = fieldsLst.IndexOf("LastName"); | 86 | int lindex = fieldsLst.IndexOf("LastName"); |
87 | if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex])) | 87 | if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex])) |
88 | { | 88 | { |
89 | userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] }; | 89 | userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] }; |
90 | } | 90 | } |
91 | } | 91 | } |
92 | else if (fieldsLst.Contains("Email")) | 92 | else if (fieldsLst.Contains("Email")) |
93 | { | 93 | { |
94 | int i = fieldsLst.IndexOf("Email"); | 94 | int i = fieldsLst.IndexOf("Email"); |
95 | if (m_DataByEmail.ContainsKey(values[i])) | 95 | if (m_DataByEmail.ContainsKey(values[i])) |
96 | userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] }; | 96 | userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] }; |
97 | } | 97 | } |
98 | 98 | ||
99 | // if (m_log.IsDebugEnabled) | 99 | // if (m_log.IsDebugEnabled) |
100 | // { | 100 | // { |
101 | // StringBuilder sb = new StringBuilder(); | 101 | // StringBuilder sb = new StringBuilder(); |
102 | // foreach (UserAccountData uad in userAccounts) | 102 | // foreach (UserAccountData uad in userAccounts) |
103 | // sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID); | 103 | // sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID); |
104 | // | 104 | // |
105 | // m_log.DebugFormat( | 105 | // m_log.DebugFormat( |
106 | // "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb); | 106 | // "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb); |
107 | // } | 107 | // } |
108 | 108 | ||
109 | return userAccounts; | 109 | return userAccounts; |
110 | } | 110 | } |
111 | 111 | ||
@@ -113,16 +113,16 @@ namespace OpenSim.Data.Null | |||
113 | { | 113 | { |
114 | if (data == null) | 114 | if (data == null) |
115 | return false; | 115 | return false; |
116 | 116 | ||
117 | m_log.DebugFormat( | 117 | m_log.DebugFormat( |
118 | "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}", | 118 | "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}", |
119 | data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode()); | 119 | data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode()); |
120 | 120 | ||
121 | m_DataByUUID[data.PrincipalID] = data; | 121 | m_DataByUUID[data.PrincipalID] = data; |
122 | m_DataByName[data.FirstName + " " + data.LastName] = data; | 122 | m_DataByName[data.FirstName + " " + data.LastName] = data; |
123 | if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty) | 123 | if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty) |
124 | m_DataByEmail[data.Data["Email"]] = data; | 124 | m_DataByEmail[data.Data["Email"]] = data; |
125 | 125 | ||
126 | // m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count); | 126 | // m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count); |
127 | 127 | ||
128 | return true; | 128 | return true; |
@@ -132,7 +132,7 @@ namespace OpenSim.Data.Null | |||
132 | { | 132 | { |
133 | // m_log.DebugFormat( | 133 | // m_log.DebugFormat( |
134 | // "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query); | 134 | // "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query); |
135 | 135 | ||
136 | string[] words = query.Split(new char[] { ' ' }); | 136 | string[] words = query.Split(new char[] { ' ' }); |
137 | 137 | ||
138 | for (int i = 0; i < words.Length; i++) | 138 | for (int i = 0; i < words.Length; i++) |