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;
|
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
||||||
if (canEditObjectsChanged)
|
if (canEditObjectsChanged)
|
||||||
friendClient.SendChangeUserRights(userID, friendID, rights);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT OVERRIDE THIS METHOD
|
||||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
|
|
|
@ -286,23 +286,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
{
|
{
|
||||||
// Deleting someone else's item
|
// Deleting someone else's item
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
if (remoteClient == null ||
|
if (remoteClient == null ||
|
||||||
objectGroup.OwnerID != remoteClient.AgentId)
|
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);
|
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Assume inventory skeleton was loaded during login
|
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
||||||
// and all folders can be found
|
|
||||||
//
|
|
||||||
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (action == DeRezAction.Return)
|
else if (action == DeRezAction.Return)
|
||||||
|
@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
if (folder == null) // None of the above
|
if (folder == null) // None of the above
|
||||||
{
|
{
|
||||||
//folder = userInfo.RootFolder.FindFolder(folderID);
|
|
||||||
folder = new InventoryFolderBase(folderID);
|
folder = new InventoryFolderBase(folderID);
|
||||||
|
|
||||||
if (folder == null) // Nowhere to put it
|
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" };
|
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)
|
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;
|
m_requestCallbackTimer.Enabled = true;
|
||||||
|
@ -270,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}",
|
"[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e);
|
||||||
e.Message, e.StackTrace);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1592,7 +1592,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// So that we know the database is upto date,
|
// So that we know the database is upto date,
|
||||||
// for when deleting the object from it
|
// for when deleting the object from it
|
||||||
ForceSceneObjectBackup(grp);
|
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))
|
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
|
||||||
permissionToTakeCopy = false;
|
permissionToTakeCopy = false;
|
||||||
|
@ -1601,7 +1611,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
|
||||||
permissionToDelete = false;
|
permissionToDelete = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -556,6 +556,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
if (stateSource == (int)StateSource.ScriptedRez)
|
if (stateSource == (int)StateSource.ScriptedRez)
|
||||||
{
|
{
|
||||||
|
lock (m_CompileDict)
|
||||||
|
{
|
||||||
|
m_CompileDict[itemID] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
DoOnRezScript(parms);
|
DoOnRezScript(parms);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1356,9 +1361,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
string xml = instance.GetXMLState();
|
string xml = instance.GetXMLState();
|
||||||
|
|
||||||
XmlDocument sdoc = new XmlDocument();
|
XmlDocument sdoc = new XmlDocument();
|
||||||
sdoc.LoadXml(xml);
|
bool loadedState = true;
|
||||||
XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
|
try
|
||||||
XmlNode rootNode = rootL[0];
|
{
|
||||||
|
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">
|
// Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
|
@ -1374,8 +1393,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
stateData.Attributes.Append(engineName);
|
stateData.Attributes.Append(engineName);
|
||||||
doc.AppendChild(stateData);
|
doc.AppendChild(stateData);
|
||||||
|
|
||||||
|
XmlNode xmlstate = null;
|
||||||
|
|
||||||
// Add <ScriptState>...</ScriptState>
|
// Add <ScriptState>...</ScriptState>
|
||||||
XmlNode xmlstate = doc.ImportNode(rootNode, true);
|
if (loadedState)
|
||||||
|
{
|
||||||
|
xmlstate = doc.ImportNode(rootNode, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstate = doc.CreateElement("", "ScriptState", "");
|
||||||
|
}
|
||||||
|
|
||||||
stateData.AppendChild(xmlstate);
|
stateData.AppendChild(xmlstate);
|
||||||
|
|
||||||
string assemName = instance.GetAssemblyName();
|
string assemName = instance.GetAssemblyName();
|
||||||
|
|
|
@ -230,6 +230,12 @@ namespace OpenSim.Server.Base
|
||||||
"shutdown",
|
"shutdown",
|
||||||
"Quit the application", HandleQuit);
|
"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
|
// Allow derived classes to perform initialization that
|
||||||
// needs to be done after the console has opened
|
// needs to be done after the console has opened
|
||||||
//
|
//
|
||||||
|
@ -259,6 +265,41 @@ namespace OpenSim.Server.Base
|
||||||
m_log.Info("[CONSOLE] Quitting");
|
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()
|
protected virtual void ReadConfig()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
{
|
{
|
||||||
public class XInventoryInConnector : ServiceConnector
|
public class XInventoryInConnector : ServiceConnector
|
||||||
{
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IInventoryService m_InventoryService;
|
private IInventoryService m_InventoryService;
|
||||||
private string m_ConfigName = "InventoryService";
|
private string m_ConfigName = "InventoryService";
|
||||||
|
|
||||||
|
@ -53,6 +55,8 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
if (configName != String.Empty)
|
if (configName != String.Empty)
|
||||||
m_ConfigName = configName;
|
m_ConfigName = configName;
|
||||||
|
|
||||||
|
m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName);
|
||||||
|
|
||||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||||
if (serverConfig == null)
|
if (serverConfig == null)
|
||||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
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
|
//responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); ??? instead
|
||||||
}
|
}
|
||||||
|
|
||||||
// subclasses cab override this
|
// subclasses can override this
|
||||||
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
protected virtual bool UpdateAgent(GridRegion destination, AgentData agent)
|
||||||
{
|
{
|
||||||
return m_SimulationService.UpdateAgent(destination, 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)
|
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();
|
GridRegion destination = new GridRegion();
|
||||||
destination.RegionID = regionID;
|
destination.RegionID = regionID;
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool Delete(string id)
|
public bool Delete(string id)
|
||||||
{
|
{
|
||||||
string errorMessage = String.Empty;
|
//string errorMessage = String.Empty;
|
||||||
string url = m_serverUrl + id;
|
string url = m_serverUrl + id;
|
||||||
|
|
||||||
if (m_cache != null)
|
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);
|
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
|
// Try get the map image
|
||||||
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
|
//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
|
// 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
|
// Warp! Root folder for travelers
|
||||||
XInventoryFolder[] folders = m_Database.GetFolders(
|
XInventoryFolder[] folders = m_Database.GetFolders(
|
||||||
new string[] { "agentID", "folderName"},
|
new string[] { "agentID", "folderName"},
|
||||||
new string[] { principalID.ToString(), "Suitcase" });
|
new string[] { principalID.ToString(), "My Suitcase" });
|
||||||
|
|
||||||
if (folders.Length > 0)
|
if (folders.Length > 0)
|
||||||
return ConvertToOpenSim(folders[0]);
|
return ConvertToOpenSim(folders[0]);
|
||||||
|
|
||||||
// make one
|
// 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);
|
return ConvertToOpenSim(suitcase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService
|
||||||
if (folders.Length == 0)
|
if (folders.Length == 0)
|
||||||
return null;
|
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)
|
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
<HintPath>..\..\..\bin\log4net.dll</HintPath>
|
||||||
</Reference>
|
</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>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\bin\OpenSim.Server.exe</HintPath>
|
<HintPath>..\..\..\bin\Robust.exe</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
|
|
Binary file not shown.
|
@ -198,6 +198,10 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
; CHANGE THIS
|
; CHANGE THIS
|
||||||
ExternalName = "http://127.0.0.1:8002"
|
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]
|
[UserAgentService]
|
||||||
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||||
;; for the service
|
;; for the service
|
||||||
|
|
|
@ -68,3 +68,8 @@
|
||||||
|
|
||||||
[GatekeeperService]
|
[GatekeeperService]
|
||||||
ExternalName = "http://127.0.0.1:9000"
|
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