diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs index f7d8c53..b7e95c4 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs | |||
@@ -32,7 +32,8 @@ using System.IO; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | |
36 | using OpenSim.Framework.ServiceAuth; | ||
36 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using OpenSim.Server.Base; | 39 | using OpenSim.Server.Base; |
@@ -40,7 +41,7 @@ using OpenMetaverse; | |||
40 | 41 | ||
41 | namespace OpenSim.Services.Connectors | 42 | namespace OpenSim.Services.Connectors |
42 | { | 43 | { |
43 | public class PresenceServicesConnector : IPresenceService | 44 | public class PresenceServicesConnector : BaseServiceConnector, IPresenceService |
44 | { | 45 | { |
45 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
46 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
@@ -80,6 +81,8 @@ namespace OpenSim.Services.Connectors | |||
80 | throw new Exception("Presence connector init error"); | 81 | throw new Exception("Presence connector init error"); |
81 | } | 82 | } |
82 | m_ServerURI = serviceURI; | 83 | m_ServerURI = serviceURI; |
84 | |||
85 | base.Initialise(source, "PresenceService"); | ||
83 | } | 86 | } |
84 | 87 | ||
85 | 88 | ||
@@ -104,7 +107,8 @@ namespace OpenSim.Services.Connectors | |||
104 | { | 107 | { |
105 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 108 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
106 | uri, | 109 | uri, |
107 | reqString); | 110 | reqString, |
111 | m_Auth); | ||
108 | if (reply != string.Empty) | 112 | if (reply != string.Empty) |
109 | { | 113 | { |
110 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 114 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -149,7 +153,8 @@ namespace OpenSim.Services.Connectors | |||
149 | { | 153 | { |
150 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 154 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
151 | uri, | 155 | uri, |
152 | reqString); | 156 | reqString, |
157 | m_Auth); | ||
153 | if (reply != string.Empty) | 158 | if (reply != string.Empty) |
154 | { | 159 | { |
155 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 160 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -193,7 +198,8 @@ namespace OpenSim.Services.Connectors | |||
193 | { | 198 | { |
194 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 199 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
195 | uri, | 200 | uri, |
196 | reqString); | 201 | reqString, |
202 | m_Auth); | ||
197 | if (reply != string.Empty) | 203 | if (reply != string.Empty) |
198 | { | 204 | { |
199 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 205 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -238,7 +244,8 @@ namespace OpenSim.Services.Connectors | |||
238 | { | 244 | { |
239 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 245 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
240 | uri, | 246 | uri, |
241 | reqString); | 247 | reqString, |
248 | m_Auth); | ||
242 | if (reply != string.Empty) | 249 | if (reply != string.Empty) |
243 | { | 250 | { |
244 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 251 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -283,7 +290,8 @@ namespace OpenSim.Services.Connectors | |||
283 | { | 290 | { |
284 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 291 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
285 | uri, | 292 | uri, |
286 | reqString); | 293 | reqString, |
294 | m_Auth); | ||
287 | if (reply == null || (reply != null && reply == string.Empty)) | 295 | if (reply == null || (reply != null && reply == string.Empty)) |
288 | { | 296 | { |
289 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgent received null or empty reply"); | 297 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgent received null or empty reply"); |
@@ -293,6 +301,7 @@ namespace OpenSim.Services.Connectors | |||
293 | catch (Exception e) | 301 | catch (Exception e) |
294 | { | 302 | { |
295 | m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); | 303 | m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server at {0}: {1}", uri, e.Message); |
304 | return null; | ||
296 | } | 305 | } |
297 | 306 | ||
298 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 307 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -327,7 +336,8 @@ namespace OpenSim.Services.Connectors | |||
327 | { | 336 | { |
328 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 337 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
329 | uri, | 338 | uri, |
330 | reqString); | 339 | reqString, |
340 | m_Auth); | ||
331 | if (reply == null || (reply != null && reply == string.Empty)) | 341 | if (reply == null || (reply != null && reply == string.Empty)) |
332 | { | 342 | { |
333 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents received null or empty reply"); | 343 | m_log.DebugFormat("[PRESENCE CONNECTOR]: GetAgents received null or empty reply"); |