From 5b69872655792bd75f7caa528c773efe5923a6e5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Sep 2012 06:51:49 -0700 Subject: Made a method of GridUserService virtual so it can be overridden. --- OpenSim/Services/UserAccountService/GridUserService.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index ac3d8fd..43fa04b 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -49,7 +49,7 @@ namespace OpenSim.Services.UserAccountService m_log.Debug("[USER GRID SERVICE]: Starting user grid service"); } - public GridUserInfo GetGridUserInfo(string userID) + public virtual GridUserInfo GetGridUserInfo(string userID) { GridUserData d = m_Database.Get(userID); @@ -122,17 +122,6 @@ namespace OpenSim.Services.UserAccountService return m_Database.Store(d); } - protected bool StoreGridUserInfo(GridUserInfo info) - { - GridUserData d = new GridUserData(); - - d.Data["HomeRegionID"] = info.HomeRegionID.ToString(); - d.Data["HomePosition"] = info.HomePosition.ToString(); - d.Data["HomeLookAt"] = info.HomeLookAt.ToString(); - - return m_Database.Store(d); - } - public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) { GridUserData d = m_Database.Get(userID); -- cgit v1.1 From 531edd51d82ecd6a842a2611c99e9919634491ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Sep 2012 07:22:55 -0700 Subject: Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow. Thanks R.Gunther (rigun@rigutech.nl) https://lists.berlios.de/pipermail/opensim-users/2012-September/010986.html --- OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs | 1 + OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 1 + OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 1 + .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 6 +++++- OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index 5c50936..089e878 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs @@ -77,6 +77,7 @@ namespace OpenSim.Services.Connectors public virtual string Helo() { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); + req.Proxy = null; // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 2f263ae..8cd2daa 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -125,6 +125,7 @@ namespace OpenSim.Services.Connectors.Hypergrid AgentCreateRequest.Method = "POST"; AgentCreateRequest.ContentType = "application/json"; AgentCreateRequest.Timeout = 10000; + AgentCreateRequest.Proxy = null; //AgentCreateRequest.KeepAlive = false; //AgentCreateRequest.Headers.Add("Authorization", authKey); diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 7429293..07142bf 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -107,6 +107,7 @@ namespace OpenSim.Services.Connectors helloNeighbourRequest.Method = "POST"; helloNeighbourRequest.ContentType = "application/json"; helloNeighbourRequest.Timeout = 10000; + helloNeighbourRequest.Proxy = null; // Fill it in OSDMap args = null; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 6bfc5cc..2b00b4d 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -184,6 +184,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); request.Method = "HEAD"; + request.Proxy = null; using (WebResponse response = request.GetResponse()) { @@ -339,7 +340,8 @@ namespace OpenSim.Services.Connectors.SimianGrid // Simian does not require the asset ID to be in the URL because it's in the post data. // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString()); - + request.Proxy = null; + HttpWebResponse response = MultipartForm.Post(request, postParameters); using (Stream responseStream = response.GetResponseStream()) { @@ -427,6 +429,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "DELETE"; + request.Proxy = null; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { @@ -460,6 +463,7 @@ namespace OpenSim.Services.Connectors.SimianGrid try { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); + request.Proxy = null; using (WebResponse response = request.GetResponse()) { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs index 93fdae3..730d1da 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs @@ -212,6 +212,7 @@ namespace OpenSim.Region.OptionalModules.Simian HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); request.Timeout = 20000; request.ReadWriteTimeout = 5000; + request.Proxy = null; using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) { -- cgit v1.1 From 91a5c602e313b96ffaf1d50b7f0d2923a2e141ba Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Sep 2012 07:48:03 -0700 Subject: Revert "Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow." But the patch is here, in case anyone wants to try it. This reverts commit 531edd51d82ecd6a842a2611c99e9919634491ef. --- OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs | 1 - OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 1 - OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 1 - .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 6 +----- OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index 089e878..5c50936 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs @@ -77,7 +77,6 @@ namespace OpenSim.Services.Connectors public virtual string Helo() { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); - req.Proxy = null; // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 8cd2daa..2f263ae 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -125,7 +125,6 @@ namespace OpenSim.Services.Connectors.Hypergrid AgentCreateRequest.Method = "POST"; AgentCreateRequest.ContentType = "application/json"; AgentCreateRequest.Timeout = 10000; - AgentCreateRequest.Proxy = null; //AgentCreateRequest.KeepAlive = false; //AgentCreateRequest.Headers.Add("Authorization", authKey); diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 07142bf..7429293 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -107,7 +107,6 @@ namespace OpenSim.Services.Connectors helloNeighbourRequest.Method = "POST"; helloNeighbourRequest.ContentType = "application/json"; helloNeighbourRequest.Timeout = 10000; - helloNeighbourRequest.Proxy = null; // Fill it in OSDMap args = null; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 2b00b4d..6bfc5cc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -184,7 +184,6 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); request.Method = "HEAD"; - request.Proxy = null; using (WebResponse response = request.GetResponse()) { @@ -340,8 +339,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // Simian does not require the asset ID to be in the URL because it's in the post data. // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString()); - request.Proxy = null; - + HttpWebResponse response = MultipartForm.Post(request, postParameters); using (Stream responseStream = response.GetResponseStream()) { @@ -429,7 +427,6 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "DELETE"; - request.Proxy = null; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { @@ -463,7 +460,6 @@ namespace OpenSim.Services.Connectors.SimianGrid try { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); - request.Proxy = null; using (WebResponse response = request.GetResponse()) { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs index 730d1da..93fdae3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs @@ -212,7 +212,6 @@ namespace OpenSim.Region.OptionalModules.Simian HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); request.Timeout = 20000; request.ReadWriteTimeout = 5000; - request.Proxy = null; using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) { -- cgit v1.1