diff --git a/trunk/src/app/srs_app_http_stream.cpp b/trunk/src/app/srs_app_http_stream.cpp index 99c22bc4e..943fdf3d3 100755 --- a/trunk/src/app/srs_app_http_stream.cpp +++ b/trunk/src/app/srs_app_http_stream.cpp @@ -606,7 +606,7 @@ srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess // update the statistic when source disconveried. SrsStatistic* stat = SrsStatistic::instance(); - if ((err = stat->on_client(srs_int2str(_srs_context->get_id()), req, hc, SrsRtmpConnPlay)) != srs_success) { + if ((err = stat->on_client(_srs_context->get_id(), req, hc, SrsRtmpConnPlay)) != srs_success) { return srs_error_wrap(err, "stat on client"); } diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index fd14b41d0..e1fa754ac 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -205,7 +205,7 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe local_sdp_str = srs_string_replace(local_sdp_str.c_str(), "\r\n", "\\r\\n"); res->set("code", SrsJsonAny::integer(ERROR_SUCCESS)); - res->set("server", SrsJsonAny::integer(SrsStatistic::instance()->server_id())); + res->set("server", SrsJsonAny::str(SrsStatistic::instance()->server_id().c_str())); // TODO: add candidates in response json? @@ -557,7 +557,7 @@ srs_error_t SrsGoApiRtcPublish::do_serve_http(ISrsHttpResponseWriter* w, ISrsHtt local_sdp_str = srs_string_replace(local_sdp_str.c_str(), "\r\n", "\\r\\n"); res->set("code", SrsJsonAny::integer(ERROR_SUCCESS)); - res->set("server", SrsJsonAny::integer(SrsStatistic::instance()->server_id())); + res->set("server", SrsJsonAny::str(SrsStatistic::instance()->server_id().c_str())); // TODO: add candidates in response json? diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index e298a18ae..e41b1ec47 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -533,7 +533,7 @@ srs_error_t SrsRtmpConn::stream_service_cycle() // update the statistic when source disconveried. SrsStatistic* stat = SrsStatistic::instance(); - if ((err = stat->on_client(srs_int2str(_srs_context->get_id()), req, this, info->type)) != srs_success) { + if ((err = stat->on_client(_srs_context->get_id(), req, this, info->type)) != srs_success) { return srs_error_wrap(err, "rtmp: stat client"); } diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index 3c81319a8..3d317eb2d 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -2527,7 +2527,7 @@ srs_error_t SrsSource::on_publish() } SrsStatistic* stat = SrsStatistic::instance(); - stat->on_stream_publish(req, srs_int2str(_source_id)); + stat->on_stream_publish(req, _source_id); return err; } diff --git a/trunk/src/app/srs_app_statistic.cpp b/trunk/src/app/srs_app_statistic.cpp index 82757f5e1..9775d9ab8 100644 --- a/trunk/src/app/srs_app_statistic.cpp +++ b/trunk/src/app/srs_app_statistic.cpp @@ -47,7 +47,7 @@ string srs_generate_id() SrsStatisticVhost::SrsStatisticVhost() { - id = srs_int2str(srs_generate_id()); + id = srs_generate_id(); clk = new SrsWallClock(); kbps = new SrsKbps(clk); @@ -98,7 +98,7 @@ srs_error_t SrsStatisticVhost::dumps(SrsJsonObject* obj) SrsStatisticStream::SrsStatisticStream() { - id = srs_int2str(srs_generate_id()); + id = srs_generate_id(); vhost = NULL; active = false;