diff options
author | Melanie Thielker | 2008-08-19 02:12:40 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-19 02:12:40 +0000 |
commit | 6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611 (patch) | |
tree | 349f4db157d3776b5f8491ba230f5400b27551a4 /OpenSim/Data | |
parent | * If two regions have configuration information that conflicts (save xy locat... (diff) | |
download | opensim-SC_OLD-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.zip opensim-SC_OLD-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.gz opensim-SC_OLD-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.bz2 opensim-SC_OLD-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.xz |
Attachment persistence!!! Patch #9169 (Mantis #1171)
Attachments now save to MySQL. No reattach on login yet.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 9f50c9f..b857aad 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -1208,7 +1208,10 @@ namespace OpenSim.Data.MySQL | |||
1208 | 1208 | ||
1209 | cmd.ExecuteNonQuery(); | 1209 | cmd.ExecuteNonQuery(); |
1210 | 1210 | ||
1211 | sql = "insert into avatarattachments (UUID, attachpoint, item, asset) values (?uuid, ?attchpoint, ?item, ?asset)"; | 1211 | if (data == null) |
1212 | return; | ||
1213 | |||
1214 | sql = "insert into avatarattachments (UUID, attachpoint, item, asset) values (?uuid, ?attachpoint, ?item, ?asset)"; | ||
1212 | 1215 | ||
1213 | cmd = (MySqlCommand) dbcon.CreateCommand(); | 1216 | cmd = (MySqlCommand) dbcon.CreateCommand(); |
1214 | cmd.CommandText = sql; | 1217 | cmd.CommandText = sql; |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 1ae5645..82ca5b1 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -834,14 +834,15 @@ namespace OpenSim.Data.MySQL | |||
834 | 834 | ||
835 | IDataReader r = cmd.ExecuteReader(); | 835 | IDataReader r = cmd.ExecuteReader(); |
836 | 836 | ||
837 | return database.readAttachments(r); | 837 | Hashtable ret = database.readAttachments(r); |
838 | |||
839 | r.Close(); | ||
840 | |||
841 | return ret; | ||
838 | } | 842 | } |
839 | 843 | ||
840 | public void UpdateUserAttachments(LLUUID agentID, Hashtable data) | 844 | public void UpdateUserAttachments(LLUUID agentID, Hashtable data) |
841 | { | 845 | { |
842 | if(data == null) | ||
843 | return; | ||
844 | |||
845 | database.writeAttachments(agentID, data); | 846 | database.writeAttachments(agentID, data); |
846 | } | 847 | } |
847 | } | 848 | } |