aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Capabilities/Caps.cs21
-rw-r--r--OpenSim/Framework/Capabilities/LLSDTaskScriptUploadComplete.cs54
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs1
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs2
4 files changed, 70 insertions, 8 deletions
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index 1f1ac78..74c6ab0 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Capabilities
46 46
47 public delegate UUID UpdateItem(UUID itemID, byte[] data); 47 public delegate UUID UpdateItem(UUID itemID, byte[] data);
48 48
49 public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data); 49 public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors);
50 50
51 public delegate void NewInventoryItem(UUID userID, InventoryItemBase item); 51 public delegate void NewInventoryItem(UUID userID, InventoryItemBase item);
52 52
@@ -54,7 +54,7 @@ namespace OpenSim.Framework.Capabilities
54 54
55 public delegate UUID ItemUpdatedCallback(UUID userID, UUID itemID, byte[] data); 55 public delegate UUID ItemUpdatedCallback(UUID userID, UUID itemID, byte[] data);
56 56
57 public delegate void TaskScriptUpdatedCallback(UUID userID, UUID itemID, UUID primID, 57 public delegate ArrayList TaskScriptUpdatedCallback(UUID userID, UUID itemID, UUID primID,
58 bool isScriptRunning, byte[] data); 58 bool isScriptRunning, byte[] data);
59 59
60 public delegate InventoryCollection FetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, 60 public delegate InventoryCollection FetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
@@ -940,11 +940,13 @@ namespace OpenSim.Framework.Capabilities
940 /// <param name="primID">Prim containing item to update</param> 940 /// <param name="primID">Prim containing item to update</param>
941 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> 941 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param>
942 /// <param name="data">New asset data</param> 942 /// <param name="data">New asset data</param>
943 public void TaskScriptUpdated(UUID itemID, UUID primID, bool isScriptRunning, byte[] data) 943 public void TaskScriptUpdated(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors)
944 { 944 {
945 if (TaskScriptUpdatedCall != null) 945 if (TaskScriptUpdatedCall != null)
946 { 946 {
947 TaskScriptUpdatedCall(m_agentID, itemID, primID, isScriptRunning, data); 947 ArrayList e = TaskScriptUpdatedCall(m_agentID, itemID, primID, isScriptRunning, data);
948 foreach (Object item in e)
949 errors.Add(item);
948 } 950 }
949 } 951 }
950 952
@@ -1174,17 +1176,20 @@ namespace OpenSim.Framework.Capabilities
1174// data, path, param)); 1176// data, path, param));
1175 1177
1176 string res = String.Empty; 1178 string res = String.Empty;
1177 LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); 1179 LLSDTaskScriptUploadComplete uploadComplete = new LLSDTaskScriptUploadComplete();
1178 1180
1181 ArrayList errors = new ArrayList();
1179 handlerUpdateTaskScript = OnUpLoad; 1182 handlerUpdateTaskScript = OnUpLoad;
1180 if (handlerUpdateTaskScript != null) 1183 if (handlerUpdateTaskScript != null)
1181 { 1184 {
1182 handlerUpdateTaskScript(inventoryItemID, primID, isScriptRunning, data); 1185 handlerUpdateTaskScript(inventoryItemID, primID, isScriptRunning, data, ref errors);
1183 } 1186 }
1184 1187
1185 uploadComplete.item_id = inventoryItemID; 1188 uploadComplete.new_asset = inventoryItemID;
1186 uploadComplete.task_id = primID; 1189 uploadComplete.compiled = errors.Count > 0 ? false : true;
1187 uploadComplete.state = "complete"; 1190 uploadComplete.state = "complete";
1191 uploadComplete.errors = new OSDArray();
1192 uploadComplete.errors.Array = errors;
1188 1193
1189 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); 1194 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
1190 1195
diff --git a/OpenSim/Framework/Capabilities/LLSDTaskScriptUploadComplete.cs b/OpenSim/Framework/Capabilities/LLSDTaskScriptUploadComplete.cs
new file mode 100644
index 0000000..d308831
--- /dev/null
+++ b/OpenSim/Framework/Capabilities/LLSDTaskScriptUploadComplete.cs
@@ -0,0 +1,54 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29using System;
30using System.Collections;
31
32namespace OpenSim.Framework.Capabilities
33{
34 [OSDMap]
35 public class LLSDTaskScriptUploadComplete
36 {
37 /// <summary>
38 /// The task inventory item that was updated
39 /// </summary>
40 public UUID new_asset;
41
42 /// <summary>
43 /// Was it compiled?
44 /// </summary>
45 public bool compiled;
46
47 /// <summary>
48 /// State of the upload. So far have only even seen this set to "complete"
49 /// </summary>
50 public string state;
51
52 public OSDArray errors;
53 }
54}
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 7305795..42e6510 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -171,6 +171,7 @@ namespace OpenSim.Framework.Communications.Cache
171 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); 171 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
172 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); 172 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
173 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); 173 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
174 item.Flags = (uint)config.GetInt("flags", 0);
174 175
175 if (libraryFolders.ContainsKey(item.Folder)) 176 if (libraryFolders.ContainsKey(item.Folder))
176 { 177 {
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 29a9e14..acae4b1 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -142,6 +142,7 @@ namespace OpenSim.Framework.Communications.Cache
142 142
143 if (userProfile != null) 143 if (userProfile != null)
144 { 144 {
145
145 if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) 146 if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
146 userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; 147 userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
147 if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) 148 if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)
@@ -177,6 +178,7 @@ namespace OpenSim.Framework.Communications.Cache
177 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); 178 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID);
178 if (userProfile != null) 179 if (userProfile != null)
179 { 180 {
181
180 if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) 182 if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
181 userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; 183 userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
182 if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) 184 if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)