diff options
author | Jeff Ames | 2010-03-10 13:15:36 +0900 |
---|---|---|
committer | Jeff Ames | 2010-03-10 13:15:36 +0900 |
commit | f58a0394edf3c0e4d46faf1f3053b940ba0a1c8c (patch) | |
tree | f1d5a1e4dfa36cfad3c4512fb1c9ba4dc19b2683 /OpenSim/Data | |
parent | Changed a cryptic debug message and a wrong comment (diff) | |
download | opensim-SC_OLD-f58a0394edf3c0e4d46faf1f3053b940ba0a1c8c.zip opensim-SC_OLD-f58a0394edf3c0e4d46faf1f3053b940ba0a1c8c.tar.gz opensim-SC_OLD-f58a0394edf3c0e4d46faf1f3053b940ba0a1c8c.tar.bz2 opensim-SC_OLD-f58a0394edf3c0e4d46faf1f3053b940ba0a1c8c.tar.xz |
Formatting cleanup. Add copyright notices.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/IGridUserData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAvatarData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLUserAccountData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGridUserData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLPresenceData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullPresenceData.cs | 16 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | 2 |
11 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/Data/IGridUserData.cs b/OpenSim/Data/IGridUserData.cs index abd2cef..bd7a435 100644 --- a/OpenSim/Data/IGridUserData.cs +++ b/OpenSim/Data/IGridUserData.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Data | |||
44 | /// </summary> | 44 | /// </summary> |
45 | public interface IGridUserData | 45 | public interface IGridUserData |
46 | { | 46 | { |
47 | GridUserData GetGridUserData(string userID); | 47 | GridUserData GetGridUserData(string userID); |
48 | bool StoreGridUserData(GridUserData data); | 48 | bool StoreGridUserData(GridUserData data); |
49 | } | 49 | } |
50 | } \ No newline at end of file | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs index 4992183..49a6b09 100644 --- a/OpenSim/Data/MSSQL/MSSQLAvatarData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAvatarData.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Data.MSSQL | |||
47 | 47 | ||
48 | public MSSQLAvatarData(string connectionString, string realm) : | 48 | public MSSQLAvatarData(string connectionString, string realm) : |
49 | base(connectionString, realm, "Avatar") | 49 | base(connectionString, realm, "Avatar") |
50 | { | 50 | { |
51 | } | 51 | } |
52 | 52 | ||
53 | public bool Delete(UUID principalID, string name) | 53 | public bool Delete(UUID principalID, string name) |
diff --git a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs index 506056d..904366e 100644 --- a/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs +++ b/OpenSim/Data/MSSQL/MSSQLGenericTableHandler.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Data.MSSQL | |||
110 | { | 110 | { |
111 | List<string> constraints = new List<string>(); | 111 | List<string> constraints = new List<string>(); |
112 | string query = string.Format(@"SELECT | 112 | string query = string.Format(@"SELECT |
113 | COL_NAME(ic.object_id,ic.column_id) AS column_name | 113 | COL_NAME(ic.object_id,ic.column_id) AS column_name |
114 | FROM sys.indexes AS i | 114 | FROM sys.indexes AS i |
115 | INNER JOIN sys.index_columns AS ic | 115 | INNER JOIN sys.index_columns AS ic |
116 | ON i.object_id = ic.object_id AND i.index_id = ic.index_id | 116 | ON i.object_id = ic.object_id AND i.index_id = ic.index_id |
@@ -157,7 +157,7 @@ namespace OpenSim.Data.MSSQL | |||
157 | string where = String.Join(" AND ", terms.ToArray()); | 157 | string where = String.Join(" AND ", terms.ToArray()); |
158 | 158 | ||
159 | string query = String.Format("SELECT * FROM {0} WHERE {1}", | 159 | string query = String.Format("SELECT * FROM {0} WHERE {1}", |
160 | m_Realm, where); | 160 | m_Realm, where); |
161 | 161 | ||
162 | cmd.Connection = conn; | 162 | cmd.Connection = conn; |
163 | cmd.CommandText = query; | 163 | cmd.CommandText = query; |
@@ -296,7 +296,7 @@ namespace OpenSim.Data.MSSQL | |||
296 | query.AppendFormat("[{0}] = {1} ", names[i], values[i]); | 296 | query.AppendFormat("[{0}] = {1} ", names[i], values[i]); |
297 | if (constraints.Count > 0) | 297 | if (constraints.Count > 0) |
298 | { | 298 | { |
299 | List<string> terms = new List<string>(); | 299 | List<string> terms = new List<string>(); |
300 | for (int j = 0; j < constraints.Count; j++) | 300 | for (int j = 0; j < constraints.Count; j++) |
301 | { | 301 | { |
302 | terms.Add(" [" + constraints[j].Key + "] = @" + constraints[j].Key); | 302 | terms.Add(" [" + constraints[j].Key + "] = @" + constraints[j].Key); |
diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index b4a945c..9993720 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Data.MSSQL | |||
47 | 47 | ||
48 | public MSSQLGridUserData(string connectionString, string realm) : | 48 | public MSSQLGridUserData(string connectionString, string realm) : |
49 | base(connectionString, realm, "UserGrid") | 49 | base(connectionString, realm, "UserGrid") |
50 | { | 50 | { |
51 | } | 51 | } |
52 | 52 | ||
53 | public GridUserData GetGridUserData(string userID) | 53 | public GridUserData GetGridUserData(string userID) |
@@ -58,7 +58,7 @@ namespace OpenSim.Data.MSSQL | |||
58 | return null; | 58 | return null; |
59 | 59 | ||
60 | return ret[0]; | 60 | return ret[0]; |
61 | } | 61 | } |
62 | 62 | ||
63 | public bool StoreGridUserData(GridUserData data) | 63 | public bool StoreGridUserData(GridUserData data) |
64 | { | 64 | { |
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 4309b42..575fd21 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Data.MSSQL | |||
46 | /// <summary> | 46 | /// <summary> |
47 | /// Connection string for ADO.net | 47 | /// Connection string for ADO.net |
48 | /// </summary> | 48 | /// </summary> |
49 | private readonly string connectionString; | 49 | private readonly string connectionString; |
50 | 50 | ||
51 | /// <summary> | 51 | /// <summary> |
52 | /// Initialize the manager and set the connectionstring | 52 | /// Initialize the manager and set the connectionstring |
@@ -196,7 +196,7 @@ namespace OpenSim.Data.MSSQL | |||
196 | 196 | ||
197 | migration.Update(); | 197 | migration.Update(); |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | /// <summary> | 201 | /// <summary> |
202 | /// Returns the version of this DB provider | 202 | /// Returns the version of this DB provider |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs index 9f18e5e..e7c8dc5 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL | |||
43 | { | 43 | { |
44 | } | 44 | } |
45 | //private string m_Realm; | 45 | //private string m_Realm; |
46 | //private List<string> m_ColumnNames = null; | 46 | //private List<string> m_ColumnNames = null; |
47 | //private MSSQLManager m_database; | 47 | //private MSSQLManager m_database; |
48 | 48 | ||
49 | //public MSSQLUserAccountData(string connectionString, string realm) | 49 | //public MSSQLUserAccountData(string connectionString, string realm) |
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 756b42d..1253e0b 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -197,7 +197,7 @@ namespace OpenSim.Data.MySQL | |||
197 | public virtual T[] Get(string where) | 197 | public virtual T[] Get(string where) |
198 | { | 198 | { |
199 | using (MySqlCommand cmd = new MySqlCommand()) | 199 | using (MySqlCommand cmd = new MySqlCommand()) |
200 | { | 200 | { |
201 | string query = String.Format("select * from {0} where {1}", | 201 | string query = String.Format("select * from {0} where {1}", |
202 | m_Realm, where); | 202 | m_Realm, where); |
203 | 203 | ||
diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index 15834d2..df29ecd 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Data.MySQL | |||
54 | return null; | 54 | return null; |
55 | 55 | ||
56 | return ret[0]; | 56 | return ret[0]; |
57 | } | 57 | } |
58 | 58 | ||
59 | public bool StoreGridUserData(GridUserData data) | 59 | public bool StoreGridUserData(GridUserData data) |
60 | { | 60 | { |
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 68a68af..143dbe3 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs | |||
@@ -134,7 +134,7 @@ namespace OpenSim.Data.MySQL | |||
134 | List<UUID> deleteSessions = new List<UUID>(); | 134 | List<UUID> deleteSessions = new List<UUID>(); |
135 | int online = 0; | 135 | int online = 0; |
136 | 136 | ||
137 | while(reader.Read()) | 137 | while (reader.Read()) |
138 | { | 138 | { |
139 | if (bool.Parse(reader["Online"].ToString())) | 139 | if (bool.Parse(reader["Online"].ToString())) |
140 | online++; | 140 | online++; |
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index 9fc4595..b98b5c9 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Data.Null | |||
55 | } | 55 | } |
56 | 56 | ||
57 | public bool Store(PresenceData data) | 57 | public bool Store(PresenceData data) |
58 | { | 58 | { |
59 | if (Instance != this) | 59 | if (Instance != this) |
60 | return Instance.Store(data); | 60 | return Instance.Store(data); |
61 | 61 | ||
@@ -113,7 +113,7 @@ namespace OpenSim.Data.Null | |||
113 | } | 113 | } |
114 | 114 | ||
115 | public bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt) | 115 | public bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt) |
116 | { | 116 | { |
117 | if (Instance != this) | 117 | if (Instance != this) |
118 | return Instance.SetHomeLocation(userID, regionID, position, lookAt); | 118 | return Instance.SetHomeLocation(userID, regionID, position, lookAt); |
119 | 119 | ||
@@ -130,28 +130,28 @@ namespace OpenSim.Data.Null | |||
130 | p.Data["HomePosition"] = position.ToString(); | 130 | p.Data["HomePosition"] = position.ToString(); |
131 | p.Data["HomeLookAt"] = lookAt.ToString(); | 131 | p.Data["HomeLookAt"] = lookAt.ToString(); |
132 | foundone = true; | 132 | foundone = true; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | return foundone; | 136 | return foundone; |
137 | } | 137 | } |
138 | 138 | ||
139 | public PresenceData[] Get(string field, string data) | 139 | public PresenceData[] Get(string field, string data) |
140 | { | 140 | { |
141 | if (Instance != this) | 141 | if (Instance != this) |
142 | return Instance.Get(field, data); | 142 | return Instance.Get(field, data); |
143 | 143 | ||
144 | // m_log.DebugFormat( | 144 | // m_log.DebugFormat( |
145 | // "[NULL PRESENCE DATA]: Getting presence data for field {0} with parameter {1}", field, data); | 145 | // "[NULL PRESENCE DATA]: Getting presence data for field {0} with parameter {1}", field, data); |
146 | 146 | ||
147 | List<PresenceData> presences = new List<PresenceData>(); | 147 | List<PresenceData> presences = new List<PresenceData>(); |
148 | if (field == "UserID") | 148 | if (field == "UserID") |
149 | { | 149 | { |
150 | foreach (PresenceData p in m_presenceData.Values) | 150 | foreach (PresenceData p in m_presenceData.Values) |
151 | { | 151 | { |
152 | if (p.UserID == data) | 152 | if (p.UserID == data) |
153 | { | 153 | { |
154 | presences.Add(p); | 154 | presences.Add(p); |
155 | // Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); | 155 | // Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); |
156 | } | 156 | } |
157 | } | 157 | } |
@@ -194,7 +194,7 @@ namespace OpenSim.Data.Null | |||
194 | } | 194 | } |
195 | 195 | ||
196 | public void Prune(string userID) | 196 | public void Prune(string userID) |
197 | { | 197 | { |
198 | if (Instance != this) | 198 | if (Instance != this) |
199 | { | 199 | { |
200 | Instance.Prune(userID); | 200 | Instance.Prune(userID); |
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index 84ce775..2c28375 100644 --- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Data.SQLite | |||
120 | } | 120 | } |
121 | 121 | ||
122 | public bool Store(AuthenticationData data) | 122 | public bool Store(AuthenticationData data) |
123 | { | 123 | { |
124 | if (data.Data.ContainsKey("UUID")) | 124 | if (data.Data.ContainsKey("UUID")) |
125 | data.Data.Remove("UUID"); | 125 | data.Data.Remove("UUID"); |
126 | 126 | ||