aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/IPresenceData.cs10
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs10
-rw-r--r--OpenSim/Services/Interfaces/IPresenceService.cs9
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs7
4 files changed, 14 insertions, 22 deletions
diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs
index e5a8ebd..b46b92d 100644
--- a/OpenSim/Data/IPresenceData.cs
+++ b/OpenSim/Data/IPresenceData.cs
@@ -32,10 +32,11 @@ using OpenSim.Framework;
32 32
33namespace OpenSim.Data 33namespace OpenSim.Data
34{ 34{
35 public struct PresenceData 35 // This MUST be a ref type!
36 public class PresenceData
36 { 37 {
37 public UUID UUID; 38 public UUID PrincipalID;
38 public UUID currentRegion; 39 public UUID RegionID;
39 public Dictionary<string, string> Data; 40 public Dictionary<string, string> Data;
40 } 41 }
41 42
@@ -48,9 +49,6 @@ namespace OpenSim.Data
48 49
49 PresenceData Get(UUID principalID); 50 PresenceData Get(UUID principalID);
50 51
51 bool SetUserDataItem(UUID principalID, string item, string value);
52 bool SetRegionDataItem(UUID principalID, string item, string value);
53
54 bool Delete(UUID regionID); 52 bool Delete(UUID regionID);
55 } 53 }
56} 54}
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 2558fa0..d41ee28 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -95,7 +95,6 @@ namespace OpenSim.Server.Handlers.Presence
95 byte[] Report(Dictionary<string, string> request) 95 byte[] Report(Dictionary<string, string> request)
96 { 96 {
97 PresenceInfo info = new PresenceInfo(); 97 PresenceInfo info = new PresenceInfo();
98 info.Data = new Dictionary<string, string>();
99 98
100 if (request["PrincipalID"] == null || request["RegionID"] == null) 99 if (request["PrincipalID"] == null || request["RegionID"] == null)
101 return FailureResult(); 100 return FailureResult();
@@ -108,15 +107,6 @@ namespace OpenSim.Server.Handlers.Presence
108 out info.RegionID)) 107 out info.RegionID))
109 return FailureResult(); 108 return FailureResult();
110 109
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 110
121 if (m_PresenceService.Report(info)) 111 if (m_PresenceService.Report(info))
122 return SuccessResult(); 112 return SuccessResult();
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index aa1c5bf..4de57e3 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using OpenSim.Framework; 29using OpenSim.Framework;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using OpenMetaverse; 31using OpenMetaverse;
@@ -35,7 +36,13 @@ namespace OpenSim.Services.Interfaces
35 { 36 {
36 public UUID PrincipalID; 37 public UUID PrincipalID;
37 public UUID RegionID; 38 public UUID RegionID;
38 public Dictionary<string, string> Data; 39 public UUID SessionID;
40 public UUID SecureSessionID;
41 public bool Online;
42 public DateTime Login;
43 public DateTime Logout;
44 public Vector3 Position;
45 public Vector3 LookAt;
39 } 46 }
40 47
41 public interface IPresenceService 48 public interface IPresenceService
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 2157462..04bcee6 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -55,11 +55,8 @@ namespace OpenSim.Services.PresenceService
55 PresenceData p = new PresenceData(); 55 PresenceData p = new PresenceData();
56 p.Data = new Dictionary<string, string>(); 56 p.Data = new Dictionary<string, string>();
57 57
58 p.UUID = presence.PrincipalID; 58 p.PrincipalID = presence.PrincipalID;
59 p.currentRegion = presence.RegionID; 59 p.RegionID = presence.RegionID;
60
61 foreach (KeyValuePair<string, string> kvp in presence.Data)
62 p.Data[kvp.Key] = kvp.Value;
63 60
64 return false; 61 return false;
65 } 62 }