diff options
author | Diva Canto | 2014-04-24 14:12:04 -0700 |
---|---|---|
committer | Diva Canto | 2014-04-24 14:12:04 -0700 |
commit | cf54df3ecf7c83817d7f5c654b622a14291ac9ae (patch) | |
tree | f155b54fa2f08acc540b9a754b10991d77671d36 /OpenSim/Services | |
parent | Fixes a long-standing bug related to god-mode change ownership of objects per... (diff) | |
parent | Revert "When linking a Hypergrid region, set the region's flags on the in-mem... (diff) | |
download | opensim-SC_OLD-cf54df3ecf7c83817d7f5c654b622a14291ac9ae.zip opensim-SC_OLD-cf54df3ecf7c83817d7f5c654b622a14291ac9ae.tar.gz opensim-SC_OLD-cf54df3ecf7c83817d7f5c654b622a14291ac9ae.tar.bz2 opensim-SC_OLD-cf54df3ecf7c83817d7f5c654b622a14291ac9ae.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Services')
3 files changed, 141 insertions, 9 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index a5520c4..d9fe5a0 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
136 | } | 136 | } |
137 | 137 | ||
138 | // Try the old version, uncompressed | 138 | // Try the old version, uncompressed |
139 | result = WebUtil.PostToService(uri, args, 30000); | 139 | result = WebUtil.PostToService(uri, args, 30000, false); |
140 | 140 | ||
141 | if (result["Success"].AsBoolean()) | 141 | if (result["Success"].AsBoolean()) |
142 | { | 142 | { |
@@ -302,7 +302,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
302 | 302 | ||
303 | try | 303 | try |
304 | { | 304 | { |
305 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false); | 305 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false); |
306 | bool success = result["success"].AsBoolean(); | 306 | bool success = result["success"].AsBoolean(); |
307 | if (result.ContainsKey("_Result")) | 307 | if (result.ContainsKey("_Result")) |
308 | { | 308 | { |
@@ -365,7 +365,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
365 | 365 | ||
366 | try | 366 | try |
367 | { | 367 | { |
368 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); | 368 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false, false); |
369 | } | 369 | } |
370 | catch (Exception e) | 370 | catch (Exception e) |
371 | { | 371 | { |
@@ -384,7 +384,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
384 | 384 | ||
385 | try | 385 | try |
386 | { | 386 | { |
387 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); | 387 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false, false); |
388 | } | 388 | } |
389 | catch (Exception e) | 389 | catch (Exception e) |
390 | { | 390 | { |
@@ -431,7 +431,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
431 | args["destination_name"] = OSD.FromString(destination.RegionName); | 431 | args["destination_name"] = OSD.FromString(destination.RegionName); |
432 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 432 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); |
433 | 433 | ||
434 | OSDMap result = WebUtil.PostToService(uri, args, 40000); | 434 | OSDMap result = WebUtil.PostToService(uri, args, 40000, false); |
435 | 435 | ||
436 | if (result == null) | 436 | if (result == null) |
437 | return false; | 437 | return false; |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index bf52660..c6d2ee3 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -68,10 +68,6 @@ namespace OpenSim.Services.GridService | |||
68 | protected string m_ThisGatekeeper = string.Empty; | 68 | protected string m_ThisGatekeeper = string.Empty; |
69 | protected Uri m_ThisGatekeeperURI = null; | 69 | protected Uri m_ThisGatekeeperURI = null; |
70 | 70 | ||
71 | // Hyperlink regions are hyperlinks on the map | ||
72 | public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>(); | ||
73 | protected Dictionary<UUID, ulong> m_HyperlinkHandles = new Dictionary<UUID, ulong>(); | ||
74 | |||
75 | protected GridRegion m_DefaultRegion; | 71 | protected GridRegion m_DefaultRegion; |
76 | protected GridRegion DefaultRegion | 72 | protected GridRegion DefaultRegion |
77 | { | 73 | { |
diff --git a/OpenSim/Services/Interfaces/OpenProfileClient.cs b/OpenSim/Services/Interfaces/OpenProfileClient.cs new file mode 100644 index 0000000..4126c35 --- /dev/null +++ b/OpenSim/Services/Interfaces/OpenProfileClient.cs | |||
@@ -0,0 +1,136 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Linq; | ||
32 | using System.Net; | ||
33 | using System.Net.Sockets; | ||
34 | using System.Reflection; | ||
35 | using System.Text; | ||
36 | using System.Xml; | ||
37 | using log4net; | ||
38 | using OpenMetaverse; | ||
39 | using OpenSim.Framework; | ||
40 | |||
41 | namespace OpenSim.Services.UserProfilesService | ||
42 | { | ||
43 | /// <summary> | ||
44 | /// A client for accessing a profile server using the OpenProfile protocol. | ||
45 | /// </summary> | ||
46 | /// <remarks> | ||
47 | /// This class was adapted from the full OpenProfile class. Since it's only a client, and not a server, | ||
48 | /// it's much simpler. | ||
49 | /// </remarks> | ||
50 | public class OpenProfileClient | ||
51 | { | ||
52 | static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
53 | |||
54 | private string m_serverURI; | ||
55 | |||
56 | /// <summary> | ||
57 | /// Creates a client for accessing a foreign grid's profile server using the OpenProfile protocol. | ||
58 | /// </summary> | ||
59 | /// <param name="serverURI">The grid's profile server URL</param> | ||
60 | public OpenProfileClient(string serverURI) | ||
61 | { | ||
62 | m_serverURI = serverURI; | ||
63 | } | ||
64 | |||
65 | |||
66 | /// <summary> | ||
67 | /// Gets an avatar's profile using the OpenProfile protocol. | ||
68 | /// </summary> | ||
69 | /// <param name="props">On success, this will contain the avatar's profile</param> | ||
70 | /// <returns>Success/failure</returns> | ||
71 | /// <remarks> | ||
72 | /// There are two profile modules currently in use in OpenSim: the older one is OpenProfile, and the newer | ||
73 | /// one is UserProfileModule (this file). This method attempts to read an avatar's profile from a foreign | ||
74 | /// grid using the OpenProfile protocol. | ||
75 | /// </remarks> | ||
76 | public bool RequestAvatarPropertiesUsingOpenProfile(ref UserProfileProperties props) | ||
77 | { | ||
78 | Hashtable ReqHash = new Hashtable(); | ||
79 | ReqHash["avatar_id"] = props.UserId.ToString(); | ||
80 | |||
81 | Hashtable profileData = XMLRPCRequester.SendRequest(ReqHash, "avatar_properties_request", m_serverURI); | ||
82 | |||
83 | if (profileData == null) | ||
84 | return false; | ||
85 | if (!profileData.ContainsKey("data")) | ||
86 | return false; | ||
87 | |||
88 | ArrayList dataArray = (ArrayList)profileData["data"]; | ||
89 | |||
90 | if (dataArray == null || dataArray[0] == null) | ||
91 | return false; | ||
92 | profileData = (Hashtable)dataArray[0]; | ||
93 | |||
94 | props.WebUrl = string.Empty; | ||
95 | props.AboutText = String.Empty; | ||
96 | props.FirstLifeText = String.Empty; | ||
97 | props.ImageId = UUID.Zero; | ||
98 | props.FirstLifeImageId = UUID.Zero; | ||
99 | props.PartnerId = UUID.Zero; | ||
100 | |||
101 | if (profileData["ProfileUrl"] != null) | ||
102 | props.WebUrl = profileData["ProfileUrl"].ToString(); | ||
103 | if (profileData["AboutText"] != null) | ||
104 | props.AboutText = profileData["AboutText"].ToString(); | ||
105 | if (profileData["FirstLifeAboutText"] != null) | ||
106 | props.FirstLifeText = profileData["FirstLifeAboutText"].ToString(); | ||
107 | if (profileData["Image"] != null) | ||
108 | props.ImageId = new UUID(profileData["Image"].ToString()); | ||
109 | if (profileData["FirstLifeImage"] != null) | ||
110 | props.FirstLifeImageId = new UUID(profileData["FirstLifeImage"].ToString()); | ||
111 | if (profileData["Partner"] != null) | ||
112 | props.PartnerId = new UUID(profileData["Partner"].ToString()); | ||
113 | |||
114 | props.WantToMask = 0; | ||
115 | props.WantToText = String.Empty; | ||
116 | props.SkillsMask = 0; | ||
117 | props.SkillsText = String.Empty; | ||
118 | props.Language = String.Empty; | ||
119 | |||
120 | if (profileData["wantmask"] != null) | ||
121 | props.WantToMask = Convert.ToInt32(profileData["wantmask"].ToString()); | ||
122 | if (profileData["wanttext"] != null) | ||
123 | props.WantToText = profileData["wanttext"].ToString(); | ||
124 | |||
125 | if (profileData["skillsmask"] != null) | ||
126 | props.SkillsMask = Convert.ToInt32(profileData["skillsmask"].ToString()); | ||
127 | if (profileData["skillstext"] != null) | ||
128 | props.SkillsText = profileData["skillstext"].ToString(); | ||
129 | |||
130 | if (profileData["languages"] != null) | ||
131 | props.Language = profileData["languages"].ToString(); | ||
132 | |||
133 | return true; | ||
134 | } | ||
135 | } | ||
136 | } | ||