diff options
author | Justin Clark-Casey (justincc) | 2010-07-13 19:28:07 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-13 19:28:07 +0100 |
commit | 1a1d42db8382c806cbb9c00f0c1c2250cab795e9 (patch) | |
tree | 9ad10e8419eaa0aa9b3c605c866eea448e262c2a /OpenSim | |
parent | Fire CHANGED_MEDIA event if a media texture is set or cleared (diff) | |
download | opensim-SC-1a1d42db8382c806cbb9c00f0c1c2250cab795e9.zip opensim-SC-1a1d42db8382c806cbb9c00f0c1c2250cab795e9.tar.gz opensim-SC-1a1d42db8382c806cbb9c00f0c1c2250cab795e9.tar.bz2 opensim-SC-1a1d42db8382c806cbb9c00f0c1c2250cab795e9.tar.xz |
discard an object media update message if it tries to set more media textures than the prim has faces
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 8bccab4..378ff4a 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -227,6 +227,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | // m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); | 227 | // m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); |
228 | // } | 228 | // } |
229 | 229 | ||
230 | if (omu.FaceMedia.Length > part.GetNumberOfSides()) | ||
231 | { | ||
232 | m_log.WarnFormat( | ||
233 | "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.", | ||
234 | omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides()); | ||
235 | return string.Empty; | ||
236 | } | ||
237 | |||
230 | part.Shape.Media = new List<MediaEntry>(omu.FaceMedia); | 238 | part.Shape.Media = new List<MediaEntry>(omu.FaceMedia); |
231 | 239 | ||
232 | UpdateMediaUrl(part); | 240 | UpdateMediaUrl(part); |