Merge branch 'master' into careminster-presence-refactor
commit
46a531d865
|
@ -769,8 +769,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
||||
if (canEditObjectsChanged)
|
||||
friendClient.SendChangeUserRights(userID, friendID, rights);
|
||||
|
||||
}
|
||||
|
||||
// update local cache
|
||||
//m_Friends[friendID].Friends = m_FriendsService.GetFriends(friendID);
|
||||
foreach (FriendInfo finfo in m_Friends[friendID].Friends)
|
||||
if (finfo.Friend == userID.ToString())
|
||||
finfo.TheirFlags = rights;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
return ret;
|
||||
}
|
||||
|
||||
// DO NOT OVERRIDE THIS METHOD
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
{
|
||||
|
|
|
@ -286,23 +286,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
{
|
||||
// Deleting someone else's item
|
||||
//
|
||||
|
||||
|
||||
if (remoteClient == null ||
|
||||
objectGroup.OwnerID != remoteClient.AgentId)
|
||||
{
|
||||
// Folder skeleton may not be loaded and we
|
||||
// have to wait for the inventory to find
|
||||
// the destination folder
|
||||
//
|
||||
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Assume inventory skeleton was loaded during login
|
||||
// and all folders can be found
|
||||
//
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
||||
}
|
||||
}
|
||||
else if (action == DeRezAction.Return)
|
||||
|
@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
|
||||
if (folder == null) // None of the above
|
||||
{
|
||||
//folder = userInfo.RootFolder.FindFolder(folderID);
|
||||
folder = new InventoryFolderBase(folderID);
|
||||
|
||||
if (folder == null) // Nowhere to put it
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
|
|||
|
||||
Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" };
|
||||
|
||||
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector", args);
|
||||
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:XInventoryInConnector", args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -134,8 +134,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||
{
|
||||
if (kvp.Key != UUID.Zero)
|
||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
}
|
||||
|
||||
m_requestCallbackTimer.Enabled = true;
|
||||
|
@ -270,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace);
|
||||
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,8 +285,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}",
|
||||
e.Message, e.StackTrace);
|
||||
"[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1592,7 +1592,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// So that we know the database is upto date,
|
||||
// for when deleting the object from it
|
||||
ForceSceneObjectBackup(grp);
|
||||
if (remoteClient != null)
|
||||
|
||||
if (remoteClient == null)
|
||||
{
|
||||
// Autoreturn has a null client. Nothing else does. So
|
||||
// allow only returns
|
||||
if (action != DeRezAction.Return)
|
||||
return;
|
||||
|
||||
permissionToTakeCopy = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
|
||||
permissionToTakeCopy = false;
|
||||
|
@ -1601,7 +1611,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
||||
permissionToDelete = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -556,6 +556,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
|
||||
if (stateSource == (int)StateSource.ScriptedRez)
|
||||
{
|
||||
lock (m_CompileDict)
|
||||
{
|
||||
m_CompileDict[itemID] = 0;
|
||||
}
|
||||
|
||||
DoOnRezScript(parms);
|
||||
}
|
||||
else
|
||||
|
@ -1356,9 +1361,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
string xml = instance.GetXMLState();
|
||||
|
||||
XmlDocument sdoc = new XmlDocument();
|
||||
sdoc.LoadXml(xml);
|
||||
XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
|
||||
XmlNode rootNode = rootL[0];
|
||||
bool loadedState = true;
|
||||
try
|
||||
{
|
||||
sdoc.LoadXml(xml);
|
||||
}
|
||||
catch (System.Xml.XmlException e)
|
||||
{
|
||||
loadedState = false;
|
||||
}
|
||||
|
||||
XmlNodeList rootL = null;
|
||||
XmlNode rootNode = null;
|
||||
if (loadedState)
|
||||
{
|
||||
rootL = sdoc.GetElementsByTagName("ScriptState");
|
||||
rootNode = rootL[0];
|
||||
}
|
||||
|
||||
// Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
|
||||
XmlDocument doc = new XmlDocument();
|
||||
|
@ -1374,8 +1393,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
stateData.Attributes.Append(engineName);
|
||||
doc.AppendChild(stateData);
|
||||
|
||||
XmlNode xmlstate = null;
|
||||
|
||||
// Add <ScriptState>...</ScriptState>
|
||||
XmlNode xmlstate = doc.ImportNode(rootNode, true);
|
||||
if (loadedState)
|
||||
{
|
||||
xmlstate = doc.ImportNode(rootNode, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
xmlstate = doc.CreateElement("", "ScriptState", "");
|
||||
}
|
||||
|
||||
stateData.AppendChild(xmlstate);
|
||||
|
||||
string assemName = instance.GetAssemblyName();
|
||||
|
|
|
@ -230,6 +230,12 @@ namespace OpenSim.Server.Base
|
|||
"shutdown",
|
||||
"Quit the application", HandleQuit);
|
||||
|
||||
// Register a command to read other commands from a file
|
||||
MainConsole.Instance.Commands.AddCommand("base", false, "command-script",
|
||||
"command-script <script>",
|
||||
"Run a command script from file", HandleScript);
|
||||
|
||||
|
||||
// Allow derived classes to perform initialization that
|
||||
// needs to be done after the console has opened
|
||||
//
|
||||
|
@ -259,6 +265,41 @@ namespace OpenSim.Server.Base
|
|||
m_log.Info("[CONSOLE] Quitting");
|
||||
}
|
||||
|
||||
protected virtual void HandleScript(string module, string[] parms)
|
||||
{
|
||||
if (parms.Length != 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
RunCommandScript(parms[1]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run an optional startup list of commands
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
private void RunCommandScript(string fileName)
|
||||
{
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running " + fileName);
|
||||
|
||||
using (StreamReader readFile = File.OpenText(fileName))
|
||||
{
|
||||
string currentCommand;
|
||||
while ((currentCommand = readFile.ReadLine()) != null)
|
||||
{
|
||||
if (currentCommand != String.Empty)
|
||||
{
|
||||
m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
|
||||
MainConsole.Instance.RunCommand(currentCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected virtual void ReadConfig()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
{
|
||||
public class XInventoryInConnector : ServiceConnector
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IInventoryService m_InventoryService;
|
||||
private string m_ConfigName = "InventoryService";
|
||||
|
||||
|
@ -53,6 +55,8 @@ namespace OpenSim.Server.Handlers.Asset
|
|||
if (configName != String.Empty)
|
||||
m_ConfigName = configName;
|
||||
|
||||
m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName);
|
||||
|
||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||
if (serverConfig == null)
|
||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
||||
|
|
|
@ -277,7 +277,7 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
//responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead
|
||||
}
|
||||
|
||||
// subclasses cab override this
|
||||
// subclasses can override this
|
||||
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
||||
{
|
||||
return m_SimulationService.UpdateAgent(destination, agent);
|
||||
|
@ -285,6 +285,16 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)
|
||||
{
|
||||
if (m_SimulationService == null)
|
||||
{
|
||||
m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless.");
|
||||
responsedata["content_type"] = "application/json";
|
||||
responsedata["int_response_code"] = HttpStatusCode.NotImplemented;
|
||||
responsedata["str_response_string"] = string.Empty;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
GridRegion destination = new GridRegion();
|
||||
destination.RegionID = regionID;
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
/// <returns></returns>
|
||||
public bool Delete(string id)
|
||||
{
|
||||
string errorMessage = String.Empty;
|
||||
//string errorMessage = String.Empty;
|
||||
string url = m_serverUrl + id;
|
||||
|
||||
if (m_cache != null)
|
||||
|
|
|
@ -255,7 +255,11 @@ namespace OpenSim.Services.GridService
|
|||
{
|
||||
m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName);
|
||||
}
|
||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort + ":" + regInfo.RegionName;
|
||||
string name = regInfo.RegionName;
|
||||
regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort;
|
||||
if (name != string.Empty)
|
||||
regInfo.RegionName += ":" + name;
|
||||
|
||||
// Try get the map image
|
||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
||||
// I need a texture that works for this... the one I tried doesn't seem to be working
|
||||
|
|
|
@ -108,13 +108,13 @@ namespace OpenSim.Services.InventoryService
|
|||
// Warp! Root folder for travelers
|
||||
XInventoryFolder[] folders = m_Database.GetFolders(
|
||||
new string[] { "agentID", "folderName"},
|
||||
new string[] { principalID.ToString(), "Suitcase" });
|
||||
new string[] { principalID.ToString(), "My Suitcase" });
|
||||
|
||||
if (folders.Length > 0)
|
||||
return ConvertToOpenSim(folders[0]);
|
||||
|
||||
// make one
|
||||
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "Suitcase");
|
||||
XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase");
|
||||
return ConvertToOpenSim(suitcase);
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService
|
|||
if (folders.Length == 0)
|
||||
return null;
|
||||
|
||||
return ConvertToOpenSim(folders[0]);
|
||||
XInventoryFolder root = null;
|
||||
foreach (XInventoryFolder folder in folders)
|
||||
if (folder.folderName == "My Inventory")
|
||||
root = folder;
|
||||
if (folders == null) // oops
|
||||
root = folders[0];
|
||||
|
||||
return ConvertToOpenSim(root);
|
||||
}
|
||||
|
||||
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenSim.Server, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="Robust, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\bin\OpenSim.Server.exe</HintPath>
|
||||
<HintPath>..\..\..\bin\Robust.exe</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
|
Binary file not shown.
|
@ -198,6 +198,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
|||
; CHANGE THIS
|
||||
ExternalName = "http://127.0.0.1:8002"
|
||||
|
||||
; Does this grid allow incoming links to any region in it?
|
||||
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||
AllowTeleportsToAnyRegion = true
|
||||
|
||||
[UserAgentService]
|
||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||
;; for the service
|
||||
|
|
|
@ -68,3 +68,8 @@
|
|||
|
||||
[GatekeeperService]
|
||||
ExternalName = "http://127.0.0.1:9000"
|
||||
|
||||
; Does this grid allow incoming links to any region in it?
|
||||
; If false, HG TPs happen only to the Default regions specified in [GridService] section
|
||||
AllowTeleportsToAnyRegion = true
|
||||
|
||||
|
|
Loading…
Reference in New Issue