diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 1ed0191..c93afd1 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1658,6 +1658,9 @@ rtsp_stream_status ( void *opaque, htsmsg_t *m ) { http_connection_t *hc = opaque; char buf[128]; + struct session *rs = NULL; + htsmsg_t *l; + int udpport; htsmsg_add_str(m, "type", "SAT>IP"); if (hc->hc_proxy_ip) { @@ -1666,6 +1669,23 @@ rtsp_stream_status ( void *opaque, htsmsg_t *m ) } if (hc->hc_username) htsmsg_add_str(m, "user", hc->hc_username); + + l = htsmsg_create_list(); + TAILQ_FOREACH(rs, &rtsp_sessions, link) { + if (hc->hc_session && + strcmp(rs->session, hc->hc_session) == 0 && + strcmp(rs->peer_ipstr, hc->hc_peer_ipstr) == 0 && + rs->rtp_peer_port > 0) { + udpport = rs->rtp_peer_port; + if ( udpport == RTSP_TCP_DATA ) { + htsmsg_add_s32(l, NULL, -1); + } else { + htsmsg_add_s32(l, NULL, udpport); + htsmsg_add_s32(l, NULL, udpport+1); + } + } + } + htsmsg_add_msg(m, "peer_udp_ports", l); } /* diff --git a/src/webui/static/app/status.js b/src/webui/static/app/status.js index 0ac4b78..06206dd 100644 --- a/src/webui/static/app/status.js +++ b/src/webui/static/app/status.js @@ -607,6 +607,7 @@ tvheadend.status_conns = function(panel, index) { { name: 'server_port' }, { name: 'peer', sortType: stype }, { name: 'peer_port' }, + { name: 'peer_udp_ports' }, { name: 'proxy' }, { name: 'user', sortType: stype }, { @@ -645,11 +646,27 @@ tvheadend.status_conns = function(panel, index) { }, { width: 50, id: 'peer_port', - header: _("Client Port"), + header: _("Client TCP Port"), dataIndex: 'peer_port', sortable: true }, { width: 50, + id: 'peer_udp_ports', + header: _("Client UDP Ports"), + dataIndex: 'peer_udp_ports', + sortable: false, + renderer: function(v) { + // return ("000"); + var r = []; + Ext.each(v, function(port) { + r.push(port); + }); + if (r.length < 1) return ""; + r.sort(); + return r.join(','); + } + }, { + width: 50, id: 'user', header: _("Username"), dataIndex: 'user',