Merge branch 'master' into vehicles
commit
642084c2a9
|
@ -44,7 +44,6 @@ namespace OpenSim.Data.MySQL
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private MySQLManager _dbConnection;
|
private MySQLManager _dbConnection;
|
||||||
private long TicksToEpoch;
|
|
||||||
|
|
||||||
#region IPlugin Members
|
#region IPlugin Members
|
||||||
|
|
||||||
|
@ -61,8 +60,6 @@ namespace OpenSim.Data.MySQL
|
||||||
/// <param name="connect">connect string</param>
|
/// <param name="connect">connect string</param>
|
||||||
override public void Initialise(string connect)
|
override public void Initialise(string connect)
|
||||||
{
|
{
|
||||||
TicksToEpoch = new DateTime(1970,1,1).Ticks;
|
|
||||||
|
|
||||||
// TODO: This will let you pass in the connect string in
|
// TODO: This will let you pass in the connect string in
|
||||||
// the config, though someone will need to write that.
|
// the config, though someone will need to write that.
|
||||||
if (connect == String.Empty)
|
if (connect == String.Empty)
|
||||||
|
@ -223,7 +220,7 @@ namespace OpenSim.Data.MySQL
|
||||||
using (cmd)
|
using (cmd)
|
||||||
{
|
{
|
||||||
// create unix epoch time
|
// create unix epoch time
|
||||||
int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
|
int now = (int)Utils.DateTimeToUnixTime(DateTime.UtcNow);
|
||||||
cmd.Parameters.AddWithValue("?id", asset.ID);
|
cmd.Parameters.AddWithValue("?id", asset.ID);
|
||||||
cmd.Parameters.AddWithValue("?name", assetName);
|
cmd.Parameters.AddWithValue("?name", assetName);
|
||||||
cmd.Parameters.AddWithValue("?description", assetDescription);
|
cmd.Parameters.AddWithValue("?description", assetDescription);
|
||||||
|
@ -248,6 +245,9 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
private void UpdateAccessTime(AssetBase asset)
|
private void UpdateAccessTime(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
// Writing to the database every time Get() is called on an asset is killing us. Seriously. -jph
|
||||||
|
return;
|
||||||
|
|
||||||
lock (_dbConnection)
|
lock (_dbConnection)
|
||||||
{
|
{
|
||||||
_dbConnection.CheckConnection();
|
_dbConnection.CheckConnection();
|
||||||
|
@ -262,7 +262,7 @@ namespace OpenSim.Data.MySQL
|
||||||
using (cmd)
|
using (cmd)
|
||||||
{
|
{
|
||||||
// create unix epoch time
|
// create unix epoch time
|
||||||
int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
|
int now = (int)Utils.DateTimeToUnixTime(DateTime.UtcNow);
|
||||||
cmd.Parameters.AddWithValue("?id", asset.ID);
|
cmd.Parameters.AddWithValue("?id", asset.ID);
|
||||||
cmd.Parameters.AddWithValue("?access_time", now);
|
cmd.Parameters.AddWithValue("?access_time", now);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
|
|
@ -3289,11 +3289,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
new CoarseLocationUpdatePacket.IndexBlock();
|
new CoarseLocationUpdatePacket.IndexBlock();
|
||||||
loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
|
loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
|
||||||
loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
|
loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
|
||||||
|
int selfindex = -1;
|
||||||
for (int i = 0; i < total; i++)
|
for (int i = 0; i < total; i++)
|
||||||
{
|
{
|
||||||
CoarseLocationUpdatePacket.LocationBlock lb =
|
CoarseLocationUpdatePacket.LocationBlock lb =
|
||||||
new CoarseLocationUpdatePacket.LocationBlock();
|
new CoarseLocationUpdatePacket.LocationBlock();
|
||||||
|
|
||||||
lb.X = (byte)CoarseLocations[i].X;
|
lb.X = (byte)CoarseLocations[i].X;
|
||||||
lb.Y = (byte)CoarseLocations[i].Y;
|
lb.Y = (byte)CoarseLocations[i].Y;
|
||||||
|
|
||||||
|
@ -3301,8 +3302,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
loc.Location[i] = lb;
|
loc.Location[i] = lb;
|
||||||
loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
|
loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
|
||||||
loc.AgentData[i].AgentID = users[i];
|
loc.AgentData[i].AgentID = users[i];
|
||||||
|
if (users[i] == AgentId)
|
||||||
|
selfindex = i;
|
||||||
}
|
}
|
||||||
ib.You = -1;
|
ib.You = (short)selfindex;
|
||||||
ib.Prey = -1;
|
ib.Prey = -1;
|
||||||
loc.Index = ib;
|
loc.Index = ib;
|
||||||
loc.Header.Reliable = false;
|
loc.Header.Reliable = false;
|
||||||
|
|
|
@ -154,6 +154,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene);
|
((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene);
|
||||||
|
|
||||||
|
// Yikes!! Remove this as soon as user services get refactored
|
||||||
|
LocalAssetServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
|
||||||
|
LocalInventoryServerURI = scene.CommsManager.NetworkServersInfo.InventoryURL;
|
||||||
|
LocalUserServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
|
||||||
|
HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
|
@ -173,9 +179,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if (!m_Initialized)
|
if (!m_Initialized)
|
||||||
{
|
{
|
||||||
m_aScene = scene;
|
m_aScene = scene;
|
||||||
LocalAssetServerURI = m_aScene.CommsManager.NetworkServersInfo.UserURL;
|
|
||||||
LocalInventoryServerURI = m_aScene.CommsManager.NetworkServersInfo.InventoryURL;
|
|
||||||
LocalUserServerURI = m_aScene.CommsManager.NetworkServersInfo.UserURL;
|
|
||||||
|
|
||||||
m_HypergridServiceConnector = new HypergridServiceConnector(scene.AssetService);
|
m_HypergridServiceConnector = new HypergridServiceConnector(scene.AssetService);
|
||||||
|
|
||||||
|
@ -189,9 +192,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
||||||
"Set local coordinate to map HG regions to", hgCommands.RunCommand);
|
"Set local coordinate to map HG regions to", hgCommands.RunCommand);
|
||||||
|
|
||||||
// Yikes!! Remove this as soon as user services get refactored
|
|
||||||
HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI);
|
|
||||||
|
|
||||||
m_Initialized = true;
|
m_Initialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2402,11 +2402,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||||
item = InventoryService.GetItem(item);
|
item = InventoryService.GetItem(item);
|
||||||
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
|
||||||
IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
|
|
||||||
if (ava != null)
|
if (m_AvatarFactory != null)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt);
|
m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt);
|
||||||
ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2481,7 +2481,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (aCircuit == null || aCircuit.child == false)
|
if (aCircuit == null || aCircuit.child == false)
|
||||||
{
|
{
|
||||||
sp.IsChildAgent = false;
|
sp.IsChildAgent = false;
|
||||||
sp.RezAttachments();
|
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2507,8 +2507,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||||
for (int i = 0; i < avatars.Count; i++)
|
for (int i = 0; i < avatars.Count; i++)
|
||||||
{
|
{
|
||||||
if (avatars[i] != this)
|
// Requested by LibOMV. Send Course Location on self.
|
||||||
{
|
//if (avatars[i] != this)
|
||||||
|
//{
|
||||||
if (avatars[i].ParentID != 0)
|
if (avatars[i].ParentID != 0)
|
||||||
{
|
{
|
||||||
// sitting avatar
|
// sitting avatar
|
||||||
|
@ -2530,7 +2531,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
CoarseLocations.Add(avatars[i].m_pos);
|
CoarseLocations.Add(avatars[i].m_pos);
|
||||||
AvatarUUIDs.Add(avatars[i].UUID);
|
AvatarUUIDs.Add(avatars[i].UUID);
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
|
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
|
||||||
|
@ -3841,6 +3842,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
List<int> attPoints = m_appearance.GetAttachedPoints();
|
List<int> attPoints = m_appearance.GetAttachedPoints();
|
||||||
foreach (int p in attPoints)
|
foreach (int p in attPoints)
|
||||||
{
|
{
|
||||||
|
if (m_isDeleted)
|
||||||
|
return;
|
||||||
|
|
||||||
UUID itemID = m_appearance.GetAttachedItem(p);
|
UUID itemID = m_appearance.GetAttachedItem(p);
|
||||||
UUID assetID = m_appearance.GetAttachedAsset(p);
|
UUID assetID = m_appearance.GetAttachedAsset(p);
|
||||||
|
|
||||||
|
@ -3866,9 +3870,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString());
|
m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
|
||||||
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||||
StorageProvider = "OpenSim.Data.MySQL.dll"
|
StorageProvider = "OpenSim.Data.MySQL.dll"
|
||||||
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"
|
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"
|
||||||
; Realm = "auth"
|
; Realm = "users"
|
||||||
|
|
||||||
; * This is the new style user service.
|
; * This is the new style user service.
|
||||||
; * "Realm" is the table that is used for user lookup.
|
; * "Realm" is the table that is used for user lookup.
|
||||||
|
@ -75,7 +75,7 @@ ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=gr
|
||||||
; * It defaults to "regions", which uses the legacy tables
|
; * It defaults to "regions", which uses the legacy tables
|
||||||
; *
|
; *
|
||||||
[GridService]
|
[GridService]
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
||||||
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;"
|
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;"
|
||||||
Realm = "regions"
|
Realm = "regions"
|
||||||
|
|
Loading…
Reference in New Issue