+ adding URI substitution for concierges broker URI

0.6.3-post-fixes
Dr Scofield 2009-01-26 21:34:44 +00:00
parent 0c14ebec87
commit 10f7e534c9
2 changed files with 11 additions and 2 deletions

View File

@ -357,6 +357,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
if (String.IsNullOrEmpty(_brokerURI)) if (String.IsNullOrEmpty(_brokerURI))
return; return;
string uri = String.Format(_brokerURI, scene.RegionInfo.RegionName, scene.RegionInfo.RegionID);
// get attendee list for the scene // get attendee list for the scene
List<UUID> attendees; List<UUID> attendees;
lock (_sceneAttendees) lock (_sceneAttendees)
@ -394,7 +396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
string payload = list.ToString(); string payload = list.ToString();
// post via REST to broker // post via REST to broker
HttpWebRequest updatePost = WebRequest.Create(_brokerURI) as HttpWebRequest; HttpWebRequest updatePost = WebRequest.Create(uri) as HttpWebRequest;
updatePost.Method = "POST"; updatePost.Method = "POST";
updatePost.ContentType = "text/xml"; updatePost.ContentType = "text/xml";
updatePost.ContentLength = payload.Length; updatePost.ContentLength = payload.Length;
@ -405,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
payloadStream.Close(); payloadStream.Close();
updatePost.BeginGetResponse(UpdateBrokerDone, updatePost); 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) private void UpdateBrokerDone(IAsyncResult result)

View File

@ -971,3 +971,10 @@ InterregionComms = "RESTComms"
; {2} is replaced with the name of the concierge (whoami variable above) ; {2} is replaced with the name of the concierge (whoami variable above)
welcomes = /path/to/welcome/template/directory 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}"