winlin

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

... ... @@ -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());
... ...
... ... @@ -35,7 +35,7 @@ using namespace std;
#include <srs_kernel_utility.hpp>
#include <srs_protocol_amf0.hpp>
int64_t srs_gvid = getpid();
int64_t srs_gvid = getpid() * 3;
int64_t srs_generate_id()
{
... ...