diff options
Diffstat (limited to '')
8 files changed, 87 insertions, 65 deletions
diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs index 891b590..e5a8ebd 100644 --- a/OpenSim/Data/IPresenceData.cs +++ b/OpenSim/Data/IPresenceData.cs | |||
@@ -32,11 +32,11 @@ using OpenSim.Framework; | |||
32 | 32 | ||
33 | namespace OpenSim.Data | 33 | namespace OpenSim.Data |
34 | { | 34 | { |
35 | public class PresenceData | 35 | public struct PresenceData |
36 | { | 36 | { |
37 | public UUID UUID; | 37 | public UUID UUID; |
38 | public UUID currentRegion; | 38 | public UUID currentRegion; |
39 | public Dictionary<string, object> Data; | 39 | public Dictionary<string, string> Data; |
40 | } | 40 | } |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
@@ -48,7 +48,8 @@ namespace OpenSim.Data | |||
48 | 48 | ||
49 | PresenceData Get(UUID principalID); | 49 | PresenceData Get(UUID principalID); |
50 | 50 | ||
51 | bool SetDataItem(UUID principalID, string item, string value); | 51 | bool SetUserDataItem(UUID principalID, string item, string value); |
52 | bool SetRegionDataItem(UUID principalID, string item, string value); | ||
52 | 53 | ||
53 | bool Delete(UUID regionID); | 54 | bool Delete(UUID regionID); |
54 | } | 55 | } |
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 4eb4a24..4e27e26 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Data.MySQL | |||
112 | for (int i = 0 ; i < fields.Length ; i++) | 112 | for (int i = 0 ; i < fields.Length ; i++) |
113 | { | 113 | { |
114 | cmd.Parameters.AddWithValue(fields[i], keys[i]); | 114 | cmd.Parameters.AddWithValue(fields[i], keys[i]); |
115 | terms.Add(fields[i] + " = ?" + fields[i]); | 115 | terms.Add("`" + fields[i] + "` = ?" + fields[i]); |
116 | } | 116 | } |
117 | 117 | ||
118 | string where = String.Join(" and ", terms.ToArray()); | 118 | string where = String.Join(" and ", terms.ToArray()); |
@@ -190,11 +190,26 @@ namespace OpenSim.Data.MySQL | |||
190 | return DoQuery(cmd); | 190 | return DoQuery(cmd); |
191 | } | 191 | } |
192 | 192 | ||
193 | public void Store(T row) | 193 | public bool Store(T row) |
194 | { | 194 | { |
195 | MySqlCommand cmd = new MySqlCommand(); | 195 | MySqlCommand cmd = new MySqlCommand(); |
196 | 196 | ||
197 | string query = ""; | 197 | string query = ""; |
198 | |||
199 | return false; | ||
200 | } | ||
201 | |||
202 | public bool Delete(string field, string val) | ||
203 | { | ||
204 | MySqlCommand cmd = new MySqlCommand(); | ||
205 | |||
206 | cmd.CommandText = String.Format("delete from {0} where `{1}` = ?{1}", m_Realm, field); | ||
207 | cmd.Parameters.AddWithValue(field, val); | ||
208 | |||
209 | if (ExecuteNonQuery(cmd) > 0) | ||
210 | return true; | ||
211 | |||
212 | return false; | ||
198 | } | 213 | } |
199 | } | 214 | } |
200 | } | 215 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs index ce32443..cc8bdb6 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs | |||
@@ -28,33 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | /* | ||
32 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
33 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
34 | * | ||
35 | * Redistribution and use in source and binary forms, with or without | ||
36 | * modification, are permitted provided that the following conditions are met: | ||
37 | * * Redistributions of source code must retain the above copyright | ||
38 | * notice, this list of conditions and the following disclaimer. | ||
39 | * * Redistributions in binary form must reproduce the above copyright | ||
40 | * notice, this list of conditions and the following disclaimer in the | ||
41 | * documentation and/or other materials provided with the distribution. | ||
42 | * * Neither the name of the OpenSimulator Project nor the | ||
43 | * names of its contributors may be used to endorse or promote products | ||
44 | * derived from this software without specific prior written permission. | ||
45 | * | ||
46 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
47 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
48 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
49 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
50 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
51 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
52 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
53 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
54 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
55 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
56 | */ | ||
57 | |||
58 | using System.IO; | 31 | using System.IO; |
59 | using System.Text; | 32 | using System.Text; |
60 | using HttpServer; | 33 | using HttpServer; |
@@ -77,9 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
77 | private readonly BaseHttpServer m_server; | 50 | private readonly BaseHttpServer m_server; |
78 | private BlockingQueue<PollServiceHttpRequest> m_request; | 51 | private BlockingQueue<PollServiceHttpRequest> m_request; |
79 | private bool m_running = true; | 52 | private bool m_running = true; |
80 | private int m_timeout = 250; | 53 | private int m_timeout = 250; |
81 | |||
82 | |||
83 | 54 | ||
84 | public PollServiceWorkerThread(BaseHttpServer pSrv, int pTimeout) | 55 | public PollServiceWorkerThread(BaseHttpServer pSrv, int pTimeout) |
85 | { | 56 | { |
@@ -135,4 +106,4 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
135 | m_request.Enqueue(pPollServiceHttpRequest); | 106 | m_request.Enqueue(pPollServiceHttpRequest); |
136 | } | 107 | } |
137 | } | 108 | } |
138 | } | 109 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index aeca7df..2e15b86 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1266,7 +1266,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1266 | // allocations, and there is no more work to be done until someone logs in | 1266 | // allocations, and there is no more work to be done until someone logs in |
1267 | GC.Collect(); | 1267 | GC.Collect(); |
1268 | 1268 | ||
1269 | m_log.Debug("[REGION]: Enabling Logins"); | 1269 | m_log.DebugFormat("[REGION]: Enabling Logins for {0}", RegionInfo.RegionName); |
1270 | loginsdisabled = false; | 1270 | loginsdisabled = false; |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
@@ -1276,24 +1276,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1276 | } | 1276 | } |
1277 | catch (AccessViolationException e) | 1277 | catch (AccessViolationException e) |
1278 | { | 1278 | { |
1279 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1279 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
1280 | } | 1280 | } |
1281 | //catch (NullReferenceException e) | 1281 | //catch (NullReferenceException e) |
1282 | //{ | 1282 | //{ |
1283 | // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1283 | // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
1284 | //} | 1284 | //} |
1285 | catch (InvalidOperationException e) | 1285 | catch (InvalidOperationException e) |
1286 | { | 1286 | { |
1287 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1287 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
1288 | } | 1288 | } |
1289 | catch (Exception e) | 1289 | catch (Exception e) |
1290 | { | 1290 | { |
1291 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1291 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
1292 | } | 1292 | } |
1293 | finally | 1293 | finally |
1294 | { | 1294 | { |
1295 | m_lastupdate = DateTime.UtcNow; | 1295 | m_lastupdate = DateTime.UtcNow; |
1296 | } | 1296 | } |
1297 | |||
1297 | maintc = Environment.TickCount - maintc; | 1298 | maintc = Environment.TickCount - maintc; |
1298 | maintc = (int)(m_timespan * 1000) - maintc; | 1299 | maintc = (int)(m_timespan * 1000) - maintc; |
1299 | 1300 | ||
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 9ca5120..2558fa0 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -94,6 +94,33 @@ namespace OpenSim.Server.Handlers.Presence | |||
94 | 94 | ||
95 | byte[] Report(Dictionary<string, string> request) | 95 | byte[] Report(Dictionary<string, string> request) |
96 | { | 96 | { |
97 | PresenceInfo info = new PresenceInfo(); | ||
98 | info.Data = new Dictionary<string, string>(); | ||
99 | |||
100 | if (request["PrincipalID"] == null || request["RegionID"] == null) | ||
101 | return FailureResult(); | ||
102 | |||
103 | if (!UUID.TryParse(request["PrincipalID"].ToString(), | ||
104 | out info.PrincipalID)) | ||
105 | return FailureResult(); | ||
106 | |||
107 | if (!UUID.TryParse(request["RegionID"].ToString(), | ||
108 | out info.RegionID)) | ||
109 | return FailureResult(); | ||
110 | |||
111 | foreach (KeyValuePair<string, string> kvp in request) | ||
112 | { | ||
113 | if (kvp.Key == "METHOD" || | ||
114 | kvp.Key == "PrincipalID" || | ||
115 | kvp.Key == "RegionID") | ||
116 | continue; | ||
117 | |||
118 | info.Data[kvp.Key] = kvp.Value; | ||
119 | } | ||
120 | |||
121 | if (m_PresenceService.Report(info)) | ||
122 | return SuccessResult(); | ||
123 | |||
97 | return FailureResult(); | 124 | return FailureResult(); |
98 | } | 125 | } |
99 | 126 | ||
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index e047f71..f86b453 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -231,13 +231,14 @@ namespace OpenSim.Services.Connectors | |||
231 | } | 231 | } |
232 | catch (TimeoutException e) | 232 | catch (TimeoutException e) |
233 | { | 233 | { |
234 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation to {0} timed out {0} {1}.", m_ServerURI, | 234 | m_log.ErrorFormat( |
235 | e.Source, e.Message); | 235 | "[INVENTORY CONNECTOR]: GetFolderContent operation to {0} for {1} timed out {2} {3}.", |
236 | m_ServerURI, folderID, e.Source, e.Message); | ||
236 | } | 237 | } |
237 | catch (Exception e) | 238 | catch (Exception e) |
238 | { | 239 | { |
239 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1} (old server?).", | 240 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed for {0}, {1} {2} (old server?).", |
240 | e.Source, e.Message); | 241 | folderID, e.Source, e.Message); |
241 | } | 242 | } |
242 | 243 | ||
243 | InventoryCollection nullCollection = new InventoryCollection(); | 244 | InventoryCollection nullCollection = new InventoryCollection(); |
@@ -256,8 +257,8 @@ namespace OpenSim.Services.Connectors | |||
256 | } | 257 | } |
257 | catch (Exception e) | 258 | catch (Exception e) |
258 | { | 259 | { |
259 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Add new inventory folder operation failed, {0} {1}", | 260 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Add new inventory folder operation failed for {0} {1}, {2} {3}", |
260 | e.Source, e.Message); | 261 | folder.Name, folder.ID, e.Source, e.Message); |
261 | } | 262 | } |
262 | 263 | ||
263 | return false; | 264 | return false; |
@@ -272,8 +273,8 @@ namespace OpenSim.Services.Connectors | |||
272 | } | 273 | } |
273 | catch (Exception e) | 274 | catch (Exception e) |
274 | { | 275 | { |
275 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Update inventory folder operation failed, {0} {1}", | 276 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Update inventory folder operation failed for {0} {1}, {2} {3}", |
276 | e.Source, e.Message); | 277 | folder.Name, folder.ID, e.Source, e.Message); |
277 | } | 278 | } |
278 | 279 | ||
279 | return false; | 280 | return false; |
@@ -307,8 +308,8 @@ namespace OpenSim.Services.Connectors | |||
307 | } | 308 | } |
308 | catch (Exception e) | 309 | catch (Exception e) |
309 | { | 310 | { |
310 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Move inventory folder operation failed, {0} {1}", | 311 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Move inventory folder operation failed for {0} {1}, {2} {3}", |
311 | e.Source, e.Message); | 312 | folder.Name, folder.ID, e.Source, e.Message); |
312 | } | 313 | } |
313 | 314 | ||
314 | return false; | 315 | return false; |
@@ -323,8 +324,8 @@ namespace OpenSim.Services.Connectors | |||
323 | } | 324 | } |
324 | catch (Exception e) | 325 | catch (Exception e) |
325 | { | 326 | { |
326 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Move inventory folder operation failed, {0} {1}", | 327 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Purge inventory folder operation failed for {0} {1}, {2} {3}", |
327 | e.Source, e.Message); | 328 | folder.Name, folder.ID, e.Source, e.Message); |
328 | } | 329 | } |
329 | 330 | ||
330 | return false; | 331 | return false; |
@@ -340,8 +341,8 @@ namespace OpenSim.Services.Connectors | |||
340 | } | 341 | } |
341 | catch (Exception e) | 342 | catch (Exception e) |
342 | { | 343 | { |
343 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Get folder items operation failed, {0} {1}", | 344 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Get folder items operation failed for folder {0}, {1} {2}", |
344 | e.Source, e.Message); | 345 | folderID, e.Source, e.Message); |
345 | } | 346 | } |
346 | 347 | ||
347 | return null; | 348 | return null; |
@@ -356,8 +357,8 @@ namespace OpenSim.Services.Connectors | |||
356 | } | 357 | } |
357 | catch (Exception e) | 358 | catch (Exception e) |
358 | { | 359 | { |
359 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Add new inventory item operation failed, {0} {1}", | 360 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Add new inventory item operation failed for {0} {1}, {2} {3}", |
360 | e.Source, e.Message); | 361 | item.Name, item.ID, e.Source, e.Message); |
361 | } | 362 | } |
362 | 363 | ||
363 | return false; | 364 | return false; |
@@ -372,8 +373,8 @@ namespace OpenSim.Services.Connectors | |||
372 | } | 373 | } |
373 | catch (Exception e) | 374 | catch (Exception e) |
374 | { | 375 | { |
375 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Update new inventory item operation failed, {0} {1}", | 376 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Update new inventory item operation failed for {0} {1}, {2} {3}", |
376 | e.Source, e.Message); | 377 | item.Name, item.ID, e.Source, e.Message); |
377 | } | 378 | } |
378 | 379 | ||
379 | return false; | 380 | return false; |
@@ -443,7 +444,7 @@ namespace OpenSim.Services.Connectors | |||
443 | } | 444 | } |
444 | catch (Exception e) | 445 | catch (Exception e) |
445 | { | 446 | { |
446 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Delete inventory item operation failed, {0} {1}", | 447 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Delete inventory items operation failed, {0} {1}", |
447 | e.Source, e.Message); | 448 | e.Source, e.Message); |
448 | } | 449 | } |
449 | 450 | ||
@@ -475,7 +476,7 @@ namespace OpenSim.Services.Connectors | |||
475 | } | 476 | } |
476 | catch (Exception e) | 477 | catch (Exception e) |
477 | { | 478 | { |
478 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Query inventory item operation failed, {0} {1}", | 479 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Query inventory folder operation failed, {0} {1}", |
479 | e.Source, e.Message); | 480 | e.Source, e.Message); |
480 | } | 481 | } |
481 | 482 | ||
@@ -576,9 +577,6 @@ namespace OpenSim.Services.Connectors | |||
576 | } | 577 | } |
577 | 578 | ||
578 | callback(folders, items); | 579 | callback(folders, items); |
579 | |||
580 | } | 580 | } |
581 | |||
582 | |||
583 | } | 581 | } |
584 | } | 582 | } |
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 6ceeb45..aa1c5bf 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Services.Interfaces | |||
35 | { | 35 | { |
36 | public UUID PrincipalID; | 36 | public UUID PrincipalID; |
37 | public UUID RegionID; | 37 | public UUID RegionID; |
38 | public Dictionary<string, object> Data; | 38 | public Dictionary<string, string> Data; |
39 | } | 39 | } |
40 | 40 | ||
41 | public interface IPresenceService | 41 | public interface IPresenceService |
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 8931a26..2157462 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs | |||
@@ -52,6 +52,15 @@ namespace OpenSim.Services.PresenceService | |||
52 | 52 | ||
53 | public bool Report(PresenceInfo presence) | 53 | public bool Report(PresenceInfo presence) |
54 | { | 54 | { |
55 | PresenceData p = new PresenceData(); | ||
56 | p.Data = new Dictionary<string, string>(); | ||
57 | |||
58 | p.UUID = presence.PrincipalID; | ||
59 | p.currentRegion = presence.RegionID; | ||
60 | |||
61 | foreach (KeyValuePair<string, string> kvp in presence.Data) | ||
62 | p.Data[kvp.Key] = kvp.Value; | ||
63 | |||
55 | return false; | 64 | return false; |
56 | } | 65 | } |
57 | } | 66 | } |