"SAT>IP",
rs->prch.prch_flags |
SUBSCRIPTION_STREAMING,
- addrbuf, hc->hc_username,
+ addrbuf, http_username(hc),
http_arg_get(&hc->hc_args, "User-Agent"),
NULL);
if (!rs->subs)
{
http_connection_t *hc = opaque;
char buf[128];
+ const char *username;
struct session *rs = NULL;
htsmsg_t *c, *tcp = NULL, *udp = NULL;
int udpport, s32;
tcp_get_str_from_ip(hc->hc_proxy_ip, buf, sizeof(buf));
htsmsg_add_str(m, "proxy", buf);
}
- if (hc->hc_username)
- htsmsg_add_str(m, "user", hc->hc_username);
+ username = http_username(hc);
+ if (username)
+ htsmsg_add_str(m, "user", username);
TAILQ_FOREACH(rs, &rtsp_sessions, link) {
if (hc->hc_session &&
{
http_connection_t *hc = opaque;
char buf[128];
+ const char *username;
htsmsg_add_str(m, "type", "HTTP");
if (hc->hc_proxy_ip) {
tcp_get_str_from_ip(hc->hc_proxy_ip, buf, sizeof(buf));
htsmsg_add_str(m, "proxy", buf);
}
- if (hc->hc_username)
- htsmsg_add_str(m, "user", hc->hc_username);
+ username = http_username(hc);
+ if (username)
+ htsmsg_add_str(m, "user", username);
}
static inline void *
prch.prch_flags | SUBSCRIPTION_STREAMING |
eflags,
hc->hc_peer_ipstr,
- hc->hc_username,
+ http_username(hc),
http_arg_get(&hc->hc_args, "User-Agent"),
NULL);
if(s) {
s = subscription_create_from_mux(&prch, NULL, weight ?: 10, "HTTP",
prch.prch_flags |
SUBSCRIPTION_STREAMING,
- hc->hc_peer_ipstr, hc->hc_username,
+ hc->hc_peer_ipstr, http_username(hc),
http_arg_get(&hc->hc_args, "User-Agent"),
NULL);
if (s) {
s = subscription_create_from_channel(&prch,
NULL, weight, "HTTP",
prch.prch_flags | SUBSCRIPTION_STREAMING,
- hc->hc_peer_ipstr, hc->hc_username,
+ hc->hc_peer_ipstr, http_username(hc),
http_arg_get(&hc->hc_args, "User-Agent"),
NULL);
if (priv->tcp_id && !hc->hc_no_output && content_len > 64*1024) {
priv->sub = subscription_create_from_file("HTTP", priv->charset,
priv->fname, hc->hc_peer_ipstr,
- hc->hc_username,
+ http_username(hc),
http_arg_get(&hc->hc_args, "User-Agent"));
if (priv->sub == NULL) {
http_stream_postop(priv->tcp_id);