webui: show username, hostname and client name when subscriving to a service
This commit is contained in:
parent
ef43010617
commit
f2d6ef4aa0
4 changed files with 15 additions and 6 deletions
|
@ -114,7 +114,8 @@ serviceprobe_thread(void *aux)
|
|||
tvhlog(LOG_INFO, "serviceprobe", "%20s: checking...",
|
||||
t->s_svcname);
|
||||
|
||||
s = subscription_create_from_service(t, "serviceprobe", &sq.sq_st, 0);
|
||||
s = subscription_create_from_service(t, "serviceprobe", &sq.sq_st, 0,
|
||||
NULL, NULL, "serviceprobe");
|
||||
if(s == NULL) {
|
||||
t->s_sp_onqueue = 0;
|
||||
TAILQ_REMOVE(&serviceprobe_queue, t, s_sp_link);
|
||||
|
|
|
@ -406,7 +406,9 @@ subscription_create_from_channel(channel_t *ch, unsigned int weight,
|
|||
*/
|
||||
th_subscription_t *
|
||||
subscription_create_from_service(service_t *t, const char *name,
|
||||
streaming_target_t *st, int flags)
|
||||
streaming_target_t *st, int flags,
|
||||
const char *hostname, const char *username,
|
||||
const char *client)
|
||||
{
|
||||
th_subscription_t *s;
|
||||
source_info_t si;
|
||||
|
@ -414,7 +416,7 @@ subscription_create_from_service(service_t *t, const char *name,
|
|||
|
||||
s = subscription_create(INT32_MAX, name, st, flags,
|
||||
subscription_input_direct,
|
||||
NULL, NULL, NULL);
|
||||
hostname, username, client);
|
||||
|
||||
if(t->s_status != SERVICE_RUNNING) {
|
||||
if((r = service_start(t, INT32_MAX, 1)) != 0) {
|
||||
|
@ -526,7 +528,7 @@ subscription_dummy_join(const char *id, int first)
|
|||
|
||||
st = calloc(1, sizeof(streaming_target_t));
|
||||
streaming_target_init(st, dummy_callback, NULL, 0);
|
||||
subscription_create_from_service(t, "dummy", st, 0);
|
||||
subscription_create_from_service(t, "dummy", st, 0, NULL, NULL, "dummy");
|
||||
|
||||
tvhlog(LOG_NOTICE, "subscription",
|
||||
"Dummy join %s ok", id);
|
||||
|
|
|
@ -97,7 +97,10 @@ th_subscription_t *subscription_create_from_channel(struct channel *ch,
|
|||
th_subscription_t *subscription_create_from_service(struct service *t,
|
||||
const char *name,
|
||||
streaming_target_t *st,
|
||||
int flags);
|
||||
int flags,
|
||||
const char *hostname,
|
||||
const char *username,
|
||||
const char *client);
|
||||
|
||||
th_subscription_t *subscription_create(int weight, const char *name,
|
||||
streaming_target_t *st,
|
||||
|
|
|
@ -601,7 +601,10 @@ http_stream_service(http_connection_t *hc, service_t *service)
|
|||
flags = 0;
|
||||
}
|
||||
|
||||
s = subscription_create_from_service(service, "HTTP", st, flags);
|
||||
s = subscription_create_from_service(service, "HTTP", st, flags,
|
||||
inet_ntoa(hc->hc_peer->sin_addr),
|
||||
hc->hc_username,
|
||||
http_arg_get(&hc->hc_args, "User-Agent"));
|
||||
if(s) {
|
||||
name = strdupa(service->s_ch ?
|
||||
service->s_ch->ch_name : service->s_nicename);
|
||||
|
|
Loading…
Add table
Reference in a new issue