Add output of client connection port

This commit is contained in:
Sergey Dryabzhinsky 2015-07-05 02:04:06 +03:00
parent f62a083806
commit 80fe8b9eae
2 changed files with 8 additions and 1 deletions

View file

@ -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);

View file

@ -316,7 +316,7 @@
http://apps.db.ripe.net/search/query.html&#63;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>