discard an object media update message if it tries to set more media textures than the prim has faces

prebuild-update
Justin Clark-Casey (justincc) 2010-07-13 19:28:07 +01:00
parent eb5e39d6ef
commit e5615d3a9b
1 changed files with 8 additions and 0 deletions

View File

@ -227,6 +227,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap
// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); // m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v);
// } // }
if (omu.FaceMedia.Length > part.GetNumberOfSides())
{
m_log.WarnFormat(
"[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.",
omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides());
return string.Empty;
}
part.Shape.Media = new List<MediaEntry>(omu.FaceMedia); part.Shape.Media = new List<MediaEntry>(omu.FaceMedia);
UpdateMediaUrl(part); UpdateMediaUrl(part);