aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-10-21 07:33:01 +0100
committerMelanie2010-10-21 07:33:01 +0100
commitfc33d569cd760b0ecf2d487b8d91d4ac3c53d08e (patch)
treeffe3d70e95b159dc4c7b3bf9613bca865d4067d3
parentCOmmented the wrong line instead, now I commented them all to be on the safe ... (diff)
parentSkip empty strings in ParseString* functions (diff)
downloadopensim-SC_OLD-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.zip
opensim-SC_OLD-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.gz
opensim-SC_OLD-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.bz2
opensim-SC_OLD-fc33d569cd760b0ecf2d487b8d91d4ac3c53d08e.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--CONTRIBUTORS.txt1
-rw-r--r--OpenSim/Framework/Capabilities/CapsUtil.cs2
-rw-r--r--OpenSim/Framework/RegionInfo.cs39
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs377
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs49
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs58
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs17
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs10
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs7
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs35
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs7
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs55
-rw-r--r--OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs2
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs17
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs9
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs17
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs29
31 files changed, 581 insertions, 201 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 2443244..38343a4 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -167,6 +167,7 @@ This software uses components from the following developers:
167* GlynnTucker.Cache (http://gtcache.sourceforge.net/) 167* GlynnTucker.Cache (http://gtcache.sourceforge.net/)
168* NDesk.Options 0.2.1 (http://www.ndesk.org/Options) 168* NDesk.Options 0.2.1 (http://www.ndesk.org/Options)
169* Json.NET 3.5 Release 6. The binary used is actually Newtonsoft.Json.Net20.dll for Mono 2.4 compatability (http://james.newtonking.com/projects/json-net.aspx) 169* Json.NET 3.5 Release 6. The binary used is actually Newtonsoft.Json.Net20.dll for Mono 2.4 compatability (http://james.newtonking.com/projects/json-net.aspx)
170* zlib.net for C# 1.0.4 (http://www.componentace.com/zlib_.NET.htm)
170 171
171Some plugins are based on Cable Beach 172Some plugins are based on Cable Beach
172Cable Beach is Copyright (c) 2008 Intel Corporation 173Cable Beach is Copyright (c) 2008 Intel Corporation
diff --git a/OpenSim/Framework/Capabilities/CapsUtil.cs b/OpenSim/Framework/Capabilities/CapsUtil.cs
index 0334e4b..faf2708 100644
--- a/OpenSim/Framework/Capabilities/CapsUtil.cs
+++ b/OpenSim/Framework/Capabilities/CapsUtil.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Capabilities
41 /// <returns></returns> 41 /// <returns></returns>
42 public static string GetCapsSeedPath(string capsObjectPath) 42 public static string GetCapsSeedPath(string capsObjectPath)
43 { 43 {
44 return "/CAPS/" + capsObjectPath + "0000/"; 44 return "CAPS/" + capsObjectPath + "0000/";
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index a006f3e..d57d4e9 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -116,8 +116,20 @@ namespace OpenSim.Framework
116 /// </summary> 116 /// </summary>
117 public string ServerURI 117 public string ServerURI
118 { 118 {
119 get { return m_serverURI; } 119 get {
120 set { m_serverURI = value; } 120 if ( m_serverURI != string.Empty ) {
121 return m_serverURI;
122 } else {
123 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
124 }
125 }
126 set {
127 if ( value.EndsWith("/") ) {
128 m_serverURI = value;
129 } else {
130 m_serverURI = value + '/';
131 }
132 }
121 } 133 }
122 protected string m_serverURI; 134 protected string m_serverURI;
123 135
@@ -142,6 +154,7 @@ namespace OpenSim.Framework
142 154
143 public SimpleRegionInfo() 155 public SimpleRegionInfo()
144 { 156 {
157 m_serverURI = string.Empty;
145 } 158 }
146 159
147 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 160 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -151,6 +164,7 @@ namespace OpenSim.Framework
151 164
152 m_internalEndPoint = internalEndPoint; 165 m_internalEndPoint = internalEndPoint;
153 m_externalHostName = externalUri; 166 m_externalHostName = externalUri;
167 m_serverURI = string.Empty;
154 } 168 }
155 169
156 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) 170 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
@@ -161,6 +175,7 @@ namespace OpenSim.Framework
161 m_externalHostName = externalUri; 175 m_externalHostName = externalUri;
162 176
163 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); 177 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
178 m_serverURI = string.Empty;
164 } 179 }
165 180
166 public SimpleRegionInfo(RegionInfo ConvertFrom) 181 public SimpleRegionInfo(RegionInfo ConvertFrom)
@@ -450,6 +465,7 @@ namespace OpenSim.Framework
450 configMember = 465 configMember =
451 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); 466 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
452 configMember.performConfigurationRetrieve(); 467 configMember.performConfigurationRetrieve();
468 m_serverURI = string.Empty;
453 } 469 }
454 470
455 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 471 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -459,10 +475,12 @@ namespace OpenSim.Framework
459 475
460 m_internalEndPoint = internalEndPoint; 476 m_internalEndPoint = internalEndPoint;
461 m_externalHostName = externalUri; 477 m_externalHostName = externalUri;
478 m_serverURI = string.Empty;
462 } 479 }
463 480
464 public RegionInfo() 481 public RegionInfo()
465 { 482 {
483 m_serverURI = string.Empty;
466 } 484 }
467 485
468 public EstateSettings EstateSettings 486 public EstateSettings EstateSettings
@@ -552,10 +570,23 @@ namespace OpenSim.Framework
552 /// <summary> 570 /// <summary>
553 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) 571 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName)
554 /// </summary> 572 /// </summary>
573
555 public string ServerURI 574 public string ServerURI
556 { 575 {
557 get { return m_serverURI; } 576 get {
558 set { m_serverURI = value; } 577 if ( m_serverURI != string.Empty ) {
578 return m_serverURI;
579 } else {
580 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
581 }
582 }
583 set {
584 if ( value.EndsWith("/") ) {
585 m_serverURI = value;
586 } else {
587 m_serverURI = value + '/';
588 }
589 }
559 } 590 }
560 591
561 public string RegionName 592 public string RegionName
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ba8c194..0c1e5e0 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Servers.HttpServer
348 { 348 {
349 try 349 try
350 { 350 {
351// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); 351 //m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
352 352
353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); 353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
354 354
@@ -376,7 +376,7 @@ namespace OpenSim.Framework.Servers.HttpServer
376 string path = request.RawUrl; 376 string path = request.RawUrl;
377 string handlerKey = GetHandlerKey(request.HttpMethod, path); 377 string handlerKey = GetHandlerKey(request.HttpMethod, path);
378 378
379// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); 379 //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
380 380
381 if (TryGetStreamHandler(handlerKey, out requestHandler)) 381 if (TryGetStreamHandler(handlerKey, out requestHandler))
382 { 382 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c5ee385..7e0a886 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -336,8 +336,8 @@ namespace OpenSim
336 //regionInfo.originRegionID = regionInfo.RegionID; 336 //regionInfo.originRegionID = regionInfo.RegionID;
337 337
338 // set initial ServerURI 338 // set initial ServerURI
339 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port;
340 regionInfo.HttpPort = m_httpServerPort; 339 regionInfo.HttpPort = m_httpServerPort;
340 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
341 341
342 regionInfo.osSecret = m_osSecret; 342 regionInfo.osSecret = m_osSecret;
343 343
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index d8e0f96..80adc46 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -598,7 +598,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
598 try 598 try
599 { 599 {
600 600
601 XmlRpcResponse GridResp = GridReq.Send("http://" + reginfo.ExternalHostName + ":" + reginfo.HttpPort, 3000); 601 XmlRpcResponse GridResp = GridReq.Send(reginfo.ServerURI, 3000);
602 602
603 Hashtable responseData = (Hashtable)GridResp.Value; 603 Hashtable responseData = (Hashtable)GridResp.Value;
604 604
@@ -620,8 +620,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
620 } 620 }
621 catch (WebException e) 621 catch (WebException e)
622 { 622 {
623 m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to http://{0}:{1} the host didn't respond ({2})", 623 m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})",
624 reginfo.ExternalHostName, reginfo.HttpPort, e.Message); 624 reginfo.ServerURI, e.Message);
625 } 625 }
626 626
627 return false; 627 return false;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index a08a628..6badc74 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -159,8 +159,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
159 159
160 private void OnInstantMessage(IClientAPI client, GridInstantMessage im) 160 private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
161 { 161 {
162 //m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); 162// m_log.DebugFormat(
163 163// "[INVENTORY TRANSFER]: {0} IM type received from {1}",
164// (InstantMessageDialog)im.dialog, client.Name);
165
164 Scene scene = FindClientScene(client.AgentId); 166 Scene scene = FindClientScene(client.AgentId);
165 167
166 if (scene == null) // Something seriously wrong here. 168 if (scene == null) // Something seriously wrong here.
diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs
new file mode 100644
index 0000000..09b9719
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/UploadObjectAssetModule.cs
@@ -0,0 +1,377 @@
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
28using System;
29using System.Collections;
30using System.Collections.Specialized;
31using System.Reflection;
32using System.IO;
33using System.Web;
34using Mono.Addins;
35using log4net;
36using Nini.Config;
37using OpenMetaverse;
38using OpenMetaverse.StructuredData;
39using OpenMetaverse.Messages.Linden;
40using OpenSim.Framework;
41using OpenSim.Framework.Servers;
42using OpenSim.Framework.Servers.HttpServer;
43using OpenSim.Region.Framework.Interfaces;
44using OpenSim.Region.Framework.Scenes;
45using OpenSim.Services.Interfaces;
46using Caps = OpenSim.Framework.Capabilities.Caps;
47using OSD = OpenMetaverse.StructuredData.OSD;
48using OSDMap = OpenMetaverse.StructuredData.OSDMap;
49using OpenSim.Framework.Capabilities;
50using ExtraParamType = OpenMetaverse.ExtraParamType;
51
52namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
53{
54 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
55 public class UploadObjectAssetModule : INonSharedRegionModule
56 {
57 private static readonly ILog m_log =
58 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 private Scene m_scene;
60
61 #region IRegionModuleBase Members
62
63
64 public Type ReplaceableInterface
65 {
66 get { return null; }
67 }
68
69 public void Initialise(IConfigSource source)
70 {
71
72 }
73
74 public void AddRegion(Scene pScene)
75 {
76 m_scene = pScene;
77 }
78
79 public void RemoveRegion(Scene scene)
80 {
81
82 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
83 m_scene = null;
84 }
85
86 public void RegionLoaded(Scene scene)
87 {
88
89 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
90 }
91
92 #endregion
93
94
95 #region IRegionModule Members
96
97
98
99 public void Close() { }
100
101 public string Name { get { return "UploadObjectAssetModuleModule"; } }
102
103
104 public void RegisterCaps(UUID agentID, Caps caps)
105 {
106 UUID capID = UUID.Random();
107
108 m_log.Info("[UploadObjectAssetModule]: /CAPS/" + capID);
109 caps.RegisterHandler("UploadObjectAsset",
110 new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/",
111 delegate(Hashtable m_dhttpMethod)
112 {
113 return ProcessAdd(m_dhttpMethod, agentID, caps);
114 }));
115 /*
116 caps.RegisterHandler("NewFileAgentInventoryVariablePrice",
117
118 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST",
119 "/CAPS/" + capID.ToString(),
120 delegate(LLSDAssetUploadRequest req)
121 {
122 return NewAgentInventoryRequest(req,agentID);
123 }));
124 */
125
126 }
127
128 #endregion
129
130
131 /// <summary>
132 /// Parses ad request
133 /// </summary>
134 /// <param name="request"></param>
135 /// <param name="AgentId"></param>
136 /// <param name="cap"></param>
137 /// <returns></returns>
138 public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap)
139 {
140 Hashtable responsedata = new Hashtable();
141 responsedata["int_response_code"] = 400; //501; //410; //404;
142 responsedata["content_type"] = "text/plain";
143 responsedata["keepalive"] = false;
144 responsedata["str_response_string"] = "Request wasn't what was expected";
145 ScenePresence avatar;
146
147 if (!m_scene.TryGetScenePresence(AgentId, out avatar))
148 return responsedata;
149
150 OSDMap r = (OSDMap)OSDParser.Deserialize((string)request["requestbody"]);
151 UploadObjectAssetMessage message = new UploadObjectAssetMessage();
152 try
153 {
154 message.Deserialize(r);
155
156 }
157 catch (Exception ex)
158 {
159 m_log.Error("[UploadObjectAssetModule]: Error deserializing message " + ex.ToString());
160 message = null;
161 }
162
163 if (message == null)
164 {
165 responsedata["int_response_code"] = 400; //501; //410; //404;
166 responsedata["content_type"] = "text/plain";
167 responsedata["keepalive"] = false;
168 responsedata["str_response_string"] =
169 "<llsd><map><key>error</key><string>Error parsing Object</string></map></llsd>";
170
171 return responsedata;
172 }
173
174 Vector3 pos = avatar.AbsolutePosition + (Vector3.UnitX * avatar.Rotation);
175 Quaternion rot = Quaternion.Identity;
176 Vector3 rootpos = Vector3.Zero;
177 Quaternion rootrot = Quaternion.Identity;
178
179 SceneObjectGroup rootGroup = null;
180 SceneObjectGroup[] allparts = new SceneObjectGroup[message.Objects.Length];
181 for (int i = 0; i < message.Objects.Length; i++)
182 {
183 UploadObjectAssetMessage.Object obj = message.Objects[i];
184 PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
185
186 if (i == 0)
187 {
188 rootpos = obj.Position;
189 rootrot = obj.Rotation;
190
191 }
192
193
194 // Combine the extraparams data into it's ugly blob again....
195 //int bytelength = 0;
196 //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++)
197 //{
198 // bytelength += obj.ExtraParams[extparams].ExtraParamData.Length;
199 //}
200 //byte[] extraparams = new byte[bytelength];
201 //int position = 0;
202
203
204
205 //for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++)
206 //{
207 // Buffer.BlockCopy(obj.ExtraParams[extparams].ExtraParamData, 0, extraparams, position,
208 // obj.ExtraParams[extparams].ExtraParamData.Length);
209 //
210 // position += obj.ExtraParams[extparams].ExtraParamData.Length;
211 // }
212
213 //pbs.ExtraParams = extraparams;
214 for (int extparams = 0; extparams < obj.ExtraParams.Length; extparams++)
215 {
216 UploadObjectAssetMessage.Object.ExtraParam extraParam = obj.ExtraParams[extparams];
217 switch ((ushort)extraParam.Type)
218 {
219 case (ushort)ExtraParamType.Sculpt:
220 Primitive.SculptData sculpt = new Primitive.SculptData(extraParam.ExtraParamData, 0);
221
222 pbs.SculptEntry = true;
223
224 pbs.SculptTexture = obj.SculptID;
225 pbs.SculptType = (byte)sculpt.Type;
226
227 break;
228 case (ushort)ExtraParamType.Flexible:
229 Primitive.FlexibleData flex = new Primitive.FlexibleData(extraParam.ExtraParamData, 0);
230 pbs.FlexiEntry = true;
231 pbs.FlexiDrag = flex.Drag;
232 pbs.FlexiForceX = flex.Force.X;
233 pbs.FlexiForceY = flex.Force.Y;
234 pbs.FlexiForceZ = flex.Force.Z;
235 pbs.FlexiGravity = flex.Gravity;
236 pbs.FlexiSoftness = flex.Softness;
237 pbs.FlexiTension = flex.Tension;
238 pbs.FlexiWind = flex.Wind;
239 break;
240 case (ushort)ExtraParamType.Light:
241 Primitive.LightData light = new Primitive.LightData(extraParam.ExtraParamData, 0);
242 pbs.LightColorA = light.Color.A;
243 pbs.LightColorB = light.Color.B;
244 pbs.LightColorG = light.Color.G;
245 pbs.LightColorR = light.Color.R;
246 pbs.LightCutoff = light.Cutoff;
247 pbs.LightEntry = true;
248 pbs.LightFalloff = light.Falloff;
249 pbs.LightIntensity = light.Intensity;
250 pbs.LightRadius = light.Radius;
251 break;
252 case 0x40:
253 pbs.ReadProjectionData(extraParam.ExtraParamData, 0);
254 break;
255
256 }
257
258
259 }
260 pbs.PathBegin = (ushort) obj.PathBegin;
261 pbs.PathCurve = (byte) obj.PathCurve;
262 pbs.PathEnd = (ushort) obj.PathEnd;
263 pbs.PathRadiusOffset = (sbyte) obj.RadiusOffset;
264 pbs.PathRevolutions = (byte) obj.Revolutions;
265 pbs.PathScaleX = (byte) obj.ScaleX;
266 pbs.PathScaleY = (byte) obj.ScaleY;
267 pbs.PathShearX = (byte) obj.ShearX;
268 pbs.PathShearY = (byte) obj.ShearY;
269 pbs.PathSkew = (sbyte) obj.Skew;
270 pbs.PathTaperX = (sbyte) obj.TaperX;
271 pbs.PathTaperY = (sbyte) obj.TaperY;
272 pbs.PathTwist = (sbyte) obj.Twist;
273 pbs.PathTwistBegin = (sbyte) obj.TwistBegin;
274 pbs.HollowShape = (HollowShape) obj.ProfileHollow;
275 pbs.PCode = (byte) PCode.Prim;
276 pbs.ProfileBegin = (ushort) obj.ProfileBegin;
277 pbs.ProfileCurve = (byte) obj.ProfileCurve;
278 pbs.ProfileEnd = (ushort) obj.ProfileEnd;
279 pbs.Scale = obj.Scale;
280 pbs.State = (byte) 0;
281 SceneObjectPart prim = new SceneObjectPart();
282 prim.UUID = UUID.Random();
283 prim.CreatorID = AgentId;
284 prim.OwnerID = AgentId;
285 prim.GroupID = obj.GroupID;
286 prim.LastOwnerID = prim.OwnerID;
287 prim.CreationDate = Util.UnixTimeSinceEpoch();
288 prim.Name = obj.Name;
289 prim.Description = "";
290
291 prim.PayPrice[0] = -2;
292 prim.PayPrice[1] = -2;
293 prim.PayPrice[2] = -2;
294 prim.PayPrice[3] = -2;
295 prim.PayPrice[4] = -2;
296 Primitive.TextureEntry tmp =
297 new Primitive.TextureEntry(UUID.Parse("89556747-24cb-43ed-920b-47caed15465f"));
298
299 for (int j = 0; j < obj.Faces.Length; j++)
300 {
301 UploadObjectAssetMessage.Object.Face face = obj.Faces[j];
302
303 Primitive.TextureEntryFace primFace = tmp.CreateFace((uint) j);
304
305 primFace.Bump = face.Bump;
306 primFace.RGBA = face.Color;
307 primFace.Fullbright = face.Fullbright;
308 primFace.Glow = face.Glow;
309 primFace.TextureID = face.ImageID;
310 primFace.Rotation = face.ImageRot;
311 primFace.MediaFlags = ((face.MediaFlags & 1) != 0);
312
313 primFace.OffsetU = face.OffsetS;
314 primFace.OffsetV = face.OffsetT;
315 primFace.RepeatU = face.ScaleS;
316 primFace.RepeatV = face.ScaleT;
317 primFace.TexMapType = (MappingType) (face.MediaFlags & 6);
318 }
319 pbs.TextureEntry = tmp.GetBytes();
320 prim.Shape = pbs;
321 prim.Scale = obj.Scale;
322
323
324 SceneObjectGroup grp = new SceneObjectGroup();
325
326 grp.SetRootPart(prim);
327 prim.ParentID = 0;
328 if (i == 0)
329 {
330 rootGroup = grp;
331
332 }
333 grp.AttachToScene(m_scene);
334 grp.AbsolutePosition = obj.Position;
335 prim.RotationOffset = obj.Rotation;
336
337 grp.RootPart.IsAttachment = false;
338 // Required for linking
339 grp.RootPart.UpdateFlag = 0;
340
341 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
342 {
343 m_scene.AddSceneObject(grp);
344 grp.AbsolutePosition = obj.Position;
345 }
346 allparts[i] = grp;
347
348 }
349
350 for (int j = 1; j < allparts.Length; j++)
351 {
352 rootGroup.RootPart.UpdateFlag = 0;
353 allparts[j].RootPart.UpdateFlag = 0;
354 rootGroup.LinkToGroup(allparts[j]);
355 }
356
357 rootGroup.ScheduleGroupForFullUpdate();
358 pos = m_scene.GetNewRezLocation(Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale(), false);
359
360 responsedata["int_response_code"] = 200; //501; //410; //404;
361 responsedata["content_type"] = "text/plain";
362 responsedata["keepalive"] = false;
363 responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>", ConvertUintToBytes(allparts[0].LocalId));
364
365 return responsedata;
366
367
368 }
369 private string ConvertUintToBytes(uint val)
370 {
371 byte[] resultbytes = Utils.UIntToBytes(val);
372 if (BitConverter.IsLittleEndian)
373 Array.Reverse(resultbytes);
374 return String.Format("<binary encoding=\"base64\">{0}</binary>", Convert.ToBase64String(resultbytes));
375 }
376 }
377}
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 2921b0d..9a0e735 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -327,43 +327,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
327 327
328 // OK, it got this agent. Let's close some child agents 328 // OK, it got this agent. Let's close some child agents
329 sp.CloseChildAgents(newRegionX, newRegionY); 329 sp.CloseChildAgents(newRegionX, newRegionY);
330 330 IClientIPEndpoint ipepClient;
331 if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) 331 if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY))
332 { 332 {
333 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); 333 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent...");
334
335 #region IP Translation for NAT 334 #region IP Translation for NAT
336 IClientIPEndpoint ipepClient; 335 // Uses ipepClient above
337 if (sp.ClientView.TryGet(out ipepClient)) 336 if (sp.ClientView.TryGet(out ipepClient))
338 { 337 {
339 capsPath 338 endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address);
340 = "http://"
341 + NetworkUtil.GetHostFor(ipepClient.EndPoint, finalDestination.ExternalHostName)
342 + ":"
343 + finalDestination.HttpPort
344 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
345 }
346 else
347 {
348 capsPath
349 = "http://"
350 + finalDestination.ExternalHostName
351 + ":"
352 + finalDestination.HttpPort
353 + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
354 } 339 }
355 #endregion 340 #endregion
341 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
356 342
357 if (eq != null) 343 if (eq != null)
358 { 344 {
359 #region IP Translation for NAT
360 // Uses ipepClient above
361 if (sp.ClientView.TryGet(out ipepClient))
362 {
363 endPoint.Address = NetworkUtil.GetIPFor(ipepClient.EndPoint, endPoint.Address);
364 }
365 #endregion
366
367 eq.EnableSimulator(destinationHandle, endPoint, sp.UUID); 345 eq.EnableSimulator(destinationHandle, endPoint, sp.UUID);
368 346
369 // ES makes the client send a UseCircuitCode message to the destination, 347 // ES makes the client send a UseCircuitCode message to the destination,
@@ -382,8 +360,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
382 else 360 else
383 { 361 {
384 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle); 362 agentCircuit.CapsPath = sp.Scene.CapsModule.GetChildSeed(sp.UUID, reg.RegionHandle);
385 capsPath = "http://" + finalDestination.ExternalHostName + ":" + finalDestination.HttpPort 363 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
386 + "/CAPS/" + agentCircuit.CapsPath + "0000/";
387 } 364 }
388 365
389 // Expect avatar crossing is a heavy-duty function at the destination. 366 // Expect avatar crossing is a heavy-duty function at the destination.
@@ -518,8 +495,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
518 495
519 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) 496 protected virtual void SetCallbackURL(AgentData agent, RegionInfo region)
520 { 497 {
521 agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort + 498 agent.CallbackURI = region.ServerURI + "agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
522 "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; 499 m_log.Debug("Set callback URL to " + agent.CallbackURI);
523 500
524 } 501 }
525 502
@@ -862,8 +839,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
862 cAgent.Position = pos; 839 cAgent.Position = pos;
863 if (isFlying) 840 if (isFlying)
864 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; 841 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
865 cAgent.CallbackURI = "http://" + m_scene.RegionInfo.ExternalHostName + ":" + m_scene.RegionInfo.HttpPort + 842 cAgent.CallbackURI = m_scene.RegionInfo.ServerURI +
866 "/agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/"; 843 "agent/" + agent.UUID.ToString() + "/" + m_scene.RegionInfo.RegionID.ToString() + "/release/";
867 844
868 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) 845 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
869 { 846 {
@@ -888,10 +865,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
888 neighbourRegion.RegionHandle); 865 neighbourRegion.RegionHandle);
889 return agent; 866 return agent;
890 } 867 }
891 // TODO Should construct this behind a method 868 string capsPath = neighbourRegion.ServerURI + CapsUtil.GetCapsSeedPath(agentcaps);
892 string capsPath =
893 "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort
894 + "/CAPS/" + agentcaps /*circuitdata.CapsPath*/ + "0000/";
895 869
896 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); 870 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
897 871
@@ -1219,8 +1193,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1219 y = y / Constants.RegionSize; 1193 y = y / Constants.RegionSize;
1220 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); 1194 m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
1221 1195
1222 string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort 1196 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath);
1223 + "/CAPS/" + a.CapsPath + "0000/";
1224 1197
1225 string reason = String.Empty; 1198 string reason = String.Empty;
1226 1199
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index fd0e879..2dd7767 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -595,12 +595,12 @@ namespace OpenSim.Region.CoreModules.InterGrid
595 // DEPRECATED 595 // DEPRECATED
596 responseMap["seed_capability"] 596 responseMap["seed_capability"]
597 = OSD.FromString( 597 = OSD.FromString(
598 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); 598 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath));
599 599
600 // REPLACEMENT 600 // REPLACEMENT
601 responseMap["region_seed_capability"] 601 responseMap["region_seed_capability"]
602 = OSD.FromString( 602 = OSD.FromString(
603 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); 603 regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath));
604 604
605 responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 605 responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
606 responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 606 responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index 0da3f5f..155335b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
36{ 36{
37 public class UserAccountCache 37 public class UserAccountCache
38 { 38 {
39 private const double CACHE_EXPIRATION_SECONDS = 120.0; 39 private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
40 40
41 private static readonly ILog m_log = 41 private static readonly ILog m_log =
42 LogManager.GetLogger( 42 LogManager.GetLogger(
@@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
57 if (account != null) 57 if (account != null)
58 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); 58 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS);
59 59
60 // m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); 60 //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
61 } 61 }
62 62
63 public UserAccount Get(UUID userID, out bool inCache) 63 public UserAccount Get(UUID userID, out bool inCache)
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index a182eea..fdbbccf 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
147 147
148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); 148 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
149 regionimage = regionimage.Replace("-", ""); 149 regionimage = regionimage.Replace("-", "");
150 m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); 150 m_log.Info("[WORLD MAP]: JPEG Map location: " + m_scene.RegionInfo.ServerURI + "/index.php?method=" + regionimage);
151 151
152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage); 152 MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
153 MainServer.Instance.AddLLSDHandler( 153 MainServer.Instance.AddLLSDHandler(
@@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
579 579
580 if (mreg != null) 580 if (mreg != null)
581 { 581 {
582 httpserver = "http://" + mreg.ExternalEndPoint.Address.ToString() + ":" + mreg.HttpPort + "/MAP/MapItems/" + regionhandle.ToString(); 582 httpserver = mreg.ServerURI + "MAP/MapItems/" + regionhandle.ToString();
583 lock (m_cachedRegionMapItemsAddress) 583 lock (m_cachedRegionMapItemsAddress)
584 { 584 {
585 if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle)) 585 if (!m_cachedRegionMapItemsAddress.ContainsKey(regionhandle))
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 618f425..06e3c0e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3329,6 +3329,8 @@ namespace OpenSim.Region.Framework.Scenes
3329 3329
3330 public void CopyTo(AgentData cAgent) 3330 public void CopyTo(AgentData cAgent)
3331 { 3331 {
3332 cAgent.CallbackURI = m_callbackURI;
3333
3332 cAgent.AgentID = UUID; 3334 cAgent.AgentID = UUID;
3333 cAgent.RegionID = Scene.RegionInfo.RegionID; 3335 cAgent.RegionID = Scene.RegionInfo.RegionID;
3334 3336
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index e33ad4a..dd7e057 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -318,6 +318,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
318 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound); 318 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
319 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume); 319 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
320 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); 320 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
321 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
322 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
321 #endregion 323 #endregion
322 324
323 #region TaskInventoryXmlProcessors initialization 325 #region TaskInventoryXmlProcessors initialization
@@ -663,6 +665,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
663 { 665 {
664 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); 666 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
665 } 667 }
668
669 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader)
670 {
671 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty));
672 }
673
674 private static void ProcessParticleSystem(SceneObjectPart obj, XmlTextReader reader)
675 {
676 obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty));
677 }
666 #endregion 678 #endregion
667 679
668 #region TaskInventoryXmlProcessors 680 #region TaskInventoryXmlProcessors
@@ -1128,6 +1140,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1128 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); 1140 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
1129 if (sop.MediaUrl != null) 1141 if (sop.MediaUrl != null)
1130 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1142 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1143 WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
1144 WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
1131 1145
1132 writer.WriteEndElement(); 1146 writer.WriteEndElement();
1133 } 1147 }
@@ -1161,6 +1175,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1161 writer.WriteEndElement(); 1175 writer.WriteEndElement();
1162 } 1176 }
1163 1177
1178 static void WriteBytes(XmlTextWriter writer, string name, byte[] data)
1179 {
1180 writer.WriteStartElement(name);
1181 byte[] d;
1182 if (data != null)
1183 d = data;
1184 else
1185 d = Utils.EmptyBytes;
1186 writer.WriteBase64(d, 0, d.Length);
1187 writer.WriteEndElement(); // name
1188
1189 }
1190
1164 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) 1191 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options)
1165 { 1192 {
1166 if (tinv.Count > 0) // otherwise skip this 1193 if (tinv.Count > 0) // otherwise skip this
@@ -1398,9 +1425,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1398 Vector3 vec; 1425 Vector3 vec;
1399 1426
1400 reader.ReadStartElement(name); 1427 reader.ReadStartElement(name);
1401 vec.X = reader.ReadElementContentAsFloat("X", String.Empty); 1428 vec.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // X or x
1402 vec.Y = reader.ReadElementContentAsFloat("Y", String.Empty); 1429 vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or Y
1403 vec.Z = reader.ReadElementContentAsFloat("Z", String.Empty); 1430 vec.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Z or z
1404 reader.ReadEndElement(); 1431 reader.ReadEndElement();
1405 1432
1406 return vec; 1433 return vec;
@@ -1408,13 +1435,28 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1408 1435
1409 static Quaternion ReadQuaternion(XmlTextReader reader, string name) 1436 static Quaternion ReadQuaternion(XmlTextReader reader, string name)
1410 { 1437 {
1411 Quaternion quat; 1438 Quaternion quat = new Quaternion();
1412 1439
1413 reader.ReadStartElement(name); 1440 reader.ReadStartElement(name);
1414 quat.X = reader.ReadElementContentAsFloat("X", String.Empty); 1441 while (reader.NodeType != XmlNodeType.EndElement)
1415 quat.Y = reader.ReadElementContentAsFloat("Y", String.Empty); 1442 {
1416 quat.Z = reader.ReadElementContentAsFloat("Z", String.Empty); 1443 switch (reader.Name.ToLower())
1417 quat.W = reader.ReadElementContentAsFloat("W", String.Empty); 1444 {
1445 case "x":
1446 quat.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1447 break;
1448 case "y":
1449 quat.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1450 break;
1451 case "z":
1452 quat.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1453 break;
1454 case "w":
1455 quat.W = reader.ReadElementContentAsFloat(reader.Name, String.Empty);
1456 break;
1457 }
1458 }
1459
1418 reader.ReadEndElement(); 1460 reader.ReadEndElement();
1419 1461
1420 return quat; 1462 return quat;
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 185d44d..25dba7f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -212,12 +212,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
212 212
213 public void SendMessageToGroup(GridInstantMessage im, UUID groupID) 213 public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
214 { 214 {
215 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID);
216
215 if (m_debugEnabled) 217 if (m_debugEnabled)
216 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 218 m_log.DebugFormat(
217 219 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members",
218 220 groupID, groupMembers.Count);
219 foreach (GroupMembersData member in m_groupData.GetGroupMembers(UUID.Zero, groupID)) 221
220 { 222 foreach (GroupMembersData member in groupMembers)
223 {
221 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) 224 if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
222 { 225 {
223 // Don't deliver messages to people who have dropped this session 226 // Don't deliver messages to people who have dropped this session
@@ -263,9 +266,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
263 266
264 void OnClientLogin(IClientAPI client) 267 void OnClientLogin(IClientAPI client)
265 { 268 {
266 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: OnInstantMessage registered for {0}", client.Name); 269 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: OnInstantMessage registered for {0}", client.Name);
267
268
269 } 270 }
270 271
271 private void OnNewClient(IClientAPI client) 272 private void OnNewClient(IClientAPI client)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 6f044e0..0c8113e 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -599,7 +599,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
599 599
600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 600 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
601 { 601 {
602 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 602 if (m_debugEnabled)
603 m_log.DebugFormat(
604 "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name);
605
603 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 606 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
604 607
605 if (m_debugEnabled) 608 if (m_debugEnabled)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 5fabbb0..2631ac1 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -641,11 +641,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
641 } 641 }
642 642
643 return Roles; 643 return Roles;
644
645 } 644 }
646 645
647
648
649 public List<GroupMembersData> GetGroupMembers(UUID requestingAgentID, UUID GroupID) 646 public List<GroupMembersData> GetGroupMembers(UUID requestingAgentID, UUID GroupID)
650 { 647 {
651 Hashtable param = new Hashtable(); 648 Hashtable param = new Hashtable();
@@ -988,8 +985,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
988 } 985 }
989 catch (Exception e) 986 catch (Exception e)
990 { 987 {
991 m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); 988 m_log.ErrorFormat(
992 m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} ", e.ToString()); 989 "[XMLRPC-GROUPS-CONNECTOR]: An error has occured while attempting to access the XmlRpcGroups server method {0} at {1}",
990 function, m_groupsServerURI);
991
992 m_log.ErrorFormat("[XMLRPC-GROUPS-CONNECTOR]: {0}{1}", e.Message, e.StackTrace);
993 993
994 foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) 994 foreach (string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
995 { 995 {
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 72dce6d..1257804 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -349,6 +349,7 @@ namespace OpenSim.Region.Physics.Meshing
349 349
350 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3(); 350 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3();
351 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3(); 351 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3();
352 ushort faceIndexOffset = (ushort)coords.Count;
352 353
353 byte[] posBytes = subMeshMap["Position"].AsBinary(); 354 byte[] posBytes = subMeshMap["Position"].AsBinary();
354 for (int i = 0; i < posBytes.Length; i += 6) 355 for (int i = 0; i < posBytes.Length; i += 6)
@@ -368,9 +369,9 @@ namespace OpenSim.Region.Physics.Meshing
368 byte[] triangleBytes = subMeshMap["TriangleList"].AsBinary(); 369 byte[] triangleBytes = subMeshMap["TriangleList"].AsBinary();
369 for (int i = 0; i < triangleBytes.Length; i += 6) 370 for (int i = 0; i < triangleBytes.Length; i += 6)
370 { 371 {
371 ushort v1 = Utils.BytesToUInt16(triangleBytes, i); 372 ushort v1 = (ushort)(Utils.BytesToUInt16(triangleBytes, i) + faceIndexOffset);
372 ushort v2 = Utils.BytesToUInt16(triangleBytes, i + 2); 373 ushort v2 = (ushort)(Utils.BytesToUInt16(triangleBytes, i + 2) + faceIndexOffset);
373 ushort v3 = Utils.BytesToUInt16(triangleBytes, i + 4); 374 ushort v3 = (ushort)(Utils.BytesToUInt16(triangleBytes, i + 4) + faceIndexOffset);
374 Face f = new Face(v1, v2, v3); 375 Face f = new Face(v1, v2, v3);
375 faces.Add(f); 376 faces.Add(f);
376 } 377 }
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
index f64a079..a1bcba6 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
@@ -124,6 +124,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
124 UUID uuid = UUID.Zero; 124 UUID uuid = UUID.Zero;
125 string regionname = string.Empty; 125 string regionname = string.Empty;
126 string gatekeeper_host = string.Empty; 126 string gatekeeper_host = string.Empty;
127 string server_uri = string.Empty;
127 int gatekeeper_port = 0; 128 int gatekeeper_port = 0;
128 IPEndPoint client_ipaddress = null; 129 IPEndPoint client_ipaddress = null;
129 130
@@ -173,6 +174,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
173 destination.RegionLocX = x; 174 destination.RegionLocX = x;
174 destination.RegionLocY = y; 175 destination.RegionLocY = y;
175 destination.RegionName = regionname; 176 destination.RegionName = regionname;
177
176 178
177 AgentCircuitData aCircuit = new AgentCircuitData(); 179 AgentCircuitData aCircuit = new AgentCircuitData();
178 try 180 try
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 479a80e..4231be1 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -63,12 +63,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
63 63
64 protected override string AgentPath() 64 protected override string AgentPath()
65 { 65 {
66 return "/foreignagent/"; 66 return "foreignagent/";
67 } 67 }
68 68
69 protected override string ObjectPath() 69 protected override string ObjectPath()
70 { 70 {
71 return "/foreignobject/"; 71 return "foreignobject/";
72 } 72 }
73 73
74 public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason) 74 public bool LinkRegion(GridRegion info, out UUID regionID, out ulong realHandle, out string externalName, out string imageURL, out string reason)
@@ -86,12 +86,11 @@ namespace OpenSim.Services.Connectors.Hypergrid
86 paramList.Add(hash); 86 paramList.Add(hash);
87 87
88 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); 88 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
89 string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); 89 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + info.ServerURI);
90 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
91 XmlRpcResponse response = null; 90 XmlRpcResponse response = null;
92 try 91 try
93 { 92 {
94 response = request.Send(uri, 10000); 93 response = request.Send(info.ServerURI, 10000);
95 } 94 }
96 catch (Exception e) 95 catch (Exception e)
97 { 96 {
@@ -108,8 +107,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
108 } 107 }
109 108
110 hash = (Hashtable)response.Value; 109 hash = (Hashtable)response.Value;
111 //foreach (Object o in hash) 110 foreach (Object o in hash)
112 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 111 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
113 try 112 try
114 { 113 {
115 bool success = false; 114 bool success = false;
@@ -117,16 +116,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
117 if (success) 116 if (success)
118 { 117 {
119 UUID.TryParse((string)hash["uuid"], out regionID); 118 UUID.TryParse((string)hash["uuid"], out regionID);
120 //m_log.Debug(">> HERE, uuid: " + uuid); 119 //m_log.Debug(">> HERE, uuid: " + regionID);
121 if ((string)hash["handle"] != null) 120 if ((string)hash["handle"] != null)
122 { 121 {
123 realHandle = Convert.ToUInt64((string)hash["handle"]); 122 realHandle = Convert.ToUInt64((string)hash["handle"]);
124 //m_log.Debug(">> HERE, realHandle: " + realHandle); 123 //m_log.Debug(">> HERE, realHandle: " + realHandle);
125 } 124 }
126 if (hash["region_image"] != null) 125 if (hash["region_image"] != null) {
127 imageURL = (string)hash["region_image"]; 126 imageURL = (string)hash["region_image"];
128 if (hash["external_name"] != null) 127 //m_log.Debug(">> HERE, imageURL: " + imageURL);
128 }
129 if (hash["external_name"] != null) {
129 externalName = (string)hash["external_name"]; 130 externalName = (string)hash["external_name"];
131 //m_log.Debug(">> HERE, externalName: " + externalName);
132 }
130 } 133 }
131 134
132 } 135 }
@@ -188,16 +191,15 @@ namespace OpenSim.Services.Connectors.Hypergrid
188 paramList.Add(hash); 191 paramList.Add(hash);
189 192
190 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); 193 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
191 string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); 194 //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + gatekeeper.ServerURI);
192 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
193 XmlRpcResponse response = null; 195 XmlRpcResponse response = null;
194 try 196 try
195 { 197 {
196 response = request.Send(uri, 10000); 198 response = request.Send(gatekeeper.ServerURI, 10000);
197 } 199 }
198 catch (Exception e) 200 catch (Exception e)
199 { 201 {
200 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message); 202 //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message);
201 return null; 203 return null;
202 } 204 }
203 205
@@ -236,21 +238,24 @@ namespace OpenSim.Services.Connectors.Hypergrid
236 if (hash["region_name"] != null) 238 if (hash["region_name"] != null)
237 { 239 {
238 region.RegionName = (string)hash["region_name"]; 240 region.RegionName = (string)hash["region_name"];
239 //m_log.Debug(">> HERE, name: " + region.RegionName); 241 //m_log.Debug(">> HERE, region_name: " + region.RegionName);
240 } 242 }
241 if (hash["hostname"] != null) 243 if (hash["hostname"] != null)
242 region.ExternalHostName = (string)hash["hostname"]; 244 region.ExternalHostName = (string)hash["hostname"];
245 //m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
243 if (hash["http_port"] != null) 246 if (hash["http_port"] != null)
244 { 247 {
245 uint p = 0; 248 uint p = 0;
246 UInt32.TryParse((string)hash["http_port"], out p); 249 UInt32.TryParse((string)hash["http_port"], out p);
247 region.HttpPort = p; 250 region.HttpPort = p;
251 //m_log.Debug(">> HERE, http_port: " + region.HttpPort);
248 } 252 }
249 if (hash["internal_port"] != null) 253 if (hash["internal_port"] != null)
250 { 254 {
251 int p = 0; 255 int p = 0;
252 Int32.TryParse((string)hash["internal_port"], out p); 256 Int32.TryParse((string)hash["internal_port"], out p);
253 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); 257 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
258 //m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
254 } 259 }
255 260
256 // Successful return 261 // Successful return
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 8f74335..10499e2 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -84,10 +84,7 @@ namespace OpenSim.Services.Connectors
84 if (info != null) // just to be sure 84 if (info != null) // just to be sure
85 { 85 {
86 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 86 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
87 87 XmlRpcResponse response = request.Send(info.ServerURI, 10000);
88 //Possible nullref from info.externalendpoint will be caught here
89 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/";
90 XmlRpcResponse response = request.Send(uri, 10000);
91 if (response.IsFault) 88 if (response.IsFault)
92 { 89 {
93 m_log.ErrorFormat("[LAND CONNECTOR]: remote call returned an error: {0}", response.FaultString); 90 m_log.ErrorFormat("[LAND CONNECTOR]: remote call returned an error: {0}", response.FaultString);
@@ -134,4 +131,4 @@ namespace OpenSim.Services.Connectors
134 return landData; 131 return landData;
135 } 132 }
136 } 133 }
137} \ No newline at end of file 134}
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index daf0439..9c57a40 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -87,9 +87,7 @@ namespace OpenSim.Services.Connectors
87 87
88 public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion) 88 public bool DoHelloNeighbourCall(GridRegion region, RegionInfo thisRegion)
89 { 89 {
90 IPEndPoint ext = region.ExternalEndPoint; 90 string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/";
91 if (ext == null) return false;
92 string uri = "http://" + ext.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
93 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); 91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
94 92
95 WebRequest HelloNeighbourRequest = WebRequest.Create(uri); 93 WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 4fc2a6d..f86eba3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -147,8 +147,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
147 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 147 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
148 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 148 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
149 149
150 string httpAddress = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/";
151
152 OSDMap extraData = new OSDMap 150 OSDMap extraData = new OSDMap
153 { 151 {
154 { "ServerURI", OSD.FromString(regionInfo.ServerURI) }, 152 { "ServerURI", OSD.FromString(regionInfo.ServerURI) },
@@ -170,7 +168,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
170 { "Name", regionInfo.RegionName }, 168 { "Name", regionInfo.RegionName },
171 { "MinPosition", minPosition.ToString() }, 169 { "MinPosition", minPosition.ToString() },
172 { "MaxPosition", maxPosition.ToString() }, 170 { "MaxPosition", maxPosition.ToString() },
173 { "Address", httpAddress }, 171 { "Address", regionInfo.ServerURI },
174 { "Enabled", "1" }, 172 { "Enabled", "1" },
175 { "ExtraData", OSDParser.SerializeJsonString(extraData) } 173 { "ExtraData", OSDParser.SerializeJsonString(extraData) }
176 }; 174 };
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index a8ed66d..f855fde 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Services.Connectors.Simulation
72 72
73 protected virtual string AgentPath() 73 protected virtual string AgentPath()
74 { 74 {
75 return "/agent/"; 75 return "agent/";
76 } 76 }
77 77
78 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) 78 public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason)
@@ -104,26 +104,7 @@ namespace OpenSim.Services.Connectors.Simulation
104 return false; 104 return false;
105 } 105 }
106 106
107 string uri = string.Empty; 107 string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
108
109 // HACK -- Simian grid make it work!!!
110 if (destination.ServerURI != null && destination.ServerURI != string.Empty && !destination.ServerURI.StartsWith("http:"))
111 uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
112 else
113 {
114 try
115 {
116 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + aCircuit.AgentID + "/";
117 }
118 catch (Exception e)
119 {
120 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message);
121 reason = e.Message;
122 return false;
123 }
124 }
125
126 //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
127 108
128 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri); 109 AgentCreateRequest = (HttpWebRequest)WebRequest.Create(uri);
129 AgentCreateRequest.Method = "POST"; 110 AgentCreateRequest.Method = "POST";
@@ -277,17 +258,7 @@ namespace OpenSim.Services.Connectors.Simulation
277 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) 258 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
278 { 259 {
279 // Eventually, we want to use a caps url instead of the agentID 260 // Eventually, we want to use a caps url instead of the agentID
280 string uri = string.Empty; 261 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
281 try
282 {
283 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + cAgentData.AgentID + "/";
284 }
285 catch (Exception e)
286 {
287 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
288 return false;
289 }
290 //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
291 262
292 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 263 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
293 ChildUpdateRequest.Method = "PUT"; 264 ChildUpdateRequest.Method = "PUT";
@@ -387,8 +358,7 @@ namespace OpenSim.Services.Connectors.Simulation
387 agent = null; 358 agent = null;
388 if (ext == null) return false; 359 if (ext == null) return false;
389 // Eventually, we want to use a caps url instead of the agentID 360 // Eventually, we want to use a caps url instead of the agentID
390 string uri = "http://" + ext.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 361 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
391 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
392 362
393 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 363 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
394 request.Method = "GET"; 364 request.Method = "GET";
@@ -409,7 +379,6 @@ namespace OpenSim.Services.Connectors.Simulation
409 sr = new StreamReader(webResponse.GetResponseStream()); 379 sr = new StreamReader(webResponse.GetResponseStream());
410 reply = sr.ReadToEnd().Trim(); 380 reply = sr.ReadToEnd().Trim();
411 381
412 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was " + reply);
413 382
414 } 383 }
415 catch (WebException ex) 384 catch (WebException ex)
@@ -430,7 +399,6 @@ namespace OpenSim.Services.Connectors.Simulation
430 OSDMap args = Util.GetOSDMap(reply); 399 OSDMap args = Util.GetOSDMap(reply);
431 if (args == null) 400 if (args == null)
432 { 401 {
433 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: Error getting OSDMap from reply");
434 return false; 402 return false;
435 } 403 }
436 404
@@ -439,7 +407,6 @@ namespace OpenSim.Services.Connectors.Simulation
439 return true; 407 return true;
440 } 408 }
441 409
442 //Console.WriteLine("[REMOTE SIMULATION CONNECTOR]: DoRetrieveRootAgentCall returned status " + webResponse.StatusCode);
443 return false; 410 return false;
444 } 411 }
445 412
@@ -481,18 +448,8 @@ namespace OpenSim.Services.Connectors.Simulation
481 448
482 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) 449 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
483 { 450 {
484 string uri = string.Empty; 451 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
485 try
486 {
487 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
488 }
489 catch (Exception e)
490 {
491 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
492 return false;
493 }
494 452
495 //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
496 453
497 WebRequest request = WebRequest.Create(uri); 454 WebRequest request = WebRequest.Create(uri);
498 request.Method = "DELETE"; 455 request.Method = "DELETE";
@@ -554,7 +511,7 @@ namespace OpenSim.Services.Connectors.Simulation
554 IPEndPoint ext = destination.ExternalEndPoint; 511 IPEndPoint ext = destination.ExternalEndPoint;
555 if (ext == null) return false; 512 if (ext == null) return false;
556 string uri 513 string uri
557 = "http://" + ext.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 514 = destination.ServerURI + ObjectPath() + sog.UUID + "/";
558 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 515 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
559 516
560 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 517 WebRequest ObjectCreateRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
index 67c482b..2a5df83 100644
--- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Services.Connectors
113 113
114 public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID) 114 public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID)
115 { 115 {
116 // m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID); 116 //m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID);
117 Dictionary<string, object> sendData = new Dictionary<string, object>(); 117 Dictionary<string, object> sendData = new Dictionary<string, object>();
118 //sendData["SCOPEID"] = scopeID.ToString(); 118 //sendData["SCOPEID"] = scopeID.ToString();
119 sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); 119 sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index e7988d6..125c2be 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -479,7 +479,7 @@ namespace OpenSim.Services.GridService
479 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); 479 OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
480 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n", 480 MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n",
481 r.RegionName, r.RegionID, 481 r.RegionName, r.RegionID,
482 String.Format("{0},{1}", r.posX, r.posY), "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverPort"].ToString(), 482 String.Format("{0},{1}", r.posX, r.posY), r.Data["serverURI"],
483 r.Data["owner_uuid"].ToString(), flags.ToString())); 483 r.Data["owner_uuid"].ToString(), flags.ToString()));
484 } 484 }
485 return; 485 return;
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index b86fb6f..74e864b 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Services.GridService
127 if (MainConsole.Instance != null) 127 if (MainConsole.Instance != null)
128 { 128 {
129 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", 129 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
130 "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", 130 "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RegionServerURI] [<RemoteRegionName>] <cr>",
131 "Link a hypergrid region", RunCommand); 131 "Link a hypergrid region", RunCommand);
132 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", 132 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
133 "unlink-region <local name> or <HostName>:<HttpPort> <cr>", 133 "unlink-region <local name> or <HostName>:<HttpPort> <cr>",
@@ -198,11 +198,7 @@ namespace OpenSim.Services.GridService
198 198
199 return null; 199 return null;
200 } 200 }
201 201 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
202
203 // From the command line and the 2 above
204 public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
205 string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
206 { 202 {
207 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); 203 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc);
208 204
@@ -217,8 +213,11 @@ namespace OpenSim.Services.GridService
217 213
218 // Big HACK for Simian Grid !!! 214 // Big HACK for Simian Grid !!!
219 // We need to clean up all URLs used in OpenSim !!! 215 // We need to clean up all URLs used in OpenSim !!!
220 if (externalHostName.Contains("/")) 216 if (externalHostName.Contains("/")) {
221 regInfo.ServerURI = externalHostName; 217 regInfo.ServerURI = externalHostName;
218 } else {
219 regInfo.ServerURI = "http://" + externalHostName + ":" + externalPort.ToString();
220 }
222 221
223 try 222 try
224 { 223 {
@@ -509,12 +508,16 @@ namespace OpenSim.Services.GridService
509 int xloc, yloc; 508 int xloc, yloc;
510 uint externalPort; 509 uint externalPort;
511 string externalHostName; 510 string externalHostName;
511 string serverURI;
512 try 512 try
513 { 513 {
514 xloc = Convert.ToInt32(cmdparams[0]); 514 xloc = Convert.ToInt32(cmdparams[0]);
515 yloc = Convert.ToInt32(cmdparams[1]); 515 yloc = Convert.ToInt32(cmdparams[1]);
516 externalPort = Convert.ToUInt32(cmdparams[3]); 516 externalPort = Convert.ToUInt32(cmdparams[3]);
517 externalHostName = cmdparams[2]; 517 externalHostName = cmdparams[2];
518 if ( cmdparams.Length == 4 ) {
519
520 }
518 //internalPort = Convert.ToUInt32(cmdparams[4]); 521 //internalPort = Convert.ToUInt32(cmdparams[4]);
519 //remotingPort = Convert.ToUInt32(cmdparams[5]); 522 //remotingPort = Convert.ToUInt32(cmdparams[5]);
520 } 523 }
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 3f5c4f1..9e96163 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -157,7 +157,7 @@ namespace OpenSim.Services.HypergridService
157 string regionimage = "regionImage" + region.RegionID.ToString(); 157 string regionimage = "regionImage" + region.RegionID.ToString();
158 regionimage = regionimage.Replace("-", ""); 158 regionimage = regionimage.Replace("-", "");
159 159
160 imageURL = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/index.php?method=" + regionimage; 160 imageURL = region.ServerURI + "index.php?method=" + regionimage;
161 161
162 return true; 162 return true;
163 } 163 }
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index eb6433c..aed2dc8 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -136,6 +136,7 @@ namespace OpenSim.Services.HypergridService
136 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", 136 m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}",
137 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), 137 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()),
138 gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort); 138 gatekeeper.ExternalHostName +":"+ gatekeeper.HttpPort);
139 m_log.Debug("gatekeeper serveruri -> " + gatekeeper.ServerURI );
139 140
140 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination 141 // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
141 GridRegion region = new GridRegion(gatekeeper); 142 GridRegion region = new GridRegion(gatekeeper);
@@ -145,12 +146,12 @@ namespace OpenSim.Services.HypergridService
145 region.RegionLocY = finalDestination.RegionLocY; 146 region.RegionLocY = finalDestination.RegionLocY;
146 147
147 // Generate a new service session 148 // Generate a new service session
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 149 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 150 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 151
151 bool success = false; 152 bool success = false;
152 string myExternalIP = string.Empty; 153 string myExternalIP = string.Empty;
153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 154 string gridName = gatekeeper.ServerURI;
154 if (m_GridName == gridName) 155 if (m_GridName == gridName)
155 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 156 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
156 else 157 else
@@ -159,7 +160,7 @@ namespace OpenSim.Services.HypergridService
159 if (!success) 160 if (!success)
160 { 161 {
161 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}", 162 m_log.DebugFormat("[USER AGENT SERVICE]: Unable to login user {0} {1} to grid {2}, reason: {3}",
162 agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason); 163 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
163 164
164 // restore the old travel info 165 // restore the old travel info
165 lock (m_TravelingAgents) 166 lock (m_TravelingAgents)
@@ -210,7 +211,7 @@ namespace OpenSim.Services.HypergridService
210 m_TravelingAgents[agentCircuit.SessionID] = travel; 211 m_TravelingAgents[agentCircuit.SessionID] = travel;
211 } 212 }
212 travel.UserID = agentCircuit.AgentID; 213 travel.UserID = agentCircuit.AgentID;
213 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; 214 travel.GridExternalName = region.ServerURI;
214 travel.ServiceToken = agentCircuit.ServiceSessionID; 215 travel.ServiceToken = agentCircuit.ServiceSessionID;
215 if (old != null) 216 if (old != null)
216 travel.ClientIPAddress = old.ClientIPAddress; 217 travel.ClientIPAddress = old.ClientIPAddress;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index cce8f2c..a0d270c 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -115,8 +115,20 @@ namespace OpenSim.Services.Interfaces
115 /// </summary> 115 /// </summary>
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get {
119 set { m_serverURI = value; } 119 if ( m_serverURI != string.Empty ) {
120 return m_serverURI;
121 } else {
122 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
123 }
124 }
125 set {
126 if ( value.EndsWith("/") ) {
127 m_serverURI = value;
128 } else {
129 m_serverURI = value + '/';
130 }
131 }
120 } 132 }
121 protected string m_serverURI; 133 protected string m_serverURI;
122 134
@@ -164,6 +176,7 @@ namespace OpenSim.Services.Interfaces
164 176
165 public GridRegion() 177 public GridRegion()
166 { 178 {
179 m_serverURI = string.Empty;
167 } 180 }
168 181
169 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri) 182 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri)
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 011cad8..e98cc22 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -339,34 +339,7 @@ namespace OpenSim.Services.LLLoginService
339 339
340 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) 340 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
341 { 341 {
342 string capsSeedPath = String.Empty; 342 SeedCapability = destination.ServerURI + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
343
344 // Don't use the following! It Fails for logging into any region not on the same port as the http server!
345 // Kept here so it doesn't happen again!
346 // response.SeedCapability = regionInfo.ServerURI + capsSeedPath;
347
348 #region IP Translation for NAT
349 if (ipepClient != null)
350 {
351 capsSeedPath
352 = "http://"
353 + NetworkUtil.GetHostFor(ipepClient.Address, destination.ExternalHostName)
354 + ":"
355 + destination.HttpPort
356 + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
357 }
358 else
359 {
360 capsSeedPath
361 = "http://"
362 + destination.ExternalHostName
363 + ":"
364 + destination.HttpPort
365 + CapsUtil.GetCapsSeedPath(aCircuit.CapsPath);
366 }
367 #endregion
368
369 SeedCapability = capsSeedPath;
370 } 343 }
371 344
372 private void SetDefaultValues() 345 private void SetDefaultValues()