aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs42
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs14
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs1
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs1
5 files changed, 50 insertions, 10 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index e1f90b6..80d58e1 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -26,6 +26,8 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
30using System.IO;
29using System.Reflection; 31using System.Reflection;
30using Nini.Config; 32using Nini.Config;
31using log4net; 33using log4net;
@@ -60,6 +62,13 @@ namespace OpenSim.Services.AssetService
60 "delete asset", 62 "delete asset",
61 "delete asset <ID>", 63 "delete asset <ID>",
62 "Delete asset from database", HandleDeleteAsset); 64 "Delete asset from database", HandleDeleteAsset);
65
66 MainConsole.Instance.Commands.AddCommand("kfs", false,
67 "dump asset",
68 "dump asset <ID>",
69 "Dump asset to a file",
70 "The filename is the same as the ID given.",
71 HandleDumpAsset);
63 72
64 if (m_AssetLoader != null) 73 if (m_AssetLoader != null)
65 { 74 {
@@ -189,6 +198,39 @@ namespace OpenSim.Services.AssetService
189 198
190 return false; 199 return false;
191 } 200 }
201
202 void HandleDumpAsset(string module, string[] args)
203 {
204 if (args.Length < 3)
205 {
206 MainConsole.Instance.Output("Usage is dump asset <ID>");
207 return;
208 }
209
210 string rawAssetId = args[2];
211 UUID assetId;
212
213 if (!UUID.TryParse(rawAssetId, out assetId))
214 {
215 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
216 return;
217 }
218
219 AssetBase asset = m_Database.GetAsset(assetId);
220 if (asset == null)
221 {
222 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
223 return;
224 }
225
226 using (FileStream fs = new FileStream(rawAssetId, FileMode.CreateNew))
227 {
228 using (BinaryWriter bw = new BinaryWriter(fs))
229 {
230 bw.Write(asset.Data);
231 }
232 }
233 }
192 234
193 void HandleShowDigest(string module, string[] args) 235 void HandleShowDigest(string module, string[] args)
194 { 236 {
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 8ab323a..0430ef6 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -314,7 +314,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
314 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 314 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
315 args["teleport_flags"] = OSD.FromString(flags.ToString()); 315 args["teleport_flags"] = OSD.FromString(flags.ToString());
316 316
317 OSDMap result = WebUtil.PostToService(uri,args); 317 OSDMap result = WebUtil.PostToService(uri, args, 20000);
318 if (result["Success"].AsBoolean()) 318 if (result["Success"].AsBoolean())
319 { 319 {
320 OSDMap unpacked = (OSDMap)result["_Result"]; 320 OSDMap unpacked = (OSDMap)result["_Result"];
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 5cb8269..cef6473 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); 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());
@@ -392,7 +392,7 @@ namespace OpenSim.Services.Connectors.Simulation
392 args["destination_name"] = OSD.FromString(destination.RegionName); 392 args["destination_name"] = OSD.FromString(destination.RegionName);
393 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 393 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
394 394
395 WebUtil.PostToService(uri, args); 395 WebUtil.PostToService(uri, args, 40000);
396 } 396 }
397 catch (Exception e) 397 catch (Exception e)
398 { 398 {
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index ebd6f7c..ddc8855 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -32,7 +32,6 @@ using System.Net;
32using System.Reflection; 32using System.Reflection;
33 33
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Capabilities;
36using OpenSim.Services.Interfaces; 35using OpenSim.Services.Interfaces;
37using GridRegion = OpenSim.Services.Interfaces.GridRegion; 36using GridRegion = OpenSim.Services.Interfaces.GridRegion;
38using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; 37using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 9bcc3dd..2ca2d15 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -38,7 +38,6 @@ using Nini.Config;
38using OpenMetaverse; 38using OpenMetaverse;
39 39
40using OpenSim.Framework; 40using OpenSim.Framework;
41using OpenSim.Framework.Capabilities;
42using OpenSim.Framework.Console; 41using OpenSim.Framework.Console;
43using OpenSim.Server.Base; 42using OpenSim.Server.Base;
44using OpenSim.Services.Interfaces; 43using OpenSim.Services.Interfaces;