aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/PresenceService
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs25
-rw-r--r--OpenSim/Services/PresenceService/PresenceServiceBase.cs2
-rw-r--r--OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs10
3 files changed, 27 insertions, 10 deletions
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index b5ca4d5..1059b2b 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Services.PresenceService
71 data.SessionID = sessionID; 71 data.SessionID = sessionID;
72 data.Data = new Dictionary<string, string>(); 72 data.Data = new Dictionary<string, string>();
73 data.Data["SecureSessionID"] = secureSessionID.ToString(); 73 data.Data["SecureSessionID"] = secureSessionID.ToString();
74 74
75 m_Database.Store(data); 75 m_Database.Store(data);
76 76
77 string prevUserStr = ""; 77 string prevUserStr = "";
@@ -80,7 +80,7 @@ namespace OpenSim.Services.PresenceService
80 80
81 m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", 81 m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}",
82 data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); 82 data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr);
83 83
84 return true; 84 return true;
85 } 85 }
86 86
@@ -92,7 +92,7 @@ namespace OpenSim.Services.PresenceService
92 sessionID, 92 sessionID,
93 (presence == null) ? null : presence.UserID, 93 (presence == null) ? null : presence.UserID,
94 (presence == null) ? null : presence.RegionID.ToString()); 94 (presence == null) ? null : presence.RegionID.ToString());
95 95
96 return m_Database.Delete("SessionID", sessionID.ToString()); 96 return m_Database.Delete("SessionID", sessionID.ToString());
97 } 97 }
98 98
@@ -144,13 +144,29 @@ namespace OpenSim.Services.PresenceService
144 public PresenceInfo GetAgent(UUID sessionID) 144 public PresenceInfo GetAgent(UUID sessionID)
145 { 145 {
146 PresenceInfo ret = new PresenceInfo(); 146 PresenceInfo ret = new PresenceInfo();
147 147
148 PresenceData data = m_Database.Get(sessionID); 148 PresenceData data = m_Database.Get(sessionID);
149 if (data == null) 149 if (data == null)
150 return null; 150 return null;
151 151
152 ret.UserID = data.UserID; 152 ret.UserID = data.UserID;
153 ret.RegionID = data.RegionID; 153 ret.RegionID = data.RegionID;
154 ret.SessionID = data.SessionID;
155
156 return ret;
157 }
158
159 public PresenceInfo GetAgentByUser(UUID userID)
160 {
161 PresenceInfo ret = new PresenceInfo();
162
163 PresenceData data = m_Database.GetByUser(userID);
164 if (data == null)
165 return null;
166
167 ret.UserID = data.UserID;
168 ret.RegionID = data.RegionID;
169 ret.SessionID = data.SessionID;
154 170
155 return ret; 171 return ret;
156 } 172 }
@@ -169,6 +185,7 @@ namespace OpenSim.Services.PresenceService
169 185
170 ret.UserID = d.UserID; 186 ret.UserID = d.UserID;
171 ret.RegionID = d.RegionID; 187 ret.RegionID = d.RegionID;
188 ret.SessionID = d.SessionID;
172 189
173 info.Add(ret); 190 info.Add(ret);
174 } 191 }
diff --git a/OpenSim/Services/PresenceService/PresenceServiceBase.cs b/OpenSim/Services/PresenceService/PresenceServiceBase.cs
index a4adb2f..7647865 100644
--- a/OpenSim/Services/PresenceService/PresenceServiceBase.cs
+++ b/OpenSim/Services/PresenceService/PresenceServiceBase.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.PresenceService
68 connString = presenceConfig.GetString("ConnectionString", connString); 68 connString = presenceConfig.GetString("ConnectionString", connString);
69 realm = presenceConfig.GetString("Realm", realm); 69 realm = presenceConfig.GetString("Realm", realm);
70 } 70 }
71 71
72 // 72 //
73 // We tried, but this doesn't exist. We can't proceed. 73 // We tried, but this doesn't exist. We can't proceed.
74 // 74 //
diff --git a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
index 4fd21a8..a79bc9f 100644
--- a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.PresenceService")] 8[assembly: AssemblyTitle("OpenSim.Services.PresenceService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,9 +25,9 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.3.*")] 32[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)]
33 33