diff options
author | Homer Horwitz | 2008-09-24 21:12:21 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-09-24 21:12:21 +0000 |
commit | fe9aea258ff4142e718b4916ccefeeedef229768 (patch) | |
tree | f60c40697833392b35788fbc5cd97a5014bb29b7 /OpenSim/Data/MySQL/MySQLInventoryData.cs | |
parent | light the mysql region tests (diff) | |
download | opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.zip opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.gz opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.bz2 opensim-SC_OLD-fe9aea258ff4142e718b4916ccefeeedef229768.tar.xz |
Add persistence of active gestures. This needs an UGAIM update to work.
Active gestures are sent as part of the login-response. Added
fetchActiveGestures to SQLite and MySQL; added an empty one for MSSQL and
NHibernate. Using the empty ones won't cause errors, but doesn't provide
persistence either, of course.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 50d3cc7..68885e1 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -795,5 +795,41 @@ namespace OpenSim.Data.MySQL | |||
795 | deleteOneFolder(folderID); | 795 | deleteOneFolder(folderID); |
796 | deleteItemsInFolder(folderID); | 796 | deleteItemsInFolder(folderID); |
797 | } | 797 | } |
798 | |||
799 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) | ||
800 | { | ||
801 | MySqlDataReader result = null; | ||
802 | MySqlCommand sqlCmd = null; | ||
803 | lock (database) | ||
804 | { | ||
805 | try | ||
806 | { | ||
807 | database.CheckConnection(); | ||
808 | sqlCmd = new MySqlCommand( | ||
809 | "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", | ||
810 | database.Connection); | ||
811 | sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString()); | ||
812 | sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); | ||
813 | result = sqlCmd.ExecuteReader(); | ||
814 | |||
815 | List<InventoryItemBase> list = new List<InventoryItemBase>(); | ||
816 | while (result.Read()) | ||
817 | list.Add(readInventoryItem(result)); | ||
818 | |||
819 | return list; | ||
820 | } | ||
821 | catch (Exception e) | ||
822 | { | ||
823 | database.Reconnect(); | ||
824 | m_log.Error(e.ToString()); | ||
825 | return null; | ||
826 | } | ||
827 | finally | ||
828 | { | ||
829 | if(result != null) result.Close(); | ||
830 | if(sqlCmd != null) sqlCmd.Dispose(); | ||
831 | } | ||
832 | } | ||
833 | } | ||
798 | } | 834 | } |
799 | } | 835 | } |