From d76178f3024b709c7aa51ba6210402f67064aec0 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 21 Feb 2009 00:14:47 +0000 Subject: Thank you, robsmart, for a patch that allows the shard to be set. The built-in default is OpenSim, unless a user server url is given, then that is used, unless "shard" is also goven, then shard takes precedence. The defult in OpenSim.ini is "OpenSim" for compatibility. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 +++++++++- bin/OpenSim.ini.example | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7e4a5a0..3acb882 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8688,7 +8688,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Dictionary httpHeaders = new Dictionary(); - httpHeaders["X-SecondLife-Shard"] = "OpenSim"; + string shard = "OpenSim"; + IConfigSource config = new IniConfigSource(Application.iniFilePath); + if (config.Configs["Network"] != null) + { + shard = config.Configs["Network"].GetString("user_server_url", shard); + shard = config.Configs["Network"].GetString("shard", shard); + } + + httpHeaders["X-SecondLife-Shard"] = shard; httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; httpHeaders["X-SecondLife-Object-Key"] = m_itemID.ToString(); httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY); diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 582b3f9..d78dfc4 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -322,6 +322,10 @@ InterregionComms = "RESTComms" ; user_send_key and user_recv_key, too messaging_server_url = "http://127.0.0.1:8006" + ; What is reported as the "X-Secondlife-Shard" + ; Defaults to the user server url if not set + ; The old default is "OpenSim", set here fro compatibility + shard = "OpenSim" [ClientStack.LindenUDP] ; This is the multiplier applied to all client throttles for outgoing UDP network data -- cgit v1.1