aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs2
-rw-r--r--OpenSim/Framework/WebUtil.cs21
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs35
6 files changed, 32 insertions, 34 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index a626b82..28fe3ba 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -462,7 +462,7 @@ namespace OpenSim.Framework
462 } 462 }
463 catch (IndexOutOfRangeException e) 463 catch (IndexOutOfRangeException e)
464 { 464 {
465 m_log.WarnFormat("[CHILD AGENT DATA]: scrtips list is shorter than object list."); 465 m_log.WarnFormat("[CHILD AGENT DATA]: scripts list is shorter than object list.");
466 } 466 }
467 467
468 attObjs.Add(info); 468 attObjs.Add(info);
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index d04a3df..e77b88b 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -140,24 +140,19 @@ namespace OpenSim.Framework
140 /// PUT JSON-encoded data to a web service that returns LLSD or 140 /// PUT JSON-encoded data to a web service that returns LLSD or
141 /// JSON data 141 /// JSON data
142 /// </summary> 142 /// </summary>
143 public static OSDMap PutToService(string url, OSDMap data) 143 public static OSDMap PutToService(string url, OSDMap data, int timeout)
144 { 144 {
145 return ServiceOSDRequest(url,data,"PUT", 20000); 145 return ServiceOSDRequest(url,data, "PUT", timeout);
146 }
147
148 public static OSDMap PostToService(string url, OSDMap data)
149 {
150 return PostToService(url, data, 20000);
151 } 146 }
152 147
153 public static OSDMap PostToService(string url, OSDMap data, int timeout) 148 public static OSDMap PostToService(string url, OSDMap data, int timeout)
154 { 149 {
155 return ServiceOSDRequest(url,data,"POST", timeout); 150 return ServiceOSDRequest(url, data, "POST", timeout);
156 } 151 }
157 152
158 public static OSDMap GetFromService(string url) 153 public static OSDMap GetFromService(string url, int timeout)
159 { 154 {
160 return ServiceOSDRequest(url,null,"GET", 20000); 155 return ServiceOSDRequest(url, null, "GET", timeout);
161 } 156 }
162 157
163 public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) 158 public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout)
@@ -182,9 +177,9 @@ namespace OpenSim.Framework
182 // If there is some input, write it into the request 177 // If there is some input, write it into the request
183 if (data != null) 178 if (data != null)
184 { 179 {
185 string strBuffer = OSDParser.SerializeJsonString(data); 180 string strBuffer = OSDParser.SerializeJsonString(data);
186 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); 181 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer);
187 182
188 request.ContentType = "application/json"; 183 request.ContentType = "application/json";
189 request.ContentLength = buffer.Length; //Count bytes to send 184 request.ContentLength = buffer.Length; //Count bytes to send
190 using (Stream requestStream = request.GetRequestStream()) 185 using (Stream requestStream = request.GetRequestStream())
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 5564067..391b1a1 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
179 return true; 179 return true;
180 180
181 // else do the remote thing 181 // else do the remote thing
182 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 182 if (!m_localBackend.IsLocalRegion(destination.RegionID))
183 { 183 {
184 return m_remoteConnector.CreateAgent(destination, aCircuit, teleportFlags, out reason); 184 return m_remoteConnector.CreateAgent(destination, aCircuit, teleportFlags, out reason);
185 } 185 }
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
241 return true; 241 return true;
242 242
243 // else do the remote thing 243 // else do the remote thing
244 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 244 if (!m_localBackend.IsLocalRegion(destination.RegionID))
245 return m_remoteConnector.QueryAccess(destination, id, position, out version, out reason); 245 return m_remoteConnector.QueryAccess(destination, id, position, out version, out reason);
246 246
247 return false; 247 return false;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cdf8366..553b575 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1077,7 +1077,7 @@ namespace OpenSim.Region.Framework.Scenes
1077 // and it has already rezzed the attachments and started their scripts. 1077 // and it has already rezzed the attachments and started their scripts.
1078 // We do the following only for non-login agents, because their scripts 1078 // We do the following only for non-login agents, because their scripts
1079 // haven't started yet. 1079 // haven't started yet.
1080 if (wasChild) 1080 if (wasChild && Attachments != null && Attachments.Count > 0)
1081 { 1081 {
1082 m_log.DebugFormat("[SCENE PRESENCE]: Restarting scripts in attachments..."); 1082 m_log.DebugFormat("[SCENE PRESENCE]: Restarting scripts in attachments...");
1083 // Resume scripts 1083 // Resume scripts
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 1aa3282..bc0bc54 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -306,7 +306,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
306 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 306 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
307 args["teleport_flags"] = OSD.FromString(flags.ToString()); 307 args["teleport_flags"] = OSD.FromString(flags.ToString());
308 308
309 OSDMap result = WebUtil.PostToService(uri,args); 309 OSDMap result = WebUtil.PostToService(uri, args, 20000);
310 if (result["Success"].AsBoolean()) 310 if (result["Success"].AsBoolean())
311 { 311 {
312 OSDMap unpacked = (OSDMap)result["_Result"]; 312 OSDMap unpacked = (OSDMap)result["_Result"];
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 6ce0a47..0ad9121 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Services.Connectors.Simulation
102 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 102 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
103 args["teleport_flags"] = OSD.FromString(flags.ToString()); 103 args["teleport_flags"] = OSD.FromString(flags.ToString());
104 104
105 OSDMap result = WebUtil.PostToService(uri, args, 5000); 105 OSDMap result = WebUtil.PostToService(uri, args, 20000);
106 if (result["Success"].AsBoolean()) 106 if (result["Success"].AsBoolean())
107 return true; 107 return true;
108 108
@@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Simulation
126 /// </summary> 126 /// </summary>
127 public bool UpdateAgent(GridRegion destination, AgentData data) 127 public bool UpdateAgent(GridRegion destination, AgentData data)
128 { 128 {
129 return UpdateAgent(destination, (IAgentData)data); 129 return UpdateAgent(destination, (IAgentData)data, 200000); // yes, 200 seconds
130 } 130 }
131 131
132 /// <summary> 132 /// <summary>
@@ -181,7 +181,7 @@ namespace OpenSim.Services.Connectors.Simulation
181 } 181 }
182 } 182 }
183 183
184 UpdateAgent(destination,(IAgentData)pos); 184 UpdateAgent(destination, (IAgentData)pos, 10000);
185 } 185 }
186 186
187 // unreachable 187 // unreachable
@@ -191,7 +191,7 @@ namespace OpenSim.Services.Connectors.Simulation
191 /// <summary> 191 /// <summary>
192 /// This is the worker function to send AgentData to a neighbor region 192 /// This is the worker function to send AgentData to a neighbor region
193 /// </summary> 193 /// </summary>
194 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData) 194 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout)
195 { 195 {
196 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent start"); 196 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent start");
197 197
@@ -207,7 +207,7 @@ namespace OpenSim.Services.Connectors.Simulation
207 args["destination_name"] = OSD.FromString(destination.RegionName); 207 args["destination_name"] = OSD.FromString(destination.RegionName);
208 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 208 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
209 209
210 OSDMap result = WebUtil.PutToService(uri,args); 210 OSDMap result = WebUtil.PutToService(uri, args, timeout);
211 return result["Success"].AsBoolean(); 211 return result["Success"].AsBoolean();
212 } 212 }
213 catch (Exception e) 213 catch (Exception e)
@@ -233,7 +233,7 @@ namespace OpenSim.Services.Connectors.Simulation
233 233
234 try 234 try
235 { 235 {
236 OSDMap result = WebUtil.GetFromService(uri); 236 OSDMap result = WebUtil.GetFromService(uri, 10000);
237 if (result["Success"].AsBoolean()) 237 if (result["Success"].AsBoolean())
238 { 238 {
239 // OSDMap args = Util.GetOSDMap(result["_RawResult"].AsString()); 239 // OSDMap args = Util.GetOSDMap(result["_RawResult"].AsString());
@@ -275,27 +275,30 @@ namespace OpenSim.Services.Connectors.Simulation
275 try 275 try
276 { 276 {
277 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000); 277 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
278 OSDMap data = (OSDMap)result["_Result"];
279
280 bool success = result["success"].AsBoolean(); 278 bool success = result["success"].AsBoolean();
281 reason = data["reason"].AsString(); 279 if (result.ContainsKey("_Result"))
282 if (data["version"] != null && data["version"].AsString() != string.Empty) 280 {
283 version = data["version"].AsString(); 281 OSDMap data = (OSDMap)result["_Result"];
284 282
285 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString()); 283 reason = data["reason"].AsString();
284 if (data["version"] != null && data["version"].AsString() != string.Empty)
285 version = data["version"].AsString();
286
287 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
288 }
286 289
287 if (!success) 290 if (!success)
288 { 291 {
289 if (data.ContainsKey("Message")) 292 if (result.ContainsKey("Message"))
290 { 293 {
291 string message = data["Message"].AsString(); 294 string message = result["Message"].AsString();
292 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region 295 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
293 { 296 {
294 m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored"); 297 m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored");
295 return true; 298 return true;
296 } 299 }
297 300
298 reason = data["Message"]; 301 reason = result["Message"];
299 } 302 }
300 else 303 else
301 { 304 {
@@ -401,7 +404,7 @@ namespace OpenSim.Services.Connectors.Simulation
401 args["destination_name"] = OSD.FromString(destination.RegionName); 404 args["destination_name"] = OSD.FromString(destination.RegionName);
402 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 405 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
403 406
404 WebUtil.PostToService(uri, args); 407 WebUtil.PostToService(uri, args, 40000);
405 } 408 }
406 catch (Exception e) 409 catch (Exception e)
407 { 410 {