diff options
Diffstat (limited to 'OpenSim/Data/MySQL')
-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 | } |