From 947d730b56d901478f81fa396fca9373f1415eae Mon Sep 17 00:00:00 2001 From: Marck Date: Sat, 27 Nov 2010 09:18:39 +0100 Subject: [PATCH 1/3] Make gatekeeper's address check case-insensitive. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 3f5c4f1400..0aa53527c7 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -333,7 +333,8 @@ namespace OpenSim.Services.HypergridService string addressee = parts[0]; m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName); - return (addressee == m_ExternalName); + + return string.Equals(addressee, m_ExternalName, StringComparison.OrdinalIgnoreCase); } #endregion From d71d4f96e32a674c86eb4b20af7c10d382443ce4 Mon Sep 17 00:00:00 2001 From: Marck Date: Sat, 27 Nov 2010 10:59:14 +0100 Subject: [PATCH 2/3] Amend GetLinkPrimitiveParams with implementations for PRIM_TEXGEN, PRIM_BUMP_SHINY, PRIM_FULLBRIGHT, and PRIM_GLOW --- .../Shared/Api/Implementation/LSL_Api.cs | 86 ++++++++++++++++--- 1 file changed, 76 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d06b134985..3c5f2d03c8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7759,24 +7759,59 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_BUMP_SHINY: - // TODO-------------- if (remain < 1) return res; face=(int)rules.GetLSLIntegerItem(idx++); - res.Add(new LSL_Integer(0)); - res.Add(new LSL_Integer(0)); + tex = part.Shape.Textures; + if (face == ScriptBaseClass.ALL_SIDES) + { + for (face = 0; face < GetNumberOfSides(part); face++) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + // Convert Shininess to PRIM_SHINY_* + res.Add(new LSL_Integer((uint)texface.Shiny >> 6)); + // PRIM_BUMP_* + res.Add(new LSL_Integer((int)texface.Bump)); + } + } + else + { + if (face >= 0 && face < GetNumberOfSides(part)) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + // Convert Shininess to PRIM_SHINY_* + res.Add(new LSL_Integer((uint)texface.Shiny >> 6)); + // PRIM_BUMP_* + res.Add(new LSL_Integer((int)texface.Bump)); + } + } break; case (int)ScriptBaseClass.PRIM_FULLBRIGHT: - // TODO-------------- if (remain < 1) return res; face=(int)rules.GetLSLIntegerItem(idx++); - res.Add(new LSL_Integer(0)); + tex = part.Shape.Textures; + if (face == ScriptBaseClass.ALL_SIDES) + { + for (face = 0; face < GetNumberOfSides(part); face++) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + res.Add(new LSL_Integer(texface.Fullbright ? 1 : 0)); + } + } + else + { + if (face >= 0 && face < GetNumberOfSides(part)) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + res.Add(new LSL_Integer(texface.Fullbright ? 1 : 0)); + } + } break; case (int)ScriptBaseClass.PRIM_FLEXIBLE: @@ -7797,14 +7832,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_TEXGEN: - // TODO-------------- - // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) if (remain < 1) return res; face=(int)rules.GetLSLIntegerItem(idx++); - res.Add(new LSL_Integer(0)); + tex = part.Shape.Textures; + if (face == ScriptBaseClass.ALL_SIDES) + { + for (face = 0; face < GetNumberOfSides(part); face++) + { + MappingType texgen = tex.GetFace((uint)face).TexMapType; + // Convert MappingType to PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR etc. + res.Add(new LSL_Integer((uint)texgen >> 1)); + } + } + else + { + if (face >= 0 && face < GetNumberOfSides(part)) + { + MappingType texgen = tex.GetFace((uint)face).TexMapType; + res.Add(new LSL_Integer((uint)texgen >> 1)); + } + } break; case (int)ScriptBaseClass.PRIM_POINT_LIGHT: @@ -7823,14 +7873,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_GLOW: - // TODO-------------- if (remain < 1) return res; face=(int)rules.GetLSLIntegerItem(idx++); - res.Add(new LSL_Float(0)); + tex = part.Shape.Textures; + if (face == ScriptBaseClass.ALL_SIDES) + { + for (face = 0; face < GetNumberOfSides(part); face++) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + res.Add(new LSL_Float(texface.Glow)); + } + } + else + { + if (face >= 0 && face < GetNumberOfSides(part)) + { + Primitive.TextureEntryFace texface = tex.GetFace((uint)face); + res.Add(new LSL_Float(texface.Glow)); + } + } break; + case (int)ScriptBaseClass.PRIM_TEXT: Color4 textColor = part.GetTextColor(); res.Add(part.Text); From 5aeb83125a9485eb0ab38c65a939964973b7962b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Nov 2010 23:30:55 +0000 Subject: [PATCH 3/3] Remove the most spammy XML dumps from the FS voice module --- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index a583ccaae5..0b51bf0b43 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -132,7 +132,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice m_FreeswitchService = ServerUtils.LoadPlugin(serviceDll, args); string jsonConfig = m_FreeswitchService.GetJsonConfig(); - m_log.Debug("[FreeSwitchVoice]: Configuration string: " + jsonConfig); + //m_log.Debug("[FreeSwitchVoice]: Configuration string: " + jsonConfig); OSDMap map = (OSDMap)OSDParser.DeserializeJson(jsonConfig); m_freeSwitchAPIPrefix = map["APIPrefix"].AsString(); @@ -363,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice try { - m_log.DebugFormat("[FreeSwitchVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", + //m_log.DebugFormat("[FreeSwitchVoice][PROVISIONVOICE]: request: {0}, path: {1}, param: {2}", request, path, param); //XmlElement resp; @@ -445,7 +445,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // voice channel LandData land = scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", + //m_log.DebugFormat("[FreeSwitchVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": request: {4}, path: {5}, param: {6}", scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, request, path, param); // TODO: EstateSettings don't seem to get propagated... @@ -592,7 +592,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["int_response_code"] = 200; - m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler return {0}",response["str_response_string"]); + //m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchSLVoiceGetPreloginHTTPHandler return {0}",response["str_response_string"]); return response; } @@ -664,7 +664,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["str_response_string"] = resp.ToString(); Regex normalizeEndLines = new Regex(@"\r\n", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); - m_log.DebugFormat("[FREESWITCH]: {0}", normalizeEndLines.Replace((string)response["str_response_string"],"")); + //m_log.DebugFormat("[FREESWITCH]: {0}", normalizeEndLines.Replace((string)response["str_response_string"],"")); return response; } @@ -696,7 +696,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice } } - m_log.DebugFormat("[FreeSwitchVoice]: AUTH, URI: {0}, Content-Type:{1}, Body{2}", uri, contenttype, + //m_log.DebugFormat("[FreeSwitchVoice]: AUTH, URI: {0}, Content-Type:{1}, Body{2}", uri, contenttype, requestbody); Hashtable response = new Hashtable(); response["str_response_string"] = string.Format(@"