mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
throtle datasnapshot gen
This commit is contained in:
@@ -63,18 +63,24 @@ namespace OpenSim.Region.DataSnapshot
|
||||
|
||||
public Hashtable OnGetSnapshot(Hashtable keysvals)
|
||||
{
|
||||
m_log.Debug("[DATASNAPSHOT] Received collection request");
|
||||
string snapObj = (string)keysvals["region"];
|
||||
m_log.DebugFormat("[DATASNAPSHOT] Received collection request for {0}", snapObj);
|
||||
Hashtable reply = new Hashtable();
|
||||
int statuscode = 200;
|
||||
|
||||
string snapObj = (string)keysvals["region"];
|
||||
|
||||
XmlDocument response = m_externalData.GetSnapshot(snapObj);
|
||||
if(response == null)
|
||||
{
|
||||
reply["str_response_string"] = string.Empty;
|
||||
reply["int_response_code"] = 503;
|
||||
reply["content_type"] = "text";
|
||||
m_log.Debug("[DATASNAPSHOT] Collection request reply try later");
|
||||
return reply;
|
||||
}
|
||||
|
||||
reply["str_response_string"] = response.OuterXml;
|
||||
reply["int_response_code"] = statuscode;
|
||||
reply["content_type"] = "text/xml";
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user