mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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
This commit is contained in:
@@ -437,7 +437,7 @@ namespace OpenSim
|
||||
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
|
||||
|
||||
// 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.EventManager.TriggerParcelPrimCountUpdate();
|
||||
@@ -856,6 +856,9 @@ namespace OpenSim
|
||||
return Util.UTF8.GetBytes("OK");
|
||||
}
|
||||
|
||||
public string Name { get { return "SimStatus"; } }
|
||||
public string Description { get { return "Simulator Status"; } }
|
||||
|
||||
public string ContentType
|
||||
{
|
||||
get { return "text/plain"; }
|
||||
@@ -880,6 +883,9 @@ namespace OpenSim
|
||||
{
|
||||
OpenSimBase m_opensim;
|
||||
string osXStatsURI = String.Empty;
|
||||
|
||||
public string Name { get { return "XSimStatus"; } }
|
||||
public string Description { get { return "Simulator XStatus"; } }
|
||||
|
||||
public XSimStatusHandler(OpenSimBase sim)
|
||||
{
|
||||
@@ -920,6 +926,9 @@ namespace OpenSim
|
||||
{
|
||||
OpenSimBase m_opensim;
|
||||
string osUXStatsURI = String.Empty;
|
||||
|
||||
public string Name { get { return "UXSimStatus"; } }
|
||||
public string Description { get { return "Simulator UXStatus"; } }
|
||||
|
||||
public UXSimStatusHandler(OpenSimBase sim)
|
||||
{
|
||||
|
||||
@@ -158,7 +158,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
try
|
||||
{
|
||||
// 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(
|
||||
"[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",
|
||||
// capsBase + m_mapLayerPath,
|
||||
// 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("UpdateScriptTask", req);
|
||||
}
|
||||
@@ -181,14 +186,22 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
try
|
||||
{
|
||||
// I don't think this one works...
|
||||
m_HostCapsObj.RegisterHandler("NewFileAgentInventory", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST",
|
||||
capsBase + m_newInventory,
|
||||
NewAgentInventoryRequest));
|
||||
IRequestHandler req = new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory);
|
||||
m_HostCapsObj.RegisterHandler(
|
||||
"NewFileAgentInventory",
|
||||
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>(
|
||||
"POST",
|
||||
capsBase + m_newInventory,
|
||||
NewAgentInventoryRequest,
|
||||
"NewFileAgentInventory",
|
||||
null));
|
||||
|
||||
IRequestHandler req
|
||||
= new RestStreamHandler(
|
||||
"POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory, "Update*", null);
|
||||
|
||||
m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req);
|
||||
m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", 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);
|
||||
m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler);
|
||||
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(
|
||||
"CopyInventoryFromNotecard",
|
||||
new RestStreamHandler(
|
||||
"POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null));
|
||||
|
||||
// As of RC 1.22.9 of the Linden client this is
|
||||
// supported
|
||||
|
||||
@@ -299,7 +318,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
m_dumpAssetsToFile);
|
||||
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://";
|
||||
|
||||
@@ -426,8 +447,14 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
AssetUploader uploader =
|
||||
new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type,
|
||||
llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile);
|
||||
|
||||
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://";
|
||||
|
||||
@@ -743,7 +770,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
uploader.OnUpLoad += ItemUpdated;
|
||||
|
||||
m_HostCapsObj.HttpListener.AddStreamHandler(
|
||||
new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
||||
new BinaryStreamHandler(
|
||||
"POST", capsBase + uploaderPath, uploader.uploaderCaps, "NoteCardAgentInventory", null));
|
||||
|
||||
string protocol = "http://";
|
||||
|
||||
|
||||
@@ -351,14 +351,18 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
// 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
|
||||
// really it should be possible to directly register the poll handler as a capability.
|
||||
caps.RegisterHandler("EventQueueGet",
|
||||
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
|
||||
caps.RegisterHandler(
|
||||
"EventQueueGet",
|
||||
new RestHTTPHandler(
|
||||
"POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
|
||||
|
||||
// delegate(Hashtable m_dhttpMethod)
|
||||
// {
|
||||
// return ProcessQueue(m_dhttpMethod, agentID, caps);
|
||||
// }));
|
||||
|
||||
// This will persist this beyond the expiry of the caps handlers
|
||||
// TODO: Add EventQueueGet name/description for diagnostics
|
||||
MainServer.Instance.AddPollServiceHTTPHandler(
|
||||
capsBase + EventQueueGetUUID.ToString() + "/",
|
||||
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
|
||||
|
||||
@@ -132,7 +132,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
capUrl = "/CAPS/" + UUID.Random();
|
||||
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler("POST", capUrl, m_fetchHandler.FetchInventoryRequest);
|
||||
= new RestStreamHandler(
|
||||
"POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString());
|
||||
|
||||
caps.RegisterHandler(capName, reqHandler);
|
||||
}
|
||||
|
||||
@@ -120,11 +120,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
// m_log.DebugFormat("[GETMESH]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
|
||||
GetMeshHandler gmeshHandler = new GetMeshHandler(m_AssetService);
|
||||
IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(),
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
{
|
||||
return gmeshHandler.ProcessGetMesh(m_dhttpMethod, UUID.Zero, null);
|
||||
});
|
||||
IRequestHandler reqHandler
|
||||
= new RestHTTPHandler(
|
||||
"GET",
|
||||
"/CAPS/" + UUID.Random(),
|
||||
httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null),
|
||||
"GetMesh",
|
||||
agentID.ToString());
|
||||
|
||||
caps.RegisterHandler("GetMesh", reqHandler);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
if (m_URL == "localhost")
|
||||
{
|
||||
// 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
|
||||
{
|
||||
|
||||
@@ -117,7 +117,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
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);
|
||||
m_agentID = agentID;
|
||||
}
|
||||
|
||||
@@ -115,67 +115,66 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);
|
||||
caps.RegisterHandler("NewFileAgentInventoryVariablePrice",
|
||||
|
||||
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>("POST",
|
||||
"/CAPS/" + capID.ToString(),
|
||||
delegate(LLSDAssetUploadRequest req)
|
||||
{
|
||||
return NewAgentInventoryRequest(req,agentID);
|
||||
}));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"NewFileAgentInventoryVariablePrice",
|
||||
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDNewFileAngentInventoryVariablePriceReplyResponse>(
|
||||
"POST",
|
||||
"/CAPS/" + capID.ToString(),
|
||||
req => NewAgentInventoryRequest(req, agentID),
|
||||
"NewFileAgentInventoryVariablePrice",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
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
|
||||
// You need to be aware of this and
|
||||
|
||||
// you need to be aware of this
|
||||
|
||||
//if (llsdRequest.asset_type == "texture" ||
|
||||
// llsdRequest.asset_type == "animation" ||
|
||||
// llsdRequest.asset_type == "sound")
|
||||
// {
|
||||
// check user level
|
||||
ScenePresence avatar = null;
|
||||
IClientAPI client = null;
|
||||
m_scene.TryGetScenePresence(agentID, out avatar);
|
||||
|
||||
if (avatar != null)
|
||||
ScenePresence avatar = null;
|
||||
IClientAPI client = null;
|
||||
m_scene.TryGetScenePresence(agentID, out avatar);
|
||||
|
||||
if (avatar != null)
|
||||
{
|
||||
client = avatar.ControllingClient;
|
||||
|
||||
if (avatar.UserLevel < m_levelUpload)
|
||||
{
|
||||
client = avatar.ControllingClient;
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false);
|
||||
|
||||
if (avatar.UserLevel < m_levelUpload)
|
||||
{
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false);
|
||||
|
||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||
errorResponse.rsvp = "";
|
||||
errorResponse.state = "error";
|
||||
return errorResponse;
|
||||
}
|
||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||
errorResponse.rsvp = "";
|
||||
errorResponse.state = "error";
|
||||
return errorResponse;
|
||||
}
|
||||
}
|
||||
|
||||
// check funds
|
||||
IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>();
|
||||
// check funds
|
||||
IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>();
|
||||
|
||||
if (mm != null)
|
||||
if (mm != null)
|
||||
{
|
||||
if (!mm.UploadCovered(agentID, mm.UploadCharge))
|
||||
{
|
||||
if (!mm.UploadCovered(agentID, mm.UploadCharge))
|
||||
{
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||
if (client != null)
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||
|
||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||
errorResponse.rsvp = "";
|
||||
errorResponse.state = "error";
|
||||
return errorResponse;
|
||||
}
|
||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||
errorResponse.rsvp = "";
|
||||
errorResponse.state = "error";
|
||||
return errorResponse;
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
string assetName = llsdRequest.name;
|
||||
@@ -189,8 +188,14 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
AssetUploader uploader =
|
||||
new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type,
|
||||
llsdRequest.asset_type, capsBase + uploaderPath, MainServer.Instance, m_dumpAssetsToFile);
|
||||
|
||||
MainServer.Instance.AddStreamHandler(
|
||||
new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
||||
new BinaryStreamHandler(
|
||||
"POST",
|
||||
capsBase + uploaderPath,
|
||||
uploader.uploaderCaps,
|
||||
"NewFileAgentInventoryVariablePrice",
|
||||
agentID.ToString()));
|
||||
|
||||
string protocol = "http://";
|
||||
|
||||
@@ -199,10 +204,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
string uploaderURL = protocol + m_scene.RegionInfo.ExternalHostName + ":" + MainServer.Instance.Port.ToString() + capsBase +
|
||||
uploaderPath;
|
||||
|
||||
|
||||
|
||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse uploadResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||
|
||||
|
||||
uploadResponse.rsvp = uploaderURL;
|
||||
uploadResponse.state = "upload";
|
||||
@@ -220,6 +224,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
pinventoryItem, pparentFolder, pdata, pinventoryType,
|
||||
passetType,agentID);
|
||||
};
|
||||
|
||||
return uploadResponse;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,12 +66,14 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
|
||||
caps.RegisterHandler("ObjectAdd",
|
||||
new RestHTTPHandler("POST", "/CAPS/OA/" + capuuid + "/",
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
{
|
||||
return ProcessAdd(m_dhttpMethod, agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"ObjectAdd",
|
||||
new RestHTTPHandler(
|
||||
"POST",
|
||||
"/CAPS/OA/" + capuuid + "/",
|
||||
httpMethod => ProcessAdd(httpMethod, agentID, caps),
|
||||
"ObjectAdd",
|
||||
agentID.ToString()));;
|
||||
}
|
||||
|
||||
public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap)
|
||||
|
||||
@@ -106,12 +106,15 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
|
||||
caps.RegisterHandler("UploadObjectAsset",
|
||||
new RestHTTPHandler("POST", "/CAPS/OA/" + capID + "/",
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
{
|
||||
return ProcessAdd(m_dhttpMethod, agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"UploadObjectAsset",
|
||||
new RestHTTPHandler(
|
||||
"POST",
|
||||
"/CAPS/OA/" + capID + "/",
|
||||
httpMethod => ProcessAdd(httpMethod, agentID, caps),
|
||||
"UploadObjectAsset",
|
||||
agentID.ToString()));
|
||||
|
||||
/*
|
||||
caps.RegisterHandler("NewFileAgentInventoryVariablePrice",
|
||||
|
||||
|
||||
@@ -154,7 +154,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
IRequestHandler reqHandler
|
||||
= new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), HandleSimulatorFeaturesRequest);
|
||||
= new RestHTTPHandler(
|
||||
"GET", "/CAPS/" + UUID.Random(),
|
||||
HandleSimulatorFeaturesRequest, "SimulatorFeatures", agentID.ToString());
|
||||
|
||||
caps.RegisterHandler("SimulatorFeatures", reqHandler);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
"POST",
|
||||
"/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath,
|
||||
new UploadBakedTextureHandler(
|
||||
caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture));
|
||||
caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture,
|
||||
"UploadBakedTexture",
|
||||
agentID.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,12 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
capUrl = "/CAPS/" + UUID.Random();
|
||||
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest);
|
||||
= new RestStreamHandler(
|
||||
"POST",
|
||||
capUrl,
|
||||
m_webFetchHandler.FetchInventoryDescendentsRequest,
|
||||
"FetchInventoryDescendents2",
|
||||
agentID.ToString());
|
||||
|
||||
caps.RegisterHandler(capName, reqHandler);
|
||||
}
|
||||
@@ -160,4 +165,4 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ namespace Flotsam.RegionModules.AssetCache
|
||||
private Dictionary<string, ManualResetEvent> m_CurrentlyWriting = new Dictionary<string, ManualResetEvent>();
|
||||
private int m_WaitOnInprogressTimeout = 3000;
|
||||
#else
|
||||
private List<string> m_CurrentlyWriting = new List<string>();
|
||||
private HashSet<string> m_CurrentlyWriting = new HashSet<string>();
|
||||
#endif
|
||||
|
||||
private bool m_FileCacheEnabled = true;
|
||||
@@ -272,7 +272,11 @@ namespace Flotsam.RegionModules.AssetCache
|
||||
// the other thread has updated the time for us.
|
||||
try
|
||||
{
|
||||
File.SetLastAccessTime(filename, DateTime.Now);
|
||||
lock (m_CurrentlyWriting)
|
||||
{
|
||||
if (!m_CurrentlyWriting.Contains(filename))
|
||||
File.SetLastAccessTime(filename, DateTime.Now);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -578,9 +578,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
private void AttachToAgent(
|
||||
IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
|
||||
// so.Name, avatar.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
|
||||
// so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
|
||||
|
||||
so.DetachFromBackup();
|
||||
|
||||
@@ -845,9 +845,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
/// <param name="att"></param>
|
||||
private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||
// att.Name, sp.Name, AttachmentPt, itemID);
|
||||
// m_log.DebugFormat(
|
||||
// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
|
||||
// att.Name, sp.Name, AttachmentPt, 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)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
|
||||
// objectLocalID, remoteClient.Name, AttachmentPt, silent);
|
||||
// m_log.DebugFormat(
|
||||
// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
|
||||
// objectLocalID, remoteClient.Name, AttachmentPt, silent);
|
||||
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
@@ -96,6 +96,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
ScenePresence killingAvatar = null;
|
||||
// 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)
|
||||
deadAvatarMessage = "You committed suicide!";
|
||||
else
|
||||
@@ -145,7 +152,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
catch (InvalidOperationException)
|
||||
{ }
|
||||
|
||||
deadAvatar.Health = 100;
|
||||
deadAvatar.setHealthWithUpdate(100.0f);
|
||||
deadAvatar.Scene.TeleportClientHome(deadAvatar.UUID, deadAvatar.ControllingClient);
|
||||
}
|
||||
|
||||
@@ -154,14 +161,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
try
|
||||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
avatar.Invulnerable = true;
|
||||
if (avatar.Health < 100.0f)
|
||||
{
|
||||
avatar.setHealthWithUpdate(100.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -30,7 +30,6 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Capabilities;
|
||||
using OpenSim.Framework.Client;
|
||||
@@ -596,7 +595,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
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.Scene.IncomingCloseAgent(sp.UUID);
|
||||
}
|
||||
@@ -1913,12 +1918,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
protected void SetInTransit(UUID id)
|
||||
|
||||
@@ -147,6 +147,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
|
||||
{
|
||||
UUID urlcode = UUID.Random();
|
||||
@@ -176,6 +177,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
uri,
|
||||
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 });
|
||||
}
|
||||
|
||||
@@ -218,6 +223,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
uri,
|
||||
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 });
|
||||
}
|
||||
|
||||
@@ -241,6 +250,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
m_RequestMap.Remove(req);
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[URL MODULE]: Releasing url {0} for {1} in {2}",
|
||||
// url, data.itemID, data.hostID);
|
||||
|
||||
RemoveUrl(data);
|
||||
m_UrlMap.Remove(url);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IUserManagement m_UserManagement;
|
||||
private IGridService m_GridService;
|
||||
// private IGridService m_GridService;
|
||||
|
||||
private Scene m_Scene;
|
||||
AccessFlags m_accessValue = AccessFlags.None;
|
||||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
||||
{
|
||||
m_Scene = scene;
|
||||
m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
|
||||
m_GridService = scene.GridService;
|
||||
// m_GridService = scene.GridService;
|
||||
|
||||
if (config != null)
|
||||
{
|
||||
|
||||
@@ -1392,21 +1392,26 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("RemoteParcelRequest",
|
||||
new RestStreamHandler("POST", capsBase + remoteParcelRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return RemoteParcelRequest(request, path, param, agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"RemoteParcelRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + remoteParcelRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> RemoteParcelRequest(request, path, param, agentID, caps),
|
||||
"RemoteParcelRequest",
|
||||
agentID.ToString()));
|
||||
|
||||
UUID parcelCapID = UUID.Random();
|
||||
caps.RegisterHandler("ParcelPropertiesUpdate",
|
||||
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"ParcelPropertiesUpdate",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
"/CAPS/" + parcelCapID,
|
||||
(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)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
// m_log.DebugFormat(
|
||||
// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
|
||||
// obj.Name, m_Scene.RegionInfo.RegionName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
caps.RegisterHandler(
|
||||
"ObjectMedia", new RestStreamHandler("POST", omCapUrl, HandleObjectMediaMessage));
|
||||
"ObjectMedia",
|
||||
new RestStreamHandler(
|
||||
"POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString()));
|
||||
}
|
||||
|
||||
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
|
||||
caps.RegisterHandler(
|
||||
"ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage));
|
||||
"ObjectMediaNavigate",
|
||||
new RestStreamHandler(
|
||||
"POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,14 +190,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
{
|
||||
//m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("MapLayer",
|
||||
new RestStreamHandler("POST", capsBase + m_mapLayerPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return MapLayerRequest(request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"MapLayer",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_mapLayerPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> MapLayerRequest(request, path, param, agentID, caps),
|
||||
"MapLayer",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -42,13 +42,13 @@ namespace OpenSim.Region.DataSnapshot
|
||||
{
|
||||
public class DataRequestHandler
|
||||
{
|
||||
private Scene m_scene = null;
|
||||
// private Scene m_scene = null;
|
||||
private DataSnapshotManager m_externalData = null;
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public DataRequestHandler(Scene scene, DataSnapshotManager externalData)
|
||||
{
|
||||
m_scene = scene;
|
||||
// m_scene = scene;
|
||||
m_externalData = externalData;
|
||||
|
||||
//Register HTTP handler
|
||||
|
||||
@@ -48,16 +48,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
public class RegionStatsHandler : IStreamedRequestHandler
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string osRXStatsURI = String.Empty;
|
||||
private string osXStatsURI = String.Empty;
|
||||
//private string osSecret = String.Empty;
|
||||
private OpenSim.Framework.RegionInfo regionInfo;
|
||||
public string localZone = TimeZone.CurrentTimeZone.StandardName;
|
||||
public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
|
||||
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info)
|
||||
public string Name { get { return "RegionStats"; } }
|
||||
public string Description { get { return "Region Statistics"; } }
|
||||
|
||||
public RegionStatsHandler(RegionInfo region_info)
|
||||
{
|
||||
regionInfo = region_info;
|
||||
osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret);
|
||||
|
||||
@@ -1417,13 +1417,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
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)
|
||||
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER });
|
||||
|
||||
item.OwnerChanged = false;
|
||||
engine.ResumeScript(item.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1250,9 +1250,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||
MakeRootAgent(AbsolutePosition, flying);
|
||||
ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
|
||||
|
||||
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(
|
||||
"[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}",
|
||||
client.Name, client.AgentId, m_callbackURI);
|
||||
@@ -1261,9 +1271,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_callbackURI = null;
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
|
||||
|
||||
ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
|
||||
ValidateAndSendAppearanceAndAgentData();
|
||||
|
||||
// Create child agents in neighbouring regions
|
||||
@@ -1278,7 +1285,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
|
||||
}
|
||||
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
||||
// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
||||
@@ -3453,25 +3459,53 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
RaiseCollisionScriptEvents(coldata);
|
||||
|
||||
if (Invulnerable)
|
||||
// Gods do not take damage and Invulnerable is set depending on parcel/region flags
|
||||
if (Invulnerable || GodLevel > 0)
|
||||
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;
|
||||
uint killerObj = 0;
|
||||
SceneObjectPart part = null;
|
||||
foreach (uint localid in coldata.Keys)
|
||||
{
|
||||
SceneObjectPart part = Scene.GetSceneObjectPart(localid);
|
||||
|
||||
if (part != null && part.ParentGroup.Damage != -1.0f)
|
||||
Health -= part.ParentGroup.Damage;
|
||||
if (localid == 0)
|
||||
{
|
||||
part = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (coldata[localid].PenetrationDepth >= 0.10f)
|
||||
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)
|
||||
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 (localid != 0)
|
||||
@@ -3487,7 +3521,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ControllingClient.SendHealth(Health);
|
||||
}
|
||||
if (Health <= 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -306,30 +306,35 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||
agentID, caps, scene.RegionInfo.RegionName);
|
||||
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ProvisionVoiceAccountRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ParcelVoiceInfoRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler("ChatSessionRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ChatSessionRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_provisionVoiceAccountRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps),
|
||||
"ProvisionVoiceAccountRequest",
|
||||
agentID.ToString()));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_parcelVoiceInfoRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps),
|
||||
"ParcelVoiceInfoRequest",
|
||||
agentID.ToString()));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ChatSessionRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_chatSessionRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ChatSessionRequest(scene, request, path, param, agentID, caps),
|
||||
"ChatSessionRequest",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -406,30 +406,36 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||
m_log.DebugFormat("[VivoxVoice] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ProvisionVoiceAccountRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ParcelVoiceInfoRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler("ChatSessionRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ChatSessionRequest(scene, request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_provisionVoiceAccountRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ProvisionVoiceAccountRequest(scene, request, path, param, agentID, caps),
|
||||
"ProvisionVoiceAccountRequest",
|
||||
agentID.ToString()));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_parcelVoiceInfoRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ParcelVoiceInfoRequest(scene, request, path, param, agentID, caps),
|
||||
"ParcelVoiceInfoRequest",
|
||||
agentID.ToString()));
|
||||
|
||||
caps.RegisterHandler(
|
||||
"ChatSessionRequest",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsBase + m_chatSessionRequestPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ChatSessionRequest(scene, request, path, param, agentID, caps),
|
||||
"ChatSessionRequest",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7938,7 +7938,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
face = (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);
|
||||
|
||||
|
||||
@@ -282,14 +282,15 @@ namespace OpenSim.Region.UserStatistics
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
||||
string capsPath = "/CAPS/VS/" + UUID.Random();
|
||||
caps.RegisterHandler("ViewerStats",
|
||||
new RestStreamHandler("POST", capsPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ViewerStatsReport(request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"ViewerStats",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ViewerStatsReport(request, path, param, agentID, caps),
|
||||
"ViewerStats",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
private void OnDeRegisterCaps(UUID agentID, Caps caps)
|
||||
|
||||
Reference in New Issue
Block a user