diff options
author | Sean Dague | 2008-05-16 14:48:09 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-16 14:48:09 +0000 |
commit | a3b10caa07530d4016bd3606a7fe892703e3fdb3 (patch) | |
tree | dfaa3f57f08b4f6a80760cdc439c1eb2ae55b96c /OpenSim/Region | |
parent | in theory, this moves the appearance mapper to live (diff) | |
download | opensim-SC_OLD-a3b10caa07530d4016bd3606a7fe892703e3fdb3.zip opensim-SC_OLD-a3b10caa07530d4016bd3606a7fe892703e3fdb3.tar.gz opensim-SC_OLD-a3b10caa07530d4016bd3606a7fe892703e3fdb3.tar.bz2 opensim-SC_OLD-a3b10caa07530d4016bd3606a7fe892703e3fdb3.tar.xz |
starting to put appearance into grid comms. now I know why
everyone hates OGS1
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 63fad4a..d77f190 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -87,6 +87,19 @@ namespace OpenSim.Region.Communications.OGS1 | |||
87 | return userData; | 87 | return userData; |
88 | } | 88 | } |
89 | 89 | ||
90 | public AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data) | ||
91 | { | ||
92 | if (data.Contains("error_type")) | ||
93 | { | ||
94 | m_log.Warn("[GRID]: " + | ||
95 | "Error sent by user server when trying to get user appearance: (" + | ||
96 | data["error_type"] + | ||
97 | "): " + data["error_desc"]); | ||
98 | return null; | ||
99 | } | ||
100 | return null; | ||
101 | } | ||
102 | |||
90 | public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) | 103 | public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) |
91 | { | 104 | { |
92 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); | 105 | List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); |
@@ -552,7 +565,27 @@ namespace OpenSim.Region.Communications.OGS1 | |||
552 | /// TODO: stubs for now to get us to a compiling state gently | 565 | /// TODO: stubs for now to get us to a compiling state gently |
553 | public AvatarAppearance GetUserAppearance(LLUUID user) | 566 | public AvatarAppearance GetUserAppearance(LLUUID user) |
554 | { | 567 | { |
555 | return new AvatarAppearance(); | 568 | AvatarAppearance appearance = null; |
569 | try | ||
570 | { | ||
571 | Hashtable param = new Hashtable(); | ||
572 | param["ownerID"] = user.ToString(); | ||
573 | |||
574 | IList parameters = new ArrayList(); | ||
575 | parameters.Add(param); | ||
576 | XmlRpcRequest req = new XmlRpcRequest("get_user_appearance", parameters); | ||
577 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); | ||
578 | Hashtable respData = (Hashtable) resp.Value; | ||
579 | |||
580 | return ConvertXMLRPCDataToAvatarAppearance(respData); | ||
581 | } | ||
582 | catch (WebException e) | ||
583 | { | ||
584 | m_log.Warn("[OGS1 USER SERVICES]: Error when trying to fetch Avatar's appearance: " + | ||
585 | e.Message); | ||
586 | // Return Empty list (no friends) | ||
587 | } | ||
588 | return appearance; | ||
556 | } | 589 | } |
557 | 590 | ||
558 | public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 591 | public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |