Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-08-23 23:55:15 +01:00
commit 1bfec00a88
22 changed files with 126 additions and 287 deletions

View File

@ -33,8 +33,6 @@ namespace OpenSim.Framework
{ {
public class RegionSettings public class RegionSettings
{ {
private ConfigurationMember configMember;
public delegate void SaveDelegate(RegionSettings rs); public delegate void SaveDelegate(RegionSettings rs);
public event SaveDelegate OnSave; public event SaveDelegate OnSave;
@ -47,202 +45,6 @@ namespace OpenSim.Framework
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f");
public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2");
public RegionSettings()
{
if (configMember == null)
{
try
{
configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true);
configMember.performConfigurationRetrieve();
}
catch (Exception)
{
}
}
}
public void LoadConfigurationOptions()
{
configMember.addConfigurationOption("region_flags",
ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
String.Empty, "336723974", true);
configMember.addConfigurationOption("max_agents",
ConfigurationOption.ConfigurationTypes.TYPE_INT32,
String.Empty, "40", true);
configMember.addConfigurationOption("object_bonus_factor",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "1.0", true);
configMember.addConfigurationOption("sim_access",
ConfigurationOption.ConfigurationTypes.TYPE_INT32,
String.Empty, "21", true);
configMember.addConfigurationOption("terrain_base_0",
ConfigurationOption.ConfigurationTypes.TYPE_UUID,
String.Empty, DEFAULT_TERRAIN_TEXTURE_1.ToString(), true);
configMember.addConfigurationOption("terrain_base_1",
ConfigurationOption.ConfigurationTypes.TYPE_UUID,
String.Empty, DEFAULT_TERRAIN_TEXTURE_2.ToString(), true);
configMember.addConfigurationOption("terrain_base_2",
ConfigurationOption.ConfigurationTypes.TYPE_UUID,
String.Empty, DEFAULT_TERRAIN_TEXTURE_3.ToString(), true);
configMember.addConfigurationOption("terrain_base_3",
ConfigurationOption.ConfigurationTypes.TYPE_UUID,
String.Empty, DEFAULT_TERRAIN_TEXTURE_4.ToString(), true);
configMember.addConfigurationOption("terrain_start_height_0",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_1",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_2",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_start_height_3",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "10.0", true);
configMember.addConfigurationOption("terrain_height_range_0",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_1",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_2",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "60.0", true);
configMember.addConfigurationOption("terrain_height_range_3",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "60.0", true);
configMember.addConfigurationOption("region_water_height",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "20.0", true);
configMember.addConfigurationOption("terrain_raise_limit",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "100.0", true);
configMember.addConfigurationOption("terrain_lower_limit",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "-100.0", true);
configMember.addConfigurationOption("sun_hour",
ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
String.Empty, "0.0", true);
}
public bool HandleIncomingConfiguration(string key, object value)
{
switch (key)
{
case "region_flags":
RegionFlags flags = (RegionFlags)(uint)value;
m_BlockTerraform =
(flags & RegionFlags.BlockTerraform) != 0;
m_BlockFly =
(flags & RegionFlags.NoFly) != 0;
m_AllowDamage =
(flags & RegionFlags.AllowDamage) != 0;
m_RestrictPushing =
(flags & RegionFlags.RestrictPushObject) != 0;
m_AllowLandResell =
(flags & RegionFlags.BlockLandResell) == 0;
m_AllowLandJoinDivide =
(flags & RegionFlags.AllowParcelChanges) != 0;
m_BlockShowInSearch =
((uint)flags & (1 << 29)) != 0;
m_DisableScripts =
(flags & RegionFlags.SkipScripts) != 0;
m_DisableCollisions =
(flags & RegionFlags.SkipCollisions) != 0;
m_DisablePhysics =
(flags & RegionFlags.SkipPhysics) != 0;
m_FixedSun =
(flags & RegionFlags.SunFixed) != 0;
m_Sandbox =
(flags & RegionFlags.Sandbox) != 0;
break;
case "max_agents":
m_AgentLimit = (int)value;
break;
case "object_bonus_factor":
m_ObjectBonus = (double)value;
break;
case "sim_access":
int access = (int)value;
if (access <= 13)
m_Maturity = 0;
else
m_Maturity = 1;
break;
case "terrain_base_0":
m_TerrainTexture1 = (UUID)value;
break;
case "terrain_base_1":
m_TerrainTexture2 = (UUID)value;
break;
case "terrain_base_2":
m_TerrainTexture3 = (UUID)value;
break;
case "terrain_base_3":
m_TerrainTexture4 = (UUID)value;
break;
case "terrain_start_height_0":
m_Elevation1SW = (double)value;
break;
case "terrain_start_height_1":
m_Elevation1NW = (double)value;
break;
case "terrain_start_height_2":
m_Elevation1SE = (double)value;
break;
case "terrain_start_height_3":
m_Elevation1NE = (double)value;
break;
case "terrain_height_range_0":
m_Elevation2SW = (double)value;
break;
case "terrain_height_range_1":
m_Elevation2NW = (double)value;
break;
case "terrain_height_range_2":
m_Elevation2SE = (double)value;
break;
case "terrain_height_range_3":
m_Elevation2NE = (double)value;
break;
case "region_water_height":
m_WaterHeight = (double)value;
break;
case "terrain_raise_limit":
m_TerrainRaiseLimit = (double)value;
break;
case "terrain_lower_limit":
m_TerrainLowerLimit = (double)value;
break;
case "sun_hour":
m_SunPosition = (double)value;
break;
}
return true;
}
public void Save() public void Save()
{ {
if (OnSave != null) if (OnSave != null)

View File

@ -2743,7 +2743,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
DirPlacesReplyPacket.StatusDataBlock[] status = DirPlacesReplyPacket.StatusDataBlock[] status =
new DirPlacesReplyPacket.StatusDataBlock[0]; new DirPlacesReplyPacket.StatusDataBlock[0];
int i = 0;
foreach (DirPlacesReplyData d in data) foreach (DirPlacesReplyData d in data)
{ {
int idx = replies.Length; int idx = replies.Length;
@ -2779,7 +2778,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
replies = new DirPlacesReplyPacket.QueryRepliesBlock[0]; replies = new DirPlacesReplyPacket.QueryRepliesBlock[0];
status = new DirPlacesReplyPacket.StatusDataBlock[0]; status = new DirPlacesReplyPacket.StatusDataBlock[0];
} }
} }

View File

@ -132,8 +132,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{ {
UUID toAgentID = new UUID(im.toAgentID); UUID toAgentID = new UUID(im.toAgentID);
//m_log.DebugFormat("[INSTANT MESSAGE]: Attempting delivery of IM from {0} to {1}", im.fromAgentName, toAgentID.ToString());
// Try root avatar only first // Try root avatar only first
foreach (Scene scene in m_Scenes) foreach (Scene scene in m_Scenes)
{ {
@ -176,6 +174,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
} }
} }
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
SendGridInstantMessageViaXMLRPC(im, result); SendGridInstantMessageViaXMLRPC(im, result);
return; return;

View File

@ -32,7 +32,6 @@ using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
@ -92,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>(); m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null) if (m_TransferModule == null)
{ {
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
m_Enabled = false; m_Enabled = false;
m_Scenelist.Clear(); m_Scenelist.Clear();
@ -185,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{ {
UUID folderID = new UUID(im.binaryBucket, 1); UUID folderID = new UUID(im.binaryBucket, 1);
m_log.DebugFormat("[AGENT INVENTORY]: Inserting original folder {0} "+ m_log.DebugFormat("[INVENTORY TRANSFER]: Inserting original folder {0} "+
"into agent {1}'s inventory", "into agent {1}'s inventory",
folderID, new UUID(im.toAgentID)); folderID, new UUID(im.toAgentID));
@ -221,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
UUID itemID = new UUID(im.binaryBucket, 1); UUID itemID = new UUID(im.binaryBucket, 1);
m_log.DebugFormat("[AGENT INVENTORY]: (giving) Inserting item {0} "+ m_log.DebugFormat("[INVENTORY TRANSFER]: (giving) Inserting item {0} "+
"into agent {1}'s inventory", "into agent {1}'s inventory",
itemID, new UUID(im.toAgentID)); itemID, new UUID(im.toAgentID));
@ -288,10 +287,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
// inventory is loaded. Courtesy of the above bulk update, // inventory is loaded. Courtesy of the above bulk update,
// It will have been pushed to the client, too // It will have been pushed to the client, too
// //
//CachedUserInfo userInfo =
// scene.CommsManager.UserProfileCacheService.
// GetUserDetails(client.AgentId);
IInventoryService invService = scene.InventoryService; IInventoryService invService = scene.InventoryService;
InventoryFolderBase trashFolder = InventoryFolderBase trashFolder =

View File

@ -27,15 +27,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using OpenMetaverse; using OpenMetaverse;
using Nini.Config; using Nini.Config;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
{ {
public abstract class BaseInventoryConnector : IInventoryService public abstract class BaseInventoryConnector : IInventoryService

View File

@ -161,6 +161,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
/// <returns></returns> /// <returns></returns>
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
{ {
m_log.DebugFormat("[INVENTORY CACHE]: Getting folder for asset type {0} for user {1}", type, userID);
Dictionary<AssetType, InventoryFolderBase> folders = null; Dictionary<AssetType, InventoryFolderBase> folders = null;
lock (m_InventoryCache) lock (m_InventoryCache)
@ -177,9 +179,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if ((folders != null) && folders.ContainsKey(type)) if ((folders != null) && folders.ContainsKey(type))
{ {
m_log.DebugFormat(
"[INVENTORY CACHE]: Returning folder {0} as type {1} for {2}", folders[type], type, userID);
return folders[type]; return folders[type];
} }
m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID);
return null; return null;
} }

View File

@ -216,13 +216,29 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return m_InventoryService.PurgeFolder(folder); return m_InventoryService.PurgeFolder(folder);
} }
/// <summary>
/// Add a new item to the user's inventory
/// </summary>
/// <param name="item"></param>
/// <returns>true if the item was successfully added</returns>
public bool AddItem(InventoryItemBase item) public bool AddItem(InventoryItemBase item)
{ {
m_log.DebugFormat(
"[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
item.Name, item.Owner, item.Folder);
if (UUID.Zero == item.Folder)
{
InventoryFolderBase f = m_InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType);
if (f != null)
{
item.Folder = f.ID;
}
else
{
f = m_InventoryService.GetRootFolder(item.Owner);
if (f != null)
item.Folder = f.ID;
else
return false;
}
}
return m_InventoryService.AddItem(item); return m_InventoryService.AddItem(item);
} }
@ -236,7 +252,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return m_InventoryService.UpdateItem(item); return m_InventoryService.UpdateItem(item);
} }
public bool MoveItems(UUID ownerID, List<InventoryItemBase> items) public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
{ {
return m_InventoryService.MoveItems(ownerID, items); return m_InventoryService.MoveItems(ownerID, items);

View File

@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
base.Init(source); base.Init(source);
} }
#region ISharedRegionModule #region ISharedRegionModule
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)

View File

@ -229,6 +229,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
if (item == null) if (item == null)
return false; return false;
if (UUID.Zero == item.Folder)
{
InventoryFolderBase f = m_RemoteConnector.GetFolderForType(item.Owner, (AssetType)item.AssetType);
if (f != null)
{
item.Folder = f.ID;
}
else
{
f = m_RemoteConnector.GetRootFolder(item.Owner);
if (f != null)
item.Folder = f.ID;
else
return false;
}
}
return m_RemoteConnector.AddItem(item); return m_RemoteConnector.AddItem(item);
} }
@ -294,9 +311,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
return m_RemoteConnector.GetAssetPermissions(userID, assetID); return m_RemoteConnector.GetAssetPermissions(userID, assetID);
} }
#endregion #endregion
} }
} }

View File

@ -984,7 +984,6 @@ namespace OpenSim.Region.Framework.Scenes
private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId) private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
{ {
Console.WriteLine("CreateAgentInventoryItemFromTask");
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
if (null == taskItem) if (null == taskItem)
@ -1055,7 +1054,10 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="itemID"></param> /// <param name="itemID"></param>
public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId) public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
{ {
m_log.Info("Adding task inventory"); m_log.DebugFormat(
"[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}",
itemId, part.Name, folderId, remoteClient.Name);
InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
if (agentItem == null) if (agentItem == null)
@ -1121,7 +1123,11 @@ namespace OpenSim.Region.Framework.Scenes
/// <see>MoveTaskInventoryItem</see> /// <see>MoveTaskInventoryItem</see>
/// </summary> /// </summary>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <param name="folderID"></param> /// <param name="folderID">
/// The user inventory folder to move (or copy) the item to. If null, then the most
/// suitable system folder is used (e.g. the Objects folder for objects). If there is no suitable folder, then
/// the item is placed in the user's root inventory folder
/// </param>
/// <param name="part"></param> /// <param name="part"></param>
/// <param name="itemID"></param> /// <param name="itemID"></param>
public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId) public InventoryItemBase MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)

View File

@ -4179,8 +4179,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
// destination is an avatar // destination is an avatar
InventoryItemBase agentItem = InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId);
World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId);
if (agentItem == null) if (agentItem == null)
return; return;
@ -4190,7 +4189,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
byte[] objBytes = agentItem.ID.GetBytes(); byte[] objBytes = agentItem.ID.GetBytes();
Array.Copy(objBytes, 0, bucket, 1, 16); Array.Copy(objBytes, 0, bucket, 1, 16);
Console.WriteLine("Giving inventory");
GridInstantMessage msg = new GridInstantMessage(World, GridInstantMessage msg = new GridInstantMessage(World,
m_host.UUID, m_host.Name+", an object owned by "+ m_host.UUID, m_host.Name+", an object owned by "+
resolveName(m_host.OwnerID)+",", destId, resolveName(m_host.OwnerID)+",", destId,

View File

@ -1373,7 +1373,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
{ {
sdoc.LoadXml(xml); sdoc.LoadXml(xml);
} }
catch (System.Xml.XmlException e) catch (System.Xml.XmlException)
{ {
loadedState = false; loadedState = false;
} }

View File

@ -156,8 +156,6 @@ namespace OpenSim.Services.Connectors
sendData["METHOD"] = "storefriend"; sendData["METHOD"] = "storefriend";
string reqString = ServerUtils.BuildQueryString(sendData);
string reply = string.Empty; string reply = string.Empty;
try try
{ {
@ -199,8 +197,6 @@ namespace OpenSim.Services.Connectors
sendData["FRIEND"] = Friend; sendData["FRIEND"] = Friend;
sendData["METHOD"] = "deletefriend"; sendData["METHOD"] = "deletefriend";
string reqString = ServerUtils.BuildQueryString(sendData);
string reply = string.Empty; string reply = string.Empty;
try try
{ {
@ -232,10 +228,8 @@ namespace OpenSim.Services.Connectors
m_log.DebugFormat("[FRIENDS CONNECTOR]: DeleteFriend received null reply"); m_log.DebugFormat("[FRIENDS CONNECTOR]: DeleteFriend received null reply");
return false; return false;
} }
#endregion #endregion
} }
} }

View File

@ -31,11 +31,9 @@ using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
using GridRegion = OpenSim.Services.Interfaces.GridRegion; using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Imaging; using OpenMetaverse.Imaging;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
@ -50,7 +48,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013"); // private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013");
private IAssetService m_AssetService; private IAssetService m_AssetService;

View File

@ -32,12 +32,10 @@ using System.IO;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
using OpenSim.Services.Connectors.Simulation; using OpenSim.Services.Connectors.Simulation;
using GridRegion = OpenSim.Services.Interfaces.GridRegion; using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData; using OpenMetaverse.StructuredData;
using log4net; using log4net;
@ -243,7 +241,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
{ {
response = request.Send(m_ServerURL, 10000); response = request.Send(m_ServerURL, 10000);
} }
catch (Exception e) catch (Exception)
{ {
return null; return null;
} }
@ -308,13 +306,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
} }
} }
catch (Exception e) catch (Exception)
{ {
return null; return null;
} }
return null; return null;
} }
public bool AgentIsComingHome(UUID sessionID, string thisGridExternalName) public bool AgentIsComingHome(UUID sessionID, string thisGridExternalName)

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
@ -53,7 +53,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private static string ZeroID = UUID.Zero.ToString(); // private static string ZeroID = UUID.Zero.ToString();
private string m_serverUrl = String.Empty; private string m_serverUrl = String.Empty;

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
private string m_serverUrl = String.Empty; private string m_serverUrl = String.Empty;
private string m_userServerUrl = String.Empty; private string m_userServerUrl = String.Empty;
private object m_gestureSyncRoot = new object(); // private object m_gestureSyncRoot = new object();
#region ISharedRegionModule #region ISharedRegionModule
@ -687,12 +687,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
for (int i = 0; i < items.Count; i++) for (int i = 0; i < items.Count; i++)
itemIDs[i] = items[i].AsUUID().ToString(); itemIDs[i] = items[i].AsUUID().ToString();
NameValueCollection requestArgs = new NameValueCollection // NameValueCollection requestArgs = new NameValueCollection
{ // {
{ "RequestMethod", "GetInventoryNodes" }, // { "RequestMethod", "GetInventoryNodes" },
{ "OwnerID", userID.ToString() }, // { "OwnerID", userID.ToString() },
{ "Items", String.Join(",", itemIDs) } // { "Items", String.Join(",", itemIDs) }
}; // };
// FIXME: Implement this in SimianGrid // FIXME: Implement this in SimianGrid
return new List<InventoryItemBase>(0); return new List<InventoryItemBase>(0);
@ -708,12 +708,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// the user's inventory</returns> /// the user's inventory</returns>
public int GetAssetPermissions(UUID userID, UUID assetID) public int GetAssetPermissions(UUID userID, UUID assetID)
{ {
NameValueCollection requestArgs = new NameValueCollection // NameValueCollection requestArgs = new NameValueCollection
{ // {
{ "RequestMethod", "GetInventoryNodes" }, // { "RequestMethod", "GetInventoryNodes" },
{ "OwnerID", userID.ToString() }, // { "OwnerID", userID.ToString() },
{ "AssetID", assetID.ToString() } // { "AssetID", assetID.ToString() }
}; // };
// FIXME: Implement this in SimianGrid // FIXME: Implement this in SimianGrid
return (int)PermissionMask.All; return (int)PermissionMask.All;

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
@ -349,24 +349,24 @@ namespace OpenSim.Services.Connectors.SimianGrid
return null; return null;
} }
private OSDMap GetSessionData(UUID sessionID) // private OSDMap GetSessionData(UUID sessionID)
{ // {
m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID);
//
NameValueCollection requestArgs = new NameValueCollection // NameValueCollection requestArgs = new NameValueCollection
{ // {
{ "RequestMethod", "GetSession" }, // { "RequestMethod", "GetSession" },
{ "SessionID", sessionID.ToString() } // { "SessionID", sessionID.ToString() }
}; // };
//
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
if (response["Success"].AsBoolean()) // if (response["Success"].AsBoolean())
return response; // return response;
else // else
m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID);
//
return null; // return null;
} // }
private List<PresenceInfo> GetSessions(UUID userID) private List<PresenceInfo> GetSessions(UUID userID)
{ {

View File

@ -141,8 +141,11 @@ namespace OpenSim.Services.Interfaces
/// <summary> /// <summary>
/// Add a new item to the user's inventory /// Add a new item to the user's inventory
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item">
/// <returns>true if the item was successfully added</returns> /// The item to be added. If item.FolderID == UUID.Zero then the item is added to the most suitable system
/// folder. If there is no suitable folder then the item is added to the user's root inventory folder.
/// </param>
/// <returns>true if the item was successfully added, false if it was not</returns>
bool AddItem(InventoryItemBase item); bool AddItem(InventoryItemBase item);
/// <summary> /// <summary>

View File

@ -157,6 +157,8 @@ namespace OpenSim.Services.InventoryService
protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID) protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID)
{ {
// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID);
XInventoryFolder[] allFolders = m_Database.GetFolders( XInventoryFolder[] allFolders = m_Database.GetFolders(
new string[] { "agentID" }, new string[] { "agentID" },
new string[] { principalID.ToString() }); new string[] { principalID.ToString() });
@ -170,6 +172,9 @@ namespace OpenSim.Services.InventoryService
return false; return false;
}); });
// m_log.DebugFormat(
// "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID);
return sysFolders; return sysFolders;
} }
@ -186,7 +191,7 @@ namespace OpenSim.Services.InventoryService
foreach (XInventoryFolder x in allFolders) foreach (XInventoryFolder x in allFolders)
{ {
//m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to skeleton", x.folderName); //m_log.DebugFormat("[XINVENTORY SERVICE]: Adding folder {0} to skeleton", x.folderName);
folders.Add(ConvertToOpenSim(x)); folders.Add(ConvertToOpenSim(x));
} }
@ -214,12 +219,21 @@ namespace OpenSim.Services.InventoryService
public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
{ {
// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
XInventoryFolder[] folders = m_Database.GetFolders( XInventoryFolder[] folders = m_Database.GetFolders(
new string[] { "agentID", "type"}, new string[] { "agentID", "type"},
new string[] { principalID.ToString(), ((int)type).ToString() }); new string[] { principalID.ToString(), ((int)type).ToString() });
if (folders.Length == 0) if (folders.Length == 0)
{
// m_log.WarnFormat("[XINVENTORY SERVICE]: Found no folder for type {0} for user {1}", type, principalID);
return null; return null;
}
// m_log.DebugFormat(
// "[XINVENTORY SERVICE]: Found folder {0} {1} for type {2} for user {3}",
// folders[0].folderName, folders[0].folderID, type, principalID);
return ConvertToOpenSim(folders[0]); return ConvertToOpenSim(folders[0]);
} }
@ -230,7 +244,7 @@ namespace OpenSim.Services.InventoryService
// connector. So we disregard the principal and look // connector. So we disregard the principal and look
// by ID. // by ID.
// //
m_log.DebugFormat("[XINVENTORY]: Fetch contents for folder {0}", folderID.ToString()); m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString());
InventoryCollection inventory = new InventoryCollection(); InventoryCollection inventory = new InventoryCollection();
inventory.UserID = principalID; inventory.UserID = principalID;
inventory.Folders = new List<InventoryFolderBase>(); inventory.Folders = new List<InventoryFolderBase>();
@ -349,6 +363,9 @@ namespace OpenSim.Services.InventoryService
public virtual bool AddItem(InventoryItemBase item) public virtual bool AddItem(InventoryItemBase item)
{ {
// m_log.DebugFormat(
// "[XINVENTORY SERVICE]: Adding item {0} to folder {1} for {2}", item.ID, item.Folder, item.Owner);
return m_Database.StoreItem(ConvertFromOpenSim(item)); return m_Database.StoreItem(ConvertFromOpenSim(item));
} }

View File

@ -227,7 +227,7 @@
;MapImageModule = "MapImageModule" ;MapImageModule = "MapImageModule"
; Set to false to not generate any maptiles ; Set to false to not generate any maptiles
;GenerateMaptiles = "true" ;GenerateMaptiles = "true"
; Refreah (in seconds) the map tile periodically ; Refresh (in seconds) the map tile periodically
;MaptileRefresh = 0 ;MaptileRefresh = 0
; If not generating maptiles, use this static texture asset ID ; If not generating maptiles, use this static texture asset ID
;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" ;MaptileStaticUUID = "00000000-0000-0000-0000-000000000000"