aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-08 17:50:57 +0000
committerJustin Clarke Casey2009-04-08 17:50:57 +0000
commitf3c7298fc5bdb35e8a293c9aee4134c8e8fe2856 (patch)
treecdcef4e023e1adf8bb4a83e5ebe81448dbf33c6b /OpenSim/Data/MSSQL/MSSQLInventoryData.cs
parent* Fix the remainder of the packets that require sessionId checks. (diff)
downloadopensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.zip
opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.gz
opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.bz2
opensim-SC_OLD-f3c7298fc5bdb35e8a293c9aee4134c8e8fe2856.tar.xz
* Make it possible to store creator strings in user inventory items as well as UUIDs
* All existing functionality should be unaffected. * Database schemas have not been changed.
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLInventoryData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index fe8287d..6a4fbab 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
181 } 181 }
182 } 182 }
183 } 183 }
184 m_log.InfoFormat("[INVENTORY DB] : FOund no inventory folder with ID : {0}", folderID); 184 m_log.InfoFormat("[INVENTORY DB] : Found no inventory folder with ID : {0}", folderID);
185 return null; 185 return null;
186 } 186 }
187 187
@@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
244 } 244 }
245 catch (Exception e) 245 catch (Exception e)
246 { 246 {
247 m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); 247 m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
248 } 248 }
249 } 249 }
250 } 250 }
@@ -277,7 +277,7 @@ namespace OpenSim.Data.MSSQL
277 } 277 }
278 catch (Exception e) 278 catch (Exception e)
279 { 279 {
280 m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); 280 m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
281 } 281 }
282 } 282 }
283 } 283 }
@@ -300,7 +300,7 @@ namespace OpenSim.Data.MSSQL
300 } 300 }
301 catch (Exception e) 301 catch (Exception e)
302 { 302 {
303 m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message); 303 m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
304 } 304 }
305 } 305 }
306 } 306 }
@@ -385,7 +385,8 @@ namespace OpenSim.Data.MSSQL
385 } 385 }
386 } 386 }
387 } 387 }
388 m_log.InfoFormat("[INVENTORY DB] : Found no inventory item with ID : {0}", itemID); 388
389 m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID);
389 return null; 390 return null;
390 } 391 }
391 392
@@ -424,7 +425,7 @@ namespace OpenSim.Data.MSSQL
424 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); 425 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
425 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); 426 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
426 command.Parameters.Add(database.CreateParameter("invType", item.InvType)); 427 command.Parameters.Add(database.CreateParameter("invType", item.InvType));
427 command.Parameters.Add(database.CreateParameter("creatorID", item.Creator)); 428 command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorId));
428 command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); 429 command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
429 command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); 430 command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
430 command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions)); 431 command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions));
@@ -441,7 +442,7 @@ namespace OpenSim.Data.MSSQL
441 } 442 }
442 catch (Exception e) 443 catch (Exception e)
443 { 444 {
444 m_log.Error("[INVENTORY DB] Error inserting item :" + e.Message); 445 m_log.Error("[INVENTORY DB]: Error inserting item :" + e.Message);
445 } 446 }
446 } 447 }
447 448
@@ -498,7 +499,7 @@ namespace OpenSim.Data.MSSQL
498 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions)); 499 command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
499 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions)); 500 command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
500 command.Parameters.Add(database.CreateParameter("invType", item.InvType)); 501 command.Parameters.Add(database.CreateParameter("invType", item.InvType));
501 command.Parameters.Add(database.CreateParameter("creatorID", item.Creator)); 502 command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorIdAsUuid));
502 command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions)); 503 command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
503 command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions)); 504 command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
504 command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice)); 505 command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice));
@@ -515,7 +516,7 @@ namespace OpenSim.Data.MSSQL
515 } 516 }
516 catch (Exception e) 517 catch (Exception e)
517 { 518 {
518 m_log.Error("[INVENTORY DB] Error updating item :" + e.Message); 519 m_log.Error("[INVENTORY DB]: Error updating item :" + e.Message);
519 } 520 }
520 } 521 }
521 } 522 }
@@ -538,7 +539,7 @@ namespace OpenSim.Data.MSSQL
538 } 539 }
539 catch (Exception e) 540 catch (Exception e)
540 { 541 {
541 m_log.Error("[INVENTORY DB] Error deleting item :" + e.Message); 542 m_log.Error("[INVENTORY DB]: Error deleting item :" + e.Message);
542 } 543 }
543 } 544 }
544 } 545 }
@@ -725,7 +726,7 @@ namespace OpenSim.Data.MSSQL
725 item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]); 726 item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]);
726 item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]); 727 item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]);
727 item.InvType = Convert.ToInt32(reader["invType"].ToString()); 728 item.InvType = Convert.ToInt32(reader["invType"].ToString());
728 item.Creator = new UUID((Guid)reader["creatorID"]); 729 item.CreatorId = ((Guid)reader["creatorID"]).ToString();
729 item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); 730 item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
730 item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); 731 item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
731 item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]); 732 item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]);
@@ -740,7 +741,7 @@ namespace OpenSim.Data.MSSQL
740 } 741 }
741 catch (SqlException e) 742 catch (SqlException e)
742 { 743 {
743 m_log.Error("[INVENTORY DB] Error reading inventory item :" + e.Message); 744 m_log.Error("[INVENTORY DB]: Error reading inventory item :" + e.Message);
744 } 745 }
745 746
746 return null; 747 return null;
@@ -764,7 +765,7 @@ namespace OpenSim.Data.MSSQL
764 } 765 }
765 catch (SqlException e) 766 catch (SqlException e)
766 { 767 {
767 m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message); 768 m_log.Error("[INVENTORY DB]: Error deleting folder :" + e.Message);
768 } 769 }
769 } 770 }
770 771