diff options
Diffstat (limited to 'OpenSim/Services/Connectors')
3 files changed, 54 insertions, 7 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 42eca05..96d2605 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -358,7 +358,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
358 | 358 | ||
359 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) | 359 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) |
360 | { | 360 | { |
361 | //m_log.Debug("[HGrid]: Linking to " + uri); | 361 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); |
362 | XmlRpcResponse response = null; | 362 | XmlRpcResponse response = null; |
363 | try | 363 | try |
364 | { | 364 | { |
@@ -366,14 +366,14 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
366 | } | 366 | } |
367 | catch (Exception e) | 367 | catch (Exception e) |
368 | { | 368 | { |
369 | m_log.Debug("[USER AGENT CONNECTOR]: Unable to contact remote server "); | 369 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); |
370 | reason = "Exception: " + e.Message; | 370 | reason = "Exception: " + e.Message; |
371 | return false; | 371 | return false; |
372 | } | 372 | } |
373 | 373 | ||
374 | if (response.IsFault) | 374 | if (response.IsFault) |
375 | { | 375 | { |
376 | m_log.ErrorFormat("[HGrid]: remote call returned an error: {0}", response.FaultString); | 376 | m_log.ErrorFormat("[HGrid]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); |
377 | reason = "XMLRPC Fault"; | 377 | reason = "XMLRPC Fault"; |
378 | return false; | 378 | return false; |
379 | } | 379 | } |
@@ -383,15 +383,29 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
383 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | 383 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); |
384 | try | 384 | try |
385 | { | 385 | { |
386 | if (hash == null) | ||
387 | { | ||
388 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURL); | ||
389 | reason = "Internal error 1"; | ||
390 | return false; | ||
391 | } | ||
386 | bool success = false; | 392 | bool success = false; |
387 | reason = string.Empty; | 393 | reason = string.Empty; |
388 | Boolean.TryParse((string)hash["result"], out success); | 394 | if (hash.ContainsKey("result")) |
395 | Boolean.TryParse((string)hash["result"], out success); | ||
396 | else | ||
397 | { | ||
398 | reason = "Internal error 2"; | ||
399 | m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURL); | ||
400 | } | ||
389 | 401 | ||
390 | return success; | 402 | return success; |
391 | } | 403 | } |
392 | catch (Exception e) | 404 | catch (Exception e) |
393 | { | 405 | { |
394 | m_log.Error("[HGrid]: Got exception while parsing GetEndPoint response " + e.StackTrace); | 406 | m_log.ErrorFormat("[HGrid]: Got exception on GetBoolResponse response."); |
407 | if (hash.ContainsKey("result") && hash["result"] != null) | ||
408 | m_log.ErrorFormat("Reply was ", (string)hash["result"]); | ||
395 | reason = "Exception: " + e.Message; | 409 | reason = "Exception: " + e.Message; |
396 | return false; | 410 | return false; |
397 | } | 411 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index dc68259..2b6d29c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -745,6 +745,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
745 | } | 745 | } |
746 | } | 746 | } |
747 | 747 | ||
748 | m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invFolders.Count + " folders from SimianGrid response"); | ||
748 | return invFolders; | 749 | return invFolders; |
749 | } | 750 | } |
750 | 751 | ||
@@ -810,6 +811,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
810 | } | 811 | } |
811 | } | 812 | } |
812 | 813 | ||
814 | m_log.Debug("[SIMIAN INVENTORY CONNECTOR]: Parsed " + invItems.Count + " items from SimianGrid response"); | ||
813 | return invItems; | 815 | return invItems; |
814 | } | 816 | } |
815 | 817 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index fbf4648..704790e 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
88 | 88 | ||
89 | public void Initialise(IConfigSource source) | 89 | public void Initialise(IConfigSource source) |
90 | { | 90 | { |
91 | if (Simian.IsSimianEnabled(source, "UserAccountServices", this.Name)) | 91 | if (Simian.IsSimianEnabled(source, "UserAccountServices", "SimianUserAccountServiceConnector")) |
92 | { | 92 | { |
93 | IConfig gridConfig = source.Configs["UserAccountService"]; | 93 | IConfig gridConfig = source.Configs["UserAccountService"]; |
94 | if (gridConfig == null) | 94 | if (gridConfig == null) |
@@ -108,6 +108,23 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
108 | serviceUrl = serviceUrl + '/'; | 108 | serviceUrl = serviceUrl + '/'; |
109 | 109 | ||
110 | m_serverUrl = serviceUrl; | 110 | m_serverUrl = serviceUrl; |
111 | IConfig profilesConfig = source.Configs["Profiles"]; | ||
112 | if (profilesConfig == null) | ||
113 | { | ||
114 | // Do not run this module by default. | ||
115 | return; | ||
116 | } | ||
117 | else | ||
118 | { | ||
119 | // if profiles aren't enabled, we're not needed. | ||
120 | // if we're not specified as the connector to use, then we're not wanted | ||
121 | if (profilesConfig.GetString("Module", String.Empty) != Name) | ||
122 | { | ||
123 | |||
124 | return; | ||
125 | } | ||
126 | m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Initializing {0}", this.Name); | ||
127 | } | ||
111 | } | 128 | } |
112 | } | 129 | } |
113 | 130 | ||
@@ -135,6 +152,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
135 | 152 | ||
136 | // Profiles | 153 | // Profiles |
137 | client.OnRequestAvatarProperties += RequestAvatarPropertiesHandler; | 154 | client.OnRequestAvatarProperties += RequestAvatarPropertiesHandler; |
155 | |||
138 | client.OnUpdateAvatarProperties += UpdateAvatarPropertiesHandler; | 156 | client.OnUpdateAvatarProperties += UpdateAvatarPropertiesHandler; |
139 | client.OnAvatarInterestUpdate += AvatarInterestUpdateHandler; | 157 | client.OnAvatarInterestUpdate += AvatarInterestUpdateHandler; |
140 | client.OnUserInfoRequest += UserInfoRequestHandler; | 158 | client.OnUserInfoRequest += UserInfoRequestHandler; |
@@ -302,12 +320,25 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
302 | System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags, | 320 | System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags, |
303 | about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID()); | 321 | about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID()); |
304 | 322 | ||
323 | OSDMap interests = null; | ||
324 | if (user.ContainsKey("LLInterests")) | ||
325 | { | ||
326 | try | ||
327 | { | ||
328 | interests = OSDParser.DeserializeJson(user["LLInterests"].AsString()) as OSDMap; | ||
329 | client.SendAvatarInterestsReply(avatarID, interests["WantMask"].AsUInteger(), interests["WantText"].AsString(), interests["SkillsMask"].AsUInteger(), interests["SkillsText"].AsString(), interests["languages"].AsString()); | ||
330 | } | ||
331 | catch { } | ||
332 | } | ||
333 | |||
334 | if (about == null) | ||
335 | about = new OSDMap(0); | ||
305 | } | 336 | } |
306 | else | 337 | else |
307 | { | 338 | { |
308 | m_log.Warn("[SIMIAN PROFILES]: Failed to fetch profile information for " + client.Name + ", returning default values"); | 339 | m_log.Warn("[SIMIAN PROFILES]: Failed to fetch profile information for " + client.Name + ", returning default values"); |
309 | client.SendAvatarProperties(avatarID, String.Empty, "1/1/1970", Utils.EmptyBytes, | 340 | client.SendAvatarProperties(avatarID, String.Empty, "1/1/1970", Utils.EmptyBytes, |
310 | String.Empty, (uint)flags, UUID.Zero, UUID.Zero, String.Empty, UUID.Zero); | 341 | String.Empty, (uint)flags, UUID.Zero, UUID.Zero, String.Empty, UUID.Zero); |
311 | } | 342 | } |
312 | } | 343 | } |
313 | 344 | ||