diff options
author | UbitUmarov | 2018-01-22 18:37:39 +0000 |
---|---|---|
committer | UbitUmarov | 2018-01-22 18:37:39 +0000 |
commit | efc74803424a5e12ce780ecdd839d144123ae79e (patch) | |
tree | 50f1e052da7188d5fc4db40983a0a34716a7ce7f /OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs | |
parent | missing files.. (diff) | |
download | opensim-SC-efc74803424a5e12ce780ecdd839d144123ae79e.zip opensim-SC-efc74803424a5e12ce780ecdd839d144123ae79e.tar.gz opensim-SC-efc74803424a5e12ce780ecdd839d144123ae79e.tar.bz2 opensim-SC-efc74803424a5e12ce780ecdd839d144123ae79e.tar.xz |
throtle datasnapshot gen
Diffstat (limited to 'OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs index 5a01fa9..fb60e9e 100644 --- a/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataRequestHandler.cs | |||
@@ -63,18 +63,24 @@ namespace OpenSim.Region.DataSnapshot | |||
63 | 63 | ||
64 | public Hashtable OnGetSnapshot(Hashtable keysvals) | 64 | public Hashtable OnGetSnapshot(Hashtable keysvals) |
65 | { | 65 | { |
66 | m_log.Debug("[DATASNAPSHOT] Received collection request"); | 66 | string snapObj = (string)keysvals["region"]; |
67 | m_log.DebugFormat("[DATASNAPSHOT] Received collection request for {0}", snapObj); | ||
67 | Hashtable reply = new Hashtable(); | 68 | Hashtable reply = new Hashtable(); |
68 | int statuscode = 200; | 69 | int statuscode = 200; |
69 | 70 | ||
70 | string snapObj = (string)keysvals["region"]; | ||
71 | |||
72 | XmlDocument response = m_externalData.GetSnapshot(snapObj); | 71 | XmlDocument response = m_externalData.GetSnapshot(snapObj); |
72 | if(response == null) | ||
73 | { | ||
74 | reply["str_response_string"] = string.Empty; | ||
75 | reply["int_response_code"] = 503; | ||
76 | reply["content_type"] = "text"; | ||
77 | m_log.Debug("[DATASNAPSHOT] Collection request reply try later"); | ||
78 | return reply; | ||
79 | } | ||
73 | 80 | ||
74 | reply["str_response_string"] = response.OuterXml; | 81 | reply["str_response_string"] = response.OuterXml; |
75 | reply["int_response_code"] = statuscode; | 82 | reply["int_response_code"] = statuscode; |
76 | reply["content_type"] = "text/xml"; | 83 | reply["content_type"] = "text/xml"; |
77 | |||
78 | return reply; | 84 | return reply; |
79 | } | 85 | } |
80 | 86 | ||