mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-04 12:31:09 +02:00
Add output of client connection port
This commit is contained in:
parent
f62a083806
commit
80fe8b9eae
|
@ -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("</address>");
|
||||
|
||||
NGX_RTMP_STAT_L("<port>");
|
||||
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("</port>");
|
||||
|
||||
NGX_RTMP_STAT_L("<time>");
|
||||
NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%i",
|
||||
(ngx_int_t) (ngx_current_msec - s->epoch)) - buf);
|
||||
|
|
2
stat.xsl
2
stat.xsl
|
@ -316,7 +316,7 @@
|
|||
http://apps.db.ripe.net/search/query.html?searchtext=<xsl:value-of select="address"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">whois</xsl:attribute>
|
||||
<xsl:value-of select="address"/>
|
||||
<xsl:value-of select="address"/>:<xsl:value-of select="port"/>
|
||||
</a>
|
||||
</td>
|
||||
<td><xsl:value-of select="flashver"/></td>
|
||||
|
|
Loading…
Reference in a new issue