Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
091f3a8000
|
@ -17,6 +17,7 @@ people that make the day to day of OpenSim happen.
|
||||||
* Snoopy Pfeffer
|
* Snoopy Pfeffer
|
||||||
* Robert Adams (Intel)
|
* Robert Adams (Intel)
|
||||||
* Oren Hurvitz (Kitely)
|
* Oren Hurvitz (Kitely)
|
||||||
|
* Kevin Cozens
|
||||||
|
|
||||||
= Core Developers Following the White Rabbit =
|
= Core Developers Following the White Rabbit =
|
||||||
Core developers who have temporarily (we hope) gone chasing the white rabbit.
|
Core developers who have temporarily (we hope) gone chasing the white rabbit.
|
||||||
|
@ -111,7 +112,6 @@ what it is today.
|
||||||
* Jon Cundill
|
* Jon Cundill
|
||||||
* Junta Kohime
|
* Junta Kohime
|
||||||
* Kayne
|
* Kayne
|
||||||
* Kevin Cozens
|
|
||||||
* kinoc (Daxtron Labs)
|
* kinoc (Daxtron Labs)
|
||||||
* Kira
|
* Kira
|
||||||
* Kitto Flora
|
* Kitto Flora
|
||||||
|
|
|
@ -110,7 +110,15 @@ namespace OpenSim.Groups
|
||||||
m_messageOnlineAgentsOnly = groupsConfig.GetBoolean("MessageOnlineUsersOnly", false);
|
m_messageOnlineAgentsOnly = groupsConfig.GetBoolean("MessageOnlineUsersOnly", false);
|
||||||
|
|
||||||
if (m_messageOnlineAgentsOnly)
|
if (m_messageOnlineAgentsOnly)
|
||||||
|
{
|
||||||
m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>();
|
m_usersOnlineCache = new ExpiringCache<UUID, PresenceInfo[]>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.Error("[Groups.Messaging]: GroupsMessagingModule V2 requires MessageOnlineUsersOnly = true");
|
||||||
|
m_groupMessagingEnabled = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
|
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true);
|
||||||
|
|
||||||
|
@ -260,7 +268,7 @@ namespace OpenSim.Groups
|
||||||
// Sending to offline members is not an option.
|
// Sending to offline members is not an option.
|
||||||
string[] t1 = groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()).ToArray();
|
string[] t1 = groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()).ToArray();
|
||||||
|
|
||||||
// We cache in order not to overwhlem the presence service on large grids with many groups. This does
|
// We cache in order not to overwhelm the presence service on large grids with many groups. This does
|
||||||
// mean that members coming online will not see all group members until after m_usersOnlineCacheExpirySeconds has elapsed.
|
// mean that members coming online will not see all group members until after m_usersOnlineCacheExpirySeconds has elapsed.
|
||||||
// (assuming this is the same across all grid simulators).
|
// (assuming this is the same across all grid simulators).
|
||||||
if (!m_usersOnlineCache.TryGetValue(groupID, out onlineAgents))
|
if (!m_usersOnlineCache.TryGetValue(groupID, out onlineAgents))
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace OpenSim.Groups
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IGroupsModule>(this);
|
scene.RegisterModuleInterface<IGroupsModule>(this);
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
"debug",
|
"Debug",
|
||||||
this,
|
this,
|
||||||
"debug groups verbose",
|
"debug groups verbose",
|
||||||
"debug groups verbose <true|false>",
|
"debug groups verbose <true|false>",
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -158,7 +158,7 @@ namespace OpenSim.Groups
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[Groups.RobustHGConnector]: Exception {0}", e.StackTrace);
|
m_log.Error(string.Format("[Groups.RobustHGConnector]: Exception {0} ", e.Message), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
|
@ -140,7 +140,7 @@ namespace OpenSim.Groups
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[GROUPS HANDLER]: Exception {0}", e.StackTrace);
|
m_log.Error(string.Format("[GROUPS HANDLER]: Exception {0} ", e.Message), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenSim.OfflineIM
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[OFFLINE IM HANDLER]: Exception {0}", e.StackTrace);
|
m_log.Error(string.Format("[OFFLINE IM HANDLER]: Exception {0} ", e.Message), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
|
@ -86,11 +86,11 @@ namespace OpenSim.Data.MySQL
|
||||||
public GroupData[] RetrieveGroups(string pattern)
|
public GroupData[] RetrieveGroups(string pattern)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(pattern))
|
if (string.IsNullOrEmpty(pattern))
|
||||||
pattern = "1 ORDER BY Name LIMIT 100";
|
pattern = "1";
|
||||||
else
|
else
|
||||||
pattern = string.Format("Name LIKE '%{0}%' ORDER BY Name LIMIT 100", pattern);
|
pattern = string.Format("Name LIKE '%{0}%'", pattern);
|
||||||
|
|
||||||
return m_Groups.Get(pattern);
|
return m_Groups.Get(string.Format("ShowInList=1 AND ({0}) ORDER BY Name LIMIT 100", pattern));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool DeleteGroup(UUID groupID)
|
public bool DeleteGroup(UUID groupID)
|
||||||
|
|
|
@ -974,8 +974,8 @@ namespace OpenSim.Data.MySQL
|
||||||
dbcon.Open();
|
dbcon.Open();
|
||||||
using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
|
using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail);
|
cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail.ToString().ToLower());
|
||||||
cmd.Parameters.AddWithValue("?Visible", pref.Visible);
|
cmd.Parameters.AddWithValue("?Visible", pref.Visible.ToString().ToLower());
|
||||||
cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
|
cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
|
|
@ -82,12 +82,15 @@ namespace OpenSim.Framework
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_creatorId = value;
|
m_creatorId = value;
|
||||||
|
|
||||||
|
if ((m_creatorId == null) || !UUID.TryParse(m_creatorId, out m_creatorIdAsUuid))
|
||||||
|
m_creatorIdAsUuid = UUID.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected string m_creatorId;
|
protected string m_creatorId;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The CreatorId expressed as a UUID.tely
|
/// The CreatorId expressed as a UUID.
|
||||||
/// </value>
|
/// </value>
|
||||||
public UUID CreatorIdAsUuid
|
public UUID CreatorIdAsUuid
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace OpenSim.Framework
|
||||||
AddinManager.AddinLoadError += on_addinloaderror_;
|
AddinManager.AddinLoadError += on_addinloaderror_;
|
||||||
AddinManager.AddinLoaded += on_addinloaded_;
|
AddinManager.AddinLoaded += on_addinloaded_;
|
||||||
|
|
||||||
clear_registry_();
|
clear_registry_(dir);
|
||||||
|
|
||||||
suppress_console_output_(true);
|
suppress_console_output_(true);
|
||||||
AddinManager.Initialize(dir);
|
AddinManager.Initialize(dir);
|
||||||
|
@ -239,18 +239,19 @@ namespace OpenSim.Framework
|
||||||
+ args.Exception.StackTrace);
|
+ args.Exception.StackTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clear_registry_()
|
private void clear_registry_(string dir)
|
||||||
{
|
{
|
||||||
// The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
|
// The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
|
||||||
// occasionally seems to corrupt its addin cache
|
// occasionally seems to corrupt its addin cache
|
||||||
// Hence, as a temporary solution we'll remove it before each startup
|
// Hence, as a temporary solution we'll remove it before each startup
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Directory.Exists("addin-db-000"))
|
if (Directory.Exists(dir + "/addin-db-000"))
|
||||||
Directory.Delete("addin-db-000", true);
|
Directory.Delete(dir + "/addin-db-000", true);
|
||||||
|
|
||||||
if (Directory.Exists("addin-db-001"))
|
if (Directory.Exists(dir + "/addin-db-001"))
|
||||||
Directory.Delete("addin-db-001", true);
|
Directory.Delete(dir + "/addin-db-001", true);
|
||||||
}
|
}
|
||||||
catch (IOException)
|
catch (IOException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -161,7 +161,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
if (!hasCreatorData && creator != null)
|
if (!hasCreatorData && creator != null)
|
||||||
{
|
{
|
||||||
XmlElement creatorData = doc.CreateElement("CreatorData");
|
XmlElement creatorData = doc.CreateElement("CreatorData");
|
||||||
creatorData.InnerText = homeURL + ";" + creator.FirstName + " " + creator.LastName;
|
creatorData.InnerText = CalcCreatorData(homeURL, creator.FirstName + " " + creator.LastName);
|
||||||
sop.AppendChild(creatorData);
|
sop.AppendChild(creatorData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,5 +172,15 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
return wr.ToString();
|
return wr.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string CalcCreatorData(string homeURL, string name)
|
||||||
|
{
|
||||||
|
return homeURL + ";" + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string CalcCreatorData(string homeURL, UUID uuid, string name)
|
||||||
|
{
|
||||||
|
return homeURL + "/" + uuid + ";" + name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,8 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
|
UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
|
||||||
if (account != null)
|
if (account != null)
|
||||||
{
|
{
|
||||||
writer.WriteElementString("CreatorData", (string)options["home"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName);
|
string creatorData = ExternalRepresentationUtils.CalcCreatorData((string)options["home"], inventoryItem.CreatorIdAsUuid, account.FirstName + " " + account.LastName);
|
||||||
|
writer.WriteElementString("CreatorData", creatorData);
|
||||||
}
|
}
|
||||||
writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
|
writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2250,10 +2250,15 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
string[] parts = firstName.Split(new char[] { '.' });
|
string[] parts = firstName.Split(new char[] { '.' });
|
||||||
if (parts.Length == 2)
|
if (parts.Length == 2)
|
||||||
return id.ToString() + ";" + agentsURI + ";" + parts[0] + " " + parts[1];
|
return CalcUniversalIdentifier(id, agentsURI, parts[0] + " " + parts[1]);
|
||||||
}
|
}
|
||||||
return id.ToString() + ";" + agentsURI + ";" + firstName + " " + lastName;
|
|
||||||
|
return CalcUniversalIdentifier(id, agentsURI, firstName + " " + lastName);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string CalcUniversalIdentifier(UUID id, string agentsURI, string name)
|
||||||
|
{
|
||||||
|
return id.ToString() + ";" + agentsURI + ";" + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2288,6 +2293,38 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
return str.Replace("_", "\\_").Replace("%", "\\%");
|
return str.Replace("_", "\\_").Replace("%", "\\%");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the name of the user's viewer.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This method handles two ways that viewers specify their name:
|
||||||
|
/// 1. Viewer = "Firestorm-Release 4.4.2.34167", Channel = "(don't care)" -> "Firestorm-Release 4.4.2.34167"
|
||||||
|
/// 2. Viewer = "4.5.1.38838", Channel = "Firestorm-Beta" -> "Firestorm-Beta 4.5.1.38838"
|
||||||
|
/// </remarks>
|
||||||
|
public static string GetViewerName(AgentCircuitData agent)
|
||||||
|
{
|
||||||
|
string name = agent.Viewer;
|
||||||
|
if (name == null)
|
||||||
|
name = "";
|
||||||
|
else
|
||||||
|
name = name.Trim();
|
||||||
|
|
||||||
|
// Check if 'Viewer' is just a version number. If it's *not*, then we
|
||||||
|
// assume that it contains the real viewer name, and we return it.
|
||||||
|
foreach (char c in name)
|
||||||
|
{
|
||||||
|
if (Char.IsLetter(c))
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The 'Viewer' string contains just a version number. If there's anything in
|
||||||
|
// 'Channel' then assume that it's the viewer name.
|
||||||
|
if ((agent.Channel != null) && (agent.Channel.Length > 0))
|
||||||
|
name = agent.Channel.Trim() + " " + name;
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DoubleQueue<T> where T:class
|
public class DoubleQueue<T> where T:class
|
||||||
|
|
|
@ -982,7 +982,7 @@ namespace OpenSim
|
||||||
aCircuit.child ? "child" : "root",
|
aCircuit.child ? "child" : "root",
|
||||||
aCircuit.circuitcode.ToString(),
|
aCircuit.circuitcode.ToString(),
|
||||||
aCircuit.IPAddress != null ? aCircuit.IPAddress.ToString() : "not set",
|
aCircuit.IPAddress != null ? aCircuit.IPAddress.ToString() : "not set",
|
||||||
aCircuit.Viewer);
|
Util.GetViewerName(aCircuit));
|
||||||
});
|
});
|
||||||
|
|
||||||
MainConsole.Instance.Output(cdt.ToString());
|
MainConsole.Instance.Output(cdt.ToString());
|
||||||
|
|
|
@ -158,10 +158,27 @@ namespace OpenSim
|
||||||
|
|
||||||
protected virtual void LoadPlugins()
|
protected virtual void LoadPlugins()
|
||||||
{
|
{
|
||||||
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
|
IConfig startupConfig = Config.Configs["Startup"];
|
||||||
|
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty;
|
||||||
|
|
||||||
|
// The location can also be specified in the environment. If there
|
||||||
|
// is no location in the configuration, we must call the constructor
|
||||||
|
// without a location parameter to allow that to happen.
|
||||||
|
if (registryLocation == String.Empty)
|
||||||
{
|
{
|
||||||
loader.Load("/OpenSim/Startup");
|
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
|
||||||
m_plugins = loader.Plugins;
|
{
|
||||||
|
loader.Load("/OpenSim/Startup");
|
||||||
|
m_plugins = loader.Plugins;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation))
|
||||||
|
{
|
||||||
|
loader.Load("/OpenSim/Startup");
|
||||||
|
m_plugins = loader.Plugins;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1049,4 +1066,4 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
public IConfigSource Source;
|
public IConfigSource Source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10387,7 +10387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerDirFindQuery(this,
|
handlerDirFindQuery(this,
|
||||||
dirFindQueryPacket.QueryData.QueryID,
|
dirFindQueryPacket.QueryData.QueryID,
|
||||||
Utils.BytesToString(
|
Utils.BytesToString(
|
||||||
dirFindQueryPacket.QueryData.QueryText),
|
dirFindQueryPacket.QueryData.QueryText).Trim(),
|
||||||
dirFindQueryPacket.QueryData.QueryFlags,
|
dirFindQueryPacket.QueryData.QueryFlags,
|
||||||
dirFindQueryPacket.QueryData.QueryStart);
|
dirFindQueryPacket.QueryData.QueryStart);
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,8 +245,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
string state = sog.GetStateSnapshot();
|
string state = sog.GetStateSnapshot();
|
||||||
ad.AttachmentObjectStates.Add(state);
|
ad.AttachmentObjectStates.Add(state);
|
||||||
sp.InTransitScriptStates.Add(state);
|
sp.InTransitScriptStates.Add(state);
|
||||||
// Let's remove the scripts of the original object here
|
|
||||||
sog.RemoveScriptInstances(true);
|
// Scripts of the originals will be removed when the Agent is successfully removed.
|
||||||
|
// sog.RemoveScriptInstances(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -483,52 +483,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
if (m_creatorIdForAssetId.ContainsKey(assetId))
|
if (m_creatorIdForAssetId.ContainsKey(assetId))
|
||||||
{
|
{
|
||||||
string xmlData = Utils.BytesToString(data);
|
data = SceneObjectSerializer.ModifySerializedObject(assetId, data,
|
||||||
List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
|
sog => {
|
||||||
|
bool modified = false;
|
||||||
|
|
||||||
|
foreach (SceneObjectPart sop in sog.Parts)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(sop.CreatorData))
|
||||||
|
{
|
||||||
|
sop.CreatorID = m_creatorIdForAssetId[assetId];
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return modified;
|
||||||
|
});
|
||||||
|
|
||||||
CoalescedSceneObjects coa = null;
|
if (data == null)
|
||||||
if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa))
|
return false;
|
||||||
{
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[INVENTORY ARCHIVER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count);
|
|
||||||
|
|
||||||
if (coa.Objects.Count == 0)
|
|
||||||
{
|
|
||||||
m_log.WarnFormat(
|
|
||||||
"[INVENTORY ARCHIVE READ REQUEST]: Aborting load of coalesced object from asset {0} as it has zero loaded components",
|
|
||||||
assetId);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sceneObjects.AddRange(coa.Objects);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SceneObjectGroup deserializedObject = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
|
||||||
|
|
||||||
if (deserializedObject != null)
|
|
||||||
{
|
|
||||||
sceneObjects.Add(deserializedObject);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.WarnFormat(
|
|
||||||
"[INVENTORY ARCHIVE READ REQUEST]: Aborting load of object from asset {0} as deserialization failed",
|
|
||||||
assetId);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (SceneObjectGroup sog in sceneObjects)
|
|
||||||
foreach (SceneObjectPart sop in sog.Parts)
|
|
||||||
if (string.IsNullOrEmpty(sop.CreatorData))
|
|
||||||
sop.CreatorID = m_creatorIdForAssetId[assetId];
|
|
||||||
|
|
||||||
if (coa != null)
|
|
||||||
data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa));
|
|
||||||
else
|
|
||||||
data = Utils.StringToBytes(SceneObjectSerializer.ToOriginalXmlFormat(sceneObjects[0]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,7 +522,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load control file
|
/// Load control file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -656,4 +628,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
m_assetsLoaded = true;
|
m_assetsLoaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,8 @@ namespace OpenSim.Region.CoreModules.Framework.Search
|
||||||
|
|
||||||
void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
|
void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
|
||||||
{
|
{
|
||||||
|
queryText = queryText.Trim();
|
||||||
|
|
||||||
if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People)
|
if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(queryText))
|
if (string.IsNullOrEmpty(queryText))
|
||||||
|
@ -194,4 +196,4 @@ namespace OpenSim.Region.CoreModules.Framework.Search
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
{
|
{
|
||||||
foreach (UserData data in m_UserCache.Values)
|
foreach (UserData data in m_UserCache.Values)
|
||||||
{
|
{
|
||||||
if (users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null &&
|
if (data.Id != UUID.Zero &&
|
||||||
|
users.Find(delegate(UserData d) { return d.Id == data.Id; }) == null &&
|
||||||
(data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower())))
|
(data.FirstName.ToLower().StartsWith(query.ToLower()) || data.LastName.ToLower().StartsWith(query.ToLower())))
|
||||||
users.Add(data);
|
users.Add(data);
|
||||||
}
|
}
|
||||||
|
@ -725,4 +726,4 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,8 +189,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
|
m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
|
||||||
: new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
|
: new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
|
||||||
|
|
||||||
// Zero can never be a valid user id
|
// Zero can never be a valid user or group id
|
||||||
m_validUserUuids[UUID.Zero] = false;
|
m_validUserUuids[UUID.Zero] = false;
|
||||||
|
m_validGroupUuids[UUID.Zero] = false;
|
||||||
|
|
||||||
m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>();
|
m_groupsModule = m_rootScene.RequestModuleInterface<IGroupsModule>();
|
||||||
m_assetService = m_rootScene.AssetService;
|
m_assetService = m_rootScene.AssetService;
|
||||||
|
@ -523,58 +524,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
oldTelehubUUID = UUID.Zero;
|
oldTelehubUUID = UUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
ModifySceneObject(scene, sceneObject);
|
||||||
// or creator data is present. Otherwise, use the estate owner instead.
|
|
||||||
foreach (SceneObjectPart part in sceneObject.Parts)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(part.CreatorData))
|
|
||||||
{
|
|
||||||
if (!ResolveUserUuid(scene, part.CreatorID))
|
|
||||||
part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
}
|
|
||||||
if (UserManager != null)
|
|
||||||
UserManager.AddUser(part.CreatorID, part.CreatorData);
|
|
||||||
|
|
||||||
if (!ResolveUserUuid(scene, part.OwnerID))
|
|
||||||
part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
|
|
||||||
if (!ResolveUserUuid(scene, part.LastOwnerID))
|
|
||||||
part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
|
|
||||||
if (!ResolveGroupUuid(part.GroupID))
|
|
||||||
part.GroupID = UUID.Zero;
|
|
||||||
|
|
||||||
// And zap any troublesome sit target information
|
|
||||||
// part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
|
|
||||||
// part.SitTargetPosition = new Vector3(0, 0, 0);
|
|
||||||
|
|
||||||
// Fix ownership/creator of inventory items
|
|
||||||
// Not doing so results in inventory items
|
|
||||||
// being no copy/no mod for everyone
|
|
||||||
lock (part.TaskInventory)
|
|
||||||
{
|
|
||||||
TaskInventoryDictionary inv = part.TaskInventory;
|
|
||||||
foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
|
|
||||||
{
|
|
||||||
if (!ResolveUserUuid(scene, kvp.Value.OwnerID))
|
|
||||||
{
|
|
||||||
kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(kvp.Value.CreatorData))
|
|
||||||
{
|
|
||||||
if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
|
|
||||||
kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UserManager != null)
|
|
||||||
UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
|
|
||||||
|
|
||||||
if (!ResolveGroupUuid(kvp.Value.GroupID))
|
|
||||||
kvp.Value.GroupID = UUID.Zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scene.AddRestoredSceneObject(sceneObject, true, false))
|
if (scene.AddRestoredSceneObject(sceneObject, true, false))
|
||||||
{
|
{
|
||||||
|
@ -598,6 +548,67 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
scene.RegionInfo.RegionSettings.ClearSpawnPoints();
|
scene.RegionInfo.RegionSettings.ClearSpawnPoints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optionally modify a loaded SceneObjectGroup. Currently this just ensures that the
|
||||||
|
/// User IDs and Group IDs are valid, but other manipulations could be done as well.
|
||||||
|
/// </summary>
|
||||||
|
private void ModifySceneObject(Scene scene, SceneObjectGroup sceneObject)
|
||||||
|
{
|
||||||
|
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
||||||
|
// or creator data is present. Otherwise, use the estate owner instead.
|
||||||
|
foreach (SceneObjectPart part in sceneObject.Parts)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(part.CreatorData))
|
||||||
|
{
|
||||||
|
if (!ResolveUserUuid(scene, part.CreatorID))
|
||||||
|
part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
}
|
||||||
|
if (UserManager != null)
|
||||||
|
UserManager.AddUser(part.CreatorID, part.CreatorData);
|
||||||
|
|
||||||
|
if (!(ResolveUserUuid(scene, part.OwnerID) || ResolveGroupUuid(part.OwnerID)))
|
||||||
|
part.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
|
||||||
|
if (!(ResolveUserUuid(scene, part.LastOwnerID) || ResolveGroupUuid(part.LastOwnerID)))
|
||||||
|
part.LastOwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
|
||||||
|
if (!ResolveGroupUuid(part.GroupID))
|
||||||
|
part.GroupID = UUID.Zero;
|
||||||
|
|
||||||
|
// And zap any troublesome sit target information
|
||||||
|
// part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
|
||||||
|
// part.SitTargetPosition = new Vector3(0, 0, 0);
|
||||||
|
|
||||||
|
// Fix ownership/creator of inventory items
|
||||||
|
// Not doing so results in inventory items
|
||||||
|
// being no copy/no mod for everyone
|
||||||
|
lock (part.TaskInventory)
|
||||||
|
{
|
||||||
|
TaskInventoryDictionary inv = part.TaskInventory;
|
||||||
|
foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
|
||||||
|
{
|
||||||
|
if (!(ResolveUserUuid(scene, kvp.Value.OwnerID) || ResolveGroupUuid(kvp.Value.OwnerID)))
|
||||||
|
{
|
||||||
|
kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(kvp.Value.CreatorData))
|
||||||
|
{
|
||||||
|
if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
|
||||||
|
kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UserManager != null)
|
||||||
|
UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
|
||||||
|
|
||||||
|
if (!ResolveGroupUuid(kvp.Value.GroupID))
|
||||||
|
kvp.Value.GroupID = UUID.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load serialized parcels.
|
/// Load serialized parcels.
|
||||||
|
@ -695,9 +706,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private bool ResolveGroupUuid(UUID uuid)
|
private bool ResolveGroupUuid(UUID uuid)
|
||||||
{
|
{
|
||||||
if (uuid == UUID.Zero)
|
|
||||||
return true; // this means the object has no group
|
|
||||||
|
|
||||||
lock (m_validGroupUuids)
|
lock (m_validGroupUuids)
|
||||||
{
|
{
|
||||||
if (!m_validGroupUuids.ContainsKey(uuid))
|
if (!m_validGroupUuids.ContainsKey(uuid))
|
||||||
|
@ -754,7 +762,21 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
|
sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
|
||||||
|
|
||||||
if (assetType == (sbyte)AssetType.Unknown)
|
if (assetType == (sbyte)AssetType.Unknown)
|
||||||
|
{
|
||||||
m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid);
|
m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid);
|
||||||
|
}
|
||||||
|
else if (assetType == (sbyte)AssetType.Object)
|
||||||
|
{
|
||||||
|
data = SceneObjectSerializer.ModifySerializedObject(UUID.Parse(uuid), data,
|
||||||
|
sog =>
|
||||||
|
{
|
||||||
|
ModifySceneObject(m_rootScene, sog);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data == null)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
|
//m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
|
||||||
|
|
||||||
|
@ -977,4 +999,4 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
return dearchivedScenes;
|
return dearchivedScenes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1342,10 +1342,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
{
|
{
|
||||||
m_regionChangeTimer.Stop();
|
m_regionChangeTimer.Stop();
|
||||||
m_regionChangeTimer.Start();
|
m_regionChangeTimer.Start();
|
||||||
}
|
|
||||||
|
|
||||||
protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e)
|
|
||||||
{
|
|
||||||
ChangeDelegate change = OnRegionInfoChange;
|
ChangeDelegate change = OnRegionInfoChange;
|
||||||
|
|
||||||
if (change != null)
|
if (change != null)
|
||||||
|
|
|
@ -1340,6 +1340,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
m_scene.ForEachClient(SendParcelOverlay);
|
m_scene.ForEachClient(SendParcelOverlay);
|
||||||
land.SendLandUpdateToClient(true, remote_client);
|
land.SendLandUpdateToClient(true, remote_client);
|
||||||
|
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1360,8 +1361,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
land.LandData.GroupID = UUID.Zero;
|
land.LandData.GroupID = UUID.Zero;
|
||||||
land.LandData.IsGroupOwned = false;
|
land.LandData.IsGroupOwned = false;
|
||||||
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
|
||||||
|
|
||||||
m_scene.ForEachClient(SendParcelOverlay);
|
m_scene.ForEachClient(SendParcelOverlay);
|
||||||
land.SendLandUpdateToClient(true, remote_client);
|
land.SendLandUpdateToClient(true, remote_client);
|
||||||
|
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1388,6 +1391,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
m_scene.ForEachClient(SendParcelOverlay);
|
m_scene.ForEachClient(SendParcelOverlay);
|
||||||
land.SendLandUpdateToClient(true, remote_client);
|
land.SendLandUpdateToClient(true, remote_client);
|
||||||
|
UpdateLandObject(land.LandData.LocalID, land.LandData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1757,6 +1757,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
|
group.HasGroupChanged = true;
|
||||||
group.ProcessBackup(SimulationDataService, true);
|
group.ProcessBackup(SimulationDataService, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2345,13 +2346,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (!softDelete)
|
if (!softDelete)
|
||||||
{
|
{
|
||||||
// Force a database update so that the scene object group ID is accurate. It's possible that the
|
// If the group contains prims whose SceneGroupID is incorrect then force a
|
||||||
// group has recently been delinked from another group but that this change has not been persisted
|
// database update, because RemoveObject() works by searching on the SceneGroupID.
|
||||||
// to the DB.
|
|
||||||
// This is an expensive thing to do so only do it if absolutely necessary.
|
// This is an expensive thing to do so only do it if absolutely necessary.
|
||||||
if (so.HasGroupChangedDueToDelink)
|
if (so.GroupContainsForeignPrims)
|
||||||
ForceSceneObjectBackup(so);
|
ForceSceneObjectBackup(so);
|
||||||
|
|
||||||
so.DetachFromBackup();
|
so.DetachFromBackup();
|
||||||
SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID);
|
SimulationDataService.RemoveObject(so.UUID, RegionInfo.RegionID);
|
||||||
}
|
}
|
||||||
|
@ -3413,6 +3413,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
|
// TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
|
||||||
|
|
||||||
// Don't disable this log message - it's too helpful
|
// Don't disable this log message - it's too helpful
|
||||||
|
string curViewer = Util.GetViewerName(acd);
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})",
|
"[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})",
|
||||||
RegionInfo.RegionName,
|
RegionInfo.RegionName,
|
||||||
|
@ -3422,7 +3423,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
acd.AgentID,
|
acd.AgentID,
|
||||||
acd.circuitcode,
|
acd.circuitcode,
|
||||||
acd.IPAddress,
|
acd.IPAddress,
|
||||||
acd.Viewer,
|
curViewer,
|
||||||
((TPFlags)teleportFlags).ToString(),
|
((TPFlags)teleportFlags).ToString(),
|
||||||
acd.startpos
|
acd.startpos
|
||||||
);
|
);
|
||||||
|
@ -3442,7 +3443,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (string viewer in m_AllowedViewers)
|
foreach (string viewer in m_AllowedViewers)
|
||||||
{
|
{
|
||||||
if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower())
|
if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower())
|
||||||
{
|
{
|
||||||
ViewerDenied = false;
|
ViewerDenied = false;
|
||||||
break;
|
break;
|
||||||
|
@ -3459,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (string viewer in m_BannedViewers)
|
foreach (string viewer in m_BannedViewers)
|
||||||
{
|
{
|
||||||
if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower())
|
if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower())
|
||||||
{
|
{
|
||||||
ViewerDenied = true;
|
ViewerDenied = true;
|
||||||
break;
|
break;
|
||||||
|
@ -3471,7 +3472,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Access denied for {0} {1} using {2}",
|
"[SCENE]: Access denied for {0} {1} using {2}",
|
||||||
acd.firstname, acd.lastname, acd.Viewer);
|
acd.firstname, acd.lastname, curViewer);
|
||||||
reason = "Access denied, your viewer is banned by the region owner";
|
reason = "Access denied, your viewer is banned by the region owner";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,12 +150,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
get { return m_hasGroupChanged; }
|
get { return m_hasGroupChanged; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool m_groupContainsForeignPrims = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Has the group changed due to an unlink operation? We record this in order to optimize deletion, since
|
/// Whether the group contains prims that came from a different group. This happens when
|
||||||
/// an unlinked group currently has to be persisted to the database before we can perform an unlink operation.
|
/// linking or delinking groups. The implication is that until the group is persisted,
|
||||||
|
/// the prims in the database still use the old SceneGroupID. That's a problem if the group
|
||||||
|
/// is deleted, because we delete groups by searching for prims by their SceneGroupID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasGroupChangedDueToDelink { get; private set; }
|
public bool GroupContainsForeignPrims
|
||||||
|
{
|
||||||
|
private set
|
||||||
|
{
|
||||||
|
m_groupContainsForeignPrims = value;
|
||||||
|
if (m_groupContainsForeignPrims)
|
||||||
|
HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
get { return m_groupContainsForeignPrims; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private bool isTimeToPersist()
|
private bool isTimeToPersist()
|
||||||
{
|
{
|
||||||
|
@ -1624,7 +1639,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
|
backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
|
||||||
backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem;
|
backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem;
|
||||||
HasGroupChanged = false;
|
HasGroupChanged = false;
|
||||||
HasGroupChangedDueToDelink = false;
|
GroupContainsForeignPrims = false;
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this);
|
m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this);
|
||||||
datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
|
datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
|
||||||
|
@ -1686,28 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
|
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
|
||||||
dupe.Backup = false;
|
dupe.Backup = false;
|
||||||
dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
|
dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
|
||||||
|
|
||||||
// Warning, The following code related to previousAttachmentStatus is needed so that clones of
|
|
||||||
// attachments do not bordercross while they're being duplicated. This is hacktastic!
|
|
||||||
// Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
|
|
||||||
// unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state
|
|
||||||
// (which should be false anyway) set it as an Attachment and then set it's Absolute Position,
|
|
||||||
// then restore it's attachment state
|
|
||||||
|
|
||||||
// This is only necessary when userExposed is false!
|
|
||||||
|
|
||||||
bool previousAttachmentStatus = dupe.IsAttachment;
|
|
||||||
|
|
||||||
if (!userExposed)
|
|
||||||
dupe.IsAttachment = true;
|
|
||||||
|
|
||||||
dupe.m_sittingAvatars = new List<UUID>();
|
dupe.m_sittingAvatars = new List<UUID>();
|
||||||
|
|
||||||
if (!userExposed)
|
|
||||||
{
|
|
||||||
dupe.IsAttachment = previousAttachmentStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
||||||
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
||||||
|
|
||||||
|
@ -2388,6 +2382,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If linking prims with different permissions, fix them
|
// If linking prims with different permissions, fix them
|
||||||
AdjustChildPrimPermissions();
|
AdjustChildPrimPermissions();
|
||||||
|
|
||||||
|
GroupContainsForeignPrims = true;
|
||||||
|
|
||||||
AttachToBackup();
|
AttachToBackup();
|
||||||
|
|
||||||
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
|
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
|
||||||
|
@ -2531,9 +2527,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
linkPart.Rezzed = RootPart.Rezzed;
|
linkPart.Rezzed = RootPart.Rezzed;
|
||||||
|
|
||||||
// When we delete a group, we currently have to force persist to the database if the object id has changed
|
// We must persist the delinked group to the database immediately, for safety. The problem
|
||||||
// (since delete works by deleting all rows which have a given object id)
|
// is that although in memory the new group has a new SceneGroupID, in the database it
|
||||||
objectGroup.HasGroupChangedDueToDelink = true;
|
// still has the parent group's SceneGroupID (until the next backup). This means that if the
|
||||||
|
// parent group is deleted then the delinked group will also be deleted from the database.
|
||||||
|
// This problem will disappear if the region remains alive long enough for another backup,
|
||||||
|
// since at that time the delinked group's new SceneGroupID will be written to the database.
|
||||||
|
// But if the region crashes before that then the prims will be permanently gone, and this must
|
||||||
|
// not happen. (We can't use a just-in-time trick like GroupContainsForeignPrims in this case
|
||||||
|
// because the delinked group doesn't know when the source group is deleted.)
|
||||||
|
m_scene.ForceSceneObjectBackup(objectGroup);
|
||||||
|
|
||||||
return objectGroup;
|
return objectGroup;
|
||||||
}
|
}
|
||||||
|
|
|
@ -848,7 +848,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public string Viewer
|
public string Viewer
|
||||||
{
|
{
|
||||||
get { return m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode).Viewer; }
|
get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -119,21 +119,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool TryFromXml(string xml, out CoalescedSceneObjects coa)
|
public static bool TryFromXml(string xml, out CoalescedSceneObjects coa)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
|
// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
|
||||||
|
|
||||||
coa = null;
|
coa = null;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
using (StringReader sr = new StringReader(xml))
|
try
|
||||||
{
|
{
|
||||||
using (XmlTextReader reader = new XmlTextReader(sr))
|
// Quickly check if this is a coalesced object, without fully parsing the XML
|
||||||
{
|
using (StringReader sr = new StringReader(xml))
|
||||||
try
|
{
|
||||||
|
using (XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.Read();
|
reader.MoveToContent(); // skip possible xml declaration
|
||||||
|
|
||||||
if (reader.Name != "CoalescedObject")
|
if (reader.Name != "CoalescedObject")
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
|
@ -142,49 +143,49 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
coa = new CoalescedSceneObjects(UUID.Zero);
|
|
||||||
reader.Read();
|
|
||||||
|
|
||||||
while (reader.NodeType != XmlNodeType.EndElement && reader.Name != "CoalescedObject")
|
|
||||||
{
|
|
||||||
if (reader.Name == "SceneObjectGroup")
|
|
||||||
{
|
|
||||||
string soXml = reader.ReadOuterXml();
|
|
||||||
|
|
||||||
SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(soXml);
|
|
||||||
|
|
||||||
if (so != null)
|
|
||||||
{
|
|
||||||
coa.Add(so);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// XXX: Possibly we should fail outright here rather than continuing if a particular component of the
|
|
||||||
// coalesced object fails to load.
|
|
||||||
m_log.WarnFormat(
|
|
||||||
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
|
|
||||||
i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reader.ReadEndElement(); // CoalescedObject
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
}
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
XmlDocument doc = new XmlDocument();
|
||||||
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} {1}",
|
doc.LoadXml(xml);
|
||||||
e.Message, e.StackTrace);
|
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
|
||||||
|
if (e == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
return false;
|
coa = new CoalescedSceneObjects(UUID.Zero);
|
||||||
}
|
|
||||||
|
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
foreach (XmlNode n in groups)
|
||||||
|
{
|
||||||
|
SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
|
||||||
|
if (so != null)
|
||||||
|
{
|
||||||
|
coa.Add(so);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// XXX: Possibly we should fail outright here rather than continuing if a particular component of the
|
||||||
|
// coalesced object fails to load.
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
|
||||||
|
i);
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.Error(string.Format(
|
||||||
|
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} ",
|
||||||
|
e.Message), e);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,6 +299,73 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Modifies a SceneObjectGroup.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sog">The object</param>
|
||||||
|
/// <returns>Whether the object was actually modified</returns>
|
||||||
|
public delegate bool SceneObjectModifier(SceneObjectGroup sog);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Modifies an object by deserializing it; applying 'modifier' to each SceneObjectGroup; and reserializing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="assetId">The object's UUID</param>
|
||||||
|
/// <param name="data">Serialized data</param>
|
||||||
|
/// <param name="modifier">The function to run on each SceneObjectGroup</param>
|
||||||
|
/// <returns>The new serialized object's data, or null if an error occurred</returns>
|
||||||
|
public static byte[] ModifySerializedObject(UUID assetId, byte[] data, SceneObjectModifier modifier)
|
||||||
|
{
|
||||||
|
List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
|
||||||
|
CoalescedSceneObjects coa = null;
|
||||||
|
|
||||||
|
string xmlData = Utils.BytesToString(data);
|
||||||
|
|
||||||
|
if (CoalescedSceneObjectsSerializer.TryFromXml(xmlData, out coa))
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat("[SERIALIZER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count);
|
||||||
|
|
||||||
|
if (coa.Objects.Count == 0)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[SERIALIZER]: Aborting load of coalesced object from asset {0} as it has zero loaded components", assetId);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
sceneObjects.AddRange(coa.Objects);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectGroup deserializedObject = FromOriginalXmlFormat(xmlData);
|
||||||
|
|
||||||
|
if (deserializedObject != null)
|
||||||
|
{
|
||||||
|
sceneObjects.Add(deserializedObject);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[SERIALIZER]: Aborting load of object from asset {0} as deserialization failed", assetId);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool modified = false;
|
||||||
|
foreach (SceneObjectGroup sog in sceneObjects)
|
||||||
|
{
|
||||||
|
if (modifier(sog))
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (modified)
|
||||||
|
{
|
||||||
|
if (coa != null)
|
||||||
|
data = Utils.StringToBytes(CoalescedSceneObjectsSerializer.ToXml(coa));
|
||||||
|
else
|
||||||
|
data = Utils.StringToBytes(ToOriginalXmlFormat(sceneObjects[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region manual serialization
|
#region manual serialization
|
||||||
|
|
||||||
|
@ -1230,7 +1297,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
if (m_UserManagement == null)
|
if (m_UserManagement == null)
|
||||||
m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>();
|
m_UserManagement = sop.ParentGroup.Scene.RequestModuleInterface<IUserManagement>();
|
||||||
string name = m_UserManagement.GetUserName(sop.CreatorID);
|
string name = m_UserManagement.GetUserName(sop.CreatorID);
|
||||||
writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name);
|
writer.WriteElementString("CreatorData", ExternalRepresentationUtils.CalcCreatorData((string)options["home"], name));
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteUUID(writer, "FolderID", sop.FolderID, options);
|
WriteUUID(writer, "FolderID", sop.FolderID, options);
|
||||||
|
@ -1403,7 +1470,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
if (m_UserManagement == null)
|
if (m_UserManagement == null)
|
||||||
m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
|
m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
|
||||||
string name = m_UserManagement.GetUserName(item.CreatorID);
|
string name = m_UserManagement.GetUserName(item.CreatorID);
|
||||||
writer.WriteElementString("CreatorData", (string)options["home"] + ";" + name);
|
writer.WriteElementString("CreatorData", ExternalRepresentationUtils.CalcCreatorData((string)options["home"], name));
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.WriteElementString("Description", item.Description);
|
writer.WriteElementString("Description", item.Description);
|
||||||
|
|
|
@ -91,7 +91,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
grp2.RootPart.ClearUpdateSchedule();
|
grp2.RootPart.ClearUpdateSchedule();
|
||||||
|
|
||||||
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
// Link grp2 to grp1. part2 becomes child prim to grp1. grp2 is eliminated.
|
||||||
|
Assert.IsFalse(grp1.GroupContainsForeignPrims);
|
||||||
grp1.LinkToGroup(grp2);
|
grp1.LinkToGroup(grp2);
|
||||||
|
Assert.IsTrue(grp1.GroupContainsForeignPrims);
|
||||||
|
|
||||||
|
scene.Backup(true);
|
||||||
|
Assert.IsFalse(grp1.GroupContainsForeignPrims);
|
||||||
|
|
||||||
// FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since
|
// FIXME: Can't do this test yet since group 2 still has its root part! We can't yet null this since
|
||||||
// it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed.
|
// it might cause SOG.ProcessBackup() to fail due to the race condition. This really needs to be fixed.
|
||||||
|
@ -143,7 +148,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
|
||||||
Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
|
Assert.That(grp1.Parts.Length, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
|
||||||
Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero");
|
Assert.That(part2.AbsolutePosition == Vector3.Zero, "The absolute position should be zero");
|
||||||
Assert.That(grp3.HasGroupChangedDueToDelink, Is.True);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -335,30 +339,34 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
SceneObjectPart rootPart
|
SceneObjectPart rootPart
|
||||||
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
|
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
|
||||||
{ Name = rootPartName, UUID = rootPartUuid };
|
{ Name = rootPartName, UUID = rootPartUuid };
|
||||||
|
|
||||||
SceneObjectPart linkPart
|
SceneObjectPart linkPart
|
||||||
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
|
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
|
||||||
{ Name = linkPartName, UUID = linkPartUuid };
|
{ Name = linkPartName, UUID = linkPartUuid };
|
||||||
|
SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart);
|
||||||
|
scene.AddNewSceneObject(linkGroup, true);
|
||||||
|
|
||||||
SceneObjectGroup sog = new SceneObjectGroup(rootPart);
|
SceneObjectGroup sog = new SceneObjectGroup(rootPart);
|
||||||
sog.AddPart(linkPart);
|
scene.AddNewSceneObject(sog, true);
|
||||||
scene.AddNewSceneObject(sog, true);
|
|
||||||
|
Assert.IsFalse(sog.GroupContainsForeignPrims);
|
||||||
// In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked
|
sog.LinkToGroup(linkGroup);
|
||||||
// scene backup thread.
|
Assert.IsTrue(sog.GroupContainsForeignPrims);
|
||||||
|
|
||||||
scene.Backup(true);
|
scene.Backup(true);
|
||||||
|
Assert.AreEqual(1, scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID).Count);
|
||||||
|
|
||||||
// These changes should occur immediately without waiting for a backup pass
|
// These changes should occur immediately without waiting for a backup pass
|
||||||
SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
|
SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
|
||||||
|
Assert.IsFalse(groupToDelete.GroupContainsForeignPrims);
|
||||||
Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.True);
|
|
||||||
scene.DeleteSceneObject(groupToDelete, false);
|
scene.DeleteSceneObject(groupToDelete, false);
|
||||||
Assert.That(groupToDelete.HasGroupChangedDueToDelink, Is.False);
|
|
||||||
|
|
||||||
List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
|
List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
|
||||||
|
|
||||||
Assert.That(storedObjects.Count, Is.EqualTo(1));
|
Assert.AreEqual(1, storedObjects.Count);
|
||||||
Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(1));
|
Assert.AreEqual(1, storedObjects[0].Parts.Length);
|
||||||
Assert.That(storedObjects[0].ContainsPart(rootPartUuid));
|
Assert.IsTrue(storedObjects[0].ContainsPart(rootPartUuid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -669,7 +669,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
|
||||||
aCircuit = new AgentCircuitData();
|
aCircuit = new AgentCircuitData();
|
||||||
|
|
||||||
if (!llClient.SceneAgent.IsChildAgent)
|
if (!llClient.SceneAgent.IsChildAgent)
|
||||||
m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0);
|
m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0);
|
||||||
|
|
||||||
int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum();
|
int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum();
|
||||||
avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1);
|
avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1);
|
||||||
|
@ -706,4 +706,4 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
|
||||||
m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum);
|
m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -121,8 +121,10 @@ public class BSActorLockAxis : BSActor
|
||||||
// The constraint is tied to the world and oriented to the prim.
|
// The constraint is tied to the world and oriented to the prim.
|
||||||
|
|
||||||
// Free to move linearly in the region
|
// Free to move linearly in the region
|
||||||
OMV.Vector3 linearLow = OMV.Vector3.Zero;
|
// OMV.Vector3 linearLow = OMV.Vector3.Zero;
|
||||||
OMV.Vector3 linearHigh = m_physicsScene.TerrainManager.DefaultRegionSize;
|
// OMV.Vector3 linearHigh = m_physicsScene.TerrainManager.DefaultRegionSize;
|
||||||
|
OMV.Vector3 linearLow = new OMV.Vector3(-10000f, -10000f, -10000f);
|
||||||
|
OMV.Vector3 linearHigh = new OMV.Vector3(10000f, 10000f, 10000f);
|
||||||
if (m_controllingPrim.LockedLinearAxis.X != BSPhysObject.FreeAxis)
|
if (m_controllingPrim.LockedLinearAxis.X != BSPhysObject.FreeAxis)
|
||||||
{
|
{
|
||||||
linearLow.X = m_controllingPrim.RawPosition.X;
|
linearLow.X = m_controllingPrim.RawPosition.X;
|
||||||
|
|
|
@ -426,7 +426,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
m_targetVelocity = value;
|
m_targetVelocity = value;
|
||||||
OMV.Vector3 targetVel = value;
|
OMV.Vector3 targetVel = value;
|
||||||
if (_setAlwaysRun && !_flying)
|
if (_setAlwaysRun && !_flying)
|
||||||
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f);
|
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
|
||||||
|
|
||||||
if (m_moveActor != null)
|
if (m_moveActor != null)
|
||||||
m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */);
|
m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */);
|
||||||
|
|
|
@ -897,15 +897,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
Part.Name, Part.UUID, false);
|
Part.Name, Part.UUID, false);
|
||||||
|
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.Debug(string.Format(
|
||||||
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
|
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4} ",
|
||||||
ScriptName,
|
ScriptName,
|
||||||
PrimName,
|
PrimName,
|
||||||
Part.UUID,
|
Part.UUID,
|
||||||
Part.AbsolutePosition,
|
Part.AbsolutePosition,
|
||||||
Part.ParentGroup.Scene.Name,
|
Part.ParentGroup.Scene.Name),
|
||||||
text.Replace("\n", "\\n"),
|
e);
|
||||||
e.InnerException);
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -1220,4 +1219,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,11 +280,11 @@ namespace OpenSim.Server.Base
|
||||||
{
|
{
|
||||||
if (!(e is System.MissingMethodException))
|
if (!(e is System.MissingMethodException))
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}, {3}",
|
m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
|
||||||
interfaceName,
|
interfaceName,
|
||||||
dllName,
|
dllName,
|
||||||
e.InnerException == null ? e.Message : e.InnerException.Message,
|
e.InnerException == null ? e.Message : e.InnerException.Message),
|
||||||
e.StackTrace);
|
e);
|
||||||
}
|
}
|
||||||
m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
|
m_log.ErrorFormat("[SERVER UTILS]: Error loading plugin {0}: {1} args.Length {2}", dllName, e.Message, args.Length);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace);
|
m_log.Error(string.Format("[XINVENTORY HANDLER]: Exception {0} ", e.Message), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
|
@ -273,10 +273,10 @@ namespace OpenSim.Server.Handlers
|
||||||
response.Result = OSD.SerializeMembers(note);
|
response.Result = OSD.SerializeMembers(note);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
object Notes = (object) note;
|
response.Error.Code = ErrorCode.InternalError;
|
||||||
OSD.DeserializeMembers(ref Notes, (OSDMap)json["params"]);
|
response.Error.Message = "Error reading notes";
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response)
|
public bool NotesUpdate(OSDMap json, ref JsonRpcResponse response)
|
||||||
|
|
|
@ -50,6 +50,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
private string m_ServerURLHost;
|
||||||
private string m_ServerURL;
|
private string m_ServerURL;
|
||||||
private GridRegion m_Gatekeeper;
|
private GridRegion m_Gatekeeper;
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
|
|
||||||
public UserAgentServiceConnector(string url, bool dnsLookup)
|
public UserAgentServiceConnector(string url, bool dnsLookup)
|
||||||
{
|
{
|
||||||
m_ServerURL = url;
|
m_ServerURL = m_ServerURLHost = url;
|
||||||
|
|
||||||
if (dnsLookup)
|
if (dnsLookup)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +76,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", m_ServerURL, e.Message);
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: Malformed Uri {0}: {1}", url, e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,11 +100,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService");
|
m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService");
|
||||||
throw new Exception("UserAgent connector init error");
|
throw new Exception("UserAgent connector init error");
|
||||||
}
|
}
|
||||||
m_ServerURL = serviceURI;
|
|
||||||
|
m_ServerURL = m_ServerURLHost = serviceURI;
|
||||||
if (!m_ServerURL.EndsWith("/"))
|
if (!m_ServerURL.EndsWith("/"))
|
||||||
m_ServerURL += "/";
|
m_ServerURL += "/";
|
||||||
|
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: UserAgentServiceConnector started for {0}", m_ServerURL);
|
//m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0}", m_ServerURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string AgentPath()
|
protected override string AgentPath()
|
||||||
|
@ -206,20 +208,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: {0} call to {1} failed: {2}", methodName, m_ServerURL, e.Message);
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: {0} call to {1} failed: {2}", methodName, m_ServerURLHost, e.Message);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.IsFault)
|
if (response.IsFault)
|
||||||
{
|
{
|
||||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned an error: {2}", methodName, m_ServerURL, response.FaultString));
|
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned an error: {2}", methodName, m_ServerURLHost, response.FaultString));
|
||||||
}
|
}
|
||||||
|
|
||||||
hash = (Hashtable)response.Value;
|
hash = (Hashtable)response.Value;
|
||||||
|
|
||||||
if (hash == null)
|
if (hash == null)
|
||||||
{
|
{
|
||||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned null", methodName, m_ServerURL));
|
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned null", methodName, m_ServerURLHost));
|
||||||
}
|
}
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
|
@ -370,14 +372,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for StatusNotification", m_ServerURL);
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for StatusNotification", m_ServerURLHost);
|
||||||
// reason = "Exception: " + e.Message;
|
// reason = "Exception: " + e.Message;
|
||||||
return friendsOnline;
|
return friendsOnline;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.IsFault)
|
if (response.IsFault)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for StatusNotification returned an error: {1}", m_ServerURL, response.FaultString);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for StatusNotification returned an error: {1}", m_ServerURLHost, response.FaultString);
|
||||||
// reason = "XMLRPC Fault";
|
// reason = "XMLRPC Fault";
|
||||||
return friendsOnline;
|
return friendsOnline;
|
||||||
}
|
}
|
||||||
|
@ -389,7 +391,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
{
|
{
|
||||||
if (hash == null)
|
if (hash == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
|
||||||
// reason = "Internal error 1";
|
// reason = "Internal error 1";
|
||||||
return friendsOnline;
|
return friendsOnline;
|
||||||
}
|
}
|
||||||
|
@ -442,14 +444,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetOnlineFriends", m_ServerURL);
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetOnlineFriends", m_ServerURLHost);
|
||||||
// reason = "Exception: " + e.Message;
|
// reason = "Exception: " + e.Message;
|
||||||
return online;
|
return online;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.IsFault)
|
if (response.IsFault)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetOnlineFriends returned an error: {1}", m_ServerURL, response.FaultString);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetOnlineFriends returned an error: {1}", m_ServerURLHost, response.FaultString);
|
||||||
// reason = "XMLRPC Fault";
|
// reason = "XMLRPC Fault";
|
||||||
return online;
|
return online;
|
||||||
}
|
}
|
||||||
|
@ -461,7 +463,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
{
|
{
|
||||||
if (hash == null)
|
if (hash == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetOnlineFriends Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
|
||||||
// reason = "Internal error 1";
|
// reason = "Internal error 1";
|
||||||
return online;
|
return online;
|
||||||
}
|
}
|
||||||
|
@ -570,13 +572,13 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
|
|
||||||
if (!hash.ContainsKey("UUID"))
|
if (!hash.ContainsKey("UUID"))
|
||||||
{
|
{
|
||||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} didn't return a UUID", m_ServerURL));
|
throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} didn't return a UUID", m_ServerURLHost));
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID uuid;
|
UUID uuid;
|
||||||
if (!UUID.TryParse(hash["UUID"].ToString(), out uuid))
|
if (!UUID.TryParse(hash["UUID"].ToString(), out uuid))
|
||||||
{
|
{
|
||||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} returned an invalid UUID: {1}", m_ServerURL, hash["UUID"].ToString()));
|
throw new Exception(string.Format("[USER AGENT CONNECTOR]: get_uuid call to {0} returned an invalid UUID: {1}", m_ServerURLHost, hash["UUID"].ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return uuid;
|
return uuid;
|
||||||
|
@ -584,7 +586,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
|
|
||||||
private bool GetBoolResponse(XmlRpcRequest request, out string reason)
|
private bool GetBoolResponse(XmlRpcRequest request, out string reason)
|
||||||
{
|
{
|
||||||
//m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL);
|
//m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURLHost);
|
||||||
XmlRpcResponse response = null;
|
XmlRpcResponse response = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -592,14 +594,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetBoolResponse", m_ServerURL);
|
m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetBoolResponse", m_ServerURLHost);
|
||||||
reason = "Exception: " + e.Message;
|
reason = "Exception: " + e.Message;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.IsFault)
|
if (response.IsFault)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetBoolResponse returned an error: {1}", m_ServerURL, response.FaultString);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetBoolResponse returned an error: {1}", m_ServerURLHost, response.FaultString);
|
||||||
reason = "XMLRPC Fault";
|
reason = "XMLRPC Fault";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -611,7 +613,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
{
|
{
|
||||||
if (hash == null)
|
if (hash == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
|
m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURLHost);
|
||||||
reason = "Internal error 1";
|
reason = "Internal error 1";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -622,7 +624,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reason = "Internal error 2";
|
reason = "Internal error 2";
|
||||||
m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURL);
|
m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURLHost);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
|
@ -97,9 +97,9 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.Warn(string.Format(
|
||||||
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3}{4}",
|
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to parse uri {0} to send HelloNeighbour from {1} to {2}. Exception {3} ",
|
||||||
uri, thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
|
uri, thisRegion.RegionName, region.RegionName, e.Message), e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -116,9 +116,9 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.Warn(string.Format(
|
||||||
"[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2}{3}",
|
"[NEIGHBOUR SERVICES CONNECTOR]: PackRegionInfoData failed for HelloNeighbour from {0} to {1}. Exception {2} ",
|
||||||
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
|
thisRegion.RegionName, region.RegionName, e.Message), e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -136,9 +136,9 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.Warn(string.Format(
|
||||||
"[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2}{3}",
|
"[NEIGHBOUR SERVICES CONNECTOR]: Exception thrown on serialization of HelloNeighbour from {0} to {1}. Exception {2} ",
|
||||||
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
|
thisRegion.RegionName, region.RegionName, e.Message), e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -153,9 +153,9 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.Warn(string.Format(
|
||||||
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}",
|
"[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ",
|
||||||
thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
|
thisRegion.RegionName, region.RegionName, uri, e.Message), e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -192,9 +192,9 @@ namespace OpenSim.Services.Connectors
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.Warn(string.Format(
|
||||||
"[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2}{3}",
|
"[NEIGHBOUR SERVICES CONNECTOR]: Exception on reply of DoHelloNeighbourCall from {0} back to {1}. Exception {2} ",
|
||||||
region.RegionName, thisRegion.RegionName, e.Message, e.StackTrace);
|
region.RegionName, thisRegion.RegionName, e.Message), e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,11 +421,18 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
args["destination_name"] = OSD.FromString(destination.RegionName);
|
args["destination_name"] = OSD.FromString(destination.RegionName);
|
||||||
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
|
||||||
|
|
||||||
WebUtil.PostToService(uri, args, 40000);
|
OSDMap result = WebUtil.PostToService(uri, args, 40000);
|
||||||
|
|
||||||
|
if (result == null)
|
||||||
|
return false;
|
||||||
|
bool success = result["success"].AsBoolean();
|
||||||
|
if (!success)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString());
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString());
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -228,17 +228,19 @@ namespace OpenSim.Services.HypergridService
|
||||||
aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName,
|
aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName,
|
||||||
aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString());
|
aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString());
|
||||||
|
|
||||||
|
string curViewer = Util.GetViewerName(aCircuit);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check client
|
// Check client
|
||||||
//
|
//
|
||||||
if (m_AllowedClients != string.Empty)
|
if (m_AllowedClients != string.Empty)
|
||||||
{
|
{
|
||||||
Regex arx = new Regex(m_AllowedClients);
|
Regex arx = new Regex(m_AllowedClients);
|
||||||
Match am = arx.Match(aCircuit.Viewer);
|
Match am = arx.Match(curViewer);
|
||||||
|
|
||||||
if (!am.Success)
|
if (!am.Success)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", aCircuit.Viewer);
|
m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is not allowed", curViewer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,11 +248,11 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (m_DeniedClients != string.Empty)
|
if (m_DeniedClients != string.Empty)
|
||||||
{
|
{
|
||||||
Regex drx = new Regex(m_DeniedClients);
|
Regex drx = new Regex(m_DeniedClients);
|
||||||
Match dm = drx.Match(aCircuit.Viewer);
|
Match dm = drx.Match(curViewer);
|
||||||
|
|
||||||
if (dm.Success)
|
if (dm.Success)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", aCircuit.Viewer);
|
m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client {0} is denied", curViewer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,10 +76,10 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (m_UserAccountService == null)
|
if (m_UserAccountService == null)
|
||||||
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
|
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
|
||||||
|
|
||||||
// legacy configuration [obsolete]
|
m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
|
||||||
m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty);
|
new string[] { "Startup", "Hypergrid", configName }, string.Empty);
|
||||||
// Preferred
|
if (m_HomeURL == string.Empty)
|
||||||
m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL);
|
throw new Exception("[HGAssetService] No HomeURI specified");
|
||||||
|
|
||||||
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
|
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
|
||||||
|
|
||||||
|
|
|
@ -215,25 +215,17 @@ namespace OpenSim.Services.HypergridService
|
||||||
if (suitcase == null)
|
if (suitcase == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
|
m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
m_Database.StoreFolder(suitcase);
|
||||||
m_Database.StoreFolder(suitcase);
|
|
||||||
|
|
||||||
// Create System folders
|
CreateSystemFolders(principalID, suitcase.folderID);
|
||||||
CreateSystemFolders(principalID, suitcase.folderID);
|
|
||||||
|
|
||||||
SetAsNormalFolder(suitcase);
|
|
||||||
|
|
||||||
return ConvertToOpenSim(suitcase);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return ConvertToOpenSim(suitcase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
SetAsNormalFolder(suitcase);
|
||||||
|
|
||||||
|
return ConvertToOpenSim(suitcase);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CreateSystemFolders(UUID principalID, UUID rootID)
|
protected void CreateSystemFolders(UUID principalID, UUID rootID)
|
||||||
|
|
|
@ -58,6 +58,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
protected IGridUserService m_GridUserService;
|
protected IGridUserService m_GridUserService;
|
||||||
protected IAuthenticationService m_AuthenticationService;
|
protected IAuthenticationService m_AuthenticationService;
|
||||||
protected IInventoryService m_InventoryService;
|
protected IInventoryService m_InventoryService;
|
||||||
|
protected IInventoryService m_HGInventoryService;
|
||||||
protected IGridService m_GridService;
|
protected IGridService m_GridService;
|
||||||
protected IPresenceService m_PresenceService;
|
protected IPresenceService m_PresenceService;
|
||||||
protected ISimulationService m_LocalSimulationService;
|
protected ISimulationService m_LocalSimulationService;
|
||||||
|
@ -165,6 +166,15 @@ namespace OpenSim.Services.LLLoginService
|
||||||
if (agentService != string.Empty)
|
if (agentService != string.Empty)
|
||||||
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args);
|
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(agentService, args);
|
||||||
|
|
||||||
|
// Get the Hypergrid inventory service (exists only if Hypergrid is enabled)
|
||||||
|
string hgInvServicePlugin = m_LoginServerConfig.GetString("HGInventoryServicePlugin", String.Empty);
|
||||||
|
if (hgInvServicePlugin != string.Empty)
|
||||||
|
{
|
||||||
|
string hgInvServiceArg = m_LoginServerConfig.GetString("HGInventoryServiceConstructorArg", String.Empty);
|
||||||
|
Object[] args2 = new Object[] { config, hgInvServiceArg };
|
||||||
|
m_HGInventoryService = ServerUtils.LoadPlugin<IInventoryService>(hgInvServicePlugin, args2);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// deal with the services given as argument
|
// deal with the services given as argument
|
||||||
//
|
//
|
||||||
|
@ -350,6 +360,13 @@ namespace OpenSim.Services.LLLoginService
|
||||||
return LLFailedLoginResponse.InventoryProblem;
|
return LLFailedLoginResponse.InventoryProblem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_HGInventoryService != null)
|
||||||
|
{
|
||||||
|
// Give the Suitcase service a chance to create the suitcase folder.
|
||||||
|
// (If we're not using the Suitcase inventory service then this won't do anything.)
|
||||||
|
m_HGInventoryService.GetRootFolder(account.PrincipalID);
|
||||||
|
}
|
||||||
|
|
||||||
List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
|
List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
|
||||||
if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
|
if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.9.xsd" version="1.9">
|
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd" version="1.10">
|
||||||
<Solution name="Prebuild" version="2.0.5">
|
<Solution name="Prebuild" version="2.0.6">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
type="Exe"
|
type="Exe"
|
||||||
rootNamespace="Prebuild"
|
rootNamespace="Prebuild"
|
||||||
startupObject="Prebuild.Prebuild"
|
startupObject="Prebuild.Prebuild"
|
||||||
version="2.0.5"
|
version="2.0.6"
|
||||||
frameworkVersion="v3_5"
|
frameworkVersion="v3_5"
|
||||||
>
|
>
|
||||||
<Author>Matthew Holmes (matthew@wildfiregames.com)</Author>
|
<Author>Matthew Holmes (matthew@wildfiregames.com)</Author>
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<Reference name="System" />
|
<Reference name="System" />
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="App.ico" buildAction="EmbeddedResource"/>
|
<Match pattern="App.ico" buildAction="EmbeddedResource"/>
|
||||||
<Match path="data" pattern="prebuild-1.9.xsd" buildAction="EmbeddedResource"/>
|
<Match path="data" pattern="prebuild-1.10.xsd" buildAction="EmbeddedResource"/>
|
||||||
<Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/>
|
<Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace Prebuild.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This must match the version of the schema that is embeeded
|
/// This must match the version of the schema that is embeeded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const string m_SchemaVersion = "1.9";
|
private const string m_SchemaVersion = "1.10";
|
||||||
private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
|
private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
|
||||||
private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
|
private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
|
||||||
bool disposed;
|
bool disposed;
|
||||||
|
|
|
@ -93,7 +93,15 @@ namespace Prebuild.Core.Nodes
|
||||||
/// .NET 4.0
|
/// .NET 4.0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
v4_0,
|
v4_0,
|
||||||
}
|
/// <summary>
|
||||||
|
/// .NET 4.5
|
||||||
|
/// </summary>
|
||||||
|
v4_5,
|
||||||
|
/// <summary>
|
||||||
|
/// .NET 4.5.1
|
||||||
|
/// </summary>
|
||||||
|
v4_5_1
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Node object representing /Prebuild/Solution/Project elements
|
/// The Node object representing /Prebuild/Solution/Project elements
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,138 +1,140 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using Prebuild.Core.Attributes;
|
using Prebuild.Core.Attributes;
|
||||||
using Prebuild.Core.Interfaces;
|
using Prebuild.Core.Interfaces;
|
||||||
using Prebuild.Core.Nodes;
|
using Prebuild.Core.Nodes;
|
||||||
using Prebuild.Core.Utilities;
|
using Prebuild.Core.Utilities;
|
||||||
using System.CodeDom.Compiler;
|
using System.CodeDom.Compiler;
|
||||||
|
|
||||||
namespace Prebuild.Core.Targets
|
namespace Prebuild.Core.Targets
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Target("vs2010")]
|
[Target("vs2010")]
|
||||||
public class VS2010Target : VSGenericTarget
|
public class VS2010Target : VSGenericTarget
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
string solutionVersion = "11.00";
|
string solutionVersion = "11.00";
|
||||||
string productVersion = "9.0.30729";
|
string productVersion = "9.0.30729";
|
||||||
string schemaVersion = "2.0";
|
string schemaVersion = "2.0";
|
||||||
string versionName = "Visual Studio 2010";
|
string versionName = "Visual Studio 2010";
|
||||||
string name = "vs2010";
|
string name = "vs2010";
|
||||||
VSVersion version = VSVersion.VS10;
|
VSVersion version = VSVersion.VS10;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the solution version.
|
/// Gets or sets the solution version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The solution version.</value>
|
/// <value>The solution version.</value>
|
||||||
public override string SolutionVersion
|
public override string SolutionVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return solutionVersion;
|
return solutionVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the product version.
|
/// Gets or sets the product version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The product version.</value>
|
/// <value>The product version.</value>
|
||||||
public override string ProductVersion
|
public override string ProductVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return productVersion;
|
return productVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the schema version.
|
/// Gets or sets the schema version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The schema version.</value>
|
/// <value>The schema version.</value>
|
||||||
public override string SchemaVersion
|
public override string SchemaVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return schemaVersion;
|
return schemaVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the version.
|
/// Gets or sets the name of the version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name of the version.</value>
|
/// <value>The name of the version.</value>
|
||||||
public override string VersionName
|
public override string VersionName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return versionName;
|
return versionName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the version.
|
/// Gets or sets the version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The version.</value>
|
/// <value>The version.</value>
|
||||||
public override VSVersion Version
|
public override VSVersion Version
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name.
|
/// Gets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public override string Name
|
public override string Name
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
|
||||||
{
|
{
|
||||||
switch (frameworkVersion)
|
switch (frameworkVersion)
|
||||||
{
|
{
|
||||||
case FrameworkVersion.v4_0:
|
case FrameworkVersion.v4_5_1:
|
||||||
case FrameworkVersion.v3_5:
|
case FrameworkVersion.v4_5:
|
||||||
return "ToolsVersion=\"4.0\"";
|
case FrameworkVersion.v4_0:
|
||||||
case FrameworkVersion.v3_0:
|
case FrameworkVersion.v3_5:
|
||||||
return "ToolsVersion=\"3.0\"";
|
return "ToolsVersion=\"4.0\"";
|
||||||
default:
|
case FrameworkVersion.v3_0:
|
||||||
return "ToolsVersion=\"2.0\"";
|
return "ToolsVersion=\"3.0\"";
|
||||||
}
|
default:
|
||||||
}
|
return "ToolsVersion=\"2.0\"";
|
||||||
|
}
|
||||||
public override string SolutionTag
|
}
|
||||||
{
|
|
||||||
get { return "# Visual Studio 2010"; }
|
public override string SolutionTag
|
||||||
}
|
{
|
||||||
|
get { return "# Visual Studio 2010"; }
|
||||||
#endregion
|
}
|
||||||
|
|
||||||
#region Constructors
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
#region Constructors
|
||||||
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
public VS2010Target()
|
/// Initializes a new instance of the <see cref="VS2005Target"/> class.
|
||||||
: base()
|
/// </summary>
|
||||||
{
|
public VS2010Target()
|
||||||
}
|
: base()
|
||||||
|
{
|
||||||
#endregion
|
}
|
||||||
}
|
|
||||||
}
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ using System.Resources;
|
||||||
[assembly: AssemblyConfiguration(".NET CLR")]
|
[assembly: AssemblyConfiguration(".NET CLR")]
|
||||||
[assembly: AssemblyCompany("The Prebuild Project")]
|
[assembly: AssemblyCompany("The Prebuild Project")]
|
||||||
[assembly: AssemblyProduct("")]
|
[assembly: AssemblyProduct("")]
|
||||||
[assembly: AssemblyCopyright("Copyright 2004-2010 " +
|
[assembly: AssemblyCopyright("Copyright 2004-2013 " +
|
||||||
"Matthew Holmes, " +
|
"Matthew Holmes, " +
|
||||||
"Dan Moorehead, " +
|
"Dan Moorehead, " +
|
||||||
"C.J. Adams-Collier, " +
|
"C.J. Adams-Collier, " +
|
||||||
|
@ -71,7 +71,7 @@ using System.Resources;
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||||
[assembly: AssemblyVersion("2.0.5.*")]
|
[assembly: AssemblyVersion("2.0.6.*")]
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
|
|
|
@ -0,0 +1,338 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>
|
||||||
|
Copyright (c) 2004-2007
|
||||||
|
Matthew Holmes (calefaction at houston . rr . com),
|
||||||
|
Dan Moorehead (dan05a at gmail . com),
|
||||||
|
David Hudson (jendave at yahoo dot com),
|
||||||
|
C.J. Adams-Collier (cjac at colliertech dot com)
|
||||||
|
|
||||||
|
.NET Prebuild is a cross-platform XML-driven pre-build tool which
|
||||||
|
allows developers to easily generate project or make files for major
|
||||||
|
IDE's and .NET development tools including: Visual Studio .NET 2002,
|
||||||
|
2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools.
|
||||||
|
|
||||||
|
BSD License:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||||
|
provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||||
|
and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||||
|
and the following disclaimer in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* The name of the author may not be used to endorse or promote products derived from this software
|
||||||
|
without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||||
|
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||||
|
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
|
||||||
|
<xs:element name="Prebuild">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="Solution" minOccurs="1" maxOccurs="1" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="version" />
|
||||||
|
<xs:attribute name="checkOsVars" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="Process" type="xs:string" />
|
||||||
|
|
||||||
|
<xs:element name="Solution">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="Options" minOccurs="0" />
|
||||||
|
<xs:element ref="Files" minOccurs="0" />
|
||||||
|
<xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="activeConfig" type="xs:string" default="Debug" />
|
||||||
|
<xs:attribute name="path" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="version" type="xs:string" default="1.0.0" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="EmbeddedSolution">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="Files" minOccurs="0" />
|
||||||
|
<xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="activeConfig" type="xs:string" default="Debug" />
|
||||||
|
<xs:attribute name="path" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="version" type="xs:string" default="1.0.0" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="DatabaseProject">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="DatabaseReference" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="path" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="DatabaseReference">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="providerId" type="xs:string" />
|
||||||
|
<xs:attribute name="providerName" type="xs:string" />
|
||||||
|
<xs:attribute name="connectionString" type="xs:string" use="required" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="Project">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||||
|
<xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
|
||||||
|
<xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="path" type="xs:string" />
|
||||||
|
<xs:attribute name="localCopy" type="xs:boolean" />
|
||||||
|
<xs:attribute name="version" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element ref="Files" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="designerFolder" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="filterGroups" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="path" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="icon" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="configFile" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="version" type="xs:string" default="1.0.0" />
|
||||||
|
<xs:attribute name="guid" type="xs:string"/>
|
||||||
|
<xs:attribute name="language" default="C#">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="C#" />
|
||||||
|
<xs:enumeration value="VB.NET" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="type" default="Exe">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Exe" />
|
||||||
|
<xs:enumeration value="WinExe" />
|
||||||
|
<xs:enumeration value="Library" />
|
||||||
|
<xs:enumeration value="Web" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="runtime" default="Microsoft">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Microsoft" />
|
||||||
|
<xs:enumeration value="Mono" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="frameworkVersion" default="v2_0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="v2_0" />
|
||||||
|
<xs:enumeration value="v3_0" />
|
||||||
|
<xs:enumeration value="v3_5" />
|
||||||
|
<xs:enumeration value="v4_0" />
|
||||||
|
<xs:enumeration value="v4_5" />
|
||||||
|
<xs:enumeration value="v4_5_1" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="startupObject" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="rootNamespace" type="xs:string" />
|
||||||
|
<xs:attribute name="assemblyName" type="xs:string" />
|
||||||
|
<xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="Configuration">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="Options" minOccurs="0" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="name" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="platform" type="xs:string" use="required" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Options">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="OnBuildSuccess" />
|
||||||
|
<xs:enumeration value="Always" />
|
||||||
|
<xs:enumeration value="OnOutputUpdated" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="RunScript" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="WarningLevel" minOccurs="0">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:integer">
|
||||||
|
<xs:minInclusive value="0" />
|
||||||
|
<xs:maxInclusive value="4" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="OutputPath" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
|
||||||
|
<xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
|
||||||
|
<xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
|
||||||
|
<xs:element name="KeyFile" type="xs:string" minOccurs="0" />
|
||||||
|
</xs:all>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Files">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
<xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="File">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="xs:string">
|
||||||
|
<xs:attribute name="resourceName" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="buildAction" default="Compile">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="None" />
|
||||||
|
<xs:enumeration value="Compile" />
|
||||||
|
<xs:enumeration value="Content" />
|
||||||
|
<xs:enumeration value="EmbeddedResource" />
|
||||||
|
<xs:enumeration value="ApplicationDefinition" />
|
||||||
|
<xs:enumeration value="Page" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="subType" default="Code">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Code" />
|
||||||
|
<xs:enumeration value="CodeBehind" />
|
||||||
|
<xs:enumeration value="Component" />
|
||||||
|
<xs:enumeration value="Form" />
|
||||||
|
<xs:enumeration value="Settings" />
|
||||||
|
<xs:enumeration value="UserControl" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="link" type="xs:boolean" />
|
||||||
|
<xs:attribute name="copyToOutput" default="Never">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Never" />
|
||||||
|
<xs:enumeration value="Always" />
|
||||||
|
<xs:enumeration value="PreserveNewest" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="preservePath" type="xs:boolean" />
|
||||||
|
<xs:attribute name="linkPath" type="xs:string" />
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Match">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" />
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute name="path" type="xs:string" />
|
||||||
|
<xs:attribute name="pattern" type="xs:string" use="required" />
|
||||||
|
<xs:attribute name="recurse" type="xs:boolean" default="false" />
|
||||||
|
<xs:attribute name="useRegex" type="xs:boolean" default="false" />
|
||||||
|
<xs:attribute name="buildAction" default="Compile">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="None" />
|
||||||
|
<xs:enumeration value="Compile" />
|
||||||
|
<xs:enumeration value="Content" />
|
||||||
|
<xs:enumeration value="EmbeddedResource" />
|
||||||
|
<xs:enumeration value="ApplicationDefinition" />
|
||||||
|
<xs:enumeration value="Page" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="resourceName" type="xs:string" default="" />
|
||||||
|
<xs:attribute name="subType" default="Code">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Code" />
|
||||||
|
<xs:enumeration value="CodeBehind" />
|
||||||
|
<xs:enumeration value="Component" />
|
||||||
|
<xs:enumeration value="Designer" />
|
||||||
|
<xs:enumeration value="Form" />
|
||||||
|
<xs:enumeration value="Settings" />
|
||||||
|
<xs:enumeration value="UserControl" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="link" type="xs:boolean" />
|
||||||
|
<xs:attribute name="copyToOutput" default="Never">
|
||||||
|
<xs:simpleType>
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Never" />
|
||||||
|
<xs:enumeration value="Always" />
|
||||||
|
<xs:enumeration value="PreserveNewest" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="preservePath" type="xs:boolean" />
|
||||||
|
<xs:attribute name="linkPath" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="Exclude">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="name" type="xs:string" />
|
||||||
|
<xs:attribute name="pattern" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
|
@ -57,6 +57,12 @@
|
||||||
; when running with the SmartThreadPool option above
|
; when running with the SmartThreadPool option above
|
||||||
MaxPoolThreads = 15
|
MaxPoolThreads = 15
|
||||||
|
|
||||||
|
; Plugin Registry Location
|
||||||
|
; Set path to directory for plugin registry. Information about the
|
||||||
|
; registered repositories and installed plugins will be stored here.
|
||||||
|
; The OpenSim.exe process must have R/W access to the location.
|
||||||
|
; RegistryLocation = "."
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## CLIENTS
|
; ## CLIENTS
|
||||||
; ##
|
; ##
|
||||||
|
|
BIN
bin/Prebuild.exe
BIN
bin/Prebuild.exe
Binary file not shown.
|
@ -335,6 +335,10 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset
|
||||||
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
|
||||||
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
|
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
|
||||||
|
|
||||||
|
; This inventory service will be used to initialize the user's inventory
|
||||||
|
HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService"
|
||||||
|
HGInventoryServiceConstructorArg = "HGInventoryService"
|
||||||
|
|
||||||
;; Ask co-operative viewers to use a different currency name
|
;; Ask co-operative viewers to use a different currency name
|
||||||
;Currency = ""
|
;Currency = ""
|
||||||
|
|
||||||
|
@ -634,7 +638,7 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset
|
||||||
;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"
|
;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"
|
||||||
;; Realm = UserProfiles
|
;; Realm = UserProfiles
|
||||||
UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
|
UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
|
||||||
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService
|
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||||
|
|
||||||
[BakedTextureService]
|
[BakedTextureService]
|
||||||
LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes"
|
LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<Prebuild version="1.7" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd">
|
<Prebuild version="1.10" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.10.xsd">
|
||||||
<Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$">
|
<Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
|
|
@ -7,11 +7,19 @@ setlocal ENABLEEXTENSIONS
|
||||||
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
|
||||||
set VALUE_NAME=MSBuildToolsPath
|
set VALUE_NAME=MSBuildToolsPath
|
||||||
|
|
||||||
rem We have to use find here as req query spits out 4 lines before Windows 7
|
rem We have to use grep or find to locate the correct line, because reg query spits
|
||||||
rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin
|
rem out 4 lines before Windows 7 but 2 lines after Windows 7.
|
||||||
rem as it uses its own find command. This could be fixed but it could be
|
rem We use grep if it's on the path; otherwise we use the built-in find command
|
||||||
rem complex to find the location of find on all windows systems
|
rem from Windows. (We must use grep on Cygwin because it overrides the "find" command.)
|
||||||
FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO (
|
|
||||||
|
for %%X in (grep.exe) do (set FOUNDGREP=%%~$PATH:X)
|
||||||
|
if defined FOUNDGREP (
|
||||||
|
set FINDCMD=grep
|
||||||
|
) else (
|
||||||
|
set FINDCMD=find
|
||||||
|
)
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO (
|
||||||
set ValueName=%%A
|
set ValueName=%%A
|
||||||
set ValueType=%%B
|
set ValueType=%%B
|
||||||
set ValueValue=%%C
|
set ValueValue=%%C
|
||||||
|
|
Loading…
Reference in New Issue