Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
670c7842a4
|
@ -63,77 +63,7 @@ namespace OpenSim.Framework
|
||||||
// a "long" call for warning & debugging purposes
|
// a "long" call for warning & debugging purposes
|
||||||
public const int LongCallTime = 500;
|
public const int LongCallTime = 500;
|
||||||
|
|
||||||
// /// <summary>
|
#region JSONRequest
|
||||||
// /// Send LLSD to an HTTP client in application/llsd+json form
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="response">HTTP response to send the data in</param>
|
|
||||||
// /// <param name="body">LLSD to send to the client</param>
|
|
||||||
// public static void SendJSONResponse(OSHttpResponse response, OSDMap body)
|
|
||||||
// {
|
|
||||||
// byte[] responseData = Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(body));
|
|
||||||
//
|
|
||||||
// response.ContentEncoding = Encoding.UTF8;
|
|
||||||
// response.ContentLength = responseData.Length;
|
|
||||||
// response.ContentType = "application/llsd+json";
|
|
||||||
// response.Body.Write(responseData, 0, responseData.Length);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// Send LLSD to an HTTP client in application/llsd+xml form
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="response">HTTP response to send the data in</param>
|
|
||||||
// /// <param name="body">LLSD to send to the client</param>
|
|
||||||
// public static void SendXMLResponse(OSHttpResponse response, OSDMap body)
|
|
||||||
// {
|
|
||||||
// byte[] responseData = OSDParser.SerializeLLSDXmlBytes(body);
|
|
||||||
//
|
|
||||||
// response.ContentEncoding = Encoding.UTF8;
|
|
||||||
// response.ContentLength = responseData.Length;
|
|
||||||
// response.ContentType = "application/llsd+xml";
|
|
||||||
// response.Body.Write(responseData, 0, responseData.Length);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Make a GET or GET-like request to a web service that returns LLSD
|
|
||||||
/// or JSON data
|
|
||||||
/// </summary>
|
|
||||||
public static OSDMap ServiceRequest(string url, string httpVerb)
|
|
||||||
{
|
|
||||||
string errorMessage;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
|
|
||||||
request.Method = httpVerb;
|
|
||||||
|
|
||||||
using (WebResponse response = request.GetResponse())
|
|
||||||
{
|
|
||||||
using (Stream responseStream = response.GetResponseStream())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string responseStr = responseStream.GetStreamString();
|
|
||||||
OSD responseOSD = OSDParser.Deserialize(responseStr);
|
|
||||||
if (responseOSD.Type == OSDType.Map)
|
|
||||||
return (OSDMap)responseOSD;
|
|
||||||
else
|
|
||||||
errorMessage = "Response format was invalid.";
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
errorMessage = "Failed to parse the response.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
|
|
||||||
errorMessage = ex.Message;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } };
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PUT JSON-encoded data to a web service that returns LLSD or
|
/// PUT JSON-encoded data to a web service that returns LLSD or
|
||||||
|
@ -303,6 +233,10 @@ namespace OpenSim.Framework
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion JSONRequest
|
||||||
|
|
||||||
|
#region FormRequest
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// POST URL-encoded form data to a web service that returns LLSD or
|
/// POST URL-encoded form data to a web service that returns LLSD or
|
||||||
/// JSON data
|
/// JSON data
|
||||||
|
@ -398,6 +332,8 @@ namespace OpenSim.Framework
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion FormRequest
|
||||||
|
|
||||||
#region Uri
|
#region Uri
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
string userAssetServer = string.Empty;
|
string userAssetServer = string.Empty;
|
||||||
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
|
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
|
||||||
{
|
{
|
||||||
Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
|
m_assMapper.Post(assetID, avatarID, userAssetServer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1476,11 +1476,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
if (!landForSale)
|
if (!landForSale)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not geenrating overlay", m_scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not generating overlay", m_scene.RegionInfo.RegionName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
for (int x = 0 ; x < 64 ; x++)
|
for (int x = 0 ; x < 64 ; x++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7069,10 +7069,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
shapeBlock.PathScaleX = 100;
|
shapeBlock.PathScaleX = 100;
|
||||||
shapeBlock.PathScaleY = 150;
|
shapeBlock.PathScaleY = 150;
|
||||||
|
|
||||||
if (type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
|
int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR);
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE &&
|
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE &&
|
if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) &&
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS)
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) &&
|
||||||
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) &&
|
||||||
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag))
|
||||||
{
|
{
|
||||||
// default
|
// default
|
||||||
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
|
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
|
||||||
|
|
|
@ -378,6 +378,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int PRIM_SCULPT_TYPE_TORUS = 2;
|
public const int PRIM_SCULPT_TYPE_TORUS = 2;
|
||||||
public const int PRIM_SCULPT_TYPE_PLANE = 3;
|
public const int PRIM_SCULPT_TYPE_PLANE = 3;
|
||||||
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
||||||
|
public const int PRIM_SCULPT_FLAG_INVERT = 64;
|
||||||
|
public const int PRIM_SCULPT_FLAG_MIRROR = 128;
|
||||||
|
|
||||||
public const int MASK_BASE = 0;
|
public const int MASK_BASE = 0;
|
||||||
public const int MASK_OWNER = 1;
|
public const int MASK_OWNER = 1;
|
||||||
|
|
Loading…
Reference in New Issue