Merge git://github.com/opensim/opensim into mantis5110

This commit is contained in:
Jonathan Freedman
2010-11-05 19:10:02 -07:00
32 changed files with 295 additions and 91 deletions

View File

@@ -144,5 +144,9 @@ namespace OpenSim.Services.Connectors
{
m_database.StoreRegionWindlightSettings(wl);
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
m_database.RemoveRegionWindlightSettings(regionID);
}
}
}

View File

@@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces
int GetRegionFlags(UUID scopeID, UUID regionID);
}
public class GridRegion
public class GridRegion : Object
{
/// <summary>
@@ -238,6 +238,33 @@ namespace OpenSim.Services.Interfaces
EstateOwner = ConvertFrom.EstateOwner;
}
# region Definition of equality
/// <summary>
/// Define equality as two regions having the same, non-zero UUID.
/// </summary>
public bool Equals(GridRegion region)
{
if ((object)region == null)
return false;
// Return true if the non-zero UUIDs are equal:
return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
}
public override bool Equals(Object obj)
{
if (obj == null)
return false;
return Equals(obj as GridRegion);
}
public override int GetHashCode()
{
return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
}
#endregion
/// <value>
/// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
///

View File

@@ -45,10 +45,20 @@ namespace OpenSim.Services.PresenceService
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
protected bool m_allowDuplicatePresences = false;
public PresenceService(IConfigSource config)
: base(config)
{
m_log.Debug("[PRESENCE SERVICE]: Starting presence service");
IConfig presenceConfig = config.Configs["PresenceService"];
if (presenceConfig != null)
{
m_allowDuplicatePresences =
presenceConfig.GetBoolean("AllowDuplicatePresences",
m_allowDuplicatePresences);
}
}
public bool LoginAgent(string userID, UUID sessionID,
@@ -57,6 +67,9 @@ namespace OpenSim.Services.PresenceService
//PresenceData[] d = m_Database.Get("UserID", userID);
//m_Database.Get("UserID", userID);
if (!m_allowDuplicatePresences)
m_Database.Delete("UserID", userID.ToString());
PresenceData data = new PresenceData();
data.UserID = userID;