aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2009-10-15 21:16:05 +0100
committerMelanie2009-10-15 21:16:05 +0100
commit642084c2a94523fa1dbe00e8c787d4da549881ca (patch)
tree8af3f8bbbd01ddfbc22980291ada1cf896ddf948
parentMerge branch 'master' into vehicles (diff)
parentminor: Change commented out authentication service realm setting to "users" t... (diff)
downloadopensim-SC-642084c2a94523fa1dbe00e8c787d4da549881ca.zip
opensim-SC-642084c2a94523fa1dbe00e8c787d4da549881ca.tar.gz
opensim-SC-642084c2a94523fa1dbe00e8c787d4da549881ca.tar.bz2
opensim-SC-642084c2a94523fa1dbe00e8c787d4da549881ca.tar.xz
Merge branch 'master' into vehicles
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs10
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
-rw-r--r--bin/OpenSim.Server.ini.example10
7 files changed, 32 insertions, 27 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 259e186..fc05d1d 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -44,7 +44,6 @@ namespace OpenSim.Data.MySQL
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private MySQLManager _dbConnection; 46 private MySQLManager _dbConnection;
47 private long TicksToEpoch;
48 47
49 #region IPlugin Members 48 #region IPlugin Members
50 49
@@ -61,8 +60,6 @@ namespace OpenSim.Data.MySQL
61 /// <param name="connect">connect string</param> 60 /// <param name="connect">connect string</param>
62 override public void Initialise(string connect) 61 override public void Initialise(string connect)
63 { 62 {
64 TicksToEpoch = new DateTime(1970,1,1).Ticks;
65
66 // TODO: This will let you pass in the connect string in 63 // TODO: This will let you pass in the connect string in
67 // the config, though someone will need to write that. 64 // the config, though someone will need to write that.
68 if (connect == String.Empty) 65 if (connect == String.Empty)
@@ -223,7 +220,7 @@ namespace OpenSim.Data.MySQL
223 using (cmd) 220 using (cmd)
224 { 221 {
225 // create unix epoch time 222 // create unix epoch time
226 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); 223 int now = (int)Utils.DateTimeToUnixTime(DateTime.UtcNow);
227 cmd.Parameters.AddWithValue("?id", asset.ID); 224 cmd.Parameters.AddWithValue("?id", asset.ID);
228 cmd.Parameters.AddWithValue("?name", assetName); 225 cmd.Parameters.AddWithValue("?name", assetName);
229 cmd.Parameters.AddWithValue("?description", assetDescription); 226 cmd.Parameters.AddWithValue("?description", assetDescription);
@@ -248,6 +245,9 @@ namespace OpenSim.Data.MySQL
248 245
249 private void UpdateAccessTime(AssetBase asset) 246 private void UpdateAccessTime(AssetBase asset)
250 { 247 {
248 // Writing to the database every time Get() is called on an asset is killing us. Seriously. -jph
249 return;
250
251 lock (_dbConnection) 251 lock (_dbConnection)
252 { 252 {
253 _dbConnection.CheckConnection(); 253 _dbConnection.CheckConnection();
@@ -262,7 +262,7 @@ namespace OpenSim.Data.MySQL
262 using (cmd) 262 using (cmd)
263 { 263 {
264 // create unix epoch time 264 // create unix epoch time
265 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); 265 int now = (int)Utils.DateTimeToUnixTime(DateTime.UtcNow);
266 cmd.Parameters.AddWithValue("?id", asset.ID); 266 cmd.Parameters.AddWithValue("?id", asset.ID);
267 cmd.Parameters.AddWithValue("?access_time", now); 267 cmd.Parameters.AddWithValue("?access_time", now);
268 cmd.ExecuteNonQuery(); 268 cmd.ExecuteNonQuery();
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 8487adc..4b27fa2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3289,11 +3289,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3289 new CoarseLocationUpdatePacket.IndexBlock(); 3289 new CoarseLocationUpdatePacket.IndexBlock();
3290 loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total]; 3290 loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
3291 loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total]; 3291 loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
3292 3292 int selfindex = -1;
3293 for (int i = 0; i < total; i++) 3293 for (int i = 0; i < total; i++)
3294 { 3294 {
3295 CoarseLocationUpdatePacket.LocationBlock lb = 3295 CoarseLocationUpdatePacket.LocationBlock lb =
3296 new CoarseLocationUpdatePacket.LocationBlock(); 3296 new CoarseLocationUpdatePacket.LocationBlock();
3297
3297 lb.X = (byte)CoarseLocations[i].X; 3298 lb.X = (byte)CoarseLocations[i].X;
3298 lb.Y = (byte)CoarseLocations[i].Y; 3299 lb.Y = (byte)CoarseLocations[i].Y;
3299 3300
@@ -3301,8 +3302,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3301 loc.Location[i] = lb; 3302 loc.Location[i] = lb;
3302 loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock(); 3303 loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
3303 loc.AgentData[i].AgentID = users[i]; 3304 loc.AgentData[i].AgentID = users[i];
3305 if (users[i] == AgentId)
3306 selfindex = i;
3304 } 3307 }
3305 ib.You = -1; 3308 ib.You = (short)selfindex;
3306 ib.Prey = -1; 3309 ib.Prey = -1;
3307 loc.Index = ib; 3310 loc.Index = ib;
3308 loc.Header.Reliable = false; 3311 loc.Header.Reliable = false;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
index 1422add..046bee5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
@@ -154,6 +154,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
154 154
155 ((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene); 155 ((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene);
156 156
157 // Yikes!! Remove this as soon as user services get refactored
158 LocalAssetServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
159 LocalInventoryServerURI = scene.CommsManager.NetworkServersInfo.InventoryURL;
160 LocalUserServerURI = scene.CommsManager.NetworkServersInfo.UserURL;
161 HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI);
162
157 } 163 }
158 164
159 public void RemoveRegion(Scene scene) 165 public void RemoveRegion(Scene scene)
@@ -173,9 +179,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
173 if (!m_Initialized) 179 if (!m_Initialized)
174 { 180 {
175 m_aScene = scene; 181 m_aScene = scene;
176 LocalAssetServerURI = m_aScene.CommsManager.NetworkServersInfo.UserURL;
177 LocalInventoryServerURI = m_aScene.CommsManager.NetworkServersInfo.InventoryURL;
178 LocalUserServerURI = m_aScene.CommsManager.NetworkServersInfo.UserURL;
179 182
180 m_HypergridServiceConnector = new HypergridServiceConnector(scene.AssetService); 183 m_HypergridServiceConnector = new HypergridServiceConnector(scene.AssetService);
181 184
@@ -189,9 +192,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
189 MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [<x> <y>] <cr>", 192 MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
190 "Set local coordinate to map HG regions to", hgCommands.RunCommand); 193 "Set local coordinate to map HG regions to", hgCommands.RunCommand);
191 194
192 // Yikes!! Remove this as soon as user services get refactored
193 HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI);
194
195 m_Initialized = true; 195 m_Initialized = true;
196 } 196 }
197 } 197 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 890126f..627034a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2402,11 +2402,11 @@ namespace OpenSim.Region.Framework.Scenes
2402 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 2402 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
2403 item = InventoryService.GetItem(item); 2403 item = InventoryService.GetItem(item);
2404 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); 2404 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
2405 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); 2405
2406 if (ava != null) 2406 if (m_AvatarFactory != null)
2407 { 2407 {
2408 m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt); 2408 m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt);
2409 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance); 2409 m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2410 } 2410 }
2411 } 2411 }
2412 } 2412 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index fba9ea8..4c7850f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2481,7 +2481,7 @@ namespace OpenSim.Region.Framework.Scenes
2481 if (aCircuit == null || aCircuit.child == false) 2481 if (aCircuit == null || aCircuit.child == false)
2482 { 2482 {
2483 sp.IsChildAgent = false; 2483 sp.IsChildAgent = false;
2484 sp.RezAttachments(); 2484 Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
2485 } 2485 }
2486 } 2486 }
2487 2487
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 15fb11f..646a483 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2507,8 +2507,9 @@ namespace OpenSim.Region.Framework.Scenes
2507 List<ScenePresence> avatars = m_scene.GetAvatars(); 2507 List<ScenePresence> avatars = m_scene.GetAvatars();
2508 for (int i = 0; i < avatars.Count; i++) 2508 for (int i = 0; i < avatars.Count; i++)
2509 { 2509 {
2510 if (avatars[i] != this) 2510 // Requested by LibOMV. Send Course Location on self.
2511 { 2511 //if (avatars[i] != this)
2512 //{
2512 if (avatars[i].ParentID != 0) 2513 if (avatars[i].ParentID != 0)
2513 { 2514 {
2514 // sitting avatar 2515 // sitting avatar
@@ -2530,7 +2531,7 @@ namespace OpenSim.Region.Framework.Scenes
2530 CoarseLocations.Add(avatars[i].m_pos); 2531 CoarseLocations.Add(avatars[i].m_pos);
2531 AvatarUUIDs.Add(avatars[i].UUID); 2532 AvatarUUIDs.Add(avatars[i].UUID);
2532 } 2533 }
2533 } 2534 //}
2534 } 2535 }
2535 2536
2536 m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); 2537 m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
@@ -3841,6 +3842,9 @@ namespace OpenSim.Region.Framework.Scenes
3841 List<int> attPoints = m_appearance.GetAttachedPoints(); 3842 List<int> attPoints = m_appearance.GetAttachedPoints();
3842 foreach (int p in attPoints) 3843 foreach (int p in attPoints)
3843 { 3844 {
3845 if (m_isDeleted)
3846 return;
3847
3844 UUID itemID = m_appearance.GetAttachedItem(p); 3848 UUID itemID = m_appearance.GetAttachedItem(p);
3845 UUID assetID = m_appearance.GetAttachedAsset(p); 3849 UUID assetID = m_appearance.GetAttachedAsset(p);
3846 3850
@@ -3866,9 +3870,7 @@ namespace OpenSim.Region.Framework.Scenes
3866 { 3870 {
3867 m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString()); 3871 m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString());
3868 } 3872 }
3869
3870 } 3873 }
3871
3872 } 3874 }
3873 } 3875 }
3874} 3876}
diff --git a/bin/OpenSim.Server.ini.example b/bin/OpenSim.Server.ini.example
index 635ba1e..f3d222f 100644
--- a/bin/OpenSim.Server.ini.example
+++ b/bin/OpenSim.Server.ini.example
@@ -58,7 +58,7 @@ LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
58AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" 58AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
59StorageProvider = "OpenSim.Data.MySQL.dll" 59StorageProvider = "OpenSim.Data.MySQL.dll"
60ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;" 60ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"
61; Realm = "auth" 61; Realm = "users"
62 62
63; * This is the new style user service. 63; * This is the new style user service.
64; * "Realm" is the table that is used for user lookup. 64; * "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
75; * It defaults to "regions", which uses the legacy tables 75; * It defaults to "regions", which uses the legacy tables
76; * 76; *
77[GridService] 77[GridService]
78 LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 78LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
79 StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" 79StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
80 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;" 80ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;"
81 Realm = "regions" 81Realm = "regions"