Merge branch 'master' into careminster

Conflicts:
	OpenSim/Framework/WebUtil.cs
	OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
	OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
	OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
avinationmerge
Melanie 2012-05-05 10:32:04 +01:00
commit 31ab8b2fe0
60 changed files with 831 additions and 363 deletions

View File

@ -63,7 +63,8 @@ namespace OpenSim.Capabilities.Handlers
FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService); FetchInventory2Handler fiHandler = new FetchInventory2Handler(m_InventoryService);
IRequestHandler reqHandler IRequestHandler reqHandler
= new RestStreamHandler("POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest); = new RestStreamHandler(
"POST", "/CAPS/FetchInventory/", fiHandler.FetchInventoryRequest, "FetchInventory", null);
server.AddStreamHandler(reqHandler); server.AddStreamHandler(reqHandler);
} }
} }

View File

@ -66,13 +66,14 @@ namespace OpenSim.Capabilities.Handlers
throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName));
GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService);
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), IRequestHandler reqHandler
delegate(Hashtable m_dhttpMethod) = new RestHTTPHandler(
{ "GET",
return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null); "/CAPS/" + UUID.Random(),
}); httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null),
"GetMesh",
null);
server.AddStreamHandler(reqHandler); server.AddStreamHandler(reqHandler);
} }
} }
} }

View File

@ -58,8 +58,8 @@ namespace OpenSim.Capabilities.Handlers
// TODO: Change this to a config option // TODO: Change this to a config option
const string REDIRECT_URL = null; const string REDIRECT_URL = null;
public GetTextureHandler(string path, IAssetService assService) : public GetTextureHandler(string path, IAssetService assService, string name, string description)
base("GET", path) : base("GET", path, name, description)
{ {
m_assetService = assService; m_assetService = assService;
} }

View File

@ -62,8 +62,8 @@ namespace OpenSim.Capabilities.Handlers
if (m_AssetService == null) if (m_AssetService == null)
throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName));
server.AddStreamHandler(new GetTextureHandler("/CAPS/GetTexture/" /*+ UUID.Random() */, m_AssetService)); server.AddStreamHandler(
new GetTextureHandler("/CAPS/GetTexture/" /*+ UUID.Random() */, m_AssetService, "GetTexture", null));
} }
} }
} }

View File

@ -52,7 +52,7 @@ namespace OpenSim.Capabilities.Handlers.GetTexture.Tests
// Overkill - we only really need the asset service, not a whole scene. // Overkill - we only really need the asset service, not a whole scene.
Scene scene = new SceneHelpers().SetupScene(); Scene scene = new SceneHelpers().SetupScene();
GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService); GetTextureHandler handler = new GetTextureHandler(null, scene.AssetService, "TestGetTexture", null);
TestOSHttpRequest req = new TestOSHttpRequest(); TestOSHttpRequest req = new TestOSHttpRequest();
TestOSHttpResponse resp = new TestOSHttpResponse(); TestOSHttpResponse resp = new TestOSHttpResponse();
req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012"); req.Url = new Uri("http://localhost/?texture_id=00000000-0000-1111-9999-000000000012");

View File

@ -85,8 +85,8 @@ namespace OpenSim.Capabilities.Handlers
uploader.OnUpLoad += BakedTextureUploaded; uploader.OnUpLoad += BakedTextureUploaded;
m_HostCapsObj.HttpListener.AddStreamHandler( m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath, new BinaryStreamHandler(
uploader.uploaderCaps)); "POST", capsBase + uploaderPath, uploader.uploaderCaps, "UploadBakedTexture", null));
string protocol = "http://"; string protocol = "http://";

View File

@ -68,7 +68,13 @@ namespace OpenSim.Capabilities.Handlers
ServerUtils.LoadPlugin<ILibraryService>(libService, args); ServerUtils.LoadPlugin<ILibraryService>(libService, args);
WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/, webFetchHandler.FetchInventoryDescendentsRequest); IRequestHandler reqHandler
= new RestStreamHandler(
"POST",
"/CAPS/WebFetchInvDesc/" /*+ UUID.Random()*/,
webFetchHandler.FetchInventoryDescendentsRequest,
"WebFetchInvDesc",
null);
server.AddStreamHandler(reqHandler); server.AddStreamHandler(reqHandler);
} }

View File

@ -39,7 +39,11 @@ namespace OpenSim.Framework.Capabilities
private LLSDMethod<TRequest, TResponse> m_method; private LLSDMethod<TRequest, TResponse> m_method;
public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
: base(httpMethod, path) : this(httpMethod, path, method, null, null) {}
public LLSDStreamhandler(
string httpMethod, string path, LLSDMethod<TRequest, TResponse> method, string name, string description)
: base(httpMethod, path, name, description)
{ {
m_method = method; m_method = method;
} }

View File

@ -33,9 +33,9 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
public abstract Hashtable Handle(string path, Hashtable Request); public abstract Hashtable Handle(string path, Hashtable Request);
protected BaseHTTPHandler(string httpMethod, string path) protected BaseHTTPHandler(string httpMethod, string path) : this(httpMethod, path, null, null) {}
: base(httpMethod, path)
{ protected BaseHTTPHandler(string httpMethod, string path, string name, string description)
} : base(httpMethod, path, name, description) {}
} }
} }

View File

@ -410,6 +410,8 @@ namespace OpenSim.Framework.Servers.HttpServer
// string reqnum = "unknown"; // string reqnum = "unknown";
int tickstart = Environment.TickCount; int tickstart = Environment.TickCount;
IRequestHandler requestHandler = null;
try try
{ {
// OpenSim.Framework.WebUtil.OSHeaderRequestID // OpenSim.Framework.WebUtil.OSHeaderRequestID
@ -438,8 +440,6 @@ namespace OpenSim.Framework.Servers.HttpServer
//response.KeepAlive = true; //response.KeepAlive = true;
response.SendChunked = false; response.SendChunked = false;
IRequestHandler requestHandler;
string path = request.RawUrl; string path = request.RawUrl;
string handlerKey = GetHandlerKey(request.HttpMethod, path); string handlerKey = GetHandlerKey(request.HttpMethod, path);
@ -675,8 +675,16 @@ namespace OpenSim.Framework.Servers.HttpServer
// since its just for reporting, tickdiff limit can be adjusted // since its just for reporting, tickdiff limit can be adjusted
int tickdiff = Environment.TickCount - tickstart; int tickdiff = Environment.TickCount - tickstart;
if (tickdiff > 3000) if (tickdiff > 3000)
{
m_log.InfoFormat( m_log.InfoFormat(
"[BASE HTTP SERVER]: slow {0} request for {1} from {2} took {3} ms", requestMethod, uriString, request.RemoteIPEndPoint.ToString(), tickdiff); "[BASE HTTP SERVER]: Slow handling of {0} {1} {2} {3} from {4} took {5}ms",
requestMethod,
uriString,
requestHandler != null ? requestHandler.Name : "",
requestHandler != null ? requestHandler.Description : "",
request.RemoteIPEndPoint.ToString(),
tickdiff);
}
} }
} }

View File

@ -45,8 +45,16 @@ namespace OpenSim.Framework.Servers.HttpServer
private readonly string m_path; private readonly string m_path;
protected BaseRequestHandler(string httpMethod, string path) public string Name { get; private set; }
public string Description { get; private set; }
protected BaseRequestHandler(string httpMethod, string path) : this(httpMethod, path, null, null) {}
protected BaseRequestHandler(string httpMethod, string path, string name, string description)
{ {
Name = name;
Description = description;
m_httpMethod = httpMethod; m_httpMethod = httpMethod;
m_path = path; m_path = path;
} }

View File

@ -34,8 +34,9 @@ namespace OpenSim.Framework.Servers.HttpServer
public abstract byte[] Handle(string path, Stream request, public abstract byte[] Handle(string path, Stream request,
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse); IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path) protected BaseStreamHandler(string httpMethod, string path) : this(httpMethod, path, null, null) {}
{
} protected BaseStreamHandler(string httpMethod, string path, string name, string description)
: base(httpMethod, path, name, description) {}
} }
} }

View File

@ -36,6 +36,15 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
private BinaryMethod m_method; private BinaryMethod m_method;
public BinaryStreamHandler(string httpMethod, string path, BinaryMethod binaryMethod)
: this(httpMethod, path, binaryMethod, null, null) {}
public BinaryStreamHandler(string httpMethod, string path, BinaryMethod binaryMethod, string name, string description)
: base(httpMethod, path, name, description)
{
m_method = binaryMethod;
}
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{ {
byte[] data = ReadFully(request); byte[] data = ReadFully(request);
@ -45,12 +54,6 @@ namespace OpenSim.Framework.Servers.HttpServer
return Encoding.UTF8.GetBytes(responseString); return Encoding.UTF8.GetBytes(responseString);
} }
public BinaryStreamHandler(string httpMethod, string path, BinaryMethod binaryMethod)
: base(httpMethod, path)
{
m_method = binaryMethod;
}
private static byte[] ReadFully(Stream stream) private static byte[] ReadFully(Stream stream)
{ {
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];

View File

@ -32,6 +32,25 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
public interface IRequestHandler public interface IRequestHandler
{ {
/// <summary>
/// Name for this handler.
/// </summary>
/// <remarks>
/// Used for diagnostics. The path doesn't always describe what the handler does. Can be null if none
/// specified.
/// </remarks>
string Name { get; }
/// <summary>
/// Description for this handler.
/// </summary>
/// <remarks>
/// Used for diagnostics. The path doesn't always describe what the handler does. Can be null if none
/// specified.
/// </remarks>
string Description { get; }
// Return response content type // Return response content type
string ContentType { get; } string ContentType { get; }

View File

@ -39,7 +39,11 @@ namespace OpenSim.Framework.Servers.HttpServer
private RestDeserialiseMethod<TRequest, TResponse> m_method; private RestDeserialiseMethod<TRequest, TResponse> m_method;
public RestDeserialiseHandler(string httpMethod, string path, RestDeserialiseMethod<TRequest, TResponse> method) public RestDeserialiseHandler(string httpMethod, string path, RestDeserialiseMethod<TRequest, TResponse> method)
: base(httpMethod, path) : this(httpMethod, path, method, null, null) {}
public RestDeserialiseHandler(
string httpMethod, string path, RestDeserialiseMethod<TRequest, TResponse> method, string name, string description)
: base(httpMethod, path, name, description)
{ {
m_method = method; m_method = method;
} }

View File

@ -38,19 +38,25 @@ namespace OpenSim.Framework.Servers.HttpServer
get { return m_dhttpMethod; } get { return m_dhttpMethod; }
} }
public override Hashtable Handle(string path, Hashtable request)
{
string param = GetParam(path);
request.Add("param", param);
request.Add("path", path);
return m_dhttpMethod(request);
}
public RestHTTPHandler(string httpMethod, string path, GenericHTTPMethod dhttpMethod) public RestHTTPHandler(string httpMethod, string path, GenericHTTPMethod dhttpMethod)
: base(httpMethod, path) : base(httpMethod, path)
{ {
m_dhttpMethod = dhttpMethod; m_dhttpMethod = dhttpMethod;
} }
public RestHTTPHandler(
string httpMethod, string path, GenericHTTPMethod dhttpMethod, string name, string description)
: base(httpMethod, path, name, description)
{
m_dhttpMethod = dhttpMethod;
}
public override Hashtable Handle(string path, Hashtable request)
{
string param = GetParam(path);
request.Add("param", param);
request.Add("path", path);
return m_dhttpMethod(request);
}
} }
} }

View File

@ -39,6 +39,15 @@ namespace OpenSim.Framework.Servers.HttpServer
get { return m_restMethod; } get { return m_restMethod; }
} }
public RestStreamHandler(string httpMethod, string path, RestMethod restMethod)
: this(httpMethod, path, restMethod, null, null) {}
public RestStreamHandler(string httpMethod, string path, RestMethod restMethod, string name, string description)
: base(httpMethod, path, name, description)
{
m_restMethod = restMethod;
}
public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{ {
Encoding encoding = Encoding.UTF8; Encoding encoding = Encoding.UTF8;
@ -52,10 +61,5 @@ namespace OpenSim.Framework.Servers.HttpServer
return Encoding.UTF8.GetBytes(responseString); return Encoding.UTF8.GetBytes(responseString);
} }
public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base(httpMethod, path)
{
m_restMethod = restMethod;
}
} }
} }

View File

@ -26,6 +26,8 @@
*/ */
using System; using System;
using System.Reflection;
using log4net;
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
@ -35,6 +37,8 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
public class TaskInventoryItem : ICloneable public class TaskInventoryItem : ICloneable
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// XXX This should really be factored out into some constants class. /// XXX This should really be factored out into some constants class.
/// </summary> /// </summary>
@ -334,12 +338,18 @@ namespace OpenSim.Framework
} }
} }
public bool OwnerChanged { public bool OwnerChanged
get { {
get
{
return _ownerChanged; return _ownerChanged;
} }
set { set
{
_ownerChanged = value; _ownerChanged = value;
// m_log.DebugFormat(
// "[TASK INVENTORY ITEM]: Owner changed set {0} for {1} {2} owned by {3}",
// _ownerChanged, Name, ItemID, OwnerID);
} }
} }

View File

@ -53,20 +53,37 @@ namespace OpenSim.Framework
LogManager.GetLogger( LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private static int m_requestNumber = 0; /// <summary>
/// Request number for diagnostic purposes.
/// </summary>
public static int RequestNumber = 0;
// this is the header field used to communicate the local request id /// <summary>
// used for performance and debugging /// this is the header field used to communicate the local request id
/// used for performance and debugging
/// </summary>
public const string OSHeaderRequestID = "opensim-request-id"; public const string OSHeaderRequestID = "opensim-request-id";
// number of milliseconds a call can take before it is considered /// <summary>
// a "long" call for warning & debugging purposes /// Number of milliseconds a call can take before it is considered
public const int LongCallTime = 500; /// a "long" call for warning & debugging purposes
/// </summary>
public const int LongCallTime = 3000;
// dictionary of end points /// <summary>
/// The maximum length of any data logged because of a long request time.
/// </summary>
/// <remarks>
/// This is to truncate any really large post data, such as an asset. In theory, the first section should
/// give us useful information about the call (which agent it relates to if applicable, etc.).
/// </remarks>
public const int MaxRequestDiagLength = 100;
/// <summary>
/// Dictionary of end points
/// </summary>
private static Dictionary<string,object> m_endpointSerializer = new Dictionary<string,object>(); private static Dictionary<string,object> m_endpointSerializer = new Dictionary<string,object>();
private static object EndPointLock(string url) private static object EndPointLock(string url)
{ {
System.Uri uri = new System.Uri(url); System.Uri uri = new System.Uri(url);
@ -128,12 +145,13 @@ namespace OpenSim.Framework
private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed) private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed)
{ {
int reqnum = m_requestNumber++; int reqnum = RequestNumber++;
// m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method);
string errorMessage = "unknown error"; string errorMessage = "unknown error";
int tickstart = Util.EnvironmentTickCount(); int tickstart = Util.EnvironmentTickCount();
int tickdata = 0; int tickdata = 0;
string strBuffer = null;
try try
{ {
@ -148,7 +166,7 @@ namespace OpenSim.Framework
// If there is some input, write it into the request // If there is some input, write it into the request
if (data != null) if (data != null)
{ {
string strBuffer = OSDParser.SerializeJsonString(data); strBuffer = OSDParser.SerializeJsonString(data);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer);
if (compressed) if (compressed)
@ -209,11 +227,18 @@ namespace OpenSim.Framework
} }
finally finally
{ {
// This just dumps a warning for any operation that takes more than 100 ms
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
if (tickdiff > LongCallTime) if (tickdiff > LongCallTime)
m_log.DebugFormat("[WEB UTIL]: osd request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", m_log.InfoFormat(
reqnum,url,method,tickdiff,tickdata); "[OSD REQUEST]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}",
reqnum,
method,
url,
tickdiff,
tickdata,
strBuffer != null
? (strBuffer.Length > MaxRequestDiagLength ? strBuffer.Remove(MaxRequestDiagLength) : strBuffer)
: "");
} }
m_log.DebugFormat( m_log.DebugFormat(
@ -291,17 +316,17 @@ namespace OpenSim.Framework
private static OSDMap ServiceFormRequestWorker(string url, NameValueCollection data, int timeout) private static OSDMap ServiceFormRequestWorker(string url, NameValueCollection data, int timeout)
{ {
int reqnum = m_requestNumber++; int reqnum = RequestNumber++;
string method = (data != null && data["RequestMethod"] != null) ? data["RequestMethod"] : "unknown"; 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); // m_log.DebugFormat("[WEB UTIL]: <{0}> start form request for {1}, method {2}",reqnum,url,method);
string errorMessage = "unknown error"; string errorMessage = "unknown error";
int tickstart = Util.EnvironmentTickCount(); int tickstart = Util.EnvironmentTickCount();
int tickdata = 0; int tickdata = 0;
string queryString = null;
try try
{ {
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST"; request.Method = "POST";
request.Timeout = timeout; request.Timeout = timeout;
@ -312,7 +337,7 @@ namespace OpenSim.Framework
if (data != null) if (data != null)
{ {
string queryString = BuildQueryString(data); queryString = BuildQueryString(data);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString); byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString);
request.ContentLength = buffer.Length; request.ContentLength = buffer.Length;
@ -355,11 +380,19 @@ namespace OpenSim.Framework
{ {
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
if (tickdiff > LongCallTime) if (tickdiff > LongCallTime)
m_log.InfoFormat("[WEB UTIL]: form request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", m_log.InfoFormat(
reqnum,url,method,tickdiff,tickdata); "[SERVICE FORM]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}",
reqnum,
method,
url,
tickdiff,
tickdata,
queryString != null
? (queryString.Length > MaxRequestDiagLength) ? queryString.Remove(MaxRequestDiagLength) : queryString
: "");
} }
m_log.WarnFormat("[WEB UTIL]: <{0}> form request to {1} failed: {2}", reqnum, url, errorMessage); m_log.WarnFormat("[SERVICE FORM]: <{0}> form request to {1} failed: {2}", reqnum, url, errorMessage);
return ErrorResponseMap(errorMessage); return ErrorResponseMap(errorMessage);
} }
@ -640,8 +673,6 @@ namespace OpenSim.Framework
return new string[0]; return new string[0];
} }
} }
public static class AsynchronousRestObjectRequester public static class AsynchronousRestObjectRequester
@ -664,6 +695,12 @@ namespace OpenSim.Framework
public static void MakeRequest<TRequest, TResponse>(string verb, public static void MakeRequest<TRequest, TResponse>(string verb,
string requestUrl, TRequest obj, Action<TResponse> action) string requestUrl, TRequest obj, Action<TResponse> action)
{ {
int reqnum = WebUtil.RequestNumber++;
// m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method);
int tickstart = Util.EnvironmentTickCount();
int tickdata = 0;
// m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} {1}", verb, requestUrl); // m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} {1}", verb, requestUrl);
Type type = typeof(TRequest); Type type = typeof(TRequest);
@ -674,12 +711,13 @@ namespace OpenSim.Framework
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
request.Method = verb; request.Method = verb;
MemoryStream buffer = null;
if (verb == "POST") if (verb == "POST")
{ {
request.ContentType = "text/xml"; request.ContentType = "text/xml";
MemoryStream buffer = new MemoryStream(); buffer = new MemoryStream();
XmlWriterSettings settings = new XmlWriterSettings(); XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = Encoding.UTF8; settings.Encoding = Encoding.UTF8;
@ -701,6 +739,9 @@ namespace OpenSim.Framework
requestStream.Write(buffer.ToArray(), 0, length); requestStream.Write(buffer.ToArray(), 0, length);
requestStream.Close(); requestStream.Close();
// capture how much time was spent writing
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
request.BeginGetResponse(delegate(IAsyncResult ar) request.BeginGetResponse(delegate(IAsyncResult ar)
{ {
response = request.EndGetResponse(ar); response = request.EndGetResponse(ar);
@ -726,11 +767,9 @@ namespace OpenSim.Framework
}, null); }, null);
}, null); }, null);
return;
} }
else
{
request.BeginGetResponse(delegate(IAsyncResult res2) request.BeginGetResponse(delegate(IAsyncResult res2)
{ {
try try
@ -801,13 +840,35 @@ namespace OpenSim.Framework
}, null); }, null);
} }
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
if (tickdiff > WebUtil.LongCallTime)
{
string originalRequest = null;
if (buffer != null)
{
originalRequest = Encoding.UTF8.GetString(buffer.ToArray());
if (originalRequest.Length > WebUtil.MaxRequestDiagLength)
originalRequest = originalRequest.Remove(WebUtil.MaxRequestDiagLength);
}
m_log.InfoFormat(
"[ASYNC REQUEST]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}",
reqnum,
verb,
requestUrl,
tickdiff,
tickdata,
originalRequest);
}
}
} }
public static class SynchronousRestFormsRequester public static class SynchronousRestFormsRequester
{ {
private static readonly ILog m_log = private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// Perform a synchronous REST request. /// Perform a synchronous REST request.
@ -821,6 +882,12 @@ namespace OpenSim.Framework
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception> /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
public static string MakeRequest(string verb, string requestUrl, string obj) 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);
int tickstart = Util.EnvironmentTickCount();
int tickdata = 0;
WebRequest request = WebRequest.Create(requestUrl); WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb; request.Method = verb;
string respstring = String.Empty; string respstring = String.Empty;
@ -856,6 +923,9 @@ namespace OpenSim.Framework
{ {
if (requestStream != null) if (requestStream != null)
requestStream.Close(); requestStream.Close();
// capture how much time was spent writing
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
} }
} }
@ -894,6 +964,18 @@ namespace OpenSim.Framework
m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving {0} {1}", verb, requestUrl); m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving {0} {1}", verb, requestUrl);
} }
} }
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}",
reqnum,
verb,
requestUrl,
tickdiff,
tickdata,
obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
return respstring; return respstring;
} }
} }
@ -921,6 +1003,12 @@ namespace OpenSim.Framework
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout) public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
{ {
int reqnum = WebUtil.RequestNumber++;
// m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method);
int tickstart = Util.EnvironmentTickCount();
int tickdata = 0;
Type type = typeof(TRequest); Type type = typeof(TRequest);
TResponse deserial = default(TResponse); TResponse deserial = default(TResponse);
@ -928,12 +1016,13 @@ namespace OpenSim.Framework
request.Method = verb; request.Method = verb;
if (pTimeout != 0) if (pTimeout != 0)
request.Timeout = pTimeout * 1000; request.Timeout = pTimeout * 1000;
MemoryStream buffer = null;
if ((verb == "POST") || (verb == "PUT")) if ((verb == "POST") || (verb == "PUT"))
{ {
request.ContentType = "text/xml"; request.ContentType = "text/xml";
MemoryStream buffer = new MemoryStream(); buffer = new MemoryStream();
XmlWriterSettings settings = new XmlWriterSettings(); XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = Encoding.UTF8; settings.Encoding = Encoding.UTF8;
@ -966,6 +1055,9 @@ namespace OpenSim.Framework
{ {
if (requestStream != null) if (requestStream != null)
requestStream.Close(); requestStream.Close();
// capture how much time was spent writing
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
} }
} }
@ -1013,6 +1105,29 @@ namespace OpenSim.Framework
verb, requestUrl, e.Message, e.StackTrace); verb, requestUrl, e.Message, e.StackTrace);
} }
int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
if (tickdiff > WebUtil.LongCallTime)
{
string originalRequest = null;
if (buffer != null)
{
originalRequest = Encoding.UTF8.GetString(buffer.ToArray());
if (originalRequest.Length > WebUtil.MaxRequestDiagLength)
originalRequest = originalRequest.Remove(WebUtil.MaxRequestDiagLength);
}
m_log.InfoFormat(
"[SynchronousRestObjectRequester]: Slow request to <{0}> {1} {2} took {3}ms, {4}ms writing, {5}",
reqnum,
verb,
requestUrl,
tickdiff,
tickdata,
originalRequest);
}
return deserial; return deserial;
} }
} }

View File

@ -437,7 +437,7 @@ namespace OpenSim
scene.LoadPrimsFromStorage(regionInfo.originRegionID); scene.LoadPrimsFromStorage(regionInfo.originRegionID);
// TODO : Try setting resource for region xstats here on scene // TODO : Try setting resource for region xstats here on scene
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo));
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.EventManager.TriggerParcelPrimCountUpdate(); scene.EventManager.TriggerParcelPrimCountUpdate();
@ -856,6 +856,9 @@ namespace OpenSim
return Util.UTF8.GetBytes("OK"); return Util.UTF8.GetBytes("OK");
} }
public string Name { get { return "SimStatus"; } }
public string Description { get { return "Simulator Status"; } }
public string ContentType public string ContentType
{ {
get { return "text/plain"; } get { return "text/plain"; }
@ -881,6 +884,9 @@ namespace OpenSim
OpenSimBase m_opensim; OpenSimBase m_opensim;
string osXStatsURI = String.Empty; string osXStatsURI = String.Empty;
public string Name { get { return "XSimStatus"; } }
public string Description { get { return "Simulator XStatus"; } }
public XSimStatusHandler(OpenSimBase sim) public XSimStatusHandler(OpenSimBase sim)
{ {
m_opensim = sim; m_opensim = sim;
@ -921,6 +927,9 @@ namespace OpenSim
OpenSimBase m_opensim; OpenSimBase m_opensim;
string osUXStatsURI = String.Empty; string osUXStatsURI = String.Empty;
public string Name { get { return "UXSimStatus"; } }
public string Description { get { return "Simulator UXStatus"; } }
public UXSimStatusHandler(OpenSimBase sim) public UXSimStatusHandler(OpenSimBase sim)
{ {
m_opensim = sim; m_opensim = sim;

View File

@ -158,7 +158,9 @@ namespace OpenSim.Region.ClientStack.Linden
try try
{ {
// the root of all evil // the root of all evil
m_HostCapsObj.RegisterHandler("SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest)); m_HostCapsObj.RegisterHandler(
"SEED", new RestStreamHandler("POST", capsBase + m_requestPath, SeedCapRequest, "SEED", null));
m_log.DebugFormat( m_log.DebugFormat(
"[CAPS]: Registered seed capability {0} for {1}", capsBase + m_requestPath, m_HostCapsObj.AgentID); "[CAPS]: Registered seed capability {0} for {1}", capsBase + m_requestPath, m_HostCapsObj.AgentID);
@ -166,7 +168,10 @@ namespace OpenSim.Region.ClientStack.Linden
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
// capsBase + m_mapLayerPath, // capsBase + m_mapLayerPath,
// GetMapLayer); // GetMapLayer);
IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); IRequestHandler req
= new RestStreamHandler(
"POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null);
m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptTaskInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptTask", req); m_HostCapsObj.RegisterHandler("UpdateScriptTask", req);
} }
@ -181,14 +186,22 @@ namespace OpenSim.Region.ClientStack.Linden
try try
{ {
// I don't think this one works... // I don't think this one works...
m_HostCapsObj.RegisterHandler("NewFileAgentInventory", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", m_HostCapsObj.RegisterHandler(
"NewFileAgentInventory",
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>(
"POST",
capsBase + m_newInventory, capsBase + m_newInventory,
NewAgentInventoryRequest)); NewAgentInventoryRequest,
IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); "NewFileAgentInventory",
null));
IRequestHandler req
= new RestStreamHandler(
"POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory, "Update*", null);
m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard));
IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData); IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData);
m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler);
IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost);
@ -197,6 +210,12 @@ namespace OpenSim.Region.ClientStack.Linden
m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler);
m_HostCapsObj.RegisterHandler(
"CopyInventoryFromNotecard",
new RestStreamHandler(
"POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null));
// As of RC 1.22.9 of the Linden client this is // As of RC 1.22.9 of the Linden client this is
// supported // supported
@ -299,7 +318,9 @@ namespace OpenSim.Region.ClientStack.Linden
m_dumpAssetsToFile); m_dumpAssetsToFile);
uploader.OnUpLoad += TaskScriptUpdated; uploader.OnUpLoad += TaskScriptUpdated;
m_HostCapsObj.HttpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler(
"POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null));
string protocol = "http://"; string protocol = "http://";
@ -426,8 +447,14 @@ namespace OpenSim.Region.ClientStack.Linden
AssetUploader uploader = AssetUploader uploader =
new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type,
llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile); llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile);
m_HostCapsObj.HttpListener.AddStreamHandler( m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); new BinaryStreamHandler(
"POST",
capsBase + uploaderPath,
uploader.uploaderCaps,
"NewAgentInventoryRequest",
m_HostCapsObj.AgentID.ToString()));
string protocol = "http://"; string protocol = "http://";
@ -743,7 +770,8 @@ namespace OpenSim.Region.ClientStack.Linden
uploader.OnUpLoad += ItemUpdated; uploader.OnUpLoad += ItemUpdated;
m_HostCapsObj.HttpListener.AddStreamHandler( m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); new BinaryStreamHandler(
"POST", capsBase + uploaderPath, uploader.uploaderCaps, "NoteCardAgentInventory", null));
string protocol = "http://"; string protocol = "http://";

View File

@ -351,14 +351,18 @@ namespace OpenSim.Region.ClientStack.Linden
// EventQueueGet when it receive capability information, but then we replace the rest handler immediately // EventQueueGet when it receive capability information, but then we replace the rest handler immediately
// afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but
// really it should be possible to directly register the poll handler as a capability. // really it should be possible to directly register the poll handler as a capability.
caps.RegisterHandler("EventQueueGet", caps.RegisterHandler(
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null)); "EventQueueGet",
new RestHTTPHandler(
"POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
// delegate(Hashtable m_dhttpMethod) // delegate(Hashtable m_dhttpMethod)
// { // {
// return ProcessQueue(m_dhttpMethod, agentID, caps); // return ProcessQueue(m_dhttpMethod, agentID, caps);
// })); // }));
// This will persist this beyond the expiry of the caps handlers // This will persist this beyond the expiry of the caps handlers
// TODO: Add EventQueueGet name/description for diagnostics
MainServer.Instance.AddPollServiceHTTPHandler( MainServer.Instance.AddPollServiceHTTPHandler(
capsBase + EventQueueGetUUID.ToString() + "/", capsBase + EventQueueGetUUID.ToString() + "/",
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));

View File

@ -132,7 +132,8 @@ namespace OpenSim.Region.ClientStack.Linden
capUrl = "/CAPS/" + UUID.Random(); capUrl = "/CAPS/" + UUID.Random();
IRequestHandler reqHandler IRequestHandler reqHandler
= new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest); = new RestStreamHandler(
"POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString());
caps.RegisterHandler(capName, reqHandler); caps.RegisterHandler(capName, reqHandler);
} }

View File

@ -120,11 +120,13 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
// m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); // m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService); GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService);
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), IRequestHandler reqHandler
delegate(Hashtable m_dhttpMethod) = new RestHTTPHandler(
{ "GET",
return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null); "/CAPS/" + UUID.Random(),
}); httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null),
"GetMesh",
agentID.ToString());
caps.RegisterHandler("GetMesh", reqHandler); caps.RegisterHandler("GetMesh", reqHandler);
} }

View File

@ -130,7 +130,9 @@ namespace OpenSim.Region.ClientStack.Linden
if (m_URL == "localhost") if (m_URL == "localhost")
{ {
// m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); // m_log.DebugFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); caps.RegisterHandler(
"GetTexture",
new GetTextureHandler("/CAPS/" + capID + "/", m_assetService, "GetTexture", agentID.ToString()));
} }
else else
{ {

View File

@ -117,7 +117,9 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegisterCaps(UUID agentID, Caps caps) public void RegisterCaps(UUID agentID, Caps caps)
{ {
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag); IRequestHandler reqHandler
= new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag, "MeshUploadFlag", agentID.ToString());
caps.RegisterHandler("MeshUploadFlag", reqHandler); caps.RegisterHandler("MeshUploadFlag", reqHandler);
m_agentID = agentID; m_agentID = agentID;
} }

View File

@ -115,31 +115,29 @@ namespace OpenSim.Region.ClientStack.Linden
UUID capID = UUID.Random(); UUID capID = UUID.Random();
// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);
caps.RegisterHandler("NewFileAgentInventoryVariablePrice", caps.RegisterHandler(
"NewFileAgentInventoryVariablePrice",
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>(
"POST",
"/CAPS/" + capID.ToString(), "/CAPS/" + capID.ToString(),
delegate(LLSDAssetUploadRequest req) req => NewAgentInventoryRequest(req, agentID),
{ "NewFileAgentInventoryVariablePrice",
return NewAgentInventoryRequest(req,agentID); agentID.ToString()));
}));
} }
#endregion #endregion
public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID) public LLSDNewFileAngentInventoryVariablePriceReplyResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest, UUID agentID)
{ {
//TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit //TODO: The Mesh uploader uploads many types of content. If you're going to implement a Money based limit
// You need to be aware of this and // you need to be aware of this
//if (llsdRequest.asset_type == "texture" || //if (llsdRequest.asset_type == "texture" ||
// llsdRequest.asset_type == "animation" || // llsdRequest.asset_type == "animation" ||
// llsdRequest.asset_type == "sound") // llsdRequest.asset_type == "sound")
// { // {
// check user level // check user level
ScenePresence avatar = null; ScenePresence avatar = null;
IClientAPI client = null; IClientAPI client = null;
m_scene.TryGetScenePresence(agentID, out avatar); m_scene.TryGetScenePresence(agentID, out avatar);
@ -176,6 +174,7 @@ namespace OpenSim.Region.ClientStack.Linden
return errorResponse; return errorResponse;
} }
} }
// } // }
string assetName = llsdRequest.name; string assetName = llsdRequest.name;
@ -189,8 +188,14 @@ namespace OpenSim.Region.ClientStack.Linden
AssetUploader uploader = AssetUploader uploader =
new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type,
llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile); llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile);
MainServer.Instance.AddStreamHandler( MainServer.Instance.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); new BinaryStreamHandler(
"POST",
capsBase + uploaderPath,
uploader.uploaderCaps,
"NewFileAgentInventoryVariablePrice",
agentID.ToString()));
string protocol = "http://"; string protocol = "http://";
@ -203,7 +208,6 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse(); LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
uploadResponse.rsvp = uploaderURL; uploadResponse.rsvp = uploaderURL;
uploadResponse.state = "upload"; uploadResponse.state = "upload";
uploadResponse.resource_cost = 0; uploadResponse.resource_cost = 0;
@ -220,6 +224,7 @@ namespace OpenSim.Region.ClientStack.Linden
pinventoryItem, pparentFolder, pdata, pinventoryType, pinventoryItem, pparentFolder, pdata, pinventoryType,
passetType,agentID); passetType,agentID);
}; };
return uploadResponse; return uploadResponse;
} }

View File

@ -66,12 +66,14 @@ namespace OpenSim.Region.ClientStack.Linden
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
caps.RegisterHandler("ObjectAdd", caps.RegisterHandler(
new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/", "ObjectAdd",
delegate(Hashtable m_dhttpMethod) new RestHTTPHandler(
{ "POST",
return ProcessAdd(m_dhttpMethod, agentID, caps); "/CAPS/OA/" + capuuid + "/",
})); httpMethod => ProcessAdd(httpMethod, agentID, caps),
"ObjectAdd",
agentID.ToString()));;
} }
public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap)

View File

@ -106,12 +106,15 @@ namespace OpenSim.Region.ClientStack.Linden
UUID capID = UUID.Random(); UUID capID = UUID.Random();
// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
caps.RegisterHandler("UploadObjectAsset", caps.RegisterHandler(
new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/", "UploadObjectAsset",
delegate(Hashtable m_dhttpMethod) new RestHTTPHandler(
{ "POST",
return ProcessAdd(m_dhttpMethod, agentID, caps); "/CAPS/OA/" + capID + "/",
})); httpMethod => ProcessAdd(httpMethod, agentID, caps),
"UploadObjectAsset",
agentID.ToString()));
/* /*
caps.RegisterHandler("NewFileAgentInventoryVariablePrice", caps.RegisterHandler("NewFileAgentInventoryVariablePrice",

View File

@ -154,7 +154,9 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegisterCaps(UUID agentID, Caps caps) public void RegisterCaps(UUID agentID, Caps caps)
{ {
IRequestHandler reqHandler IRequestHandler reqHandler
= new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), HandleSimulatorFeaturesRequest); = new RestHTTPHandler(
"GET", "/CAPS/" + UUID.Random(),
HandleSimulatorFeaturesRequest, "SimulatorFeatures", agentID.ToString());
caps.RegisterHandler("SimulatorFeatures", reqHandler); caps.RegisterHandler("SimulatorFeatures", reqHandler);
} }

View File

@ -106,7 +106,9 @@ namespace OpenSim.Region.ClientStack.Linden
"POST", "POST",
"/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath,
new UploadBakedTextureHandler( new UploadBakedTextureHandler(
caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture)); caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture,
"UploadBakedTexture",
agentID.ToString()));
} }
} }
} }

View File

@ -144,7 +144,12 @@ namespace OpenSim.Region.ClientStack.Linden
capUrl = "/CAPS/" + UUID.Random(); capUrl = "/CAPS/" + UUID.Random();
IRequestHandler reqHandler IRequestHandler reqHandler
= new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest); = new RestStreamHandler(
"POST",
capUrl,
m_webFetchHandler.FetchInventoryDescendentsRequest,
"FetchInventoryDescendents2",
agentID.ToString());
caps.RegisterHandler(capName, reqHandler); caps.RegisterHandler(capName, reqHandler);
} }

View File

@ -83,7 +83,7 @@ namespace Flotsam.RegionModules.AssetCache
private Dictionary<string, ManualResetEvent> m_CurrentlyWriting = new Dictionary<string, ManualResetEvent>(); private Dictionary<string, ManualResetEvent> m_CurrentlyWriting = new Dictionary<string, ManualResetEvent>();
private int m_WaitOnInprogressTimeout = 3000; private int m_WaitOnInprogressTimeout = 3000;
#else #else
private List<string> m_CurrentlyWriting = new List<string>(); private HashSet<string> m_CurrentlyWriting = new HashSet<string>();
#endif #endif
private bool m_FileCacheEnabled = true; private bool m_FileCacheEnabled = true;
@ -272,8 +272,12 @@ namespace Flotsam.RegionModules.AssetCache
// the other thread has updated the time for us. // the other thread has updated the time for us.
try try
{ {
lock (m_CurrentlyWriting)
{
if (!m_CurrentlyWriting.Contains(filename))
File.SetLastAccessTime(filename, DateTime.Now); File.SetLastAccessTime(filename, DateTime.Now);
} }
}
catch catch
{ {
} }

View File

@ -578,9 +578,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
private void AttachToAgent( private void AttachToAgent(
IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", // "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
// so.Name, avatar.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); // so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
so.DetachFromBackup(); so.DetachFromBackup();
@ -845,9 +845,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// <param name="att"></param> /// <param name="att"></param>
private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att) private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
// att.Name, sp.Name, AttachmentPt, itemID); // att.Name, sp.Name, AttachmentPt, itemID);
if (UUID.Zero == itemID) if (UUID.Zero == itemID)
{ {
@ -910,9 +910,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})", // "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
// objectLocalID, remoteClient.Name, AttachmentPt, silent); // objectLocalID, remoteClient.Name, AttachmentPt, silent);
if (!Enabled) if (!Enabled)
return; return;

View File

@ -96,6 +96,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
ScenePresence killingAvatar = null; ScenePresence killingAvatar = null;
// string killingAvatarMessage; // string killingAvatarMessage;
// check to see if it is an NPC and just remove it
INPCModule NPCmodule = deadAvatar.Scene.RequestModuleInterface<INPCModule>();
if (NPCmodule != null && NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene))
{
return;
}
if (killerObjectLocalID == 0) if (killerObjectLocalID == 0)
deadAvatarMessage = "You committed suicide!"; deadAvatarMessage = "You committed suicide!";
else else
@ -145,7 +152,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
catch (InvalidOperationException) catch (InvalidOperationException)
{ } { }
deadAvatar.Health = 100; deadAvatar.setHealthWithUpdate(100.0f);
deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient); deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient);
} }
@ -154,14 +161,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
try try
{ {
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0) || avatar.Scene.RegionInfo.RegionSettings.AllowDamage)
{ {
avatar.Invulnerable = false; avatar.Invulnerable = false;
} }
else else
{ {
avatar.Invulnerable = true; avatar.Invulnerable = true;
if (avatar.Health < 100.0f)
{
avatar.setHealthWithUpdate(100.0f);
}
} }
} }
catch (Exception) catch (Exception)

View File

@ -30,7 +30,6 @@ using System.Collections.Generic;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Capabilities; using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Client; using OpenSim.Framework.Client;
@ -596,7 +595,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
{ {
// Thread.Sleep(5000); // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before
// they regard the new region as the current region after receiving the AgentMovementComplete
// response. If close is sent before then, it will cause the viewer to quit instead.
// However, if this delay is longer, then a viewer can teleport back to this region and experience
// a failure because the old ScenePresence has not yet been cleaned up.
Thread.Sleep(2000);
sp.Close(); sp.Close();
sp.Scene.IncomingCloseAgent(sp.UUID); sp.Scene.IncomingCloseAgent(sp.UUID);
} }
@ -1913,12 +1918,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Thread.Sleep(100); Thread.Sleep(100);
} }
if (count > 0) return count > 0;
return true;
else
return false;
return true;
} }
protected void SetInTransit(UUID id) protected void SetInTransit(UUID id)

View File

@ -147,6 +147,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
public void Close() public void Close()
{ {
} }
public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID) public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
{ {
UUID urlcode = UUID.Random(); UUID urlcode = UUID.Random();
@ -176,6 +177,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
uri, uri,
new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode));
m_log.DebugFormat(
"[URL MODULE]: Set up incoming request url {0} for {1} in {2} {3}",
uri, itemID, host.Name, host.LocalId);
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
} }
@ -218,6 +223,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
uri, uri,
new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode));
m_log.DebugFormat(
"[URL MODULE]: Set up incoming secure request url {0} for {1} in {2} {3}",
uri, itemID, host.Name, host.LocalId);
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
} }
@ -241,6 +250,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
m_RequestMap.Remove(req); m_RequestMap.Remove(req);
} }
// m_log.DebugFormat(
// "[URL MODULE]: Releasing url {0} for {1} in {2}",
// url, data.itemID, data.hostID);
RemoveUrl(data); RemoveUrl(data);
m_UrlMap.Remove(url); m_UrlMap.Remove(url);
} }

View File

@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private IUserManagement m_UserManagement; private IUserManagement m_UserManagement;
private IGridService m_GridService; // private IGridService m_GridService;
private Scene m_Scene; private Scene m_Scene;
AccessFlags m_accessValue = AccessFlags.None; AccessFlags m_accessValue = AccessFlags.None;
@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
{ {
m_Scene = scene; m_Scene = scene;
m_UserManagement = scene.RequestModuleInterface<IUserManagement>(); m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
m_GridService = scene.GridService; // m_GridService = scene.GridService;
if (config != null) if (config != null)
{ {

View File

@ -1392,21 +1392,26 @@ namespace OpenSim.Region.CoreModules.World.Land
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
{ {
string capsBase = "/CAPS/" + caps.CapsObjectPath; string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler("RemoteParcelRequest", caps.RegisterHandler(
new RestStreamHandler("POST", capsBase + remoteParcelRequestPath, "RemoteParcelRequest",
delegate(string request, string path, string param, new RestStreamHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "POST",
{ capsBase + remoteParcelRequestPath,
return RemoteParcelRequest(request, path, param, agentID, caps); (request, path, param, httpRequest, httpResponse)
})); => RemoteParcelRequest(request, path, param, agentID, caps),
"RemoteParcelRequest",
agentID.ToString()));
UUID parcelCapID = UUID.Random(); UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate", caps.RegisterHandler(
new RestStreamHandler("POST", "/CAPS/" + parcelCapID, "ParcelPropertiesUpdate",
delegate(string request, string path, string param, new RestStreamHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "POST",
{ "/CAPS/" + parcelCapID,
return ProcessPropertiesUpdate(request, path, param, agentID, caps); (request, path, param, httpRequest, httpResponse)
})); => ProcessPropertiesUpdate(request, path, param, agentID, caps),
"ParcelPropertiesUpdate",
agentID.ToString()));
} }
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{ {

View File

@ -126,7 +126,6 @@ namespace OpenSim.Region.CoreModules.World.Land
// m_log.DebugFormat( // m_log.DebugFormat(
// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted", // "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
// obj.Name, m_Scene.RegionInfo.RegionName); // obj.Name, m_Scene.RegionInfo.RegionName);
} }
} }

View File

@ -145,7 +145,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
// Even though we're registering for POST we're going to get GETS and UPDATES too // Even though we're registering for POST we're going to get GETS and UPDATES too
caps.RegisterHandler( caps.RegisterHandler(
"ObjectMedia", new RestStreamHandler("POST", omCapUrl, HandleObjectMediaMessage)); "ObjectMedia",
new RestStreamHandler(
"POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString()));
} }
string omuCapUrl = "/CAPS/" + UUID.Random(); string omuCapUrl = "/CAPS/" + UUID.Random();
@ -157,7 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
// Even though we're registering for POST we're going to get GETS and UPDATES too // Even though we're registering for POST we're going to get GETS and UPDATES too
caps.RegisterHandler( caps.RegisterHandler(
"ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); "ObjectMediaNavigate",
new RestStreamHandler(
"POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString()));
} }
} }

View File

@ -190,14 +190,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{ {
//m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); //m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
string capsBase = "/CAPS/" + caps.CapsObjectPath; string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler("MapLayer", caps.RegisterHandler(
new RestStreamHandler("POST", capsBase + m_mapLayerPath, "MapLayer",
delegate(string request, string path, string param, new RestStreamHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "POST",
{ capsBase + m_mapLayerPath,
return MapLayerRequest(request, path, param, (request, path, param, httpRequest, httpResponse)
agentID, caps); => MapLayerRequest(request, path, param, agentID, caps),
})); "MapLayer",
agentID.ToString()));
} }
/// <summary> /// <summary>

View File

@ -42,13 +42,13 @@ namespace OpenSim.Region.DataSnapshot
{ {
public class DataRequestHandler public class DataRequestHandler
{ {
private Scene m_scene = null; // private Scene m_scene = null;
private DataSnapshotManager m_externalData = null; private DataSnapshotManager m_externalData = null;
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public DataRequestHandler(Scene scene, DataSnapshotManager externalData) public DataRequestHandler(Scene scene, DataSnapshotManager externalData)
{ {
m_scene = scene; // m_scene = scene;
m_externalData = externalData; m_externalData = externalData;
//Register HTTP handler //Register HTTP handler

View File

@ -48,6 +48,8 @@ namespace OpenSim.Region.Framework.Scenes
{ {
public class RegionStatsHandler : IStreamedRequestHandler public class RegionStatsHandler : IStreamedRequestHandler
{ {
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string osRXStatsURI = String.Empty; private string osRXStatsURI = String.Empty;
private string osXStatsURI = String.Empty; private string osXStatsURI = String.Empty;
//private string osSecret = String.Empty; //private string osSecret = String.Empty;
@ -55,9 +57,10 @@ namespace OpenSim.Region.Framework.Scenes
public string localZone = TimeZone.CurrentTimeZone.StandardName; public string localZone = TimeZone.CurrentTimeZone.StandardName;
public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string Name { get { return "RegionStats"; } }
public string Description { get { return "Region Statistics"; } }
public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info) public RegionStatsHandler(RegionInfo region_info)
{ {
regionInfo = region_info; regionInfo = region_info;
osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret); osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret);

View File

@ -1417,10 +1417,16 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (engine != null) if (engine != null)
{ {
// m_log.DebugFormat(
// "[PRIM INVENTORY]: Resuming script {0} {1} for {2}, OwnerChanged {3}",
// item.Name, item.ItemID, item.OwnerID, item.OwnerChanged);
engine.ResumeScript(item.ItemID);
if (item.OwnerChanged) if (item.OwnerChanged)
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER }); engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER });
item.OwnerChanged = false; item.OwnerChanged = false;
engine.ResumeScript(item.ItemID);
} }
} }
} }

View File

@ -1250,9 +1250,19 @@ namespace OpenSim.Region.Framework.Scenes
bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
MakeRootAgent(AbsolutePosition, flying); MakeRootAgent(AbsolutePosition, flying);
ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
// m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
if ((m_callbackURI != null) && !m_callbackURI.Equals("")) if ((m_callbackURI != null) && !m_callbackURI.Equals(""))
{ {
// We cannot sleep here since this would hold up the inbound packet processing thread, as
// CompleteMovement() is executed synchronously. However, it might be better to delay the release
// here until we know for sure that the agent is active in this region. Sending AgentMovementComplete
// is not enough for Imprudence clients - there appears to be a small delay (<200ms, <500ms) until they regard this
// region as the current region, meaning that a close sent before then will fail the teleport.
// System.Threading.Thread.Sleep(2000);
m_log.DebugFormat( m_log.DebugFormat(
"[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}", "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}",
client.Name, client.AgentId, m_callbackURI); client.Name, client.AgentId, m_callbackURI);
@ -1261,9 +1271,6 @@ namespace OpenSim.Region.Framework.Scenes
m_callbackURI = null; m_callbackURI = null;
} }
// m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
ValidateAndSendAppearanceAndAgentData(); ValidateAndSendAppearanceAndAgentData();
// Create child agents in neighbouring regions // Create child agents in neighbouring regions
@ -1278,7 +1285,6 @@ namespace OpenSim.Region.Framework.Scenes
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
} }
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
@ -3453,24 +3459,52 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
RaiseCollisionScriptEvents(coldata); // Gods do not take damage and Invulnerable is set depending on parcel/region flags
if (Invulnerable || GodLevel > 0)
if (Invulnerable)
return; return;
// The following may be better in the ICombatModule
// probably tweaking of the values for ground and normal prim collisions will be needed
float starthealth = Health; float starthealth = Health;
uint killerObj = 0; uint killerObj = 0;
SceneObjectPart part = null;
foreach (uint localid in coldata.Keys) foreach (uint localid in coldata.Keys)
{ {
SceneObjectPart part = Scene.GetSceneObjectPart(localid); if (localid == 0)
{
if (part != null && part.ParentGroup.Damage != -1.0f) part = null;
Health -= part.ParentGroup.Damage; }
else else
{ {
part = Scene.GetSceneObjectPart(localid);
}
if (part != null)
{
// Ignore if it has been deleted or volume detect
if (!part.ParentGroup.IsDeleted && !part.ParentGroup.IsVolumeDetect)
{
if (part.ParentGroup.Damage > 0.0f)
{
// Something with damage...
Health -= part.ParentGroup.Damage;
part.ParentGroup.Scene.DeleteSceneObject(part.ParentGroup, false);
}
else
{
// An ordinary prim
if (coldata[localid].PenetrationDepth >= 0.10f) if (coldata[localid].PenetrationDepth >= 0.10f)
Health -= coldata[localid].PenetrationDepth * 5.0f; Health -= coldata[localid].PenetrationDepth * 5.0f;
} }
}
}
else
{
// 0 is the ground
// what about collisions with other avatars?
if (localid == 0 && coldata[localid].PenetrationDepth >= 0.10f)
Health -= coldata[localid].PenetrationDepth * 5.0f;
}
if (Health <= 0.0f) if (Health <= 0.0f)
{ {
@ -3487,8 +3521,17 @@ namespace OpenSim.Region.Framework.Scenes
ControllingClient.SendHealth(Health); ControllingClient.SendHealth(Health);
} }
if (Health <= 0) if (Health <= 0)
{
m_scene.EventManager.TriggerAvatarKill(killerObj, this); m_scene.EventManager.TriggerAvatarKill(killerObj, this);
} }
if (starthealth == Health && Health < 100.0f)
{
Health += 0.03f;
if (Health > 100.0f)
Health = 100.0f;
ControllingClient.SendHealth(Health);
}
}
} }
public void setHealthWithUpdate(float health) public void setHealthWithUpdate(float health)

View File

@ -306,30 +306,35 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
agentID, caps, scene.RegionInfo.RegionName); agentID, caps, scene.RegionInfo.RegionName);
string capsBase = "/CAPS/" + caps.CapsObjectPath; string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler("ProvisionVoiceAccountRequest", caps.RegisterHandler(
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, "ProvisionVoiceAccountRequest",
delegate(string request, string path, string param, new RestStreamHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "POST",
{ capsBase + m_provisionVoiceAccountRequestPath,
return ProvisionVoiceAccountRequest(scene, request, path, param, (request, path, param, httpRequest, httpResponse)
agentID, caps); => ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps),
})); "ProvisionVoiceAccountRequest",
caps.RegisterHandler("ParcelVoiceInfoRequest", agentID.ToString()));
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
delegate(string request, string path, string param, caps.RegisterHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "ParcelVoiceInfoRequest",
{ new RestStreamHandler(
return ParcelVoiceInfoRequest(scene, request, path, param, "POST",
agentID, caps); capsBase + m_parcelVoiceInfoRequestPath,
})); (request, path, param, httpRequest, httpResponse)
caps.RegisterHandler("ChatSessionRequest", => ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps),
new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, "ParcelVoiceInfoRequest",
delegate(string request, string path, string param, agentID.ToString()));
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{ caps.RegisterHandler(
return ChatSessionRequest(scene, request, path, param, "ChatSessionRequest",
agentID, caps); new RestStreamHandler(
})); "POST",
capsBase + m_chatSessionRequestPath,
(request, path, param, httpRequest, httpResponse)
=> ChatSessionRequest(scene, request, path, param, agentID, caps),
"ChatSessionRequest",
agentID.ToString()));
} }
/// <summary> /// <summary>

View File

@ -406,30 +406,36 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
m_log.DebugFormat("[VivoxVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); m_log.DebugFormat("[VivoxVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
string capsBase = "/CAPS/" + caps.CapsObjectPath; string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler("ProvisionVoiceAccountRequest",
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, caps.RegisterHandler(
delegate(string request, string path, string param, "ProvisionVoiceAccountRequest",
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) new RestStreamHandler(
{ "POST",
return ProvisionVoiceAccountRequest(scene, request, path, param, capsBase + m_provisionVoiceAccountRequestPath,
agentID, caps); (request, path, param, httpRequest, httpResponse)
})); => ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps),
caps.RegisterHandler("ParcelVoiceInfoRequest", "ProvisionVoiceAccountRequest",
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, agentID.ToString()));
delegate(string request, string path, string param,
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) caps.RegisterHandler(
{ "ParcelVoiceInfoRequest",
return ParcelVoiceInfoRequest(scene, request, path, param, new RestStreamHandler(
agentID, caps); "POST",
})); capsBase + m_parcelVoiceInfoRequestPath,
caps.RegisterHandler("ChatSessionRequest", (request, path, param, httpRequest, httpResponse)
new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, => ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps),
delegate(string request, string path, string param, "ParcelVoiceInfoRequest",
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) agentID.ToString()));
{
return ChatSessionRequest(scene, request, path, param, caps.RegisterHandler(
agentID, caps); "ChatSessionRequest",
})); new RestStreamHandler(
"POST",
capsBase + m_chatSessionRequestPath,
(request, path, param, httpRequest, httpResponse)
=> ChatSessionRequest(scene, request, path, param, agentID, caps),
"ChatSessionRequest",
agentID.ToString()));
} }
/// <summary> /// <summary>

View File

@ -7938,7 +7938,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
face = (int)rules.GetLSLIntegerItem(idx++); face = (int)rules.GetLSLIntegerItem(idx++);
int shiny = (int)rules.GetLSLIntegerItem(idx++); int shiny = (int)rules.GetLSLIntegerItem(idx++);
Bumpiness bump = (Bumpiness)Convert.ToByte((int)rules.GetLSLIntegerItem(idx++)); Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++);
SetShiny(part, face, shiny, bump); SetShiny(part, face, shiny, bump);

View File

@ -282,14 +282,15 @@ namespace OpenSim.Region.UserStatistics
// m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); // m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
string capsPath = "/CAPS/VS/" + UUID.Random(); string capsPath = "/CAPS/VS/" + UUID.Random();
caps.RegisterHandler("ViewerStats", caps.RegisterHandler(
new RestStreamHandler("POST", capsPath, "ViewerStats",
delegate(string request, string path, string param, new RestStreamHandler(
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) "POST",
{ capsPath,
return ViewerStatsReport(request, path, param, (request, path, param, httpRequest, httpResponse)
agentID, caps); => ViewerStatsReport(request, path, param, agentID, caps),
})); "ViewerStats",
agentID.ToString()));
} }
private void OnDeRegisterCaps(UUID agentID, Caps caps) private void OnDeRegisterCaps(UUID agentID, Caps caps)

View File

@ -191,6 +191,8 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
#endregion HTML #endregion HTML
public string Name { get { return "OpenId"; } }
public string Description { get { return null; } }
public string ContentType { get { return m_contentType; } } public string ContentType { get { return m_contentType; } }
public string HttpMethod { get { return m_httpMethod; } } public string HttpMethod { get { return m_httpMethod; } }
public string Path { get { return m_path; } } public string Path { get { return m_path; } }

View File

@ -95,7 +95,8 @@ namespace OpenSim.Server.Handlers.Friends
return DeleteFriendString(request); return DeleteFriendString(request);
} }
m_log.DebugFormat("[FRIENDS HANDLER]: unknown method {0} request {1}", method.Length, method);
m_log.DebugFormat("[FRIENDS HANDLER]: unknown method request {0}", method);
} }
catch (Exception e) catch (Exception e)
{ {
@ -103,7 +104,6 @@ namespace OpenSim.Server.Handlers.Friends
} }
return FailureResult(); return FailureResult();
} }
#region Method-specific handlers #region Method-specific handlers

View File

@ -116,7 +116,7 @@ namespace OpenSim.Server.Handlers.Grid
return GetRegionFlags(request); return GetRegionFlags(request);
} }
m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); m_log.DebugFormat("[GRID HANDLER]: unknown method request {0}", method);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -122,7 +122,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
return GrantRights(request); return GrantRights(request);
*/ */
} }
m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0} request {1}", method.Length, method);
m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -52,6 +52,7 @@ namespace OpenSim.Services.InventoryService
: this(config, "InventoryService") : this(config, "InventoryService")
{ {
} }
public XInventoryService(IConfigSource config, string configName) : base(config) public XInventoryService(IConfigSource config, string configName) : base(config)
{ {
if (configName != string.Empty) if (configName != string.Empty)
@ -363,6 +364,11 @@ namespace OpenSim.Services.InventoryService
// We don't check the principal's ID here // We don't check the principal's ID here
// //
public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs)
{
return DeleteFolders(principalID, folderIDs, true);
}
public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs, bool onlyIfTrash)
{ {
if (!m_AllowDelete) if (!m_AllowDelete)
return false; return false;
@ -371,11 +377,12 @@ namespace OpenSim.Services.InventoryService
// //
foreach (UUID id in folderIDs) foreach (UUID id in folderIDs)
{ {
if (!ParentIsTrash(id)) if (onlyIfTrash && !ParentIsTrash(id))
continue; continue;
//m_log.InfoFormat("[XINVENTORY SERVICE]: Delete folder {0}", id);
InventoryFolderBase f = new InventoryFolderBase(); InventoryFolderBase f = new InventoryFolderBase();
f.ID = id; f.ID = id;
PurgeFolder(f); PurgeFolder(f, onlyIfTrash);
m_Database.DeleteFolders("folderID", id.ToString()); m_Database.DeleteFolders("folderID", id.ToString());
} }
@ -383,11 +390,16 @@ namespace OpenSim.Services.InventoryService
} }
public virtual bool PurgeFolder(InventoryFolderBase folder) public virtual bool PurgeFolder(InventoryFolderBase folder)
{
return PurgeFolder(folder, true);
}
public virtual bool PurgeFolder(InventoryFolderBase folder, bool onlyIfTrash)
{ {
if (!m_AllowDelete) if (!m_AllowDelete)
return false; return false;
if (!ParentIsTrash(folder.ID)) if (onlyIfTrash && !ParentIsTrash(folder.ID))
return false; return false;
XInventoryFolder[] subFolders = m_Database.GetFolders( XInventoryFolder[] subFolders = m_Database.GetFolders(
@ -396,7 +408,7 @@ namespace OpenSim.Services.InventoryService
foreach (XInventoryFolder x in subFolders) foreach (XInventoryFolder x in subFolders)
{ {
PurgeFolder(ConvertToOpenSim(x)); PurgeFolder(ConvertToOpenSim(x), onlyIfTrash);
m_Database.DeleteFolders("folderID", x.folderID.ToString()); m_Database.DeleteFolders("folderID", x.folderID.ToString());
} }

View File

@ -231,7 +231,8 @@ namespace OpenSim.Services.LLLoginService
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency) GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency,
string DSTZone)
: this() : this()
{ {
FillOutInventoryData(invSkel, libService); FillOutInventoryData(invSkel, libService);
@ -261,6 +262,44 @@ namespace OpenSim.Services.LLLoginService
FillOutSeedCap(aCircuit, destination, clientIP); FillOutSeedCap(aCircuit, destination, clientIP);
switch (DSTZone)
{
case "none":
DST = "N";
break;
case "local":
DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
break;
default:
TimeZoneInfo dstTimeZone = null;
string[] tzList = DSTZone.Split(';');
foreach (string tzName in tzList)
{
try
{
dstTimeZone = TimeZoneInfo.FindSystemTimeZoneById(tzName);
}
catch
{
continue;
}
break;
}
if (dstTimeZone == null)
{
m_log.WarnFormat(
"[LLOGIN RESPONSE]: No valid timezone found for DST in {0}, falling back to system time.", tzList);
DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
}
else
{
DST = dstTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
}
break;
}
} }
private void FillOutInventoryData(List<InventoryFolderBase> invSkel, ILibraryService libService) private void FillOutInventoryData(List<InventoryFolderBase> invSkel, ILibraryService libService)

View File

@ -82,6 +82,8 @@ namespace OpenSim.Services.LLLoginService
protected string m_AllowedClients; protected string m_AllowedClients;
protected string m_DeniedClients; protected string m_DeniedClients;
protected string m_DSTZone;
IConfig m_LoginServerConfig; IConfig m_LoginServerConfig;
// IConfig m_ClientsConfig; // IConfig m_ClientsConfig;
@ -118,6 +120,8 @@ namespace OpenSim.Services.LLLoginService
m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty);
m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty);
m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time");
// Clean up some of these vars // Clean up some of these vars
if (m_MapTileURL != String.Empty) if (m_MapTileURL != String.Empty)
{ {
@ -241,6 +245,7 @@ namespace OpenSim.Services.LLLoginService
m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}",
firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0);
try try
{ {
// //
@ -423,8 +428,11 @@ namespace OpenSim.Services.LLLoginService
// //
// Finally, fill out the response and return it // Finally, fill out the response and return it
// //
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, LLLoginResponse response
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency); = new LLLoginResponse(
account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone);
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
return response; return response;
@ -438,7 +446,10 @@ namespace OpenSim.Services.LLLoginService
} }
} }
protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags) protected GridRegion FindDestination(
UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation,
GridRegion home, out GridRegion gatekeeper,
out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
{ {
flags = TeleportFlags.ViaLogin; flags = TeleportFlags.ViaLogin;

View File

@ -275,6 +275,18 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
;AllowedClients = "" ;AllowedClients = ""
;DeniedClients = "" ;DeniedClients = ""
;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST.
;; Options are
;; "none" no DST
;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour.
;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings.
;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
DSTZone = "America/Los_Angeles;Pacific Standard Time"
[MapImageService] [MapImageService]
LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
; Set this if you want to change the default ; Set this if you want to change the default

View File

@ -250,6 +250,27 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
;AllowedClients = "" ;AllowedClients = ""
;DeniedClients = "" ;DeniedClients = ""
;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead,
;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific
;; would result in time inconsistencies between grids (during summer and around DST transition period)
;; default let OpenSim calculate US Pacific DST
;; "none" disable DST (equivallent to "local" with system set to GMT)
;; "local" force legacy behaviour (using local system time to calculate DST)
; DSTZone = "America/Los_Angeles;Pacific Standard Time"
;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST.
;; Options are
;; "none" no DST
;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour.
;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings.
;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
DSTZone = "America/Los_Angeles;Pacific Standard Time"
[MapImageService] [MapImageService]
LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
; Set this if you want to change the default ; Set this if you want to change the default

View File

@ -95,6 +95,18 @@
WelcomeMessage = "Welcome, Avatar!" WelcomeMessage = "Welcome, Avatar!"
;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST.
;; Options are
;; "none" no DST
;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour.
;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings.
;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
DSTZone = "America/Los_Angeles;Pacific Standard Time"
[MapImageService] [MapImageService]
LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
; in minutes ; in minutes