From 10f7e534c931a7cdfa9bbc6995700310aadf07b2 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 26 Jan 2009 21:34:44 +0000 Subject: + adding URI substitution for concierges broker URI --- .../Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs | 6 ++++-- bin/OpenSim.ini.example | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs index 297913e..2d1f381 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs @@ -357,6 +357,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge if (String.IsNullOrEmpty(_brokerURI)) return; + string uri = String.Format(_brokerURI, scene.RegionInfo.RegionName, scene.RegionInfo.RegionID); + // get attendee list for the scene List attendees; lock (_sceneAttendees) @@ -394,7 +396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge string payload = list.ToString(); // post via REST to broker - HttpWebRequest updatePost = WebRequest.Create(_brokerURI) as HttpWebRequest; + HttpWebRequest updatePost = WebRequest.Create(uri) as HttpWebRequest; updatePost.Method = "POST"; updatePost.ContentType = "text/xml"; updatePost.ContentLength = payload.Length; @@ -405,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge payloadStream.Close(); updatePost.BeginGetResponse(UpdateBrokerDone, updatePost); - _log.DebugFormat("[Concierge] async broker update to {0} started", _brokerURI); + _log.DebugFormat("[Concierge] async broker update to {0} started", uri); } private void UpdateBrokerDone(IAsyncResult result) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index f202e18..7fe7e09 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -971,3 +971,10 @@ InterregionComms = "RESTComms" ; {2} is replaced with the name of the concierge (whoami variable above) welcomes = /path/to/welcome/template/directory + + ; Concierge can send attendee lists to an event broker whenever an + ; avatar enters or leaves a concierged region. the URL is subject + ; to format substitution: + ; {0} is replaced with the region's name + ; {1} is replaced with the region's UUID + broker = "http://broker.place.com/{1}" \ No newline at end of file -- cgit v1.1