aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-02 19:17:02 -0400
committerJonathan Freedman2010-10-02 19:17:02 -0400
commit32ccc7a9d912543c0a5d3f8db839734194f3d8dd (patch)
tree9822d8a2ea479b4a8d26ae7cc4df0124db201c56 /OpenSim/Services
parentSo, the client can have an old idea of the object properties for the object w... (diff)
downloadopensim-SC_OLD-32ccc7a9d912543c0a5d3f8db839734194f3d8dd.zip
opensim-SC_OLD-32ccc7a9d912543c0a5d3f8db839734194f3d8dd.tar.gz
opensim-SC_OLD-32ccc7a9d912543c0a5d3f8db839734194f3d8dd.tar.bz2
opensim-SC_OLD-32ccc7a9d912543c0a5d3f8db839734194f3d8dd.tar.xz
* refactor refactor refactor ServerURI 4 lyfe
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs31
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs45
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs14
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs8
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs8
9 files changed, 51 insertions, 66 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 479a80e..89a8f7a 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -108,8 +108,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
108 } 108 }
109 109
110 hash = (Hashtable)response.Value; 110 hash = (Hashtable)response.Value;
111 //foreach (Object o in hash) 111 foreach (Object o in hash)
112 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 112 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
113 try 113 try
114 { 114 {
115 bool success = false; 115 bool success = false;
@@ -117,16 +117,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
117 if (success) 117 if (success)
118 { 118 {
119 UUID.TryParse((string)hash["uuid"], out regionID); 119 UUID.TryParse((string)hash["uuid"], out regionID);
120 //m_log.Debug(">> HERE, uuid: " + uuid); 120 m_log.Debug(">> HERE, uuid: " + regionID);
121 if ((string)hash["handle"] != null) 121 if ((string)hash["handle"] != null)
122 { 122 {
123 realHandle = Convert.ToUInt64((string)hash["handle"]); 123 realHandle = Convert.ToUInt64((string)hash["handle"]);
124 //m_log.Debug(">> HERE, realHandle: " + realHandle); 124 m_log.Debug(">> HERE, realHandle: " + realHandle);
125 } 125 }
126 if (hash["region_image"] != null) 126 if (hash["region_image"] != null) {
127 imageURL = (string)hash["region_image"]; 127 imageURL = (string)hash["region_image"];
128 if (hash["external_name"] != null) 128 m_log.Debug(">> HERE, imageURL: " + imageURL);
129 }
130 if (hash["external_name"] != null) {
129 externalName = (string)hash["external_name"]; 131 externalName = (string)hash["external_name"];
132 m_log.Debug(">> HERE, externalName: " + externalName);
133 }
130 } 134 }
131 135
132 } 136 }
@@ -208,8 +212,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
208 } 212 }
209 213
210 hash = (Hashtable)response.Value; 214 hash = (Hashtable)response.Value;
211 //foreach (Object o in hash) 215 foreach (Object o in hash)
212 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 216 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
213 try 217 try
214 { 218 {
215 bool success = false; 219 bool success = false;
@@ -219,38 +223,41 @@ namespace OpenSim.Services.Connectors.Hypergrid
219 GridRegion region = new GridRegion(); 223 GridRegion region = new GridRegion();
220 224
221 UUID.TryParse((string)hash["uuid"], out region.RegionID); 225 UUID.TryParse((string)hash["uuid"], out region.RegionID);
222 //m_log.Debug(">> HERE, uuid: " + region.RegionID); 226 m_log.Debug(">> HERE, uuid: " + region.RegionID);
223 int n = 0; 227 int n = 0;
224 if (hash["x"] != null) 228 if (hash["x"] != null)
225 { 229 {
226 Int32.TryParse((string)hash["x"], out n); 230 Int32.TryParse((string)hash["x"], out n);
227 region.RegionLocX = n; 231 region.RegionLocX = n;
228 //m_log.Debug(">> HERE, x: " + region.RegionLocX); 232 m_log.Debug(">> HERE, x: " + region.RegionLocX);
229 } 233 }
230 if (hash["y"] != null) 234 if (hash["y"] != null)
231 { 235 {
232 Int32.TryParse((string)hash["y"], out n); 236 Int32.TryParse((string)hash["y"], out n);
233 region.RegionLocY = n; 237 region.RegionLocY = n;
234 //m_log.Debug(">> HERE, y: " + region.RegionLocY); 238 m_log.Debug(">> HERE, y: " + region.RegionLocY);
235 } 239 }
236 if (hash["region_name"] != null) 240 if (hash["region_name"] != null)
237 { 241 {
238 region.RegionName = (string)hash["region_name"]; 242 region.RegionName = (string)hash["region_name"];
239 //m_log.Debug(">> HERE, name: " + region.RegionName); 243 m_log.Debug(">> HERE, region_name: " + region.RegionName);
240 } 244 }
241 if (hash["hostname"] != null) 245 if (hash["hostname"] != null)
242 region.ExternalHostName = (string)hash["hostname"]; 246 region.ExternalHostName = (string)hash["hostname"];
247 m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
243 if (hash["http_port"] != null) 248 if (hash["http_port"] != null)
244 { 249 {
245 uint p = 0; 250 uint p = 0;
246 UInt32.TryParse((string)hash["http_port"], out p); 251 UInt32.TryParse((string)hash["http_port"], out p);
247 region.HttpPort = p; 252 region.HttpPort = p;
253 m_log.Debug(">> HERE, http_port: " + region.HttpPort);
248 } 254 }
249 if (hash["internal_port"] != null) 255 if (hash["internal_port"] != null)
250 { 256 {
251 int p = 0; 257 int p = 0;
252 Int32.TryParse((string)hash["internal_port"], out p); 258 Int32.TryParse((string)hash["internal_port"], out p);
253 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); 259 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
260 m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
254 } 261 }
255 262
256 // Successful return 263 // Successful return
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 8143b5a..4b25ac8 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -84,8 +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 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; 87 XmlRpcResponse response = request.Send(info.ServerURI, 10000);
88 XmlRpcResponse response = request.Send(uri, 10000);
89 if (response.IsFault) 88 if (response.IsFault)
90 { 89 {
91 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);
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index 0a982f8..9c57a40 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -87,7 +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 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/"; 90 string uri = region.ServerURI + "/region/" + thisRegion.RegionID + "/";
91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); 91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
92 92
93 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 4409d5c..0a9f230 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -145,8 +145,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
145 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 145 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
146 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 146 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
147 147
148 string httpAddress = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/";
149
150 OSDMap extraData = new OSDMap 148 OSDMap extraData = new OSDMap
151 { 149 {
152 { "ServerURI", OSD.FromString(regionInfo.ServerURI) }, 150 { "ServerURI", OSD.FromString(regionInfo.ServerURI) },
@@ -168,7 +166,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
168 { "Name", regionInfo.RegionName }, 166 { "Name", regionInfo.RegionName },
169 { "MinPosition", minPosition.ToString() }, 167 { "MinPosition", minPosition.ToString() },
170 { "MaxPosition", maxPosition.ToString() }, 168 { "MaxPosition", maxPosition.ToString() },
171 { "Address", httpAddress }, 169 { "Address", regionInfo.ServerURI },
172 { "Enabled", "1" }, 170 { "Enabled", "1" },
173 { "ExtraData", OSDParser.SerializeJsonString(extraData) } 171 { "ExtraData", OSDParser.SerializeJsonString(extraData) }
174 }; 172 };
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index a5f748f..07839d3 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -104,24 +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 108
126 //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri); 109 //Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
127 110
@@ -277,16 +260,7 @@ namespace OpenSim.Services.Connectors.Simulation
277 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) 260 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
278 { 261 {
279 // Eventually, we want to use a caps url instead of the agentID 262 // Eventually, we want to use a caps url instead of the agentID
280 string uri = string.Empty; 263 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); 264 //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
291 265
292 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri); 266 HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
@@ -385,7 +359,7 @@ namespace OpenSim.Services.Connectors.Simulation
385 { 359 {
386 agent = null; 360 agent = null;
387 // Eventually, we want to use a caps url instead of the agentID 361 // Eventually, we want to use a caps url instead of the agentID
388 string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 362 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
389 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); 363 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
390 364
391 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 365 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
@@ -479,16 +453,7 @@ namespace OpenSim.Services.Connectors.Simulation
479 453
480 public bool CloseAgent(GridRegion destination, UUID id) 454 public bool CloseAgent(GridRegion destination, UUID id)
481 { 455 {
482 string uri = string.Empty; 456 string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
483 try
484 {
485 uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
486 }
487 catch (Exception e)
488 {
489 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
490 return false;
491 }
492 457
493 //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri); 458 //Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
494 459
@@ -538,7 +503,7 @@ namespace OpenSim.Services.Connectors.Simulation
538 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 503 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
539 { 504 {
540 string uri 505 string uri
541 = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 506 = destination.ServerURI + ObjectPath() + sog.UUID + "/";
542 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 507 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
543 508
544 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 509 WebRequest ObjectCreateRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index b86fb6f..757ae80 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>",
@@ -200,10 +200,16 @@ namespace OpenSim.Services.GridService
200 } 200 }
201 201
202 202
203 // From the command line and the 2 above
204 public bool TryCreateLink(UUID scopeID, int xloc, int yloc, 203 public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
205 string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason) 204 string externalRegionName, uint externalPort, string externalHostName, out GridRegion regInfo, out string reason)
206 { 205 {
206 TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, regInfo, reason);
207 }
208
209 // From the command line and the 2 above
210 public bool TryCreateLink(UUID scopeID, int xloc, int yloc,
211 string externalRegionName, uint externalPort, string externalHostName, string serverURI, out GridRegion regInfo, out string reason)
212 {
207 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); 213 m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc);
208 214
209 reason = string.Empty; 215 reason = string.Empty;
@@ -509,12 +515,16 @@ namespace OpenSim.Services.GridService
509 int xloc, yloc; 515 int xloc, yloc;
510 uint externalPort; 516 uint externalPort;
511 string externalHostName; 517 string externalHostName;
518 string serverURI;
512 try 519 try
513 { 520 {
514 xloc = Convert.ToInt32(cmdparams[0]); 521 xloc = Convert.ToInt32(cmdparams[0]);
515 yloc = Convert.ToInt32(cmdparams[1]); 522 yloc = Convert.ToInt32(cmdparams[1]);
516 externalPort = Convert.ToUInt32(cmdparams[3]); 523 externalPort = Convert.ToUInt32(cmdparams[3]);
517 externalHostName = cmdparams[2]; 524 externalHostName = cmdparams[2];
525 if ( cmdparams.Length == 4 ) {
526
527 }
518 //internalPort = Convert.ToUInt32(cmdparams[4]); 528 //internalPort = Convert.ToUInt32(cmdparams[4]);
519 //remotingPort = Convert.ToUInt32(cmdparams[5]); 529 //remotingPort = Convert.ToUInt32(cmdparams[5]);
520 } 530 }
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 8acd618..4653b31 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -145,13 +145,13 @@ namespace OpenSim.Services.HypergridService
145 region.RegionLocY = finalDestination.RegionLocY; 145 region.RegionLocY = finalDestination.RegionLocY;
146 146
147 // Generate a new service session 147 // Generate a new service session
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 148 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 150
151 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); 151 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
152 bool success = false; 152 bool success = false;
153 string myExternalIP = string.Empty; 153 string myExternalIP = string.Empty;
154 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 154 string gridName = gatekeeper.ServerURI;
155 if (m_GridName == gridName) 155 if (m_GridName == gridName)
156 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 156 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
157 else 157 else
@@ -160,7 +160,7 @@ namespace OpenSim.Services.HypergridService
160 if (!success) 160 if (!success)
161 { 161 {
162 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}",
163 agentCircuit.firstname, agentCircuit.lastname, region.ExternalHostName + ":" + region.HttpPort, reason); 163 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
164 164
165 // restore the old travel info 165 // restore the old travel info
166 lock (m_TravelingAgents) 166 lock (m_TravelingAgents)
@@ -206,7 +206,7 @@ namespace OpenSim.Services.HypergridService
206 m_TravelingAgents[agentCircuit.SessionID] = travel; 206 m_TravelingAgents[agentCircuit.SessionID] = travel;
207 } 207 }
208 travel.UserID = agentCircuit.AgentID; 208 travel.UserID = agentCircuit.AgentID;
209 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort; 209 travel.GridExternalName = region.ServerURI;
210 travel.ServiceToken = agentCircuit.ServiceSessionID; 210 travel.ServiceToken = agentCircuit.ServiceSessionID;
211 if (old != null) 211 if (old != null)
212 travel.ClientIPAddress = old.ClientIPAddress; 212 travel.ClientIPAddress = old.ClientIPAddress;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 77230a3..bf441e6 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -116,7 +116,13 @@ namespace OpenSim.Services.Interfaces
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get { return m_serverURI; }
119 set { m_serverURI = value; } 119 set {
120 if ( value.EndsWith("/") ) {
121 m_serverURI = value;
122 } else {
123 m_serverURI = value + '/';
124 }
125 }
120 } 126 }
121 protected string m_serverURI; 127 protected string m_serverURI;
122 128