aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Capabilities/Caps.cs105
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs1
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs1
7 files changed, 114 insertions, 20 deletions
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index 0db7bb9..8a339fe 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.Capabilities
44 string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder, 44 string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
45 byte[] data, string inventoryType, string assetType); 45 byte[] data, string inventoryType, string assetType);
46 46
47 public delegate void UploadedBakedTexture(UUID assetID, byte[] data);
48
47 public delegate UUID UpdateItem(UUID itemID, byte[] data); 49 public delegate UUID UpdateItem(UUID itemID, byte[] data);
48 50
49 public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors); 51 public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors);
@@ -97,6 +99,7 @@ namespace OpenSim.Framework.Capabilities
97 // private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. 99 // private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
98 100
99 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. 101 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
102 private static readonly string m_uploadBakedTexturePath = "0010/";// This is in the LandManagementModule.
100 103
101 //private string eventQueue = "0100/"; 104 //private string eventQueue = "0100/";
102 private IScene m_Scene; 105 private IScene m_Scene;
@@ -185,6 +188,8 @@ namespace OpenSim.Framework.Capabilities
185 m_capsHandlers["UpdateScriptTaskInventory"] = 188 m_capsHandlers["UpdateScriptTaskInventory"] =
186 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); 189 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
187 m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"]; 190 m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
191 m_capsHandlers["UploadBakedTexture"] =
192 new RestStreamHandler("POST", capsBase + m_uploadBakedTexturePath, UploadBakedTexture);
188 193
189 } 194 }
190 catch (Exception e) 195 catch (Exception e)
@@ -742,6 +747,50 @@ namespace OpenSim.Framework.Capabilities
742 return null; 747 return null;
743 } 748 }
744 749
750 public string UploadBakedTexture(string request, string path,
751 string param, OSHttpRequest httpRequest,
752 OSHttpResponse httpResponse)
753 {
754 try
755 {
756 m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
757 m_regionName);
758
759 string capsBase = "/CAPS/" + m_capsObjectPath;
760 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
761
762 BakedTextureUploader uploader =
763 new BakedTextureUploader( capsBase + uploaderPath,
764 m_httpListener);
765 uploader.OnUpLoad += BakedTextureUploaded;
766
767 m_httpListener.AddStreamHandler(
768 new BinaryStreamHandler("POST", capsBase + uploaderPath,
769 uploader.uploaderCaps));
770
771 string protocol = "http://";
772
773 if (m_httpListener.UseSSL)
774 protocol = "https://";
775
776 string uploaderURL = protocol + m_httpListenerHostName + ":" +
777 m_httpListenPort.ToString() + capsBase + uploaderPath;
778
779 LLSDAssetUploadResponse uploadResponse =
780 new LLSDAssetUploadResponse();
781 uploadResponse.uploader = uploaderURL;
782 uploadResponse.state = "upload";
783
784 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
785 }
786 catch (Exception e)
787 {
788 m_log.Error("[CAPS]: " + e.ToString());
789 }
790
791 return null;
792 }
793
745 /// <summary> 794 /// <summary>
746 /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset. 795 /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset.
747 /// </summary> 796 /// </summary>
@@ -925,6 +974,17 @@ namespace OpenSim.Framework.Capabilities
925 } 974 }
926 } 975 }
927 976
977 public void BakedTextureUploaded(UUID assetID, byte[] data)
978 {
979 m_log.DebugFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
980 AssetBase asset;
981 asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString());
982 asset.Data = data;
983 asset.Temporary = true;
984 asset.Local = true;
985 m_assetCache.Store(asset);
986 }
987
928 /// <summary> 988 /// <summary>
929 /// Called when new asset data for an agent inventory item update has been uploaded. 989 /// Called when new asset data for an agent inventory item update has been uploaded.
930 /// </summary> 990 /// </summary>
@@ -1243,5 +1303,50 @@ namespace OpenSim.Framework.Capabilities
1243 fs.Close(); 1303 fs.Close();
1244 } 1304 }
1245 } 1305 }
1306
1307 public class BakedTextureUploader
1308 {
1309 public event UploadedBakedTexture OnUpLoad;
1310 private UploadedBakedTexture handlerUpLoad = null;
1311
1312 private string uploaderPath = String.Empty;
1313 private UUID newAssetID;
1314 private IHttpServer httpListener;
1315
1316 public BakedTextureUploader(string path, IHttpServer httpServer)
1317 {
1318 newAssetID = UUID.Random();
1319 uploaderPath = path;
1320 httpListener = httpServer;
1321 }
1322
1323 /// <summary>
1324 ///
1325 /// </summary>
1326 /// <param name="data"></param>
1327 /// <param name="path"></param>
1328 /// <param name="param"></param>
1329 /// <returns></returns>
1330 public string uploaderCaps(byte[] data, string path, string param)
1331 {
1332 string res = String.Empty;
1333 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
1334 uploadComplete.new_asset = newAssetID.ToString();
1335 uploadComplete.new_inventory_item = UUID.Zero;
1336 uploadComplete.state = "complete";
1337
1338 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
1339
1340 httpListener.RemoveStreamHandler("POST", uploaderPath);
1341
1342 handlerUpLoad = OnUpLoad;
1343 if (handlerUpLoad != null)
1344 {
1345 handlerUpLoad(newAssetID, data);
1346 }
1347
1348 return res;
1349 }
1350 }
1246 } 1351 }
1247} 1352}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 105501f..aa7de05 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3427,6 +3427,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3427 3427
3428 avp.Sender.IsTrial = false; 3428 avp.Sender.IsTrial = false;
3429 avp.Sender.ID = agentID; 3429 avp.Sender.ID = agentID;
3430 m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3430 OutPacket(avp, ThrottleOutPacketType.Task); 3431 OutPacket(avp, ThrottleOutPacketType.Task);
3431 } 3432 }
3432 3433
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 2a36362..4159610 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -689,7 +689,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
689 } 689 }
690 690
691 // Fire on_rez 691 // Fire on_rez
692 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 0); 692 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
693 rootPart.ParentGroup.ResumeScripts(); 693 rootPart.ParentGroup.ResumeScripts();
694 694
695 rootPart.ScheduleFullUpdate(); 695 rootPart.ScheduleFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 8760c84..0d9682e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -218,8 +218,7 @@ namespace OpenSim.Region.Framework.Scenes
218 218
219 // Update item with new asset 219 // Update item with new asset
220 item.AssetID = asset.FullID; 220 item.AssetID = asset.FullID;
221 if (group.UpdateInventoryItem(item)) 221 group.UpdateInventoryItem(item);
222 remoteClient.SendAgentAlertMessage("Script saved", false);
223 222
224 part.GetProperties(remoteClient); 223 part.GetProperties(remoteClient);
225 224
@@ -232,10 +231,6 @@ namespace OpenSim.Region.Framework.Scenes
232 // 231 //
233 errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0); 232 errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0);
234 } 233 }
235 else
236 {
237 remoteClient.SendAgentAlertMessage("Script saved", false);
238 }
239 part.ParentGroup.ResumeScripts(); 234 part.ParentGroup.ResumeScripts();
240 return errors; 235 return errors;
241 } 236 }
@@ -1401,13 +1396,6 @@ namespace OpenSim.Region.Framework.Scenes
1401 { 1396 {
1402 agentTransactions.HandleTaskItemUpdateFromTransaction( 1397 agentTransactions.HandleTaskItemUpdateFromTransaction(
1403 remoteClient, part, transactionID, currentItem); 1398 remoteClient, part, transactionID, currentItem);
1404
1405 if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
1406 remoteClient.SendAgentAlertMessage("Notecard saved", false);
1407 else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
1408 remoteClient.SendAgentAlertMessage("Script saved", false);
1409 else
1410 remoteClient.SendAgentAlertMessage("Item saved", false);
1411 } 1399 }
1412 1400
1413 // Base ALWAYS has move 1401 // Base ALWAYS has move
@@ -1993,7 +1981,7 @@ namespace OpenSim.Region.Framework.Scenes
1993 1981
1994 // We can only call this after adding the scene object, since the scene object references the scene 1982 // We can only call this after adding the scene object, since the scene object references the scene
1995 // to find out if scripts should be activated at all. 1983 // to find out if scripts should be activated at all.
1996 group.CreateScriptInstances(param, true, DefaultScriptEngine, 2); 1984 group.CreateScriptInstances(param, true, DefaultScriptEngine, 3);
1997 1985
1998 group.ScheduleGroupForFullUpdate(); 1986 group.ScheduleGroupForFullUpdate();
1999 1987
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9fea2a0..400f4c0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1160,6 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
1160 //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); 1160 //m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
1161 if (HeartbeatThread != null) 1161 if (HeartbeatThread != null)
1162 { 1162 {
1163 m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
1163 HeartbeatThread.Abort(); 1164 HeartbeatThread.Abort();
1164 HeartbeatThread = null; 1165 HeartbeatThread = null;
1165 } 1166 }
@@ -2442,7 +2443,7 @@ namespace OpenSim.Region.Framework.Scenes
2442 return false; 2443 return false;
2443 } 2444 }
2444 2445
2445 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); 2446 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2);
2446 2447
2447 newObject.ResumeScripts(); 2448 newObject.ResumeScripts();
2448 2449
@@ -4555,7 +4556,7 @@ namespace OpenSim.Region.Framework.Scenes
4555 // 4556 //
4556 int health=1; // Start at 1, means we're up 4557 int health=1; // Start at 1, means we're up
4557 4558
4558 if ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000) 4559 if (m_firstHeartbeat || ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000))
4559 health+=1; 4560 health+=1;
4560 else 4561 else
4561 return health; 4562 return health;
@@ -5067,7 +5068,7 @@ namespace OpenSim.Region.Framework.Scenes
5067 { 5068 {
5068 ForEachSOG(delegate (SceneObjectGroup grp) 5069 ForEachSOG(delegate (SceneObjectGroup grp)
5069 { 5070 {
5070 if (grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp))) 5071 if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp)))
5071 { 5072 {
5072 UUID agentID = grp.OwnerID; 5073 UUID agentID = grp.OwnerID;
5073 if (agentID == UUID.Zero) 5074 if (agentID == UUID.Zero)
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index b86a564..8823df1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.Framework.Scenes
1928 copy.UpdateGroupRotationR(rot); 1928 copy.UpdateGroupRotationR(rot);
1929 } 1929 }
1930 1930
1931 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); 1931 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1);
1932 copy.HasGroupChanged = true; 1932 copy.HasGroupChanged = true;
1933 copy.ScheduleGroupForFullUpdate(); 1933 copy.ScheduleGroupForFullUpdate();
1934 copy.ResumeScripts(); 1934 copy.ResumeScripts();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f682ee5..2ed00a0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2810,7 +2810,6 @@ namespace OpenSim.Region.Framework.Scenes
2810 m_controllingClient.SendAvatarDataImmediate(this); 2810 m_controllingClient.SendAvatarDataImmediate(this);
2811 2811
2812 SendInitialFullUpdateToAllClients(); 2812 SendInitialFullUpdateToAllClients();
2813 SendAppearanceToAllOtherAgents();
2814 } 2813 }
2815 2814
2816 /// <summary> 2815 /// <summary>