From 9d8a67fe1348419c41374d1be77737bfa048106c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Aug 2010 16:26:27 +0100 Subject: get rid of PrimitiveBaseShape.MediaRaw staging post using an OSD serialization rather than auto forces serialization code to be placed in OpenSim.Framework this makes the media texture raw data staging post in PrimitiveBaseShape redundant, now we just directly call the code in PrimitiveBaseShape.MediaList itself --- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index f17e8ae..50fcd96 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -1701,8 +1701,8 @@ namespace OpenSim.Data.MySQL s.State = (byte)(int)row["State"]; - if (!(row["Media"] is System.DBNull)) - s.MediaRaw = (string)row["Media"]; + if (!(row["Media"] is System.DBNull)) + s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); return s; } @@ -1746,7 +1746,9 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("Texture", s.TextureEntry); cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); cmd.Parameters.AddWithValue("State", s.State); - cmd.Parameters.AddWithValue("Media", s.MediaRaw); + + if (s.Media != null) + cmd.Parameters.AddWithValue("Media", s.Media.ToXml()); } public void StorePrimInventory(UUID primID, ICollection items) -- cgit v1.1