Project

General

Profile

Feature #4748 » Proxy-info-in-webUI-v2.diff

Mono Polimorph, 2017-12-11 13:25

View differences:

src/http.c
1361 1361
      http_error(hc, HTTP_STATUS_BAD_REQUEST);
1362 1362
      return -1;
1363 1363
    }
1364
    hc->hc_is_proxied = 1;
1364 1365
  }
1365 1366

  
1366 1367
  tcp_get_str_from_ip(hc->hc_peer, authbuf, sizeof(authbuf));
......
1851 1852
  atomic_set(&hc->hc_extra_insend, 0);
1852 1853
  atomic_set(&hc->hc_extra_chunks, 0);
1853 1854

  
1855
  hc->hc_is_proxied = 0;
1854 1856
  do {
1855 1857
    hc->hc_no_output  = 0;
1856 1858

  
src/http.h
175 175
  uint8_t hc_no_output;
176 176
  uint8_t hc_shutdown;
177 177
  uint8_t hc_is_local_ip;   /*< a connection from the local network */
178
  uint8_t hc_is_proxied;
178 179

  
179 180
  /* Support for HTTP POST */
180 181

  
src/satip/rtsp.c
1655 1655
rtsp_stream_status ( void *opaque, htsmsg_t *m )
1656 1656
{
1657 1657
  http_connection_t *hc = opaque;
1658
  htsmsg_add_str(m, "type", "SAT>IP");
1658
  htsmsg_add_str(m, "type", (hc->hc_is_proxied)? "SAT>IP/proxy" : "SAT>IP");
1659 1659
  if (hc->hc_username)
1660 1660
    htsmsg_add_str(m, "user", hc->hc_username);
1661 1661
}
src/webui/webui.c
362 362
http_stream_status ( void *opaque, htsmsg_t *m )
363 363
{
364 364
  http_connection_t *hc = opaque;
365
  htsmsg_add_str(m, "type", "HTTP");
365
  htsmsg_add_str(m, "type", (hc->hc_is_proxied)? "HTTP/proxy" : "HTTP");
366 366
  if (hc->hc_username)
367 367
    htsmsg_add_str(m, "user", hc->hc_username);
368 368
}
(2-2/2)