mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
This commit is contained in:
@@ -282,14 +282,15 @@ namespace OpenSim.Region.UserStatistics
|
||||
// m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
||||
string capsPath = "/CAPS/VS/" + UUID.Random();
|
||||
caps.RegisterHandler("ViewerStats",
|
||||
new RestStreamHandler("POST", capsPath,
|
||||
delegate(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
return ViewerStatsReport(request, path, param,
|
||||
agentID, caps);
|
||||
}));
|
||||
caps.RegisterHandler(
|
||||
"ViewerStats",
|
||||
new RestStreamHandler(
|
||||
"POST",
|
||||
capsPath,
|
||||
(request, path, param, httpRequest, httpResponse)
|
||||
=> ViewerStatsReport(request, path, param, agentID, caps),
|
||||
"ViewerStats",
|
||||
agentID.ToString()));
|
||||
}
|
||||
|
||||
private void OnDeRegisterCaps(UUID agentID, Caps caps)
|
||||
|
||||
Reference in New Issue
Block a user