aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs2
-rw-r--r--OpenSim/Framework/AvatarWearable.cs3
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs31
-rw-r--r--OpenSim/Framework/MainServer.cs9
-rw-r--r--OpenSim/Framework/RegionInfo.cs1
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
6 files changed, 46 insertions, 4 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index d0a22b2..69e1ae6 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -231,7 +231,7 @@ namespace OpenSim.Framework
231 231
232 protected virtual void SetDefaultParams() 232 protected virtual void SetDefaultParams()
233 { 233 {
234 m_visualparams = new byte[] { 56,23,66,0,0,25,0,124,107,0,0,91,137,36,180,79,78,20,32,255,0,63,137,137,63,122,0,71,127,94,63,0,150,150,150,17,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,78,0,0,0,0,0,0,0,0,0,145,216,133,0,0,0,219,107,150,150,165,135,0,150,150,150,63,112,155,150,150,150,150,150,150,150,150,150,150,150,0,0,0,0,188,255,91,219,124,0,150,127,165,127,127,127,127,59,63,107,71,68,89,33,79,114,178,127,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,0,85,131,117,127,147,163,104,0,140,18,0,107,130,0,150,150,198,0,0,40,38,91,165,209,198,127,127,153,204,51,51,150,150,255,204,0,150,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,22,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; 234 m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 };
235// for (int i = 0; i < VISUALPARAM_COUNT; i++) 235// for (int i = 0; i < VISUALPARAM_COUNT; i++)
236// { 236// {
237// m_visualparams[i] = 150; 237// m_visualparams[i] = 150;
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index efec50b..0809ab6 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -221,9 +221,6 @@ namespace OpenSim.Framework
221 { 221 {
222 get 222 get
223 { 223 {
224 if (defaultWearables != null)
225 return defaultWearables;
226
227 defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these 224 defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
228 for (int i = 0; i < MAX_WEARABLES; i++) 225 for (int i = 0; i < MAX_WEARABLES; i++)
229 { 226 {
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index 7eb289b..07de27a 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -32,6 +32,7 @@ using System.Collections.Generic;
32using System.Diagnostics; 32using System.Diagnostics;
33using System.Reflection; 33using System.Reflection;
34using System.Text; 34using System.Text;
35using System.Text.RegularExpressions;
35using System.Threading; 36using System.Threading;
36using OpenMetaverse; 37using OpenMetaverse;
37using Nini.Config; 38using Nini.Config;
@@ -62,6 +63,7 @@ namespace OpenSim.Framework.Console
62 new Dictionary<UUID, ConsoleConnection>(); 63 new Dictionary<UUID, ConsoleConnection>();
63 private string m_UserName = String.Empty; 64 private string m_UserName = String.Empty;
64 private string m_Password = String.Empty; 65 private string m_Password = String.Empty;
66 private string m_AllowedOrigin = String.Empty;
65 67
66 public RemoteConsole(string defaultPrompt) : base(defaultPrompt) 68 public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
67 { 69 {
@@ -77,6 +79,7 @@ namespace OpenSim.Framework.Console
77 79
78 m_UserName = netConfig.GetString("ConsoleUser", String.Empty); 80 m_UserName = netConfig.GetString("ConsoleUser", String.Empty);
79 m_Password = netConfig.GetString("ConsolePass", String.Empty); 81 m_Password = netConfig.GetString("ConsolePass", String.Empty);
82 m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty);
80 } 83 }
81 84
82 public void SetServer(IHttpServer server) 85 public void SetServer(IHttpServer server)
@@ -150,6 +153,29 @@ namespace OpenSim.Framework.Console
150 return cmdinput; 153 return cmdinput;
151 } 154 }
152 155
156 private Hashtable CheckOrigin(Hashtable result)
157 {
158 if (!string.IsNullOrEmpty(m_AllowedOrigin))
159 result["access_control_allow_origin"] = m_AllowedOrigin;
160 return result;
161 }
162 /* TODO: Figure out how PollServiceHTTPHandler can access the request headers
163 * in order to use m_AllowedOrigin as a regular expression
164 private Hashtable CheckOrigin(Hashtable headers, Hashtable result)
165 {
166 if (!string.IsNullOrEmpty(m_AllowedOrigin))
167 {
168 if (headers.ContainsKey("origin"))
169 {
170 string origin = headers["origin"].ToString();
171 if (Regex.IsMatch(origin, m_AllowedOrigin))
172 result["access_control_allow_origin"] = origin;
173 }
174 }
175 return result;
176 }
177 */
178
153 private void DoExpire() 179 private void DoExpire()
154 { 180 {
155 List<UUID> expired = new List<UUID>(); 181 List<UUID> expired = new List<UUID>();
@@ -235,6 +261,7 @@ namespace OpenSim.Framework.Console
235 reply["str_response_string"] = xmldoc.InnerXml; 261 reply["str_response_string"] = xmldoc.InnerXml;
236 reply["int_response_code"] = 200; 262 reply["int_response_code"] = 200;
237 reply["content_type"] = "text/xml"; 263 reply["content_type"] = "text/xml";
264 reply = CheckOrigin(reply);
238 265
239 return reply; 266 return reply;
240 } 267 }
@@ -289,6 +316,7 @@ namespace OpenSim.Framework.Console
289 reply["str_response_string"] = xmldoc.InnerXml; 316 reply["str_response_string"] = xmldoc.InnerXml;
290 reply["int_response_code"] = 200; 317 reply["int_response_code"] = 200;
291 reply["content_type"] = "text/xml"; 318 reply["content_type"] = "text/xml";
319 reply = CheckOrigin(reply);
292 320
293 return reply; 321 return reply;
294 } 322 }
@@ -344,6 +372,7 @@ namespace OpenSim.Framework.Console
344 reply["str_response_string"] = xmldoc.InnerXml; 372 reply["str_response_string"] = xmldoc.InnerXml;
345 reply["int_response_code"] = 200; 373 reply["int_response_code"] = 200;
346 reply["content_type"] = "text/xml"; 374 reply["content_type"] = "text/xml";
375 reply = CheckOrigin(reply);
347 376
348 return reply; 377 return reply;
349 } 378 }
@@ -457,6 +486,7 @@ namespace OpenSim.Framework.Console
457 result["content_type"] = "application/xml"; 486 result["content_type"] = "application/xml";
458 result["keepalive"] = false; 487 result["keepalive"] = false;
459 result["reusecontext"] = false; 488 result["reusecontext"] = false;
489 result = CheckOrigin(result);
460 490
461 return result; 491 return result;
462 } 492 }
@@ -480,6 +510,7 @@ namespace OpenSim.Framework.Console
480 result["content_type"] = "text/xml"; 510 result["content_type"] = "text/xml";
481 result["keepalive"] = false; 511 result["keepalive"] = false;
482 result["reusecontext"] = false; 512 result["reusecontext"] = false;
513 result = CheckOrigin(result);
483 514
484 return result; 515 return result;
485 } 516 }
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs
index 1f5f208..8ccabec 100644
--- a/OpenSim/Framework/MainServer.cs
+++ b/OpenSim/Framework/MainServer.cs
@@ -27,6 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using System.Net;
30using log4net; 31using log4net;
31using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Framework.Servers.HttpServer;
32 33
@@ -48,6 +49,11 @@ namespace OpenSim.Framework
48 49
49 public static IHttpServer GetHttpServer(uint port) 50 public static IHttpServer GetHttpServer(uint port)
50 { 51 {
52 return GetHttpServer(port,null);
53 }
54
55 public static IHttpServer GetHttpServer(uint port, IPAddress ipaddr)
56 {
51 if (port == 0) 57 if (port == 0)
52 return Instance; 58 return Instance;
53 if (instance != null && port == Instance.Port) 59 if (instance != null && port == Instance.Port)
@@ -58,6 +64,9 @@ namespace OpenSim.Framework
58 64
59 m_Servers[port] = new BaseHttpServer(port); 65 m_Servers[port] = new BaseHttpServer(port);
60 66
67 if (ipaddr != null )
68 m_Servers[port].ListenIPAddress = ipaddr;
69
61 m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); 70 m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
62 m_Servers[port].Start(); 71 m_Servers[port].Start();
63 72
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 73b8bd0..680e702 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -42,6 +42,7 @@ namespace OpenSim.Framework
42{ 42{
43 public class RegionLightShareData : ICloneable 43 public class RegionLightShareData : ICloneable
44 { 44 {
45 public bool valid = false;
45 public UUID regionID = UUID.Zero; 46 public UUID regionID = UUID.Zero;
46 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f); 47 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
47 public float waterFogDensityExponent = 4.0f; 48 public float waterFogDensityExponent = 4.0f;
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 0c1e5e0..3c58a7d 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1450,6 +1450,10 @@ namespace OpenSim.Framework.Servers.HttpServer
1450 if (responsedata.ContainsKey("reusecontext")) 1450 if (responsedata.ContainsKey("reusecontext"))
1451 response.ReuseContext = (bool) responsedata["reusecontext"]; 1451 response.ReuseContext = (bool) responsedata["reusecontext"];
1452 1452
1453 // Cross-Origin Resource Sharing with simple requests
1454 if (responsedata.ContainsKey("access_control_allow_origin"))
1455 response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]);
1456
1453 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this 1457 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
1454 //and should check for NullReferenceExceptions 1458 //and should check for NullReferenceExceptions
1455 1459