aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs14
-rw-r--r--OpenSim/Services/Connectors/Land/LandServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs22
-rw-r--r--OpenSim/Services/Interfaces/IAttachmentsService.cs17
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs8
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs8
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs6
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs6
11 files changed, 90 insertions, 9 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index c426bba..6f159a0 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -87,7 +87,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
87 paramList.Add(hash); 87 paramList.Add(hash);
88 88
89 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); 89 XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
90 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; 90 IPEndPoint ext = info.ExternalEndPoint;
91 string uri = "";
92 if (ext != null)
93 {
94 uri = "http://" + ext.Address + ":" + info.HttpPort + "/";
95 }
91 //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); 96 //m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
92 XmlRpcResponse response = null; 97 XmlRpcResponse response = null;
93 try 98 try
@@ -189,7 +194,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
189 paramList.Add(hash); 194 paramList.Add(hash);
190 195
191 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); 196 XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
192 string uri = "http://" + gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"; 197 IPEndPoint ext = gatekeeper.ExternalEndPoint;
198 string uri = "";
199 if (ext != null)
200 {
201 uri = "http://" + ext.Address + ":" + gatekeeper.HttpPort + "/";
202 }
193 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); 203 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
194 XmlRpcResponse response = null; 204 XmlRpcResponse response = null;
195 try 205 try
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
index 06bc11c..0223a77 100644
--- a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServiceConnector.cs
@@ -83,6 +83,8 @@ namespace OpenSim.Services.Connectors
83 if (info != null) // just to be sure 83 if (info != null) // just to be sure
84 { 84 {
85 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 85 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
86
87 //Possible nullref from info.externalendpoint will be caught here
86 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; 88 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/";
87 XmlRpcResponse response = request.Send(uri, 10000); 89 XmlRpcResponse response = request.Send(uri, 10000);
88 if (response.IsFault) 90 if (response.IsFault)
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
index 0a982f8..daf0439 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
@@ -87,7 +87,9 @@ 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 IPEndPoint ext = region.ExternalEndPoint;
91 if (ext == null) return false;
92 string uri = "http://" + ext.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
91 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri); 93 //m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
92 94
93 WebRequest HelloNeighbourRequest = WebRequest.Create(uri); 95 WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs
index 41ebeaf..9f86078 100644
--- a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs
@@ -300,6 +300,14 @@ namespace OpenSim.Services.Connectors
300 { 300 {
301 pinfo = new PresenceInfo((Dictionary<string, object>)replyData["result"]); 301 pinfo = new PresenceInfo((Dictionary<string, object>)replyData["result"]);
302 } 302 }
303 else
304 {
305 m_log.DebugFormat("[PRESENCE CONNECTOR]: Invalid reply (result not dictionary) received from presence server when querying for sessionID {0}", sessionID.ToString());
306 }
307 }
308 else
309 {
310 m_log.DebugFormat("[PRESENCE CONNECTOR]: Invalid reply received from presence server when querying for sessionID {0}", sessionID.ToString());
303 } 311 }
304 312
305 return pinfo; 313 return pinfo;
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index db9027a..6a61da6 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -105,6 +105,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
105 105
106 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 106 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
107 { 107 {
108 IPEndPoint ext = regionInfo.ExternalEndPoint;
109 if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint";
108 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 110 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
109 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 111 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
110 112
@@ -115,7 +117,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
115 { "ServerURI", OSD.FromString(regionInfo.ServerURI) }, 117 { "ServerURI", OSD.FromString(regionInfo.ServerURI) },
116 { "InternalAddress", OSD.FromString(regionInfo.InternalEndPoint.Address.ToString()) }, 118 { "InternalAddress", OSD.FromString(regionInfo.InternalEndPoint.Address.ToString()) },
117 { "InternalPort", OSD.FromInteger(regionInfo.InternalEndPoint.Port) }, 119 { "InternalPort", OSD.FromInteger(regionInfo.InternalEndPoint.Port) },
118 { "ExternalAddress", OSD.FromString(regionInfo.ExternalEndPoint.Address.ToString()) }, 120 { "ExternalAddress", OSD.FromString(ext.Address.ToString()) },
119 { "ExternalPort", OSD.FromInteger(regionInfo.ExternalEndPoint.Port) }, 121 { "ExternalPort", OSD.FromInteger(regionInfo.ExternalEndPoint.Port) },
120 { "MapTexture", OSD.FromUUID(regionInfo.TerrainImage) }, 122 { "MapTexture", OSD.FromUUID(regionInfo.TerrainImage) },
121 { "Access", OSD.FromInteger(regionInfo.Access) }, 123 { "Access", OSD.FromInteger(regionInfo.Access) },
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 32f02fb..0947b5f 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -348,9 +348,11 @@ namespace OpenSim.Services.Connectors.Simulation
348 348
349 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) 349 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
350 { 350 {
351 IPEndPoint ext = destination.ExternalEndPoint;
351 agent = null; 352 agent = null;
353 if (ext == null) return false;
352 // Eventually, we want to use a caps url instead of the agentID 354 // Eventually, we want to use a caps url instead of the agentID
353 string uri = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; 355 string uri = "http://" + ext.Address + ":" + destination.HttpPort + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
354 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri); 356 //Console.WriteLine(" >>> DoRetrieveRootAgentCall <<< " + uri);
355 357
356 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); 358 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
@@ -442,7 +444,7 @@ namespace OpenSim.Services.Connectors.Simulation
442 return true; 444 return true;
443 } 445 }
444 446
445 public bool CloseAgent(GridRegion destination, UUID id) 447 private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
446 { 448 {
447 string uri = string.Empty; 449 string uri = string.Empty;
448 try 450 try
@@ -459,6 +461,8 @@ namespace OpenSim.Services.Connectors.Simulation
459 461
460 WebRequest request = WebRequest.Create(uri); 462 WebRequest request = WebRequest.Create(uri);
461 request.Method = "DELETE"; 463 request.Method = "DELETE";
464 if (ChildOnly)
465 request.Method += "CHILD";
462 request.Timeout = 10000; 466 request.Timeout = 10000;
463 467
464 StreamReader sr = null; 468 StreamReader sr = null;
@@ -491,6 +495,16 @@ namespace OpenSim.Services.Connectors.Simulation
491 return true; 495 return true;
492 } 496 }
493 497
498 public bool CloseChildAgent(GridRegion destination, UUID id)
499 {
500 return CloseAgent(destination, id, true);
501 }
502
503 public bool CloseAgent(GridRegion destination, UUID id)
504 {
505 return CloseAgent(destination, id, false);
506 }
507
494 #endregion Agents 508 #endregion Agents
495 509
496 #region Objects 510 #region Objects
@@ -502,8 +516,10 @@ namespace OpenSim.Services.Connectors.Simulation
502 516
503 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 517 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall)
504 { 518 {
519 IPEndPoint ext = destination.ExternalEndPoint;
520 if (ext == null) return false;
505 string uri 521 string uri
506 = "http://" + destination.ExternalEndPoint.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/"; 522 = "http://" + ext.Address + ":" + destination.HttpPort + ObjectPath() + sog.UUID + "/";
507 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri); 523 //m_log.Debug(" >>> DoCreateObjectCall <<< " + uri);
508 524
509 WebRequest ObjectCreateRequest = WebRequest.Create(uri); 525 WebRequest ObjectCreateRequest = WebRequest.Create(uri);
diff --git a/OpenSim/Services/Interfaces/IAttachmentsService.cs b/OpenSim/Services/Interfaces/IAttachmentsService.cs
new file mode 100644
index 0000000..bdde369
--- /dev/null
+++ b/OpenSim/Services/Interfaces/IAttachmentsService.cs
@@ -0,0 +1,17 @@
1////////////////////////////////////////////////////////////////
2//
3// (c) 2009, 2010 Careminster Limited and Melanie Thielker
4//
5// All rights reserved
6//
7using System;
8using Nini.Config;
9
10namespace OpenSim.Services.Interfaces
11{
12 public interface IAttachmentsService
13 {
14 string Get(string id);
15 void Store(string id, string data);
16 }
17}
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index e55b633..94cee57 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -259,9 +259,13 @@ namespace OpenSim.Services.Interfaces
259 } 259 }
260 catch (SocketException e) 260 catch (SocketException e)
261 { 261 {
262 throw new Exception( 262 /*throw new Exception(
263 "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + 263 "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" +
264 e + "' attached to this exception", e); 264 e + "' attached to this exception", e);*/
265 // Don't throw a fatal exception here, instead, return Null and handle it in the caller.
266 // Reason is, on systems such as OSgrid it has occured that known hostnames stop
267 // resolving and thus make surrounding regions crash out with this exception.
268 return null;
265 } 269 }
266 270
267 return new IPEndPoint(ia, m_internalEndPoint.Port); 271 return new IPEndPoint(ia, m_internalEndPoint.Port);
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 67d7cbe..33d6fde 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -71,6 +71,14 @@ namespace OpenSim.Services.Interfaces
71 bool ReleaseAgent(UUID originRegion, UUID id, string uri); 71 bool ReleaseAgent(UUID originRegion, UUID id, string uri);
72 72
73 /// <summary> 73 /// <summary>
74 /// Close child agent.
75 /// </summary>
76 /// <param name="regionHandle"></param>
77 /// <param name="id"></param>
78 /// <returns></returns>
79 bool CloseChildAgent(GridRegion destination, UUID id);
80
81 /// <summary>
74 /// Close agent. 82 /// Close agent.
75 /// </summary> 83 /// </summary>
76 /// <param name="regionHandle"></param> 84 /// <param name="regionHandle"></param>
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 54d53fb..6a2cbeb 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Services.LLLoginService
57 public static LLFailedLoginResponse InventoryProblem; 57 public static LLFailedLoginResponse InventoryProblem;
58 public static LLFailedLoginResponse DeadRegionProblem; 58 public static LLFailedLoginResponse DeadRegionProblem;
59 public static LLFailedLoginResponse LoginBlockedProblem; 59 public static LLFailedLoginResponse LoginBlockedProblem;
60 public static LLFailedLoginResponse UnverifiedAccountProblem;
60 public static LLFailedLoginResponse AlreadyLoggedInProblem; 61 public static LLFailedLoginResponse AlreadyLoggedInProblem;
61 public static LLFailedLoginResponse InternalError; 62 public static LLFailedLoginResponse InternalError;
62 63
@@ -80,6 +81,10 @@ namespace OpenSim.Services.LLLoginService
80 LoginBlockedProblem = new LLFailedLoginResponse("presence", 81 LoginBlockedProblem = new LLFailedLoginResponse("presence",
81 "Logins are currently restricted. Please try again later.", 82 "Logins are currently restricted. Please try again later.",
82 "false"); 83 "false");
84 UnverifiedAccountProblem = new LLFailedLoginResponse("presence",
85 "Your account has not yet been verified. Please check " +
86 "your email and click the provided link.",
87 "false");
83 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", 88 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence",
84 "You appear to be already logged in. " + 89 "You appear to be already logged in. " +
85 "If this is not the case please wait for your session to timeout. " + 90 "If this is not the case please wait for your session to timeout. " +
@@ -322,6 +327,7 @@ namespace OpenSim.Services.LLLoginService
322 private void FillOutRegionData(GridRegion destination) 327 private void FillOutRegionData(GridRegion destination)
323 { 328 {
324 IPEndPoint endPoint = destination.ExternalEndPoint; 329 IPEndPoint endPoint = destination.ExternalEndPoint;
330 if (endPoint == null) return;
325 SimAddress = endPoint.Address.ToString(); 331 SimAddress = endPoint.Address.ToString();
326 SimPort = (uint)endPoint.Port; 332 SimPort = (uint)endPoint.Port;
327 RegionX = (uint)destination.RegionLocX; 333 RegionX = (uint)destination.RegionLocX;
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 00fffff..5c12a54 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -223,6 +223,12 @@ namespace OpenSim.Services.LLLoginService
223 return LLFailedLoginResponse.UserProblem; 223 return LLFailedLoginResponse.UserProblem;
224 } 224 }
225 225
226 if (account.UserLevel < 0)
227 {
228 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account");
229 return LLFailedLoginResponse.UnverifiedAccountProblem;
230 }
231
226 if (account.UserLevel < m_MinLoginLevel) 232 if (account.UserLevel < m_MinLoginLevel)
227 { 233 {
228 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); 234 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel);