aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2018-10-19 04:03:52 +0100
committerUbitUmarov2018-10-19 04:03:52 +0100
commit190e7433cc75b5913849c8c53bd3e49febb3714b (patch)
treebc1c6a638ed4b671a79996782b8a7819599a5cb0 /OpenSim/Region/ClientStack
parent add initial test support for cap LSLSyntax. This does not seem to work for O... (diff)
downloadopensim-SC-190e7433cc75b5913849c8c53bd3e49febb3714b.zip
opensim-SC-190e7433cc75b5913849c8c53bd3e49febb3714b.tar.gz
opensim-SC-190e7433cc75b5913849c8c53bd3e49febb3714b.tar.bz2
opensim-SC-190e7433cc75b5913849c8c53bd3e49febb3714b.tar.xz
fix typos
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index 8c7fb56..200a1c1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -77,8 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden
77 private string m_GridName = string.Empty; 77 private string m_GridName = string.Empty;
78 private string m_GridURL = string.Empty; 78 private string m_GridURL = string.Empty;
79 79
80 static private UUID m_scriptSyntaxeID = UUID.Zero; 80 static private UUID m_scriptSyntaxID = UUID.Zero;
81 static private string m_scriptSyntaxeXML; 81 static private string m_scriptSyntaxXML;
82 private bool m_doScriptSyntax; 82 private bool m_doScriptSyntax;
83 83
84 #region ISharedRegionModule Members 84 #region ISharedRegionModule Members
@@ -86,7 +86,7 @@ namespace OpenSim.Region.ClientStack.Linden
86 public void Initialise(IConfigSource source) 86 public void Initialise(IConfigSource source)
87 { 87 {
88 IConfig config = source.Configs["SimulatorFeatures"]; 88 IConfig config = source.Configs["SimulatorFeatures"];
89 m_doScriptSyntax = false; 89 m_doScriptSyntax = true;
90 if (config != null) 90 if (config != null)
91 { 91 {
92 // 92 //
@@ -109,10 +109,10 @@ namespace OpenSim.Region.ClientStack.Linden
109 if (m_GridName == string.Empty) 109 if (m_GridName == string.Empty)
110 m_GridName = Util.GetConfigVarFromSections<string>( 110 m_GridName = Util.GetConfigVarFromSections<string>(
111 source, "gridname", new string[] { "GridInfo", "SimulatorFeatures" }, String.Empty); 111 source, "gridname", new string[] { "GridInfo", "SimulatorFeatures" }, String.Empty);
112 m_doScriptSyntax = config.GetBoolean("ScriptSyntaxe", m_doScriptSyntax); 112 m_doScriptSyntax = config.GetBoolean("ScriptSyntax", m_doScriptSyntax);
113 } 113 }
114 114
115 ReadScriptSyntaxe(); 115 ReadScriptSyntax();
116 AddDefaultFeatures(); 116 AddDefaultFeatures();
117 } 117 }
118 118
@@ -168,8 +168,8 @@ namespace OpenSim.Region.ClientStack.Linden
168 typesMap["prim"] = true; 168 typesMap["prim"] = true;
169 m_features["PhysicsShapeTypes"] = typesMap; 169 m_features["PhysicsShapeTypes"] = typesMap;
170 170
171 if(m_doScriptSyntax && m_scriptSyntaxeID != UUID.Zero) 171 if(m_doScriptSyntax && m_scriptSyntaxID != UUID.Zero)
172 m_features["LSLSyntaxId"] = OSD.FromUUID(m_scriptSyntaxeID); 172 m_features["LSLSyntaxId"] = OSD.FromUUID(m_scriptSyntaxID);
173 173
174 // Extra information for viewers that want to use it 174 // Extra information for viewers that want to use it
175 // TODO: Take these out of here into their respective modules, like map-server-url 175 // TODO: Take these out of here into their respective modules, like map-server-url
@@ -209,11 +209,11 @@ namespace OpenSim.Region.ClientStack.Linden
209 "SimulatorFeatures", agentID.ToString()); 209 "SimulatorFeatures", agentID.ToString());
210 caps.RegisterHandler("SimulatorFeatures", reqHandler); 210 caps.RegisterHandler("SimulatorFeatures", reqHandler);
211 211
212 if (m_doScriptSyntax && m_scriptSyntaxeID != UUID.Zero && !String.IsNullOrEmpty(m_scriptSyntaxeXML)) 212 if (m_doScriptSyntax && m_scriptSyntaxID != UUID.Zero && !String.IsNullOrEmpty(m_scriptSyntaxXML))
213 { 213 {
214 IRequestHandler sreqHandler = new RestHTTPHandler( 214 IRequestHandler sreqHandler = new RestHTTPHandler(
215 "GET", "/CAPS/" + UUID.Random(), 215 "GET", "/CAPS/" + UUID.Random(),
216 x => { return HandleSyntaxeRequest(x, agentID); }, 216 x => { return HandleSyntaxRequest(x, agentID); },
217 "LSLSyntax", agentID.ToString()); 217 "LSLSyntax", agentID.ToString());
218 caps.RegisterHandler("LSLSyntax", sreqHandler); 218 caps.RegisterHandler("LSLSyntax", sreqHandler);
219 } 219 }
@@ -278,11 +278,11 @@ namespace OpenSim.Region.ClientStack.Linden
278 return responsedata; 278 return responsedata;
279 } 279 }
280 280
281 private Hashtable HandleSyntaxeRequest(Hashtable mDhttpMethod, UUID agentID) 281 private Hashtable HandleSyntaxRequest(Hashtable mDhttpMethod, UUID agentID)
282 { 282 {
283 Hashtable responsedata = new Hashtable(); 283 Hashtable responsedata = new Hashtable();
284 responsedata["int_response_code"] = 200; 284 responsedata["int_response_code"] = 200;
285 responsedata["str_response_string"] = m_scriptSyntaxeXML; 285 responsedata["str_response_string"] = m_scriptSyntaxXML;
286 return responsedata; 286 return responsedata;
287 } 287 }
288 288
@@ -328,22 +328,22 @@ namespace OpenSim.Region.ClientStack.Linden
328 return url; 328 return url;
329 } 329 }
330 330
331 private void ReadScriptSyntaxe() 331 private void ReadScriptSyntax()
332 { 332 {
333 if(!m_doScriptSyntax || m_scriptSyntaxeID != UUID.Zero) 333 if(!m_doScriptSyntax || m_scriptSyntaxID != UUID.Zero)
334 return; 334 return;
335 335
336 if(!File.Exists("ScriptSyntaxe.xml")) 336 if(!File.Exists("ScriptSyntax.xml"))
337 return; 337 return;
338 338
339 try 339 try
340 { 340 {
341 using (StreamReader sr = File.OpenText("ScriptSyntaxe.xml")) 341 using (StreamReader sr = File.OpenText("ScriptSyntax.xml"))
342 { 342 {
343 string version = sr.ReadLine(); 343 string version = sr.ReadLine();
344 if(string.IsNullOrEmpty(version)) 344 if(string.IsNullOrEmpty(version))
345 return; 345 return;
346 if(!UUID.TryParse(version, out m_scriptSyntaxeID)) 346 if(!UUID.TryParse(version, out m_scriptSyntaxID))
347 return; 347 return;
348 348
349 StringBuilder sb = new StringBuilder(400*1024); 349 StringBuilder sb = new StringBuilder(400*1024);
@@ -356,14 +356,14 @@ namespace OpenSim.Region.ClientStack.Linden
356 continue; 356 continue;
357 sb.Append(s); 357 sb.Append(s);
358 } 358 }
359 m_scriptSyntaxeXML = sb.ToString(); 359 m_scriptSyntaxXML = sb.ToString();
360 } 360 }
361 } 361 }
362 catch 362 catch
363 { 363 {
364 m_log.Error("[SIMULATOR FEATURES MODULE] fail read ScriptSyntaxe.xml file"); 364 m_log.Error("[SIMULATOR FEATURES MODULE] fail read ScriptSyntax.xml file");
365 m_scriptSyntaxeID = UUID.Zero; 365 m_scriptSyntaxID = UUID.Zero;
366 m_scriptSyntaxeXML = ""; 366 m_scriptSyntaxXML = "";
367 } 367 }
368 } 368 }
369 } 369 }