1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine /api/v1/summaries, with code and server id.

This commit is contained in:
winlin 2015-12-15 12:46:47 +08:00
parent 9b3fdc74d8
commit b486f6fe6b
2 changed files with 6 additions and 1 deletions

View file

@ -267,9 +267,14 @@ SrsGoApiSummaries::~SrsGoApiSummaries()
int SrsGoApiSummaries::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
SrsStatistic* stat = SrsStatistic::instance();
SrsJsonObject* obj = SrsJsonAny::object();
SrsAutoFree(SrsJsonObject, obj);
obj->set("code", SrsJsonAny::integer(ERROR_SUCCESS));
obj->set("server", SrsJsonAny::integer(stat->server_id()));
srs_api_dump_summaries(obj);
return srs_api_response(w, r, obj->dumps());