diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 202d1993f8..4473ee0e09 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -852,7 +852,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["success"] = true; responseData["region_name"] = region.RegionName; responseData["region_id"] = region.RegionID.ToString(); - responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012 m_log.Info("[RADMIN]: CreateRegion: request complete"); } @@ -2015,29 +2014,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController { return; } - #region Deprecate July 2012 - //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!! - else if (requestData.ContainsKey("regionid") && - !String.IsNullOrEmpty((string)requestData["regionid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("region_ID") && - !String.IsNullOrEmpty((string)requestData["region_ID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("regionID") && - !String.IsNullOrEmpty((string)requestData["regionID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead"); - } - else if (requestData.ContainsKey("region_uuid") && - !String.IsNullOrEmpty((string)requestData["region_uuid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead"); - } - #endregion else { responseData["accepted"] = false; @@ -2059,56 +2035,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController throw new Exception(String.Format("Region ID {0} not found", regionID)); } } - #region Deprecate July 2012 - else if (requestData.ContainsKey("regionid") && - !String.IsNullOrEmpty((string)requestData["regionid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["regionid"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("region_ID") && - !String.IsNullOrEmpty((string)requestData["region_ID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["region_ID"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("regionID") && - !String.IsNullOrEmpty((string)requestData["regionID"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["regionID"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - else if (requestData.ContainsKey("region_uuid") && - !String.IsNullOrEmpty((string)requestData["region_uuid"])) - { - m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead"); - - UUID regionID = (UUID)(string)requestData["region_uuid"]; - if (!m_application.SceneManager.TryGetScene(regionID, out scene)) - { - responseData["error"] = String.Format("Region ID {0} not found", regionID); - throw new Exception(String.Format("Region ID {0} not found", regionID)); - } - } - #endregion else if (requestData.ContainsKey("region_name") && !String.IsNullOrEmpty((string)requestData["region_name"])) { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs index cb88695600..072bd6f010 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs @@ -312,14 +312,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // Now that everything is setup we can proceed to // add THIS agent to the HTTP server's handler list - if (!AddAgentHandler(Rest.Name,this)) - { - Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); - foreach (IRest handler in handlers) - { - handler.Close(); - } - } + // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will + // have to be handled through the AddHttpHandler interface. +// if (!AddAgentHandler(Rest.Name,this)) +// { +// Rest.Log.ErrorFormat("{0} Unable to activate handler interface", MsgId); +// foreach (IRest handler in handlers) +// { +// handler.Close(); +// } +// } } catch (Exception e) @@ -342,11 +344,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory { Rest.Log.InfoFormat("{0} Plugin is terminating", MsgId); - try - { - RemoveAgentHandler(Rest.Name, this); - } - catch (KeyNotFoundException){} + // FIXME: If this code is ever to be re-enabled (most of it is disabled already) then this will + // have to be handled through the AddHttpHandler interface. +// try +// { +// RemoveAgentHandler(Rest.Name, this); +// } +// catch (KeyNotFoundException){} foreach (IRest handler in handlers) { diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index eb167502b0..a2425b5cf3 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs @@ -297,7 +297,9 @@ namespace OpenSim.ApplicationPlugins.Rest { if (!IsEnabled) return false; _agents.Add(agentName, handler); - return _httpd.AddAgentHandler(agentName, handler); +// return _httpd.AddAgentHandler(agentName, handler); + + return false; } /// @@ -316,7 +318,7 @@ namespace OpenSim.ApplicationPlugins.Rest if (_agents[agentName] == handler) { _agents.Remove(agentName); - return _httpd.RemoveAgentHandler(agentName, handler); +// return _httpd.RemoveAgentHandler(agentName, handler); } return false; } @@ -358,10 +360,10 @@ namespace OpenSim.ApplicationPlugins.Rest _httpd.RemoveStreamHandler(h.HttpMethod, h.Path); } _handlers = null; - foreach (KeyValuePair h in _agents) - { - _httpd.RemoveAgentHandler(h.Key, h.Value); - } +// foreach (KeyValuePair h in _agents) +// { +// _httpd.RemoveAgentHandler(h.Key, h.Value); +// } _agents = null; } diff --git a/OpenSim/Framework/AssetPermissions.cs b/OpenSim/Framework/AssetPermissions.cs new file mode 100644 index 0000000000..4a905c2f5d --- /dev/null +++ b/OpenSim/Framework/AssetPermissions.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Reflection; + +using Nini.Config; +using log4net; + +using OpenMetaverse; + +namespace OpenSim.Framework +{ + public class AssetPermissions + { + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + private bool[] m_DisallowExport, m_DisallowImport; + private string[] m_AssetTypeNames; + + public AssetPermissions(IConfig config) + { + Type enumType = typeof(AssetType); + m_AssetTypeNames = Enum.GetNames(enumType); + for (int i = 0; i < m_AssetTypeNames.Length; i++) + m_AssetTypeNames[i] = m_AssetTypeNames[i].ToLower(); + int n = Enum.GetValues(enumType).Length; + m_DisallowExport = new bool[n]; + m_DisallowImport = new bool[n]; + + LoadPermsFromConfig(config, "DisallowExport", m_DisallowExport); + LoadPermsFromConfig(config, "DisallowImport", m_DisallowImport); + + } + + private void LoadPermsFromConfig(IConfig assetConfig, string variable, bool[] bitArray) + { + if (assetConfig == null) + return; + + string perms = assetConfig.GetString(variable, String.Empty); + string[] parts = perms.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + foreach (string s in parts) + { + int index = Array.IndexOf(m_AssetTypeNames, s.Trim().ToLower()); + if (index >= 0) + bitArray[index] = true; + else + m_log.WarnFormat("[Asset Permissions]: Invalid AssetType {0}", s); + } + + } + + public bool AllowedExport(sbyte type) + { + string assetTypeName = ((AssetType)type).ToString(); + + int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower()); + if (index >= 0 && m_DisallowExport[index]) + { + m_log.DebugFormat("[Asset Permissions]: Export denied: configuration does not allow export of AssetType {0}", assetTypeName); + return false; + } + + return true; + } + + public bool AllowedImport(sbyte type) + { + string assetTypeName = ((AssetType)type).ToString(); + + int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower()); + if (index >= 0 && m_DisallowImport[index]) + { + m_log.DebugFormat("[Asset Permissions]: Import denied: configuration does not allow import of AssetType {0}", assetTypeName); + return false; + } + + return true; + } + + + } +} diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index fc64ff9cee..e7bed6aeb0 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -645,11 +645,11 @@ namespace OpenSim.Framework #region Prim stuff - m_nonphysPrimMin = config.GetFloat("NonphysicalPrimMin", 0); - allKeys.Remove("NonphysicalPrimMin"); + m_nonphysPrimMin = config.GetFloat("NonPhysicalPrimMin", 0); + allKeys.Remove("NonPhysicalPrimMin"); - m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 0); - allKeys.Remove("NonphysicalPrimMax"); + m_nonphysPrimMax = config.GetInt("NonPhysicalPrimMax", 0); + allKeys.Remove("NonPhysicalPrimMax"); m_physPrimMin = config.GetFloat("PhysicalPrimMin", 0); allKeys.Remove("PhysicalPrimMin"); diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 691b45a144..29593e5815 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -54,8 +54,23 @@ namespace OpenSim.Framework.Servers.HttpServer private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); + /// + /// Gets or sets the debug level. + /// + /// + /// See MainServer.DebugLevel. + /// public int DebugLevel { get; set; } + /// + /// Request number for diagnostic purposes. + /// + /// + /// This is an internal number. In some debug situations an external number may also be supplied in the + /// opensim-request-id header but we are not currently logging this. + /// + public int RequestNumber { get; private set; } + private volatile int NotSocketErrors = 0; public volatile bool HTTPDRunning = false; @@ -67,7 +82,7 @@ namespace OpenSim.Framework.Servers.HttpServer protected Dictionary m_llsdHandlers = new Dictionary(); protected Dictionary m_streamHandlers = new Dictionary(); protected Dictionary m_HTTPHandlers = new Dictionary(); - protected Dictionary m_agentHandlers = new Dictionary(); +// protected Dictionary m_agentHandlers = new Dictionary(); protected Dictionary m_pollHandlers = new Dictionary(); @@ -245,29 +260,29 @@ namespace OpenSim.Framework.Servers.HttpServer return new List(m_pollHandlers.Keys); } - // Note that the agent string is provided simply to differentiate - // the handlers - it is NOT required to be an actual agent header - // value. - public bool AddAgentHandler(string agent, IHttpAgentHandler handler) - { - lock (m_agentHandlers) - { - if (!m_agentHandlers.ContainsKey(agent)) - { - m_agentHandlers.Add(agent, handler); - return true; - } - } - - //must already have a handler for that path so return false - return false; - } - - public List GetAgentHandlerKeys() - { - lock (m_agentHandlers) - return new List(m_agentHandlers.Keys); - } +// // Note that the agent string is provided simply to differentiate +// // the handlers - it is NOT required to be an actual agent header +// // value. +// public bool AddAgentHandler(string agent, IHttpAgentHandler handler) +// { +// lock (m_agentHandlers) +// { +// if (!m_agentHandlers.ContainsKey(agent)) +// { +// m_agentHandlers.Add(agent, handler); +// return true; +// } +// } +// +// //must already have a handler for that path so return false +// return false; +// } +// +// public List GetAgentHandlerKeys() +// { +// lock (m_agentHandlers) +// return new List(m_agentHandlers.Keys); +// } public bool AddLLSDHandler(string path, LLSDMethod handler) { @@ -296,6 +311,8 @@ namespace OpenSim.Framework.Servers.HttpServer private void OnRequest(object source, RequestEventArgs args) { + RequestNumber++; + try { IHttpClientContext context = (IHttpClientContext)source; @@ -405,7 +422,6 @@ namespace OpenSim.Framework.Servers.HttpServer string requestMethod = request.HttpMethod; string uriString = request.RawUrl; -// string reqnum = "unknown"; int requestStartTick = Environment.TickCount; // Will be adjusted later on. @@ -422,22 +438,22 @@ namespace OpenSim.Framework.Servers.HttpServer Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); - // This is the REST agent interface. We require an agent to properly identify - // itself. If the REST handler recognizes the prefix it will attempt to - // satisfy the request. If it is not recognizable, and no damage has occurred - // the request can be passed through to the other handlers. This is a low - // probability event; if a request is matched it is normally expected to be - // handled - IHttpAgentHandler agentHandler; - - if (TryGetAgentHandler(request, response, out agentHandler)) - { - if (HandleAgentRequest(agentHandler, request, response)) - { - requestEndTick = Environment.TickCount; - return; - } - } +// // This is the REST agent interface. We require an agent to properly identify +// // itself. If the REST handler recognizes the prefix it will attempt to +// // satisfy the request. If it is not recognizable, and no damage has occurred +// // the request can be passed through to the other handlers. This is a low +// // probability event; if a request is matched it is normally expected to be +// // handled +// IHttpAgentHandler agentHandler; +// +// if (TryGetAgentHandler(request, response, out agentHandler)) +// { +// if (HandleAgentRequest(agentHandler, request, response)) +// { +// requestEndTick = Environment.TickCount; +// return; +// } +// } //response.KeepAlive = true; response.SendChunked = false; @@ -529,8 +545,8 @@ namespace OpenSim.Framework.Servers.HttpServer if (DebugLevel >= 3) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", - request.ContentType, request.HttpMethod, request.Url.PathAndQuery); + "[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}", + RequestNumber, Port, request.ContentType, request.HttpMethod, request.Url.PathAndQuery, request.RemoteIPEndPoint); buffer = HandleHTTPRequest(request, response); break; @@ -541,8 +557,8 @@ namespace OpenSim.Framework.Servers.HttpServer if (DebugLevel >= 3) m_log.DebugFormat( - "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", - request.ContentType, request.HttpMethod, request.Url.PathAndQuery); + "[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}", + RequestNumber, Port, request.ContentType, request.HttpMethod, request.Url.PathAndQuery, request.RemoteIPEndPoint); buffer = HandleLLSDRequests(request, response); break; @@ -620,11 +636,11 @@ namespace OpenSim.Framework.Servers.HttpServer } catch (IOException e) { - m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e); + m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e); } catch (Exception e) { - m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.Message), e); + m_log.Error(String.Format("[BASE HTTP SERVER]: HandleRequest() threw {0} ", e.StackTrace), e); SendHTML500(response); } finally @@ -635,12 +651,21 @@ namespace OpenSim.Framework.Servers.HttpServer if (tickdiff > 3000 && requestHandler.Name != "GetTexture") { m_log.InfoFormat( - "[BASE HTTP SERVER]: Slow handling of {0} {1} {2} {3} from {4} took {5}ms", + "[BASE HTTP SERVER]: Slow handling of {0} {1} {2} {3} {4} from {5} took {6}ms", + RequestNumber, requestMethod, uriString, requestHandler != null ? requestHandler.Name : "", requestHandler != null ? requestHandler.Description : "", - request.RemoteIPEndPoint.ToString(), + request.RemoteIPEndPoint, + tickdiff); + } + else if (DebugLevel >= 4) + { + m_log.DebugFormat( + "[BASE HTTP SERVER]: HTTP IN {0} :{1} took {2}ms", + RequestNumber, + Port, tickdiff); } } @@ -649,30 +674,45 @@ namespace OpenSim.Framework.Servers.HttpServer private void LogIncomingToStreamHandler(OSHttpRequest request, IRequestHandler requestHandler) { m_log.DebugFormat( - "[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}", - request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description); + "[BASE HTTP SERVER]: HTTP IN {0} :{1} stream handler {2} {3} {4} {5} from {6}", + RequestNumber, + Port, + request.HttpMethod, + request.Url.PathAndQuery, + requestHandler.Name, + requestHandler.Description, + request.RemoteIPEndPoint); - if (DebugLevel >= 4) + if (DebugLevel >= 5) LogIncomingInDetail(request); } private void LogIncomingToContentTypeHandler(OSHttpRequest request) { m_log.DebugFormat( - "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", - request.ContentType, request.HttpMethod, request.Url.PathAndQuery); + "[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}", + RequestNumber, + Port, + request.ContentType, + request.HttpMethod, + request.Url.PathAndQuery, + request.RemoteIPEndPoint); - if (DebugLevel >= 4) + if (DebugLevel >= 5) LogIncomingInDetail(request); } private void LogIncomingToXmlRpcHandler(OSHttpRequest request) { m_log.DebugFormat( - "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", - request.HttpMethod, request.Url.PathAndQuery); + "[BASE HTTP SERVER]: HTTP IN {0} :{1} assumed generic XMLRPC request {2} {3} from {4}", + RequestNumber, + Port, + request.HttpMethod, + request.Url.PathAndQuery, + request.RemoteIPEndPoint); - if (DebugLevel >= 4) + if (DebugLevel >= 5) LogIncomingInDetail(request); } @@ -682,7 +722,7 @@ namespace OpenSim.Framework.Servers.HttpServer { string output; - if (DebugLevel == 4) + if (DebugLevel == 5) { const int sampleLength = 80; char[] sampleChars = new char[sampleLength]; @@ -790,24 +830,24 @@ namespace OpenSim.Framework.Servers.HttpServer } } - private bool TryGetAgentHandler(OSHttpRequest request, OSHttpResponse response, out IHttpAgentHandler agentHandler) - { - agentHandler = null; - - lock (m_agentHandlers) - { - foreach (IHttpAgentHandler handler in m_agentHandlers.Values) - { - if (handler.Match(request, response)) - { - agentHandler = handler; - return true; - } - } - } - - return false; - } +// private bool TryGetAgentHandler(OSHttpRequest request, OSHttpResponse response, out IHttpAgentHandler agentHandler) +// { +// agentHandler = null; +// +// lock (m_agentHandlers) +// { +// foreach (IHttpAgentHandler handler in m_agentHandlers.Values) +// { +// if (handler.Match(request, response)) +// { +// agentHandler = handler; +// return true; +// } +// } +// } +// +// return false; +// } /// /// Try all the registered xmlrpc handlers when an xmlrpc request is received. @@ -1778,21 +1818,21 @@ namespace OpenSim.Framework.Servers.HttpServer m_pollHandlers.Remove(path); } - public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) - { - lock (m_agentHandlers) - { - IHttpAgentHandler foundHandler; - - if (m_agentHandlers.TryGetValue(agent, out foundHandler) && foundHandler == handler) - { - m_agentHandlers.Remove(agent); - return true; - } - } - - return false; - } +// public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) +// { +// lock (m_agentHandlers) +// { +// IHttpAgentHandler foundHandler; +// +// if (m_agentHandlers.TryGetValue(agent, out foundHandler) && foundHandler == handler) +// { +// m_agentHandlers.Remove(agent); +// return true; +// } +// } +// +// return false; +// } public void RemoveXmlRPCHandler(string method) { diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs index db58f6f468..0bd3aae7d5 100644 --- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs @@ -41,10 +41,10 @@ namespace OpenSim.Framework.Servers.HttpServer uint Port { get; } bool UseSSL { get; } - // Note that the agent string is provided simply to differentiate - // the handlers - it is NOT required to be an actual agent header - // value. - bool AddAgentHandler(string agent, IHttpAgentHandler handler); +// // Note that the agent string is provided simply to differentiate +// // the handlers - it is NOT required to be an actual agent header +// // value. +// bool AddAgentHandler(string agent, IHttpAgentHandler handler); /// /// Add a handler for an HTTP request. @@ -106,13 +106,13 @@ namespace OpenSim.Framework.Servers.HttpServer bool SetDefaultLLSDHandler(DefaultLLSDMethod handler); - /// - /// Remove the agent if it is registered. - /// - /// - /// - /// - bool RemoveAgentHandler(string agent, IHttpAgentHandler handler); +// /// +// /// Remove the agent if it is registered. +// /// +// /// +// /// +// /// +// bool RemoveAgentHandler(string agent, IHttpAgentHandler handler); /// /// Remove an HTTP handler diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs index 7402c735c1..4b61b18fea 100644 --- a/OpenSim/Framework/Servers/MainServer.cs +++ b/OpenSim/Framework/Servers/MainServer.cs @@ -48,9 +48,12 @@ namespace OpenSim.Framework.Servers /// Control the printing of certain debug messages. /// /// - /// If DebugLevel >= 1, then short warnings are logged when receiving bad input data. - /// If DebugLevel >= 2, then long warnings are logged when receiving bad input data. - /// If DebugLevel >= 3, then short notices about all incoming non-poll HTTP requests are logged. + /// If DebugLevel >= 1 then short warnings are logged when receiving bad input data. + /// If DebugLevel >= 2 then long warnings are logged when receiving bad input data. + /// If DebugLevel >= 3 then short notices about all incoming non-poll HTTP requests are logged. + /// If DebugLevel >= 4 then the time taken to fulfill the request is logged. + /// If DebugLevel >= 5 then the start of the body of incoming non-poll HTTP requests will be logged. + /// If DebugLevel >= 6 then the entire body of incoming non-poll HTTP requests will be logged. /// public static int DebugLevel { @@ -102,7 +105,6 @@ namespace OpenSim.Framework.Servers get { return new Dictionary(m_Servers); } } - public static void RegisterHttpConsoleCommands(ICommandConsole console) { console.Commands.AddCommand( @@ -111,15 +113,20 @@ namespace OpenSim.Framework.Servers "Show all registered http handlers", HandleShowHttpHandlersCommand); console.Commands.AddCommand( - "Debug", false, "debug http", "debug http []", - "Turn on inbound non-poll http request debugging.", - "If level <= 0, then no extra logging is done.\n" - + "If level >= 1, then short warnings are logged when receiving bad input data.\n" - + "If level >= 2, then long warnings are logged when receiving bad input data.\n" - + "If level >= 3, then short notices about all incoming non-poll HTTP requests are logged.\n" - + "If level >= 4, then a sample from the beginning of the incoming data is logged.\n" - + "If level >= 5, then the entire incoming data is logged.\n" - + "If no level is specified then the current level is returned.", + "Debug", false, "debug http", "debug http []", + "Turn on http request logging.", + "If in or all and\n" + + " level <= 0 then no extra logging is done.\n" + + " level >= 1 then short warnings are logged when receiving bad input data.\n" + + " level >= 2 then long warnings are logged when receiving bad input data.\n" + + " level >= 3 then short notices about all incoming non-poll HTTP requests are logged.\n" + + " level >= 4 then the time taken to fulfill the request is logged.\n" + + " level >= 5 then a sample from the beginning of the incoming data is logged.\n" + + " level >= 6 then the entire incoming data is logged.\n" + + " no level is specified then the current level is returned.\n\n" + + "If out or all and\n" + + " level >= 3 then short notices about all outgoing requests going through WebUtil are logged.\n" + + " level >= 4 then the time taken to fulfill the request is logged.\n", HandleDebugHttpCommand); } @@ -127,24 +134,74 @@ namespace OpenSim.Framework.Servers /// Turn on some debugging values for OpenSim. /// /// - private static void HandleDebugHttpCommand(string module, string[] args) + private static void HandleDebugHttpCommand(string module, string[] cmdparams) { - if (args.Length == 3) + if (cmdparams.Length < 3) { - int newDebug; - if (int.TryParse(args[2], out newDebug)) - { - MainServer.DebugLevel = newDebug; - MainConsole.Instance.OutputFormat("Debug http level set to {0}", newDebug); - } + MainConsole.Instance.Output("Usage: debug http 0..6"); + return; } - else if (args.Length == 2) + + bool inReqs = false; + bool outReqs = false; + bool allReqs = false; + + string subCommand = cmdparams[2]; + + if (subCommand.ToLower() == "in") { - MainConsole.Instance.OutputFormat("Current debug http level is {0}", MainServer.DebugLevel); + inReqs = true; + } + else if (subCommand.ToLower() == "out") + { + outReqs = true; + } + else if (subCommand.ToLower() == "all") + { + allReqs = true; } else { - MainConsole.Instance.Output("Usage: debug http 0..5"); + MainConsole.Instance.Output("You must specify in, out or all"); + return; + } + + if (cmdparams.Length >= 4) + { + string rawNewDebug = cmdparams[3]; + int newDebug; + + if (!int.TryParse(rawNewDebug, out newDebug)) + { + MainConsole.Instance.OutputFormat("{0} is not a valid debug level", rawNewDebug); + return; + } + + if (newDebug < 0 || newDebug > 5) + { + MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0..5", newDebug); + return; + } + + if (allReqs || inReqs) + { + MainServer.DebugLevel = newDebug; + MainConsole.Instance.OutputFormat("IN debug level set to {0}", newDebug); + } + + if (allReqs || outReqs) + { + WebUtil.DebugLevel = newDebug; + MainConsole.Instance.OutputFormat("OUT debug level set to {0}", newDebug); + } + } + else + { + if (allReqs || inReqs) + MainConsole.Instance.OutputFormat("Current IN debug level is {0}", MainServer.DebugLevel); + + if (allReqs || outReqs) + MainConsole.Instance.OutputFormat("Current OUT debug level is {0}", WebUtil.DebugLevel); } } @@ -174,9 +231,9 @@ namespace OpenSim.Framework.Servers foreach (String s in httpServer.GetHTTPHandlerKeys()) handlers.AppendFormat("\t{0} {1}\n", s, (poll.Contains(s) ? "(poll service)" : string.Empty)); - handlers.AppendFormat("* Agent:\n"); - foreach (String s in httpServer.GetAgentHandlerKeys()) - handlers.AppendFormat("\t{0}\n", s); +// handlers.AppendFormat("* Agent:\n"); +// foreach (String s in httpServer.GetAgentHandlerKeys()) +// handlers.AppendFormat("\t{0}\n", s); handlers.AppendFormat("* LLSD:\n"); foreach (String s in httpServer.GetLLSDHandlerKeys()) diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 8094b6dc75..a03d62697a 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -53,10 +53,18 @@ namespace OpenSim.Framework LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); + /// + /// Control the printing of certain debug messages. + /// + /// + /// If DebugLevel >= 3 then short notices about outgoing HTTP requests are logged. + /// + public static int DebugLevel { get; set; } + /// /// Request number for diagnostic purposes. /// - public static int RequestNumber = 0; + public static int RequestNumber { get; internal set; } /// /// this is the header field used to communicate the local request id @@ -146,7 +154,11 @@ namespace OpenSim.Framework private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed) { int reqnum = RequestNumber++; - // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); + + if (DebugLevel >= 3) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} ServiceOSD {1} {2} (timeout {3}, compressed {4})", + reqnum, method, url, timeout, compressed); string errorMessage = "unknown error"; int tickstart = Util.EnvironmentTickCount(); @@ -230,7 +242,7 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > LongCallTime) m_log.InfoFormat( - "[OSD REQUEST]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", + "[WEB UTIL]: Slow ServiceOSD request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, method, url, @@ -239,10 +251,14 @@ namespace OpenSim.Framework strBuffer != null ? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer) : ""); + else if (DebugLevel >= 4) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", + reqnum, tickdiff, tickdata); } m_log.DebugFormat( - "[WEB UTIL]: <{0}> osd request for {1}, method {2} FAILED: {3}", reqnum, url, method, errorMessage); + "[WEB UTIL]: ServiceOSD request {0} {1} {2} FAILED: {3}", reqnum, url, method, errorMessage); return ErrorResponseMap(errorMessage); } @@ -318,7 +334,11 @@ namespace OpenSim.Framework { int reqnum = RequestNumber++; string method = (data != null && data["RequestMethod"] != null) ? data["RequestMethod"] : "unknown"; - // m_log.DebugFormat("[WEB UTIL]: <{0}> start form request for {1}, method {2}",reqnum,url,method); + + if (DebugLevel >= 3) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} ServiceForm {1} {2} (timeout {3})", + reqnum, method, url, timeout); string errorMessage = "unknown error"; int tickstart = Util.EnvironmentTickCount(); @@ -381,7 +401,7 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > LongCallTime) m_log.InfoFormat( - "[SERVICE FORM]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", + "[WEB UTIL]: Slow ServiceForm request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, method, url, @@ -390,9 +410,13 @@ namespace OpenSim.Framework queryString != null ? (queryString.Length > MaxRequestDiagLength) ? queryString.Remove(MaxRequestDiagLength) : queryString : ""); + else if (DebugLevel >= 4) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", + reqnum, tickdiff, tickdata); } - m_log.WarnFormat("[SERVICE FORM]: <{0}> form request to {1} failed: {2}", reqnum, url, errorMessage); + m_log.WarnFormat("[WEB UTIL]: ServiceForm request {0} {1} {2} failed: {2}", reqnum, method, url, errorMessage); return ErrorResponseMap(errorMessage); } @@ -644,7 +668,6 @@ namespace OpenSim.Framework /// public static string[] GetPreferredImageTypes(string accept) { - if (accept == null || accept == string.Empty) return new string[0]; @@ -703,13 +726,15 @@ namespace OpenSim.Framework int maxConnections) { int reqnum = WebUtil.RequestNumber++; - // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); + + if (WebUtil.DebugLevel >= 3) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} AsynchronousRequestObject {1} {2}", + reqnum, verb, requestUrl); int tickstart = Util.EnvironmentTickCount(); int tickdata = 0; - // m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} {1}", verb, requestUrl); - Type type = typeof(TRequest); WebRequest request = WebRequest.Create(requestUrl); @@ -866,7 +891,7 @@ namespace OpenSim.Framework } m_log.InfoFormat( - "[ASYNC REQUEST]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", + "[ASYNC REQUEST]: Slow request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, verb, requestUrl, @@ -874,6 +899,12 @@ namespace OpenSim.Framework tickdata, originalRequest); } + else if (WebUtil.DebugLevel >= 4) + { + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", + reqnum, tickdiff, tickdata); + } } } @@ -894,7 +925,11 @@ namespace OpenSim.Framework public static string MakeRequest(string verb, string requestUrl, string obj) { int reqnum = WebUtil.RequestNumber++; - // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); + + if (WebUtil.DebugLevel >= 3) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} SynchronousRestForms {1} {2}", + reqnum, verb, requestUrl); int tickstart = Util.EnvironmentTickCount(); int tickdata = 0; @@ -979,13 +1014,17 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > WebUtil.LongCallTime) m_log.InfoFormat( - "[FORMS]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", + "[FORMS]: Slow request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, verb, requestUrl, tickdiff, tickdata, obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj); + else if (WebUtil.DebugLevel >= 4) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", + reqnum, tickdiff, tickdata); return respstring; } @@ -1020,7 +1059,11 @@ namespace OpenSim.Framework public static TResponse MakeRequest(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections) { int reqnum = WebUtil.RequestNumber++; - // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); + + if (WebUtil.DebugLevel >= 3) + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} SynchronousRestObject {1} {2}", + reqnum, verb, requestUrl); int tickstart = Util.EnvironmentTickCount(); int tickdata = 0; @@ -1139,7 +1182,7 @@ namespace OpenSim.Framework } m_log.InfoFormat( - "[SynchronousRestObjectRequester]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}", + "[SynchronousRestObjectRequester]: Slow request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, verb, requestUrl, @@ -1147,6 +1190,12 @@ namespace OpenSim.Framework tickdata, originalRequest); } + else if (WebUtil.DebugLevel >= 4) + { + m_log.DebugFormat( + "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", + reqnum, tickdiff, tickdata); + } return deserial; } diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 951afd740d..5d41c1cce2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -933,6 +933,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); item = m_scene.InventoryService.GetItem(item); + if (item == null) + return; + bool changed = sp.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID); if (changed && m_scene.AvatarFactory != null) { diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 48f3a23e90..b7a116979c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests public class AttachmentsModuleTests : OpenSimTestCase { private AutoResetEvent m_chatEvent = new AutoResetEvent(false); - private OSChatMessage m_osChatMessageReceived; +// private OSChatMessage m_osChatMessageReceived; [TestFixtureSetUp] public void FixtureInit() @@ -83,7 +83,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests { // Console.WriteLine("Got chat [{0}]", oscm.Message); - m_osChatMessageReceived = oscm; +// m_osChatMessageReceived = oscm; m_chatEvent.Set(); } diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 4c786ffbcd..a1d8d5a549 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -150,6 +150,34 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (m_Enabled) scene.RegisterModuleInterface(this); + + scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject; + } + + void OnIncomingSceneObject(SceneObjectGroup so) + { + if (!so.IsAttachment) + return; + + if (so.Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar)) + return; + + // foreign user + AgentCircuitData aCircuit = so.Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar); + if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0) + { + if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) + { + string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); + m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); + Dictionary ids = new Dictionary(); + HGUuidGatherer uuidGatherer = new HGUuidGatherer(so.Scene.AssetService, url); + uuidGatherer.GatherAssetUuids(so, ids); + + foreach (KeyValuePair kvp in ids) + uuidGatherer.FetchAsset(kvp.Key); + } + } } protected override void OnNewClient(IClientAPI client) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs index eaadc1b8be..6f62856f6b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs @@ -71,19 +71,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess #region Internal functions - public AssetBase FetchAsset(string url, UUID assetID) + public AssetMetadata FetchMetadata(string url, UUID assetID) { if (!url.EndsWith("/") && !url.EndsWith("=")) url = url + "/"; - AssetBase asset = m_scene.AssetService.Get(url + assetID.ToString()); + AssetMetadata meta = m_scene.AssetService.GetMetadata(url + assetID.ToString()); - if (asset != null) - { - m_log.DebugFormat("[HG ASSET MAPPER]: Copied asset {0} from {1} to local asset server. ", asset.ID, url); - return asset; - } - return null; + if (meta != null) + m_log.DebugFormat("[HG ASSET MAPPER]: Fetched metadata for asset {0} of type {1} from {2} ", assetID, meta.Type, url); + else + m_log.DebugFormat("[HG ASSET MAPPER]: Unable to fetched metadata for asset {0} from {1} ", assetID, url); + + return meta; } public bool PostAsset(string url, AssetBase asset) @@ -93,6 +93,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (!url.EndsWith("/") && !url.EndsWith("=")) url = url + "/"; + bool success = true; // See long comment in AssetCache.AddAsset if (!asset.Temporary || asset.Local) { @@ -103,14 +104,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // not having a global naming infrastructure AssetBase asset1 = new AssetBase(asset.FullID, asset.Name, asset.Type, asset.Metadata.CreatorID); Copy(asset, asset1); - try - { - asset1.ID = url + asset.ID; - } - catch - { - m_log.Warn("[HG ASSET MAPPER]: Oops."); - } + asset1.ID = url + asset.ID; AdjustIdentifiers(asset1.Metadata); if (asset1.Metadata.Type == (sbyte)AssetType.Object) @@ -118,11 +112,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess else asset1.Data = asset.Data; - m_scene.AssetService.Store(asset1); - m_log.DebugFormat("[HG ASSET MAPPER]: Posted copy of asset {0} from local asset server to {1}", asset1.ID, url); + string id = m_scene.AssetService.Store(asset1); + if (id == string.Empty) + { + m_log.DebugFormat("[HG ASSET MAPPER]: Asset server {0} did not accept {1}", url, asset.ID); + success = false; + } + else + m_log.DebugFormat("[HG ASSET MAPPER]: Posted copy of asset {0} from local asset server to {1}", asset1.ID, url); } - return true; - } + return success; + } else m_log.Warn("[HG ASSET MAPPER]: Tried to post asset to remote server, but asset not in local cache."); @@ -222,28 +222,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess public void Get(UUID assetID, UUID ownerID, string userAssetURL) { - // Get the item from the remote asset server onto the local AssetCache - // and place an entry in m_assetMap + // Get the item from the remote asset server onto the local AssetService - m_log.Debug("[HG ASSET MAPPER]: Fetching object " + assetID + " from asset server " + userAssetURL); - AssetBase asset = FetchAsset(userAssetURL, assetID); + AssetMetadata meta = FetchMetadata(userAssetURL, assetID); + if (meta == null) + return; - if (asset != null) - { - // OK, now fetch the inside. - Dictionary ids = new Dictionary(); - HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, userAssetURL); - uuidGatherer.GatherAssetUuids(asset.FullID, (AssetType)asset.Type, ids); - if (ids.ContainsKey(assetID)) - ids.Remove(assetID); - foreach (UUID uuid in ids.Keys) - FetchAsset(userAssetURL, uuid); + // The act of gathering UUIDs downloads the assets from the remote server + Dictionary ids = new Dictionary(); + HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, userAssetURL); + uuidGatherer.GatherAssetUuids(assetID, (AssetType)meta.Type, ids); - m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", asset.ID, userAssetURL); + m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", assetID, userAssetURL); - } - else - m_log.Warn("[HG ASSET MAPPER]: Could not fetch asset from remote asset server " + userAssetURL); } @@ -257,19 +248,23 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (asset != null) { Dictionary ids = new Dictionary(); - HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, string.Empty); + HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, string.Empty); uuidGatherer.GatherAssetUuids(asset.FullID, (AssetType)asset.Type, ids); + bool success = false; foreach (UUID uuid in ids.Keys) { asset = m_scene.AssetService.Get(uuid.ToString()); if (asset == null) m_log.DebugFormat("[HG ASSET MAPPER]: Could not find asset {0}", uuid); else - PostAsset(userAssetURL, asset); + success = PostAsset(userAssetURL, asset); } - // maybe all pieces got there... - m_log.DebugFormat("[HG ASSET MAPPER]: Successfully posted item {0} to asset server {1}", assetID, userAssetURL); + // maybe all pieces got there... + if (!success) + m_log.DebugFormat("[HG ASSET MAPPER]: Problems posting item {0} to asset server {1}", assetID, userAssetURL); + else + m_log.DebugFormat("[HG ASSET MAPPER]: Successfully posted item {0} to asset server {1}", assetID, userAssetURL); } else diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index a0cad40754..80257bd5a2 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -263,8 +263,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess //} // OK, we're done fetching. Pass it up to the default RezObject - return base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, - RezSelected, RemoveItem, fromTaskID, attachment); + SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, + RezSelected, RemoveItem, fromTaskID, attachment); + + if (sog == null) + remoteClient.SendAgentAlertMessage("Unable to rez: problem accessing inventory or locating assets", false); + + return sog; } diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs deleted file mode 100644 index fcb544f27a..0000000000 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGUuidGatherer.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -using OpenSim.Framework; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Services.Interfaces; -using OpenMetaverse; - -namespace OpenSim.Region.CoreModules.Framework.InventoryAccess -{ - public class HGUuidGatherer : UuidGatherer - { - protected string m_assetServerURL; - protected HGAssetMapper m_assetMapper; - - public HGUuidGatherer(HGAssetMapper assMap, IAssetService assetCache, string assetServerURL) : base(assetCache) - { - m_assetMapper = assMap; - m_assetServerURL = assetServerURL; - } - - protected override AssetBase GetAsset(UUID uuid) - { - if (string.Empty == m_assetServerURL) - return m_assetCache.Get(uuid.ToString()); - else - return m_assetMapper.FetchAsset(m_assetServerURL, uuid); - } - } -} diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs similarity index 100% rename from OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs rename to OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index 008465fcc9..1e1c7d00e0 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs @@ -56,6 +56,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset private bool m_Enabled = false; + private AssetPermissions m_AssetPerms; + public Type ReplaceableInterface { get { return null; } @@ -128,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset if (m_LocalAssetServiceURI != string.Empty) m_LocalAssetServiceURI = m_LocalAssetServiceURI.Trim('/'); + IConfig hgConfig = source.Configs["HGAssetService"]; + m_AssetPerms = new AssetPermissions(hgConfig); // it's ok if arg is null + m_Enabled = true; m_log.Info("[HG ASSET CONNECTOR]: HG asset broker enabled"); } @@ -206,14 +211,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset asset = m_HGService.Get(id); if (asset != null) { - // Now store it locally - // For now, let me just do it for textures and scripts - if (((AssetType)asset.Type == AssetType.Texture) || - ((AssetType)asset.Type == AssetType.LSLBytecode) || - ((AssetType)asset.Type == AssetType.LSLText)) - { + // Now store it locally, if allowed + if (m_AssetPerms.AllowedImport(asset.Type)) m_GridService.Store(asset); - } + else + return null; } } else @@ -328,7 +330,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset string id = string.Empty; if (IsHG(asset.ID)) - id = m_HGService.Store(asset); + { + if (m_AssetPerms.AllowedExport(asset.Type)) + id = m_HGService.Store(asset); + else + return String.Empty; + } else id = m_GridService.Store(asset); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 57ae5497ee..43381337c7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -46,8 +46,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests public class GridConnectorsTests : OpenSimTestCase { LocalGridServicesConnector m_LocalConnector; - private void SetUp() + + [SetUp] + public override void SetUp() { + base.SetUp(); + IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.AddConfig("GridService"); @@ -71,8 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests TestHelpers.InMethod(); // log4net.Config.XmlConfigurator.Configure(); - SetUp(); - // Create 4 regions GridRegion r1 = new GridRegion(); r1.RegionName = "Test Region 1"; diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 0a309057e7..82f49b0dfa 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -65,8 +65,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests protected TaskInventoryItem m_soundItem; [SetUp] - public void SetUp() + public override void SetUp() { + base.SetUp(); + + // FIXME: Do something about this - relying on statics in unit tests causes trouble sooner or later new SceneManager(); m_archiverModule = new ArchiverModule(); diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index e257b57c11..67d218beba 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -188,6 +188,22 @@ namespace OpenSim.Region.Framework.Scenes public delegate void OnPluginConsoleDelegate(string[] args); + /// + /// Triggered after + /// has been called for all + /// loaded via . + /// Handlers for this event are typically used to parse the arguments + /// from in order to process or + /// filter the arguments and pass them onto + /// + /// + /// Triggered by in + /// via + /// via + /// via + /// via + /// + /// public event OnPluginConsoleDelegate OnPluginConsole; /// @@ -202,6 +218,18 @@ namespace OpenSim.Region.Framework.Scenes public delegate void OnSetRootAgentSceneDelegate(UUID agentID, Scene scene); + /// + /// Triggered before the grunt work for adding a root agent to a + /// scene has been performed (resuming attachment scripts, physics, + /// animations etc.) + /// + /// + /// Triggered before + /// by + /// in + /// via + /// and + /// public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; /// @@ -226,13 +254,45 @@ namespace OpenSim.Region.Framework.Scenes /// /// Fired when an object is touched/grabbed. /// + /// /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of /// the root part. + /// Triggerd in response to + /// via + /// in + /// public event ObjectGrabDelegate OnObjectGrab; public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); + /// + /// Triggered when an object is being touched/grabbed continuously. + /// + /// + /// Triggered in response to + /// via + /// in + /// public event ObjectGrabDelegate OnObjectGrabbing; + + /// + /// Triggered when an object stops being touched/grabbed. + /// + /// + /// Triggered in response to + /// via + /// in + /// public event ObjectDeGrabDelegate OnObjectDeGrab; + + /// + /// Triggered when a script resets. + /// + /// + /// Triggered by + /// in + /// via + /// via + /// public event ScriptResetDelegate OnScriptReset; public event OnPermissionErrorDelegate OnPermissionError; @@ -242,17 +302,50 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// Occurs after OnNewScript. + /// Triggered by + /// in /// public event NewRezScript OnRezScript; public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); public delegate void RemoveScript(uint localID, UUID itemID); + + /// + /// Triggered when a script is removed from an object. + /// + /// + /// Triggered by + /// in , + /// , + /// , + /// + /// public event RemoveScript OnRemoveScript; public delegate void StartScript(uint localID, UUID itemID); + + /// + /// Triggered when a script starts. + /// + /// + /// Triggered by + /// in + /// via , + /// via + /// public event StartScript OnStartScript; public delegate void StopScript(uint localID, UUID itemID); + + /// + /// Triggered when a script stops. + /// + /// + /// Triggered by , + /// in , + /// , + /// + /// public event StopScript OnStopScript; public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); @@ -303,6 +396,9 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// Occurs before OnRezScript + /// Triggered by + /// in , + /// /// public event NewScript OnNewScript; @@ -337,6 +433,12 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// Triggered after the scene receives a client's upload of an updated script and has stored it in an asset. + /// Triggered by + /// in + /// via + /// via + /// via + /// via /// public event UpdateScript OnUpdateScript; @@ -395,15 +497,36 @@ namespace OpenSim.Region.Framework.Scenes public event ScriptColliding OnScriptLandColliderEnd; public delegate void OnMakeChildAgentDelegate(ScenePresence presence); + + /// + /// Triggered when an agent has been made a child agent of a scene. + /// + /// + /// Triggered by + /// in + /// via , + /// , + /// + /// public event OnMakeChildAgentDelegate OnMakeChildAgent; public delegate void OnSaveNewWindlightProfileDelegate(); public delegate void OnSendNewWindlightProfileTargetedDelegate(RegionLightShareData wl, UUID user); /// + /// Triggered after the grunt work for adding a root agent to a + /// scene has been performed (resuming attachment scripts, physics, + /// animations etc.) + /// + /// /// This event is on the critical path for transferring an avatar from one region to another. Try and do /// as little work on this event as possible, or do work asynchronously. - /// + /// Triggered after + /// by + /// in + /// via + /// and + /// public event Action OnMakeRootAgent; public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; @@ -429,9 +552,10 @@ namespace OpenSim.Region.Framework.Scenes public event AvatarKillData OnAvatarKilled; public delegate void AvatarKillData(uint KillerLocalID, ScenePresence avatar); -// public delegate void ScriptTimerEvent(uint localID, double timerinterval); - -// public event ScriptTimerEvent OnScriptTimerEvent; + /* + public delegate void ScriptTimerEvent(uint localID, double timerinterval); + public event ScriptTimerEvent OnScriptTimerEvent; + */ public delegate void EstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); @@ -441,12 +565,27 @@ namespace OpenSim.Region.Framework.Scenes /// /// Triggered when an object is added to the scene. /// + /// + /// Triggered by + /// in , + /// , + /// + /// public event Action OnObjectAddedToScene; + /// + /// Delegate for + /// + /// The object being removed from the scene + public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); + /// /// Triggered when an object is removed from the scene. /// - public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); + /// + /// Triggered by + /// in + /// public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; public delegate void NoticeNoLandDataFromStorage(); @@ -632,9 +771,28 @@ namespace OpenSim.Region.Framework.Scenes public event PrimsLoaded OnPrimsLoaded; public delegate void TeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout); + + /// + /// Triggered when a teleport starts + /// + /// + /// Triggered by + /// in + /// and + /// via + /// public event TeleportStart OnTeleportStart; public delegate void TeleportFail(IClientAPI client, bool gridLogout); + + /// + /// Trigered when a teleport fails. + /// + /// + /// Triggered by + /// in + /// via + /// public event TeleportFail OnTeleportFail; public class MoneyTransferArgs : EventArgs @@ -642,7 +800,9 @@ namespace OpenSim.Region.Framework.Scenes public UUID sender; public UUID receiver; - // Always false. The SL protocol sucks. + /// + /// Always false. The SL protocol sucks. + /// public bool authenticated = false; public int amount; diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ee5f6df2a9..129bf090d3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Minimum value of the size of a non-physical prim in each axis /// - public float m_minNonphys = 0.01f; + public float m_minNonphys = 0.001f; /// /// Maximum value of the size of a non-physical prim in each axis @@ -769,13 +769,13 @@ namespace OpenSim.Region.Framework.Scenes PhysicalPrims = startupConfig.GetBoolean("physical_prim", true); CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); - m_minNonphys = startupConfig.GetFloat("NonphysicalPrimMin", m_minNonphys); + m_minNonphys = startupConfig.GetFloat("NonPhysicalPrimMin", m_minNonphys); if (RegionInfo.NonphysPrimMin > 0) { m_minNonphys = RegionInfo.NonphysPrimMin; } - m_maxNonphys = startupConfig.GetFloat("NonphysicalPrimMax", m_maxNonphys); + m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); if (RegionInfo.NonphysPrimMax > 0) { m_maxNonphys = RegionInfo.NonphysPrimMax; @@ -895,6 +895,8 @@ namespace OpenSim.Region.Framework.Scenes } // FIXME: Ultimately this should be in a module. + SendPeriodicAppearanceUpdates = true; + IConfig appearanceConfig = m_config.Configs["Appearance"]; if (appearanceConfig != null) { diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 411e4214fe..b5ef7b0a0d 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -52,26 +52,23 @@ namespace OpenSim.Region.Framework.Scenes public class UuidGatherer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - /// - /// Asset cache used for gathering assets - /// - protected IAssetService m_assetCache; - - /// - /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate - /// asset was found by the asset service. - /// - private AssetBase m_requestedObjectAsset; - /// - /// Signal whether we are currently waiting for the asset service to deliver an asset. - /// - private bool m_waitingForObjectAsset; + protected IAssetService m_assetService; + +// /// +// /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate +// /// asset was found by the asset service. +// /// +// private AssetBase m_requestedObjectAsset; +// +// /// +// /// Signal whether we are currently waiting for the asset service to deliver an asset. +// /// +// private bool m_waitingForObjectAsset; public UuidGatherer(IAssetService assetCache) { - m_assetCache = assetCache; + m_assetService = assetCache; } /// @@ -191,18 +188,18 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// The callback made when we request the asset for an object from the asset service. - /// - private void AssetReceived(string id, Object sender, AssetBase asset) - { - lock (this) - { - m_requestedObjectAsset = asset; - m_waitingForObjectAsset = false; - Monitor.Pulse(this); - } - } +// /// +// /// The callback made when we request the asset for an object from the asset service. +// /// +// private void AssetReceived(string id, Object sender, AssetBase asset) +// { +// lock (this) +// { +// m_requestedObjectAsset = asset; +// m_waitingForObjectAsset = false; +// Monitor.Pulse(this); +// } +// } /// /// Get an asset synchronously, potentially using an asynchronous callback. If the @@ -212,25 +209,29 @@ namespace OpenSim.Region.Framework.Scenes /// protected virtual AssetBase GetAsset(UUID uuid) { - m_waitingForObjectAsset = true; - m_assetCache.Get(uuid.ToString(), this, AssetReceived); + return m_assetService.Get(uuid.ToString()); - // The asset cache callback can either - // - // 1. Complete on the same thread (if the asset is already in the cache) or - // 2. Come in via a different thread (if we need to go fetch it). - // - // The code below handles both these alternatives. - lock (this) - { - if (m_waitingForObjectAsset) - { - Monitor.Wait(this); - m_waitingForObjectAsset = false; - } - } - - return m_requestedObjectAsset; + // XXX: Switching to do this synchronously where the call was async before but we always waited for it + // to complete anyway! +// m_waitingForObjectAsset = true; +// m_assetCache.Get(uuid.ToString(), this, AssetReceived); +// +// // The asset cache callback can either +// // +// // 1. Complete on the same thread (if the asset is already in the cache) or +// // 2. Come in via a different thread (if we need to go fetch it). +// // +// // The code below handles both these alternatives. +// lock (this) +// { +// if (m_waitingForObjectAsset) +// { +// Monitor.Wait(this); +// m_waitingForObjectAsset = false; +// } +// } +// +// return m_requestedObjectAsset; } /// @@ -361,4 +362,47 @@ namespace OpenSim.Region.Framework.Scenes } } } + + public class HGUuidGatherer : UuidGatherer + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + protected string m_assetServerURL; + + public HGUuidGatherer(IAssetService assetService, string assetServerURL) + : base(assetService) + { + m_assetServerURL = assetServerURL; + if (!m_assetServerURL.EndsWith("/") && !m_assetServerURL.EndsWith("=")) + m_assetServerURL = m_assetServerURL + "/"; + } + + protected override AssetBase GetAsset(UUID uuid) + { + if (string.Empty == m_assetServerURL) + return base.GetAsset(uuid); + else + return FetchAsset(uuid); + } + + public AssetBase FetchAsset(UUID assetID) + { + + // Test if it's already here + AssetBase asset = m_assetService.Get(assetID.ToString()); + if (asset == null) + { + // It's not, so fetch it from abroad + asset = m_assetService.Get(m_assetServerURL + assetID.ToString()); + if (asset != null) + m_log.DebugFormat("[HGUUIDGatherer]: Copied asset {0} from {1} to local asset server", assetID, m_assetServerURL); + else + m_log.DebugFormat("[HGUUIDGatherer]: Failed to fetch asset {0} from {1}", assetID, m_assetServerURL); + } + //else + // m_log.DebugFormat("[HGUUIDGatherer]: Asset {0} from {1} was already here", assetID, m_assetServerURL); + + return asset; + } + } } diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index ca956fbe91..a01479896e 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs @@ -231,12 +231,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat if (m_server == null || m_baseNick == null || m_ircChannel == null || m_user == null) throw new Exception("Invalid connector configuration"); - // Generate an initial nickname if randomizing is enabled + // Generate an initial nickname if (m_randomizeNick) - { m_nick = m_baseNick + Util.RandomClass.Next(1, 99); - } + else + m_nick = m_baseNick; m_log.InfoFormat("[IRC-Connector-{0}]: Initialization complete", idn); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 957066910d..8d06d833f0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5871,27 +5871,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Returns the index of the first occurrence of test /// in src. /// - + /// Source list + /// List to search for + /// + /// The index number of the point in src where test was found if it was found. + /// Otherwise returns -1 + /// public LSL_Integer llListFindList(LSL_List src, LSL_List test) { - int index = -1; int length = src.Length - test.Length + 1; m_host.AddScriptLPS(1); // If either list is empty, do not match - if (src.Length != 0 && test.Length != 0) { for (int i = 0; i < length; i++) { - if (src.Data[i].Equals(test.Data[0])) + // Why this piece of insanity? This is because most script constants are C# value types (e.g. int) + // rather than wrapped LSL types. Such a script constant does not have int.Equal(LSL_Integer) code + // and so the comparison fails even if the LSL_Integer conceptually has the same value. + // Therefore, here we test Equals on both the source and destination objects. + // However, a future better approach may be use LSL struct script constants (e.g. LSL_Integer(1)). + if (src.Data[i].Equals(test.Data[0]) || test.Data[0].Equals(src.Data[i])) { int j; for (j = 1; j < test.Length; j++) - if (!src.Data[i+j].Equals(test.Data[j])) + if (!(src.Data[i+j].Equals(test.Data[j]) || test.Data[j].Equals(src.Data[i+j]))) break; + if (j == test.Length) { index = i; @@ -5902,19 +5911,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } return index; - } public LSL_String llGetObjectName() { m_host.AddScriptLPS(1); - return m_host.Name!=null?m_host.Name:String.Empty; + return m_host.Name !=null ? m_host.Name : String.Empty; } public void llSetObjectName(string name) { m_host.AddScriptLPS(1); - m_host.Name = name!=null?name:String.Empty; + m_host.Name = name != null ? name : String.Empty; } public LSL_String llGetDate() diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs new file mode 100644 index 0000000000..dd23be8857 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs @@ -0,0 +1,134 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using NUnit.Framework; +using OpenSim.Framework; +using OpenSim.Tests.Common; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.Framework.Scenes; +using Nini.Config; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenMetaverse; +using OpenSim.Tests.Common.Mock; + +using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; +using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + [TestFixture] + public class LSL_ApiListTests + { + private LSL_Api m_lslApi; + + [SetUp] + public void SetUp() + { + IConfigSource initConfigSource = new IniConfigSource(); + IConfig config = initConfigSource.AddConfig("XEngine"); + config.Set("Enabled", "true"); + + Scene scene = new SceneHelpers().SetupScene(); + SceneObjectPart part = SceneHelpers.AddSceneObject(scene).RootPart; + + XEngine.XEngine engine = new XEngine.XEngine(); + engine.Initialise(initConfigSource); + engine.AddRegion(scene); + + m_lslApi = new LSL_Api(); + m_lslApi.Initialize(engine, part, null); + } + + [Test] + public void TestllListFindList() + { + TestHelpers.InMethod(); + + LSL_List src = new LSL_List(new LSL_Integer(1), new LSL_Integer(2), new LSL_Integer(3)); + + { + // Test for a single item that should be found + int result = m_lslApi.llListFindList(src, new LSL_List(new LSL_Integer(4))); + Assert.That(result, Is.EqualTo(-1)); + } + + { + // Test for a single item that should be found + int result = m_lslApi.llListFindList(src, new LSL_List(new LSL_Integer(2))); + Assert.That(result, Is.EqualTo(1)); + } + + { + // Test for a constant that should be found + int result = m_lslApi.llListFindList(src, new LSL_List(ScriptBaseClass.AGENT)); + Assert.That(result, Is.EqualTo(0)); + } + + { + // Test for a list that should be found + int result = m_lslApi.llListFindList(src, new LSL_List(new LSL_Integer(2), new LSL_Integer(3))); + Assert.That(result, Is.EqualTo(1)); + } + + { + // Test for a single item not in the list + int result = m_lslApi.llListFindList(src, new LSL_List(new LSL_Integer(4))); + Assert.That(result, Is.EqualTo(-1)); + } + + { + // Test for something that should not be cast + int result = m_lslApi.llListFindList(src, new LSL_List(new LSL_String("4"))); + Assert.That(result, Is.EqualTo(-1)); + } + + { + // Test for a list not in the list + int result + = m_lslApi.llListFindList( + src, new LSL_List(new LSL_Integer(2), new LSL_Integer(3), new LSL_Integer(4))); + Assert.That(result, Is.EqualTo(-1)); + } + + { + LSL_List srcWithConstants + = new LSL_List(new LSL_Integer(3), ScriptBaseClass.AGENT, ScriptBaseClass.OS_NPC_LAND_AT_TARGET); + + // Test for constants that appears in the source list that should be found + int result + = m_lslApi.llListFindList(srcWithConstants, new LSL_List(new LSL_Integer(1), new LSL_Integer(2))); + + Assert.That(result, Is.EqualTo(1)); + } + } + } + } \ No newline at end of file diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 47d22b95fd..0f7d7c6dc1 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -58,9 +58,11 @@ namespace OpenSim.Services.HypergridService private static IUserAgentService m_UserAgentService; private static ISimulationService m_SimulationService; - protected string m_AllowedClients = string.Empty; - protected string m_DeniedClients = string.Empty; + private static string m_AllowedClients = string.Empty; + private static string m_DeniedClients = string.Empty; private static bool m_ForeignAgentsAllowed = true; + private static List m_ForeignsAllowedExceptions = new List(); + private static List m_ForeignsDisallowedExceptions = new List(); private static UUID m_ScopeID; private static bool m_AllowTeleportsToAnyRegion; @@ -113,6 +115,9 @@ namespace OpenSim.Services.HypergridService m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty); m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); + LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions); + LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_ForeignsDisallowedExceptions); + if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); @@ -125,6 +130,15 @@ namespace OpenSim.Services.HypergridService { } + protected void LoadDomainExceptionsFromConfig(IConfig config, string variable, List exceptions) + { + string value = config.GetString(variable, string.Empty); + string[] parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + + foreach (string s in parts) + exceptions.Add(s.Trim()); + } + public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason) { regionID = UUID.Zero; @@ -260,14 +274,25 @@ namespace OpenSim.Services.HypergridService m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok"); // - // Foreign agents allowed + // Foreign agents allowed? Exceptions? // - if (account == null && !m_ForeignAgentsAllowed) + if (account == null) { - reason = "Unauthorized"; - m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1}. Refusing service.", - aCircuit.firstname, aCircuit.lastname); - return false; + bool allowed = m_ForeignAgentsAllowed; + + if (m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsAllowedExceptions)) + allowed = false; + + if (!m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsDisallowedExceptions)) + allowed = true; + + if (!allowed) + { + reason = "Destination does not allow visitors from your world"; + m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1} @ {2}. Refusing service.", + aCircuit.firstname, aCircuit.lastname, aCircuit.ServiceURLs["HomeURI"]); + return false; + } } // May want to authorize @@ -393,6 +418,27 @@ namespace OpenSim.Services.HypergridService #region Misc + private bool IsException(AgentCircuitData aCircuit, List exceptions) + { + bool exception = false; + if (exceptions.Count > 0) // we have exceptions + { + // Retrieve the visitor's origin + string userURL = aCircuit.ServiceURLs["HomeURI"].ToString(); + if (!userURL.EndsWith("/")) + userURL += "/"; + + if (exceptions.Find(delegate(string s) + { + if (!s.EndsWith("/")) + s += "/"; + return s == userURL; + }) != null) + exception = true; + } + + return exception; + } #endregion } diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs index db9816639b..84dec8d389 100644 --- a/OpenSim/Services/HypergridService/HGAssetService.cs +++ b/OpenSim/Services/HypergridService/HGAssetService.cs @@ -58,6 +58,8 @@ namespace OpenSim.Services.HypergridService private UserAccountCache m_Cache; + private AssetPermissions m_AssetPerms; + public HGAssetService(IConfigSource config, string configName) : base(config, configName) { m_log.Debug("[HGAsset Service]: Starting"); @@ -80,6 +82,10 @@ namespace OpenSim.Services.HypergridService m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); + + // Permissions + m_AssetPerms = new AssetPermissions(assetConfig); + } #region IAssetService overrides @@ -90,6 +96,9 @@ namespace OpenSim.Services.HypergridService if (asset == null) return null; + if (!m_AssetPerms.AllowedExport(asset.Type)) + return null; + if (asset.Metadata.Type == (sbyte)AssetType.Object) asset.Data = AdjustIdentifiers(asset.Data); ; @@ -112,16 +121,27 @@ namespace OpenSim.Services.HypergridService public override byte[] GetData(string id) { - byte[] data = base.GetData(id); + AssetBase asset = Get(id); - if (data == null) + if (asset == null) return null; - return AdjustIdentifiers(data); + if (!m_AssetPerms.AllowedExport(asset.Type)) + return null; + + return asset.Data; } //public virtual bool Get(string id, Object sender, AssetRetrieved handler) + public override string Store(AssetBase asset) + { + if (!m_AssetPerms.AllowedImport(asset.Type)) + return string.Empty; + + return base.Store(asset); + } + public override bool Delete(string id) { // NOGO diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index a49993c33f..56aafe6e3a 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -77,6 +77,10 @@ namespace OpenSim.Services.HypergridService protected static bool m_BypassClientVerification; + private static Dictionary m_ForeignTripsAllowed = new Dictionary(); + private static Dictionary> m_TripsAllowedExceptions = new Dictionary>(); + private static Dictionary> m_TripsDisallowedExceptions = new Dictionary>(); + public UserAgentService(IConfigSource config) : this(config, null) { } @@ -121,6 +125,12 @@ namespace OpenSim.Services.HypergridService m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); m_UserAccountService = ServerUtils.LoadPlugin(userAccountService, args); + m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0); + + LoadTripPermissionsFromConfig(serverConfig, "ForeignTripsAllowed"); + LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); + LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions); + m_GridName = serverConfig.GetString("ExternalName", string.Empty); if (m_GridName == string.Empty) { @@ -130,10 +140,43 @@ namespace OpenSim.Services.HypergridService if (!m_GridName.EndsWith("/")) m_GridName = m_GridName + "/"; - m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0); } } + protected void LoadTripPermissionsFromConfig(IConfig config, string variable) + { + foreach (string keyName in config.GetKeys()) + { + if (keyName.StartsWith(variable + "_Level_")) + { + int level = 0; + if (Int32.TryParse(keyName.Replace(variable + "_Level_", ""), out level)) + m_ForeignTripsAllowed.Add(level, config.GetBoolean(keyName, true)); + } + } + } + + protected void LoadDomainExceptionsFromConfig(IConfig config, string variable, Dictionary> exceptions) + { + foreach (string keyName in config.GetKeys()) + { + if (keyName.StartsWith(variable + "_Level_")) + { + int level = 0; + if (Int32.TryParse(keyName.Replace(variable + "_Level_", ""), out level) && !exceptions.ContainsKey(level)) + { + exceptions.Add(level, new List()); + string value = config.GetString(keyName, string.Empty); + string[] parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + + foreach (string s in parts) + exceptions[level].Add(s.Trim()); + } + } + } + } + + public GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt) { position = new Vector3(128, 128, 0); lookAt = Vector3.UnitY; @@ -166,13 +209,39 @@ namespace OpenSim.Services.HypergridService m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI); - if (m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID) == null) + string gridName = gatekeeper.ServerURI; + + UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID); + if (account == null) { m_log.WarnFormat("[USER AGENT SERVICE]: Someone attempted to lauch a foreign user from here {0} {1}", agentCircuit.firstname, agentCircuit.lastname); reason = "Forbidden to launch your agents from here"; return false; } + // Is this user allowed to go there? + if (m_GridName != gridName) + { + if (m_ForeignTripsAllowed.ContainsKey(account.UserLevel)) + { + bool allowed = m_ForeignTripsAllowed[account.UserLevel]; + + if (m_ForeignTripsAllowed[account.UserLevel] && IsException(gridName, account.UserLevel, m_TripsAllowedExceptions)) + allowed = false; + + if (!m_ForeignTripsAllowed[account.UserLevel] && IsException(gridName, account.UserLevel, m_TripsDisallowedExceptions)) + allowed = true; + + if (!allowed) + { + reason = "Your world does not allow you to visit the destination"; + m_log.InfoFormat("[USER AGENT SERVICE]: Agents not permitted to visit {0}. Refusing service.", gridName); + return false; + } + } + } + + // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination GridRegion region = new GridRegion(gatekeeper); region.ServerURI = gatekeeper.ServerURI; @@ -189,7 +258,6 @@ namespace OpenSim.Services.HypergridService bool success = false; string myExternalIP = string.Empty; - string gridName = gatekeeper.ServerURI; m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}", m_GridName, gridName); @@ -586,6 +654,35 @@ namespace OpenSim.Services.HypergridService else return UUID.Zero; } + + #region Misc + + private bool IsException(string dest, int level, Dictionary> exceptions) + { + if (!exceptions.ContainsKey(level)) + return false; + + bool exception = false; + if (exceptions[level].Count > 0) // we have exceptions + { + string destination = dest; + if (!destination.EndsWith("/")) + destination += "/"; + + if (exceptions[level].Find(delegate(string s) + { + if (!s.EndsWith("/")) + s += "/"; + return s == destination; + }) != null) + exception = true; + } + + return exception; + } + + #endregion + } class TravelingAgentInfo diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index 1b4cab5a0d..30b9c7b5a3 100755 Binary files a/bin/OpenMetaverse.Rendering.Meshmerizer.dll and b/bin/OpenMetaverse.Rendering.Meshmerizer.dll differ diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index 7b5174da58..5c0b3c65e7 100755 Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index a08b4062ed..511096e7fe 100755 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverse.dll.config b/bin/OpenMetaverse.dll.config index e8c90a4a1d..b67da5f502 100644 --- a/bin/OpenMetaverse.dll.config +++ b/bin/OpenMetaverse.dll.config @@ -1,7 +1,5 @@ - - - - - + + + diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index fc4f8eb7d9..8bc88858b1 100755 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0de40022ff..3ec4bab23c 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -87,13 +87,13 @@ ;; from the selected region_info_source. ; allow_regionless = false - ;# {NonPhysicalPrimMin} {} {Minimum size of nonphysical prims?} {} 0.01 - ;; Minimum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMin!). - ; NonphysicalPrimMin = 0.01 + ;# {NonPhysicalPrimMin} {} {Minimum size of nonphysical prims?} {} 0.001 + ;; Minimum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonPhysicalPrimMin!). + ; NonPhysicalPrimMin = 0.001 ;# {NonPhysicalPrimMax} {} {Maximum size of nonphysical prims?} {} 256 - ;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). - ; NonphysicalPrimMax = 256 + ;; Maximum size for non-physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonPhysicalPrimMax!). + ; NonPhysicalPrimMax = 256 ;# {PhysicalPrimMin} {} {Minimum size of physical prims?} {} 10 ;; Maximum size where a prim can be physical. Affects resizing of existing prims. This can be overriden in the region config file. diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 1dc3f15dc3..fee29c9e96 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -85,8 +85,8 @@ ;; from the selected region_info_source. allow_regionless = false - ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonphysicalPrimMax!). - NonphysicalPrimMax = 256 + ; Maximum size of non physical prims. Affects resizing of existing prims. This can be overriden in the region config file (as NonPhysicalPrimMax!). + NonPhysicalPrimMax = 256 ; Maximum size of physical prims. Affects resizing of existing prims. This can be overriden in the region config file. PhysicalPrimMax = 10 @@ -673,8 +673,7 @@ ; If true, avatar appearance information is resent to other avatars in the simulator every 60 seconds. ; This may help with some situations where avatars are persistently grey, though it will not help ; in other situations (e.g. appearance baking failures where the avatar only appears as a cloud to others). - ; This setting is experimental. - ResendAppearanceUpdates = false + ResendAppearanceUpdates = true [Attachments] diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index fad399d351..18094b7226 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -396,6 +396,18 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ;AllowedClients = "" ;DeniedClients = "" + ;; Are foreign visitors allowed? + ;ForeignAgentsAllowed = true + ;; + ;; If ForeignAgentsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept = "http://griefer.com:8002, http://enemy.com:8002" + ;; + ;; If ForeignAgentsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept = "http://myfriendgrid.com:8002, http://myboss.com:8002" + + [UserAgentService] LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService" ;; for the service @@ -416,6 +428,24 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; User level required to be contacted from other grids ;LevelOutsideContacts = 0 + ;; Restrictions on destinations of local users. + ;; Are local users allowed to visit other grids? + ;; What user level? Use variables of this forrm: + ;; ForeignTripsAllowed_Level_ = true | false + ;; (the default is true) + ;; For example: + ; ForeignTripsAllowed_Level_0 = false + ; ForeignTripsAllowed_Level_200 = true ; true is default, no need to say it + ;; + ;; If ForeignTripsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept_Level_0 = "http://myothergrid.com:8002, http://boss.com:8002" + ;; + ;; If ForeignTripsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept_Level_200 = "http://griefer.com:8002, http://enemy.com:8002" + + ; * The interface that local users get when they are in other grids. ; * This restricts the inventory operations while in other grids. ; * Still not completely safe, especially if users perform inventory operations @@ -437,6 +467,18 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" HomeURI = "http://127.0.0.1:8002" + ;; The asset types that this grid can export to / import from other grids. + ;; Comma separated. + ;; Valid values are all the asset types in OpenMetaverse.AssetType, namely: + ;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText, + ;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh + ;; + ;; Leave blank or commented if you don't want to apply any restrictions. + ;; A more strict, but still reasonable, policy may be to disallow the exchange + ;; of scripts, like so: + ; DisallowExport ="LSLText" + ; DisallowImport ="LSLBytecode" + [HGFriendsService] LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFriendsService" UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 8d7f6fc427..79f7ed6c3f 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -137,6 +137,26 @@ ;; uncomment the next line. You may want to do this on sims that have licensed content. ; OutboundPermission = False +[HGAssetService] + ; + ; === HG ONLY === + ; Change this to your server + ; accessible from other grids + ; + HomeURI = "http://mygridserver.com:8002" + + ;; The asset types that this grid can export to / import from other grids. + ;; Comma separated. + ;; Valid values are all the asset types in OpenMetaverse.AssetType, namely: + ;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText, + ;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh + ;; + ;; Leave blank or commented if you don't want to apply any restrictions. + ;; A more strict, but still reasonable, policy may be to disallow the exchange + ;; of scripts, like so: + ; DisallowExport ="LSLText" + ; DisallowImport ="LSLBytecode" + [HGFriendsModule] ; User level required to be able to send friendship invitations to foreign users ;LevelHGFriends = 0; diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index e4bc548967..84de0ecab2 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -53,6 +53,19 @@ [HGAssetService] HomeURI = "http://127.0.0.1:9000" + ;; The asset types that this grid can export to / import from other grids. + ;; Comma separated. + ;; Valid values are all the asset types in OpenMetaverse.AssetType, namely: + ;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText, + ;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh + ;; + ;; Leave blank or commented if you don't want to apply any restrictions. + ;; A more strict, but still reasonable, policy may be to disallow the exchange + ;; of scripts, like so: + ; DisallowExport ="LSLText" + ; DisallowImport ="LSLBytecode" + + [HGInventoryAccessModule] HomeURI = "http://127.0.0.1:9000" Gatekeeper = "http://127.0.0.1:9000" @@ -151,8 +164,17 @@ ;AllowedClients = "" ;DeniedClients = "" - ;; Are foreign visitors allowed + ;; Are foreign visitors allowed? ;ForeignAgentsAllowed = true + ;; + ;; If ForeignAgentsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept = "http://griefer.com:8002, http://enemy.com:8002" + ;; + ;; If ForeignAgentsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept = "http://myfriendgrid.com:8002, http://myboss.com:8002" + [FreeswitchService] ;; If FreeSWITCH is not being used then you don't need to set any of these parameters @@ -258,5 +280,22 @@ ; Region_Test_1 = "DisallowForeigners" [UserAgentService] - ; User level required to be contacted from other grids + ;; User level required to be contacted from other grids ;LevelOutsideContacts = 0 + + ;; Restrictions on destinations of local users. + ;; Are local users allowed to visit other grids? + ;; What user level? Use variables of this forrm: + ;; ForeignTripsAllowed_Level_ = true | false + ;; (the default is true) + ;; For example: + ; ForeignTripsAllowed_Level_0 = false + ; ForeignTripsAllowed_Level_200 = true ; true is default, no need to say it + ;; + ;; If ForeignTripsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept_Level_0 = "http://myothergrid.com:8002, http://boss.com:8002" + ;; + ;; If ForeignTripsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept_Level_200 = "http://griefer.com:8002, http://enemy.com:8002" diff --git a/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686.so b/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686.so deleted file mode 100644 index 0106b56ff9..0000000000 Binary files a/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686.so and /dev/null differ diff --git a/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1.so b/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1.so deleted file mode 100644 index 53543e7b90..0000000000 Binary files a/bin/lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1.so and /dev/null differ diff --git a/bin/lib32/libopenjpeg-dotnet.so b/bin/lib32/libopenjpeg-dotnet.so new file mode 100755 index 0000000000..193eca4b34 Binary files /dev/null and b/bin/lib32/libopenjpeg-dotnet.so differ diff --git a/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64.so b/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64.so deleted file mode 100644 index be11bb477d..0000000000 Binary files a/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64.so and /dev/null differ diff --git a/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib b/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib deleted file mode 100644 index dc5077558d..0000000000 Binary files a/bin/lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib and /dev/null differ diff --git a/bin/lib64/libopenjpeg-dotnet-x86_64.so b/bin/lib64/libopenjpeg-dotnet-x86_64.so new file mode 100755 index 0000000000..7a9bdfcd1d Binary files /dev/null and b/bin/lib64/libopenjpeg-dotnet-x86_64.so differ diff --git a/bin/lib64/libopenjpeg-dotnet.dylib b/bin/lib64/libopenjpeg-dotnet.dylib new file mode 100755 index 0000000000..18ca868c65 Binary files /dev/null and b/bin/lib64/libopenjpeg-dotnet.dylib differ diff --git a/bin/openjpeg-dotnet-x86_64.dll b/bin/openjpeg-dotnet-x86_64.dll index 97729fffa0..9e8cd21507 100755 Binary files a/bin/openjpeg-dotnet-x86_64.dll and b/bin/openjpeg-dotnet-x86_64.dll differ diff --git a/bin/openjpeg-dotnet.dll b/bin/openjpeg-dotnet.dll index 64b2557ece..6377b8d970 100755 Binary files a/bin/openjpeg-dotnet.dll and b/bin/openjpeg-dotnet.dll differ diff --git a/bin/openmetaverse_data/avatar_lad.xml b/bin/openmetaverse_data/avatar_lad.xml new file mode 100644 index 0000000000..3bd7ba72eb --- /dev/null +++ b/bin/openmetaverse_data/avatar_lad.xml @@ -0,0 +1,12308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/openmetaverse_data/blush_alpha.tga b/bin/openmetaverse_data/blush_alpha.tga new file mode 100644 index 0000000000..05be7e7e3d Binary files /dev/null and b/bin/openmetaverse_data/blush_alpha.tga differ diff --git a/bin/openmetaverse_data/body_skingrain.tga b/bin/openmetaverse_data/body_skingrain.tga new file mode 100644 index 0000000000..7264baac14 Binary files /dev/null and b/bin/openmetaverse_data/body_skingrain.tga differ diff --git a/bin/openmetaverse_data/bodyfreckles_alpha.tga b/bin/openmetaverse_data/bodyfreckles_alpha.tga new file mode 100644 index 0000000000..d30ab3d122 Binary files /dev/null and b/bin/openmetaverse_data/bodyfreckles_alpha.tga differ diff --git a/bin/openmetaverse_data/bump_face_wrinkles.tga b/bin/openmetaverse_data/bump_face_wrinkles.tga new file mode 100644 index 0000000000..54bf7a55be Binary files /dev/null and b/bin/openmetaverse_data/bump_face_wrinkles.tga differ diff --git a/bin/openmetaverse_data/bump_head_base.tga b/bin/openmetaverse_data/bump_head_base.tga new file mode 100644 index 0000000000..fa3568573a Binary files /dev/null and b/bin/openmetaverse_data/bump_head_base.tga differ diff --git a/bin/openmetaverse_data/bump_lowerbody_base.tga b/bin/openmetaverse_data/bump_lowerbody_base.tga new file mode 100644 index 0000000000..498ea3c721 Binary files /dev/null and b/bin/openmetaverse_data/bump_lowerbody_base.tga differ diff --git a/bin/openmetaverse_data/bump_pants_wrinkles.tga b/bin/openmetaverse_data/bump_pants_wrinkles.tga new file mode 100644 index 0000000000..cca72415e8 Binary files /dev/null and b/bin/openmetaverse_data/bump_pants_wrinkles.tga differ diff --git a/bin/openmetaverse_data/bump_shirt_wrinkles.tga b/bin/openmetaverse_data/bump_shirt_wrinkles.tga new file mode 100644 index 0000000000..9e0d757a48 Binary files /dev/null and b/bin/openmetaverse_data/bump_shirt_wrinkles.tga differ diff --git a/bin/openmetaverse_data/bump_upperbody_base.tga b/bin/openmetaverse_data/bump_upperbody_base.tga new file mode 100644 index 0000000000..e57d6352e6 Binary files /dev/null and b/bin/openmetaverse_data/bump_upperbody_base.tga differ diff --git a/bin/openmetaverse_data/eyebrows_alpha.tga b/bin/openmetaverse_data/eyebrows_alpha.tga new file mode 100644 index 0000000000..c363e482e1 Binary files /dev/null and b/bin/openmetaverse_data/eyebrows_alpha.tga differ diff --git a/bin/openmetaverse_data/eyeliner_alpha.tga b/bin/openmetaverse_data/eyeliner_alpha.tga new file mode 100644 index 0000000000..1611eb3355 Binary files /dev/null and b/bin/openmetaverse_data/eyeliner_alpha.tga differ diff --git a/bin/openmetaverse_data/eyeshadow_inner_alpha.tga b/bin/openmetaverse_data/eyeshadow_inner_alpha.tga new file mode 100644 index 0000000000..37d7919395 Binary files /dev/null and b/bin/openmetaverse_data/eyeshadow_inner_alpha.tga differ diff --git a/bin/openmetaverse_data/eyeshadow_outer_alpha.tga b/bin/openmetaverse_data/eyeshadow_outer_alpha.tga new file mode 100644 index 0000000000..00eef9d9f7 Binary files /dev/null and b/bin/openmetaverse_data/eyeshadow_outer_alpha.tga differ diff --git a/bin/openmetaverse_data/eyewhite.tga b/bin/openmetaverse_data/eyewhite.tga new file mode 100644 index 0000000000..a720496988 Binary files /dev/null and b/bin/openmetaverse_data/eyewhite.tga differ diff --git a/bin/openmetaverse_data/facehair_chincurtains_alpha.tga b/bin/openmetaverse_data/facehair_chincurtains_alpha.tga new file mode 100644 index 0000000000..b10397063c Binary files /dev/null and b/bin/openmetaverse_data/facehair_chincurtains_alpha.tga differ diff --git a/bin/openmetaverse_data/facehair_moustache_alpha.tga b/bin/openmetaverse_data/facehair_moustache_alpha.tga new file mode 100644 index 0000000000..4068c4f2b1 Binary files /dev/null and b/bin/openmetaverse_data/facehair_moustache_alpha.tga differ diff --git a/bin/openmetaverse_data/facehair_sideburns_alpha.tga b/bin/openmetaverse_data/facehair_sideburns_alpha.tga new file mode 100644 index 0000000000..acddc2d9bd Binary files /dev/null and b/bin/openmetaverse_data/facehair_sideburns_alpha.tga differ diff --git a/bin/openmetaverse_data/facehair_soulpatch_alpha.tga b/bin/openmetaverse_data/facehair_soulpatch_alpha.tga new file mode 100644 index 0000000000..687091a29f Binary files /dev/null and b/bin/openmetaverse_data/facehair_soulpatch_alpha.tga differ diff --git a/bin/openmetaverse_data/freckles_alpha.tga b/bin/openmetaverse_data/freckles_alpha.tga new file mode 100644 index 0000000000..a9a4ec0735 Binary files /dev/null and b/bin/openmetaverse_data/freckles_alpha.tga differ diff --git a/bin/openmetaverse_data/glove_length_alpha.tga b/bin/openmetaverse_data/glove_length_alpha.tga new file mode 100644 index 0000000000..db89ad57e7 Binary files /dev/null and b/bin/openmetaverse_data/glove_length_alpha.tga differ diff --git a/bin/openmetaverse_data/gloves_fingers_alpha.tga b/bin/openmetaverse_data/gloves_fingers_alpha.tga new file mode 100644 index 0000000000..dba2eec277 Binary files /dev/null and b/bin/openmetaverse_data/gloves_fingers_alpha.tga differ diff --git a/bin/openmetaverse_data/head_alpha.tga b/bin/openmetaverse_data/head_alpha.tga new file mode 100644 index 0000000000..8164525353 Binary files /dev/null and b/bin/openmetaverse_data/head_alpha.tga differ diff --git a/bin/openmetaverse_data/head_color.tga b/bin/openmetaverse_data/head_color.tga new file mode 100644 index 0000000000..74b1b3078b Binary files /dev/null and b/bin/openmetaverse_data/head_color.tga differ diff --git a/bin/openmetaverse_data/head_hair.tga b/bin/openmetaverse_data/head_hair.tga new file mode 100644 index 0000000000..5321f35204 Binary files /dev/null and b/bin/openmetaverse_data/head_hair.tga differ diff --git a/bin/openmetaverse_data/head_highlights_alpha.tga b/bin/openmetaverse_data/head_highlights_alpha.tga new file mode 100644 index 0000000000..8dc5239f97 Binary files /dev/null and b/bin/openmetaverse_data/head_highlights_alpha.tga differ diff --git a/bin/openmetaverse_data/head_shading_alpha.tga b/bin/openmetaverse_data/head_shading_alpha.tga new file mode 100644 index 0000000000..e8ea490109 Binary files /dev/null and b/bin/openmetaverse_data/head_shading_alpha.tga differ diff --git a/bin/openmetaverse_data/head_skingrain.tga b/bin/openmetaverse_data/head_skingrain.tga new file mode 100644 index 0000000000..b42dee0809 Binary files /dev/null and b/bin/openmetaverse_data/head_skingrain.tga differ diff --git a/bin/openmetaverse_data/jacket_length_lower_alpha.tga b/bin/openmetaverse_data/jacket_length_lower_alpha.tga new file mode 100644 index 0000000000..722bc192a8 Binary files /dev/null and b/bin/openmetaverse_data/jacket_length_lower_alpha.tga differ diff --git a/bin/openmetaverse_data/jacket_length_upper_alpha.tga b/bin/openmetaverse_data/jacket_length_upper_alpha.tga new file mode 100644 index 0000000000..e9db7e7b1f Binary files /dev/null and b/bin/openmetaverse_data/jacket_length_upper_alpha.tga differ diff --git a/bin/openmetaverse_data/jacket_open_lower_alpha.tga b/bin/openmetaverse_data/jacket_open_lower_alpha.tga new file mode 100644 index 0000000000..db0c2fb0e3 Binary files /dev/null and b/bin/openmetaverse_data/jacket_open_lower_alpha.tga differ diff --git a/bin/openmetaverse_data/jacket_open_upper_alpha.tga b/bin/openmetaverse_data/jacket_open_upper_alpha.tga new file mode 100644 index 0000000000..71b8a0b805 Binary files /dev/null and b/bin/openmetaverse_data/jacket_open_upper_alpha.tga differ diff --git a/bin/openmetaverse_data/lipgloss_alpha.tga b/bin/openmetaverse_data/lipgloss_alpha.tga new file mode 100644 index 0000000000..78ceecaf85 Binary files /dev/null and b/bin/openmetaverse_data/lipgloss_alpha.tga differ diff --git a/bin/openmetaverse_data/lips_mask.tga b/bin/openmetaverse_data/lips_mask.tga new file mode 100644 index 0000000000..ae1401c006 Binary files /dev/null and b/bin/openmetaverse_data/lips_mask.tga differ diff --git a/bin/openmetaverse_data/lipstick_alpha.tga b/bin/openmetaverse_data/lipstick_alpha.tga new file mode 100644 index 0000000000..2795f1bd40 Binary files /dev/null and b/bin/openmetaverse_data/lipstick_alpha.tga differ diff --git a/bin/openmetaverse_data/lowerbody_color.tga b/bin/openmetaverse_data/lowerbody_color.tga new file mode 100644 index 0000000000..a63aa12fca Binary files /dev/null and b/bin/openmetaverse_data/lowerbody_color.tga differ diff --git a/bin/openmetaverse_data/lowerbody_highlights_alpha.tga b/bin/openmetaverse_data/lowerbody_highlights_alpha.tga new file mode 100644 index 0000000000..ae3413ac8b Binary files /dev/null and b/bin/openmetaverse_data/lowerbody_highlights_alpha.tga differ diff --git a/bin/openmetaverse_data/lowerbody_shading_alpha.tga b/bin/openmetaverse_data/lowerbody_shading_alpha.tga new file mode 100644 index 0000000000..0242663a7d Binary files /dev/null and b/bin/openmetaverse_data/lowerbody_shading_alpha.tga differ diff --git a/bin/openmetaverse_data/nailpolish_alpha.tga b/bin/openmetaverse_data/nailpolish_alpha.tga new file mode 100644 index 0000000000..91af762902 Binary files /dev/null and b/bin/openmetaverse_data/nailpolish_alpha.tga differ diff --git a/bin/openmetaverse_data/pants_length_alpha.tga b/bin/openmetaverse_data/pants_length_alpha.tga new file mode 100644 index 0000000000..3c4f21c0f2 Binary files /dev/null and b/bin/openmetaverse_data/pants_length_alpha.tga differ diff --git a/bin/openmetaverse_data/pants_waist_alpha.tga b/bin/openmetaverse_data/pants_waist_alpha.tga new file mode 100644 index 0000000000..35658c0896 Binary files /dev/null and b/bin/openmetaverse_data/pants_waist_alpha.tga differ diff --git a/bin/openmetaverse_data/rosyface_alpha.tga b/bin/openmetaverse_data/rosyface_alpha.tga new file mode 100644 index 0000000000..a0c8513da2 Binary files /dev/null and b/bin/openmetaverse_data/rosyface_alpha.tga differ diff --git a/bin/openmetaverse_data/rouge_alpha.tga b/bin/openmetaverse_data/rouge_alpha.tga new file mode 100644 index 0000000000..a0c8513da2 Binary files /dev/null and b/bin/openmetaverse_data/rouge_alpha.tga differ diff --git a/bin/openmetaverse_data/shirt_bottom_alpha.tga b/bin/openmetaverse_data/shirt_bottom_alpha.tga new file mode 100644 index 0000000000..7cce03dbe0 Binary files /dev/null and b/bin/openmetaverse_data/shirt_bottom_alpha.tga differ diff --git a/bin/openmetaverse_data/shirt_collar_alpha.tga b/bin/openmetaverse_data/shirt_collar_alpha.tga new file mode 100644 index 0000000000..f55f635473 Binary files /dev/null and b/bin/openmetaverse_data/shirt_collar_alpha.tga differ diff --git a/bin/openmetaverse_data/shirt_collar_back_alpha.tga b/bin/openmetaverse_data/shirt_collar_back_alpha.tga new file mode 100644 index 0000000000..43a6453107 Binary files /dev/null and b/bin/openmetaverse_data/shirt_collar_back_alpha.tga differ diff --git a/bin/openmetaverse_data/shirt_sleeve_alpha.tga b/bin/openmetaverse_data/shirt_sleeve_alpha.tga new file mode 100644 index 0000000000..e3b18f4fc6 Binary files /dev/null and b/bin/openmetaverse_data/shirt_sleeve_alpha.tga differ diff --git a/bin/openmetaverse_data/shoe_height_alpha.tga b/bin/openmetaverse_data/shoe_height_alpha.tga new file mode 100644 index 0000000000..d08dd750f3 Binary files /dev/null and b/bin/openmetaverse_data/shoe_height_alpha.tga differ diff --git a/bin/openmetaverse_data/skirt_length_alpha.tga b/bin/openmetaverse_data/skirt_length_alpha.tga new file mode 100644 index 0000000000..c86799469d Binary files /dev/null and b/bin/openmetaverse_data/skirt_length_alpha.tga differ diff --git a/bin/openmetaverse_data/skirt_slit_back_alpha.tga b/bin/openmetaverse_data/skirt_slit_back_alpha.tga new file mode 100644 index 0000000000..0e49688b14 Binary files /dev/null and b/bin/openmetaverse_data/skirt_slit_back_alpha.tga differ diff --git a/bin/openmetaverse_data/skirt_slit_front_alpha.tga b/bin/openmetaverse_data/skirt_slit_front_alpha.tga new file mode 100644 index 0000000000..888bbf71a1 Binary files /dev/null and b/bin/openmetaverse_data/skirt_slit_front_alpha.tga differ diff --git a/bin/openmetaverse_data/skirt_slit_left_alpha.tga b/bin/openmetaverse_data/skirt_slit_left_alpha.tga new file mode 100644 index 0000000000..210feac1ea Binary files /dev/null and b/bin/openmetaverse_data/skirt_slit_left_alpha.tga differ diff --git a/bin/openmetaverse_data/skirt_slit_right_alpha.tga b/bin/openmetaverse_data/skirt_slit_right_alpha.tga new file mode 100644 index 0000000000..ce11c64bf6 Binary files /dev/null and b/bin/openmetaverse_data/skirt_slit_right_alpha.tga differ diff --git a/bin/openmetaverse_data/underpants_trial_female.tga b/bin/openmetaverse_data/underpants_trial_female.tga new file mode 100644 index 0000000000..96bf732351 Binary files /dev/null and b/bin/openmetaverse_data/underpants_trial_female.tga differ diff --git a/bin/openmetaverse_data/underpants_trial_male.tga b/bin/openmetaverse_data/underpants_trial_male.tga new file mode 100644 index 0000000000..095695ca1c Binary files /dev/null and b/bin/openmetaverse_data/underpants_trial_male.tga differ diff --git a/bin/openmetaverse_data/undershirt_trial_female.tga b/bin/openmetaverse_data/undershirt_trial_female.tga new file mode 100644 index 0000000000..e17a309531 Binary files /dev/null and b/bin/openmetaverse_data/undershirt_trial_female.tga differ diff --git a/bin/openmetaverse_data/upperbody_color.tga b/bin/openmetaverse_data/upperbody_color.tga new file mode 100644 index 0000000000..85fcc41142 Binary files /dev/null and b/bin/openmetaverse_data/upperbody_color.tga differ diff --git a/bin/openmetaverse_data/upperbody_highlights_alpha.tga b/bin/openmetaverse_data/upperbody_highlights_alpha.tga new file mode 100644 index 0000000000..2d8102b583 Binary files /dev/null and b/bin/openmetaverse_data/upperbody_highlights_alpha.tga differ diff --git a/bin/openmetaverse_data/upperbody_shading_alpha.tga b/bin/openmetaverse_data/upperbody_shading_alpha.tga new file mode 100644 index 0000000000..b420506b3e Binary files /dev/null and b/bin/openmetaverse_data/upperbody_shading_alpha.tga differ diff --git a/bin/openmetaverse_data/upperbodyfreckles_alpha.tga b/bin/openmetaverse_data/upperbodyfreckles_alpha.tga new file mode 100644 index 0000000000..76c7ce8849 Binary files /dev/null and b/bin/openmetaverse_data/upperbodyfreckles_alpha.tga differ diff --git a/bin/pCampBot.exe.config b/bin/pCampBot.exe.config old mode 100644 new mode 100755