register HTS client subscriptions with a real name
This commit is contained in:
parent
f838630fd7
commit
2bb1b33344
1 changed files with 8 additions and 2 deletions
10
htsclient.c
10
htsclient.c
|
@ -448,6 +448,8 @@ cr_channel_subscribe(client_t *c, char **argv, int argc)
|
|||
th_channel_t *ch;
|
||||
th_subscription_t *s;
|
||||
unsigned int chindex, weight;
|
||||
char tmp[100];
|
||||
struct sockaddr_in *si;
|
||||
|
||||
if(argc < 1)
|
||||
return 1;
|
||||
|
@ -466,8 +468,12 @@ cr_channel_subscribe(client_t *c, char **argv, int argc)
|
|||
if((ch = channel_by_index(chindex)) == NULL)
|
||||
return 1;
|
||||
|
||||
s = subscription_create(ch, weight, "client",
|
||||
client_subscription_callback, c);
|
||||
si = (struct sockaddr_in *)&c->c_tcp_session.tcp_peer_addr;
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "HTS Client @ %s",
|
||||
inet_ntoa(si->sin_addr));
|
||||
|
||||
s = subscription_create(ch, weight, tmp, client_subscription_callback, c);
|
||||
if(s == NULL)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue