aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/IXInventoryData.cs17
-rw-r--r--OpenSim/Data/MSSQL/MSSQLXInventoryData.cs128
-rw-r--r--OpenSim/Data/MySQL/MySQLXInventoryData.cs94
-rw-r--r--OpenSim/Data/SQLite/SQLiteXInventoryData.cs30
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionModule.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs30
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs2
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs23
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs11
-rw-r--r--OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs1
13 files changed, 299 insertions, 61 deletions
diff --git a/OpenSim/Data/IXInventoryData.cs b/OpenSim/Data/IXInventoryData.cs
index e64a828..ca47506 100644
--- a/OpenSim/Data/IXInventoryData.cs
+++ b/OpenSim/Data/IXInventoryData.cs
@@ -116,7 +116,22 @@ namespace OpenSim.Data
116 /// <returns>true if the delete was successful, false if it was not</returns> 116 /// <returns>true if the delete was successful, false if it was not</returns>
117 bool DeleteItems(string[] fields, string[] vals); 117 bool DeleteItems(string[] fields, string[] vals);
118 118
119 bool MoveItem(string id, string newParent); 119 /// <summary>
120 /// Move an item to another folder.
121 /// </summary>
122 /// <returns>/returns>
123 /// <param name='id'>UUID of the item</param>
124 /// <param name='newParent'>UUID of the new parent folder.</param>
125 bool MoveItem(string id, string newParentFolderID);
126
127 /// <summary>
128 /// Move a folder to another folder.
129 /// </summary>
130 /// <returns>/returns>
131 /// <param name='id'>UUID of the item</param>
132 /// <param name='newParent'>UUID of the new parent folder.</param>
133 bool MoveFolder(string id, string newParentFolderID);
134
120 XInventoryItem[] GetActiveGestures(UUID principalID); 135 XInventoryItem[] GetActiveGestures(UUID principalID);
121 int GetAssetPermissions(UUID principalID, UUID assetID); 136 int GetAssetPermissions(UUID principalID, UUID assetID);
122 } 137 }
diff --git a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
index a1069c6..1bc6e3c 100644
--- a/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLXInventoryData.cs
@@ -43,12 +43,12 @@ namespace OpenSim.Data.MSSQL
43 private static readonly ILog m_log = LogManager.GetLogger( 43 private static readonly ILog m_log = LogManager.GetLogger(
44 MethodBase.GetCurrentMethod().DeclaringType); 44 MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private MSSQLGenericTableHandler<XInventoryFolder> m_Folders; 46 private MSSQLFolderHandler m_Folders;
47 private MSSQLItemHandler m_Items; 47 private MSSQLItemHandler m_Items;
48 48
49 public MSSQLXInventoryData(string conn, string realm) 49 public MSSQLXInventoryData(string conn, string realm)
50 { 50 {
51 m_Folders = new MSSQLGenericTableHandler<XInventoryFolder>( 51 m_Folders = new MSSQLFolderHandler(
52 conn, "inventoryfolders", "InventoryStore"); 52 conn, "inventoryfolders", "InventoryStore");
53 m_Items = new MSSQLItemHandler( 53 m_Items = new MSSQLItemHandler(
54 conn, "inventoryitems", String.Empty); 54 conn, "inventoryitems", String.Empty);
@@ -85,6 +85,7 @@ namespace OpenSim.Data.MSSQL
85 { 85 {
86 return m_Folders.Delete(field, val); 86 return m_Folders.Delete(field, val);
87 } 87 }
88
88 public bool DeleteFolders(string[] fields, string[] vals) 89 public bool DeleteFolders(string[] fields, string[] vals)
89 { 90 {
90 return m_Folders.Delete(fields, vals); 91 return m_Folders.Delete(fields, vals);
@@ -94,15 +95,22 @@ namespace OpenSim.Data.MSSQL
94 { 95 {
95 return m_Items.Delete(field, val); 96 return m_Items.Delete(field, val);
96 } 97 }
98
97 public bool DeleteItems(string[] fields, string[] vals) 99 public bool DeleteItems(string[] fields, string[] vals)
98 { 100 {
99 return m_Items.Delete(fields, vals); 101 return m_Items.Delete(fields, vals);
100 } 102 }
103
101 public bool MoveItem(string id, string newParent) 104 public bool MoveItem(string id, string newParent)
102 { 105 {
103 return m_Items.MoveItem(id, newParent); 106 return m_Items.MoveItem(id, newParent);
104 } 107 }
105 108
109 public bool MoveFolder(string id, string newParent)
110 {
111 return m_Folders.MoveFolder(id, newParent);
112 }
113
106 public XInventoryItem[] GetActiveGestures(UUID principalID) 114 public XInventoryItem[] GetActiveGestures(UUID principalID)
107 { 115 {
108 return m_Items.GetActiveGestures(principalID); 116 return m_Items.GetActiveGestures(principalID);
@@ -124,79 +132,115 @@ namespace OpenSim.Data.MSSQL
124 public bool MoveItem(string id, string newParent) 132 public bool MoveItem(string id, string newParent)
125 { 133 {
126 using (SqlConnection conn = new SqlConnection(m_ConnectionString)) 134 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
127 using (SqlCommand cmd = new SqlCommand())
128 { 135 {
136 using (SqlCommand cmd = new SqlCommand())
137 {
129 138
130 cmd.CommandText = String.Format("update {0} set parentFolderID = @ParentFolderID where inventoryID = @InventoryID", m_Realm); 139 cmd.CommandText = String.Format("update {0} set parentFolderID = @ParentFolderID where inventoryID = @InventoryID", m_Realm);
131 cmd.Parameters.Add(m_database.CreateParameter("@ParentFolderID", newParent)); 140 cmd.Parameters.Add(m_database.CreateParameter("@ParentFolderID", newParent));
132 cmd.Parameters.Add(m_database.CreateParameter("@InventoryID", id)); 141 cmd.Parameters.Add(m_database.CreateParameter("@InventoryID", id));
133 cmd.Connection = conn; 142 cmd.Connection = conn;
134 conn.Open(); 143 conn.Open();
135 return cmd.ExecuteNonQuery() == 0 ? false : true; 144 return cmd.ExecuteNonQuery() == 0 ? false : true;
145 }
136 } 146 }
137 } 147 }
138 148
139 public XInventoryItem[] GetActiveGestures(UUID principalID) 149 public XInventoryItem[] GetActiveGestures(UUID principalID)
140 { 150 {
141 using (SqlConnection conn = new SqlConnection(m_ConnectionString)) 151 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
142 using (SqlCommand cmd = new SqlCommand())
143 { 152 {
144 cmd.CommandText = String.Format("select * from inventoryitems where avatarId = @uuid and assetType = @type and flags = 1", m_Realm); 153 using (SqlCommand cmd = new SqlCommand())
154 {
155 cmd.CommandText = String.Format("select * from inventoryitems where avatarId = @uuid and assetType = @type and flags = 1", m_Realm);
145 156
146 cmd.Parameters.Add(m_database.CreateParameter("@uuid", principalID.ToString())); 157 cmd.Parameters.Add(m_database.CreateParameter("@uuid", principalID.ToString()));
147 cmd.Parameters.Add(m_database.CreateParameter("@type", (int)AssetType.Gesture)); 158 cmd.Parameters.Add(m_database.CreateParameter("@type", (int)AssetType.Gesture));
148 cmd.Connection = conn; 159 cmd.Connection = conn;
149 conn.Open(); 160 conn.Open();
150 return DoQuery(cmd); 161 return DoQuery(cmd);
162 }
151 } 163 }
152 } 164 }
153 165
154 public int GetAssetPermissions(UUID principalID, UUID assetID) 166 public int GetAssetPermissions(UUID principalID, UUID assetID)
155 { 167 {
156 using (SqlConnection conn = new SqlConnection(m_ConnectionString)) 168 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
157 using (SqlCommand cmd = new SqlCommand())
158 { 169 {
159 cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = @PrincipalID and assetID = @AssetID group by assetID", m_Realm); 170 using (SqlCommand cmd = new SqlCommand())
160 cmd.Parameters.Add(m_database.CreateParameter("@PrincipalID", principalID.ToString()));
161 cmd.Parameters.Add(m_database.CreateParameter("@AssetID", assetID.ToString()));
162 cmd.Connection = conn;
163 conn.Open();
164 using (SqlDataReader reader = cmd.ExecuteReader())
165 { 171 {
172 cmd.CommandText = String.Format("select bit_or(inventoryCurrentPermissions) as inventoryCurrentPermissions from inventoryitems where avatarID = @PrincipalID and assetID = @AssetID group by assetID", m_Realm);
173 cmd.Parameters.Add(m_database.CreateParameter("@PrincipalID", principalID.ToString()));
174 cmd.Parameters.Add(m_database.CreateParameter("@AssetID", assetID.ToString()));
175 cmd.Connection = conn;
176 conn.Open();
177 using (SqlDataReader reader = cmd.ExecuteReader())
178 {
166 179
167 int perms = 0; 180 int perms = 0;
168 181
169 if (reader.Read()) 182 if (reader.Read())
170 { 183 {
171 perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]); 184 perms = Convert.ToInt32(reader["inventoryCurrentPermissions"]);
185 }
186
187 return perms;
172 } 188 }
173 189
174 return perms;
175 } 190 }
176
177 } 191 }
178 } 192 }
193
179 public override bool Store(XInventoryItem item) 194 public override bool Store(XInventoryItem item)
180 { 195 {
181 if (!base.Store(item)) 196 if (!base.Store(item))
182 return false; 197 return false;
198
183 string sql = "update inventoryfolders set version=version+1 where folderID = @folderID"; 199 string sql = "update inventoryfolders set version=version+1 where folderID = @folderID";
184 using (SqlConnection conn = new SqlConnection(m_ConnectionString)) 200 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
185 using (SqlCommand cmd = new SqlCommand(sql, conn))
186 { 201 {
187 conn.Open(); 202 using (SqlCommand cmd = new SqlCommand(sql, conn))
203 {
204 conn.Open();
205
206 cmd.Parameters.AddWithValue("@folderID", item.parentFolderID.ToString());
207 try
208 {
209 cmd.ExecuteNonQuery();
210 }
211 catch (Exception)
212 {
213 return false;
214 }
215 }
216
217 return true;
218 }
219 }
220 }
221
222 public class MSSQLFolderHandler : MSSQLGenericTableHandler<XInventoryFolder>
223 {
224 public MSSQLFolderHandler(string c, string t, string m) :
225 base(c, t, m)
226 {
227 }
228
229 public bool MoveFolder(string id, string newParentFolderID)
230 {
231 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
232 {
233 using (SqlCommand cmd = new SqlCommand())
234 {
188 235
189 cmd.Parameters.AddWithValue("@folderID", item.parentFolderID.ToString()); 236 cmd.CommandText = String.Format("update {0} set parentFolderID = @ParentFolderID where folderID = @folderID", m_Realm);
190 try 237 cmd.Parameters.Add(m_database.CreateParameter("@ParentFolderID", newParentFolderID));
191 { 238 cmd.Parameters.Add(m_database.CreateParameter("@folderID", id));
192 cmd.ExecuteNonQuery(); 239 cmd.Connection = conn;
193 } 240 conn.Open();
194 catch (Exception) 241 return cmd.ExecuteNonQuery() == 0 ? false : true;
195 { 242 }
196 return false;
197 }
198 } 243 }
199 return true;
200 } 244 }
201 } 245 }
202} 246} \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
index cccc500..7a3b5b4 100644
--- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
@@ -42,12 +42,12 @@ namespace OpenSim.Data.MySQL
42 /// </summary> 42 /// </summary>
43 public class MySQLXInventoryData : IXInventoryData 43 public class MySQLXInventoryData : IXInventoryData
44 { 44 {
45 private MySQLGenericTableHandler<XInventoryFolder> m_Folders; 45 private MySqlFolderHandler m_Folders;
46 private MySqlItemHandler m_Items; 46 private MySqlItemHandler m_Items;
47 47
48 public MySQLXInventoryData(string conn, string realm) 48 public MySQLXInventoryData(string conn, string realm)
49 { 49 {
50 m_Folders = new MySQLGenericTableHandler<XInventoryFolder>( 50 m_Folders = new MySqlFolderHandler(
51 conn, "inventoryfolders", "InventoryStore"); 51 conn, "inventoryfolders", "InventoryStore");
52 m_Items = new MySqlItemHandler( 52 m_Items = new MySqlItemHandler(
53 conn, "inventoryitems", String.Empty); 53 conn, "inventoryitems", String.Empty);
@@ -106,6 +106,11 @@ namespace OpenSim.Data.MySQL
106 return m_Items.MoveItem(id, newParent); 106 return m_Items.MoveItem(id, newParent);
107 } 107 }
108 108
109 public bool MoveFolder(string id, string newParent)
110 {
111 return m_Folders.MoveFolder(id, newParent);
112 }
113
109 public XInventoryItem[] GetActiveGestures(UUID principalID) 114 public XInventoryItem[] GetActiveGestures(UUID principalID)
110 { 115 {
111 return m_Items.GetActiveGestures(principalID); 116 return m_Items.GetActiveGestures(principalID);
@@ -275,4 +280,89 @@ namespace OpenSim.Data.MySQL
275 return true; 280 return true;
276 } 281 }
277 } 282 }
283
284 public class MySqlFolderHandler : MySQLGenericTableHandler<XInventoryFolder>
285 {
286// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
287
288 public MySqlFolderHandler(string c, string t, string m) :
289 base(c, t, m)
290 {
291 }
292
293 public bool MoveFolder(string id, string newParentFolderID)
294 {
295 XInventoryFolder[] folders = Get(new string[] { "folderID" }, new string[] { id });
296
297 if (folders.Length == 0)
298 return false;
299
300 UUID oldParentFolderUUID = folders[0].parentFolderID;
301
302 using (MySqlCommand cmd = new MySqlCommand())
303 {
304 cmd.CommandText
305 = String.Format(
306 "update {0} set parentFolderID = ?ParentFolderID where folderID = ?folderID", m_Realm);
307 cmd.Parameters.AddWithValue("?ParentFolderID", newParentFolderID);
308 cmd.Parameters.AddWithValue("?folderID", id);
309
310 if (ExecuteNonQuery(cmd) == 0)
311 return false;
312 }
313
314 IncrementFolderVersion(oldParentFolderUUID);
315 IncrementFolderVersion(newParentFolderID);
316
317 return true;
318 }
319
320 public override bool Store(XInventoryFolder folder)
321 {
322 if (!base.Store(folder))
323 return false;
324
325 IncrementFolderVersion(folder.parentFolderID);
326
327 return true;
328 }
329
330 private bool IncrementFolderVersion(UUID folderID)
331 {
332 return IncrementFolderVersion(folderID.ToString());
333 }
334
335 private bool IncrementFolderVersion(string folderID)
336 {
337// m_log.DebugFormat("[MYSQL FOLDER HANDLER]: Incrementing version on folder {0}", folderID);
338// Util.PrintCallStack();
339
340 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
341 {
342 dbcon.Open();
343
344 using (MySqlCommand cmd = new MySqlCommand())
345 {
346 cmd.Connection = dbcon;
347
348 cmd.CommandText = String.Format("update inventoryfolders set version=version+1 where folderID = ?folderID");
349 cmd.Parameters.AddWithValue("?folderID", folderID);
350
351 try
352 {
353 cmd.ExecuteNonQuery();
354 }
355 catch (Exception)
356 {
357 return false;
358 }
359 cmd.Dispose();
360 }
361
362 dbcon.Close();
363 }
364
365 return true;
366 }
367 }
278} \ No newline at end of file 368} \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index 1f36986..75f8c87 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Data.SQLite
47 { 47 {
48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 private SQLiteGenericTableHandler<XInventoryFolder> m_Folders; 50 private SqliteFolderHandler m_Folders;
51 private SqliteItemHandler m_Items; 51 private SqliteItemHandler m_Items;
52 52
53 public SQLiteXInventoryData(string conn, string realm) 53 public SQLiteXInventoryData(string conn, string realm)
@@ -55,7 +55,7 @@ namespace OpenSim.Data.SQLite
55 if (Util.IsWindows()) 55 if (Util.IsWindows())
56 Util.LoadArchSpecificWindowsDll("sqlite3.dll"); 56 Util.LoadArchSpecificWindowsDll("sqlite3.dll");
57 57
58 m_Folders = new SQLiteGenericTableHandler<XInventoryFolder>( 58 m_Folders = new SqliteFolderHandler(
59 conn, "inventoryfolders", "XInventoryStore"); 59 conn, "inventoryfolders", "XInventoryStore");
60 m_Items = new SqliteItemHandler( 60 m_Items = new SqliteItemHandler(
61 conn, "inventoryitems", String.Empty); 61 conn, "inventoryitems", String.Empty);
@@ -114,6 +114,11 @@ namespace OpenSim.Data.SQLite
114 return m_Items.MoveItem(id, newParent); 114 return m_Items.MoveItem(id, newParent);
115 } 115 }
116 116
117 public bool MoveFolder(string id, string newParent)
118 {
119 return m_Folders.MoveFolder(id, newParent);
120 }
121
117 public XInventoryItem[] GetActiveGestures(UUID principalID) 122 public XInventoryItem[] GetActiveGestures(UUID principalID)
118 { 123 {
119 return m_Items.GetActiveGestures(principalID); 124 return m_Items.GetActiveGestures(principalID);
@@ -177,4 +182,23 @@ namespace OpenSim.Data.SQLite
177 return perms; 182 return perms;
178 } 183 }
179 } 184 }
180} 185
186 public class SqliteFolderHandler : SQLiteGenericTableHandler<XInventoryFolder>
187 {
188 public SqliteFolderHandler(string c, string t, string m) :
189 base(c, t, m)
190 {
191 }
192
193 public bool MoveFolder(string id, string newParentFolderID)
194 {
195 SqliteCommand cmd = new SqliteCommand();
196
197 cmd.CommandText = String.Format("update {0} set parentFolderID = :ParentFolderID where folderID = :FolderID", m_Realm);
198 cmd.Parameters.Add(new SqliteParameter(":ParentFolderID", newParentFolderID));
199 cmd.Parameters.Add(new SqliteParameter(":FolderID", id));
200
201 return ExecuteNonQuery(cmd, m_Connection) == 0 ? false : true;
202 }
203 }
204} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs
index 2bb0c75..aacc26b 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs
@@ -24,6 +24,7 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 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. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27using System;
27 28
28using Nini.Config; 29using Nini.Config;
29using OpenSim.Region.Framework.Scenes; 30using OpenSim.Region.Framework.Scenes;
@@ -33,6 +34,7 @@ namespace OpenSim.Region.Framework.Interfaces
33 /// <summary> 34 /// <summary>
34 /// DEPRECATED! Use INonSharedRegionModule or ISharedRegionModule instead 35 /// DEPRECATED! Use INonSharedRegionModule or ISharedRegionModule instead
35 /// </summary> 36 /// </summary>
37 [Obsolete("Use INonSharedRegionModule or ISharedRegionModule instead", false)]
36 public interface IRegionModule 38 public interface IRegionModule
37 { 39 {
38 /// <summary> 40 /// <summary>
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index c736557..319f6ab 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -661,6 +661,20 @@ namespace OpenSim.Region.Physics.OdePlugin
661 set { return; } 661 set { return; }
662 } 662 }
663 663
664 public override Vector3 TargetVelocity
665 {
666 get
667 {
668 return m_taintTargetVelocity;
669 }
670
671 set
672 {
673 Velocity = value;
674 }
675 }
676
677
664 public override Vector3 Velocity 678 public override Vector3 Velocity
665 { 679 {
666 get 680 get
@@ -1394,4 +1408,4 @@ namespace OpenSim.Region.Physics.OdePlugin
1394 m_eventsubscription += p; 1408 m_eventsubscription += p;
1395 } 1409 }
1396 } 1410 }
1397} \ No newline at end of file 1411}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 3bbdbe8..700f538 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7105,6 +7105,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7105 m_host.SetCameraAtOffset(offset); 7105 m_host.SetCameraAtOffset(offset);
7106 } 7106 }
7107 7107
7108 public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
7109 {
7110 m_host.AddScriptLPS(1);
7111
7112 if (link == ScriptBaseClass.LINK_SET ||
7113 link == ScriptBaseClass.LINK_ALL_CHILDREN ||
7114 link == ScriptBaseClass.LINK_ALL_OTHERS) return;
7115
7116 SceneObjectPart part = null;
7117
7118 switch (link)
7119 {
7120 case ScriptBaseClass.LINK_ROOT:
7121 part = m_host.ParentGroup.RootPart;
7122 break;
7123 case ScriptBaseClass.LINK_THIS:
7124 part = m_host;
7125 break;
7126 default:
7127 part = m_host.ParentGroup.GetLinkNumPart(link);
7128 break;
7129 }
7130
7131 if (null != part)
7132 {
7133 part.SetCameraEyeOffset(eye);
7134 part.SetCameraAtOffset(at);
7135 }
7136 }
7137
7108 public LSL_String llDumpList2String(LSL_List src, string seperator) 7138 public LSL_String llDumpList2String(LSL_List src, string seperator)
7109 { 7139 {
7110 m_host.AddScriptLPS(1); 7140 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 05c20f9..9bf6f9b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -336,6 +336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
336 void llSetBuoyancy(double buoyancy); 336 void llSetBuoyancy(double buoyancy);
337 void llSetCameraAtOffset(LSL_Vector offset); 337 void llSetCameraAtOffset(LSL_Vector offset);
338 void llSetCameraEyeOffset(LSL_Vector offset); 338 void llSetCameraEyeOffset(LSL_Vector offset);
339 void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at);
339 void llSetCameraParams(LSL_List rules); 340 void llSetCameraParams(LSL_List rules);
340 void llSetClickAction(int action); 341 void llSetClickAction(int action);
341 void llSetColor(LSL_Vector color, int face); 342 void llSetColor(LSL_Vector color, int face);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 89b6eff..8ecc4f8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1515,6 +1515,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1515 m_LSL_Functions.llSetCameraEyeOffset(offset); 1515 m_LSL_Functions.llSetCameraEyeOffset(offset);
1516 } 1516 }
1517 1517
1518 public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
1519 {
1520 m_LSL_Functions.llSetLinkCamera(link, eye, at);
1521 }
1522
1518 public void llSetCameraParams(LSL_List rules) 1523 public void llSetCameraParams(LSL_List rules)
1519 { 1524 {
1520 m_LSL_Functions.llSetCameraParams(rules); 1525 m_LSL_Functions.llSetCameraParams(rules);
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 4cd933c..d840527 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -321,7 +321,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
321 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 321 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
322 args["teleport_flags"] = OSD.FromString(flags.ToString()); 322 args["teleport_flags"] = OSD.FromString(flags.ToString());
323 323
324 OSDMap result = WebUtil.PostToService(uri, args, 20000); 324 OSDMap result = WebUtil.PostToService(uri, args, 80000);
325 if (result["Success"].AsBoolean()) 325 if (result["Success"].AsBoolean())
326 { 326 {
327 OSDMap unpacked = (OSDMap)result["_Result"]; 327 OSDMap unpacked = (OSDMap)result["_Result"];
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 004311f..7b84d55 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -68,6 +68,7 @@ namespace OpenSim.Services.HypergridService
68 private static UUID m_ScopeID; 68 private static UUID m_ScopeID;
69 private static bool m_AllowTeleportsToAnyRegion; 69 private static bool m_AllowTeleportsToAnyRegion;
70 private static string m_ExternalName; 70 private static string m_ExternalName;
71 private static Uri m_Uri;
71 private static GridRegion m_DefaultGatewayRegion; 72 private static GridRegion m_DefaultGatewayRegion;
72 73
73 public GatekeeperService(IConfigSource config, ISimulationService simService) 74 public GatekeeperService(IConfigSource config, ISimulationService simService)
@@ -99,6 +100,15 @@ namespace OpenSim.Services.HypergridService
99 if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/")) 100 if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
100 m_ExternalName = m_ExternalName + "/"; 101 m_ExternalName = m_ExternalName + "/";
101 102
103 try
104 {
105 m_Uri = new Uri(m_ExternalName);
106 }
107 catch
108 {
109 m_log.WarnFormat("[GATEKEEPER SERVICE]: Malformed gatekeeper address {0}", m_ExternalName);
110 }
111
102 Object[] args = new Object[] { config }; 112 Object[] args = new Object[] { config };
103 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 113 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
104 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); 114 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
@@ -433,7 +443,18 @@ namespace OpenSim.Services.HypergridService
433 string externalname = m_ExternalName.TrimEnd(trailing_slash); 443 string externalname = m_ExternalName.TrimEnd(trailing_slash);
434 m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname); 444 m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
435 445
436 return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase); 446 Uri uri;
447 try
448 {
449 uri = new Uri(addressee);
450 }
451 catch
452 {
453 m_log.DebugFormat("[GATEKEEPER SERVICE]: Visitor provided malformed service address {0}", addressee);
454 return false;
455 }
456
457 return string.Equals(uri.GetLeftPart(UriPartial.Authority), m_Uri.GetLeftPart(UriPartial.Authority), StringComparison.OrdinalIgnoreCase) ;
437 } 458 }
438 459
439 #endregion 460 #endregion
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 309dab4..9abc5e4 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -400,16 +400,7 @@ namespace OpenSim.Services.InventoryService
400 400
401 public virtual bool MoveFolder(InventoryFolderBase folder) 401 public virtual bool MoveFolder(InventoryFolderBase folder)
402 { 402 {
403 XInventoryFolder[] x = m_Database.GetFolders( 403 return m_Database.MoveFolder(folder.ID.ToString(), folder.ParentID.ToString());
404 new string[] { "folderID" },
405 new string[] { folder.ID.ToString() });
406
407 if (x.Length == 0)
408 return false;
409
410 x[0].parentFolderID = folder.ParentID;
411
412 return m_Database.StoreFolder(x[0]);
413 } 404 }
414 405
415 // We don't check the principal's ID here 406 // We don't check the principal's ID here
diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
index bca5979..f9bf768 100644
--- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
@@ -125,6 +125,7 @@ namespace OpenSim.Tests.Common.Mock
125 } 125 }
126 126
127 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); } 127 public bool MoveItem(string id, string newParent) { throw new NotImplementedException(); }
128 public bool MoveFolder(string id, string newParent) { throw new NotImplementedException(); }
128 public XInventoryItem[] GetActiveGestures(UUID principalID) { throw new NotImplementedException(); } 129 public XInventoryItem[] GetActiveGestures(UUID principalID) { throw new NotImplementedException(); }
129 public int GetAssetPermissions(UUID principalID, UUID assetID) { throw new NotImplementedException(); } 130 public int GetAssetPermissions(UUID principalID, UUID assetID) { throw new NotImplementedException(); }
130 } 131 }