mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
STAT: Add server_id into http_hooks (#2692) v4.0.185
This commit is contained in:
parent
5783c4420f
commit
ced518ea92
3 changed files with 5 additions and 1 deletions
|
@ -45,10 +45,13 @@ srs_error_t SrsHttpHooks::on_connect(string url, SrsRequest* req)
|
|||
srs_error_t err = srs_success;
|
||||
|
||||
SrsContextId cid = _srs_context->get_id();
|
||||
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
|
||||
SrsJsonObject* obj = SrsJsonAny::object();
|
||||
SrsAutoFree(SrsJsonObject, obj);
|
||||
|
||||
obj->set("server_id", SrsJsonAny::str(stat->server_id().c_str()));
|
||||
obj->set("action", SrsJsonAny::str("on_connect"));
|
||||
obj->set("client_id", SrsJsonAny::str(cid.c_str()));
|
||||
obj->set("ip", SrsJsonAny::str(req->ip.c_str()));
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 184
|
||||
#define VERSION_REVISION 185
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue