diff --git a/ngx_rtmp_stat_module.c b/ngx_rtmp_stat_module.c index 326a811..b4edbe9 100644 --- a/ngx_rtmp_stat_module.c +++ b/ngx_rtmp_stat_module.c @@ -329,6 +329,7 @@ ngx_rtmp_stat_client(ngx_http_request_t *r, ngx_chain_t ***lll, ngx_rtmp_session_t *s) { u_char buf[NGX_INT_T_LEN]; + struct sockaddr_in *sa; #ifdef NGX_RTMP_POOL_DEBUG ngx_rtmp_stat_dump_pool(r, lll, s->connection->pool); @@ -342,6 +343,12 @@ ngx_rtmp_stat_client(ngx_http_request_t *r, ngx_chain_t ***lll, NGX_RTMP_STAT_ES(&s->connection->addr_text); NGX_RTMP_STAT_L(""); + NGX_RTMP_STAT_L(""); + sa = (struct sockaddr_in *) s->connection->sockaddr; + NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%ui", + (ngx_uint_t) ntohs(sa->sin_port)) - buf); + NGX_RTMP_STAT_L(""); + NGX_RTMP_STAT_L("