aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Clients/RegionClient.cs16
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs5
-rw-r--r--OpenSim/Framework/IRegionCommsListener.cs3
-rw-r--r--OpenSim/Framework/IScene.cs2
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs3
-rw-r--r--OpenSim/Framework/RegionCommsListener.cs13
-rw-r--r--OpenSim/Framework/Util.cs26
7 files changed, 37 insertions, 31 deletions
diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs
index 73e2db0..3419ce2 100644
--- a/OpenSim/Framework/Communications/Clients/RegionClient.cs
+++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs
@@ -35,6 +35,8 @@ using System.Text;
35using OpenMetaverse; 35using OpenMetaverse;
36using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
37 37
38using GridRegion = OpenSim.Services.Interfaces.GridRegion;
39
38using log4net; 40using log4net;
39 41
40namespace OpenSim.Framework.Communications.Clients 42namespace OpenSim.Framework.Communications.Clients
@@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Clients
43 { 45 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 47
46 public bool DoCreateChildAgentCall(RegionInfo region, AgentCircuitData aCircuit, string authKey, out string reason) 48 public bool DoCreateChildAgentCall(GridRegion region, AgentCircuitData aCircuit, string authKey, out string reason)
47 { 49 {
48 reason = String.Empty; 50 reason = String.Empty;
49 51
@@ -166,7 +168,7 @@ namespace OpenSim.Framework.Communications.Clients
166 168
167 } 169 }
168 170
169 public bool DoChildAgentUpdateCall(RegionInfo region, IAgentData cAgentData) 171 public bool DoChildAgentUpdateCall(GridRegion region, IAgentData cAgentData)
170 { 172 {
171 // Eventually, we want to use a caps url instead of the agentID 173 // Eventually, we want to use a caps url instead of the agentID
172 string uri = string.Empty; 174 string uri = string.Empty;
@@ -260,7 +262,7 @@ namespace OpenSim.Framework.Communications.Clients
260 return true; 262 return true;
261 } 263 }
262 264
263 public bool DoRetrieveRootAgentCall(RegionInfo region, UUID id, out IAgentData agent) 265 public bool DoRetrieveRootAgentCall(GridRegion region, UUID id, out IAgentData agent)
264 { 266 {
265 agent = null; 267 agent = null;
266 // Eventually, we want to use a caps url instead of the agentID 268 // Eventually, we want to use a caps url instead of the agentID
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Communications.Clients
348 } 350 }
349 351
350 352
351 public bool DoCloseAgentCall(RegionInfo region, UUID id) 353 public bool DoCloseAgentCall(GridRegion region, UUID id)
352 { 354 {
353 string uri = string.Empty; 355 string uri = string.Empty;
354 try 356 try
@@ -391,7 +393,7 @@ namespace OpenSim.Framework.Communications.Clients
391 return true; 393 return true;
392 } 394 }
393 395
394 public bool DoCreateObjectCall(RegionInfo region, ISceneObject sog, string sogXml2, bool allowScriptCrossing) 396 public bool DoCreateObjectCall(GridRegion region, ISceneObject sog, string sogXml2, bool allowScriptCrossing)
395 { 397 {
396 ulong regionHandle = GetRegionHandle(region.RegionHandle); 398 ulong regionHandle = GetRegionHandle(region.RegionHandle);
397 string uri 399 string uri
@@ -474,7 +476,7 @@ namespace OpenSim.Framework.Communications.Clients
474 476
475 } 477 }
476 478
477 public bool DoCreateObjectCall(RegionInfo region, UUID userID, UUID itemID) 479 public bool DoCreateObjectCall(GridRegion region, UUID userID, UUID itemID)
478 { 480 {
479 ulong regionHandle = GetRegionHandle(region.RegionHandle); 481 ulong regionHandle = GetRegionHandle(region.RegionHandle);
480 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + UUID.Zero + "/" + regionHandle.ToString() + "/"; 482 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + UUID.Zero + "/" + regionHandle.ToString() + "/";
@@ -646,7 +648,7 @@ namespace OpenSim.Framework.Communications.Clients
646 return false; 648 return false;
647 } 649 }
648 650
649 public virtual void SendUserInformation(RegionInfo regInfo, AgentCircuitData aCircuit) 651 public virtual void SendUserInformation(GridRegion regInfo, AgentCircuitData aCircuit)
650 { 652 {
651 } 653 }
652 654
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index e9a6adb..9f377a6 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -59,11 +59,6 @@ namespace OpenSim.Framework.Communications
59 } 59 }
60 protected IMessagingService m_messageService; 60 protected IMessagingService m_messageService;
61 61
62 public IGridServices GridService
63 {
64 get { return m_gridService; }
65 }
66 protected IGridServices m_gridService;
67 62
68 public UserProfileCacheService UserProfileCacheService 63 public UserProfileCacheService UserProfileCacheService
69 { 64 {
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs
index ba4c616..307c6bc 100644
--- a/OpenSim/Framework/IRegionCommsListener.cs
+++ b/OpenSim/Framework/IRegionCommsListener.cs
@@ -46,8 +46,6 @@ namespace OpenSim.Framework
46 46
47 public delegate bool CloseAgentConnection(UUID agentID); 47 public delegate bool CloseAgentConnection(UUID agentID);
48 48
49 public delegate bool RegionUp(RegionInfo region);
50
51 public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData); 49 public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData);
52 50
53 public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message); 51 public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message);
@@ -65,7 +63,6 @@ namespace OpenSim.Framework
65 event AcknowledgePrimCross OnAcknowledgePrimCrossed; 63 event AcknowledgePrimCross OnAcknowledgePrimCrossed;
66 event UpdateNeighbours OnNeighboursUpdate; 64 event UpdateNeighbours OnNeighboursUpdate;
67 event CloseAgentConnection OnCloseAgentConnection; 65 event CloseAgentConnection OnCloseAgentConnection;
68 event RegionUp OnRegionUp;
69 event ChildAgentUpdate OnChildAgentUpdate; 66 event ChildAgentUpdate OnChildAgentUpdate;
70 event LogOffUser OnLogOffUser; 67 event LogOffUser OnLogOffUser;
71 event GetLandData OnGetLandData; 68 event GetLandData OnGetLandData;
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 2e2c703..d61e08c 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Framework
74 void CloseAllAgents(uint circuitcode); 74 void CloseAllAgents(uint circuitcode);
75 75
76 void Restart(int seconds); 76 void Restart(int seconds);
77 bool OtherRegionUp(RegionInfo thisRegion); 77 //RegionInfo OtherRegionUp(RegionInfo thisRegion);
78 78
79 string GetSimulatorVersion(); 79 string GetSimulatorVersion();
80 80
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs
index 3b00af3..7e66742 100644
--- a/OpenSim/Framework/NetworkServersInfo.cs
+++ b/OpenSim/Framework/NetworkServersInfo.cs
@@ -102,8 +102,7 @@ namespace OpenSim.Framework
102 ConfigSettings.DefaultInventoryServerHttpPort.ToString()); 102 ConfigSettings.DefaultInventoryServerHttpPort.ToString());
103 secureInventoryServer = config.Configs["Network"].GetBoolean("secure_inventory_server", true); 103 secureInventoryServer = config.Configs["Network"].GetBoolean("secure_inventory_server", true);
104 104
105 MessagingURL = config.Configs["Network"].GetString("messaging_server_url", 105 MessagingURL = config.Configs["Network"].GetString("messaging_server_url", string.Empty);
106 "http://127.0.0.1:" + ConfigSettings.DefaultMessageServerHttpPort);
107 } 106 }
108 } 107 }
109} 108}
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs
index 016c78c..90200d6 100644
--- a/OpenSim/Framework/RegionCommsListener.cs
+++ b/OpenSim/Framework/RegionCommsListener.cs
@@ -47,7 +47,6 @@ namespace OpenSim.Framework
47 private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser 47 private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser
48 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate; 48 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate;
49 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; 49 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
50 private RegionUp handlerRegionUp = null; // OnRegionUp;
51 private LogOffUser handlerLogOffUser = null; 50 private LogOffUser handlerLogOffUser = null;
52 private GetLandData handlerGetLandData = null; 51 private GetLandData handlerGetLandData = null;
53 52
@@ -62,7 +61,6 @@ namespace OpenSim.Framework
62 public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed; 61 public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
63 public event AcknowledgePrimCross OnAcknowledgePrimCrossed; 62 public event AcknowledgePrimCross OnAcknowledgePrimCrossed;
64 public event CloseAgentConnection OnCloseAgentConnection; 63 public event CloseAgentConnection OnCloseAgentConnection;
65 public event RegionUp OnRegionUp;
66 public event ChildAgentUpdate OnChildAgentUpdate; 64 public event ChildAgentUpdate OnChildAgentUpdate;
67 public event LogOffUser OnLogOffUser; 65 public event LogOffUser OnLogOffUser;
68 public event GetLandData OnGetLandData; 66 public event GetLandData OnGetLandData;
@@ -108,17 +106,6 @@ namespace OpenSim.Framework
108 return false; 106 return false;
109 } 107 }
110 108
111 public virtual bool TriggerRegionUp(RegionInfo region)
112 {
113 handlerRegionUp = OnRegionUp;
114 if (handlerRegionUp != null)
115 {
116 handlerRegionUp(region);
117 return true;
118 }
119 return false;
120 }
121
122 public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData) 109 public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData)
123 { 110 {
124 handlerChildAgentUpdate = OnChildAgentUpdate; 111 handlerChildAgentUpdate = OnChildAgentUpdate;
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 45b5a10..a28a617 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1203,6 +1203,32 @@ namespace OpenSim.Framework
1203 return found.ToArray(); 1203 return found.ToArray();
1204 } 1204 }
1205 1205
1206 public static string ServerURI(string uri)
1207 {
1208 if (uri == string.Empty)
1209 return string.Empty;
1210
1211 // Get rid of eventual slashes at the end
1212 uri = uri.TrimEnd('/');
1213
1214 IPAddress ipaddr1 = null;
1215 string port1 = "";
1216 try
1217 {
1218 ipaddr1 = Util.GetHostFromURL(uri);
1219 }
1220 catch { }
1221
1222 try
1223 {
1224 port1 = uri.Split(new char[] { ':' })[2];
1225 }
1226 catch { }
1227
1228 // We tried our best to convert the domain names to IP addresses
1229 return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
1230 }
1231
1206 #region FireAndForget Threading Pattern 1232 #region FireAndForget Threading Pattern
1207 1233
1208 public static void FireAndForget(System.Threading.WaitCallback callback) 1234 public static void FireAndForget(System.Threading.WaitCallback callback)