]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: show username, hostname and client name when subscribing to a complete mux
authorJohn Törnblom <john.tornblom@gmail.com>
Wed, 9 Jan 2013 15:00:57 +0000 (16:00 +0100)
committerJohn Törnblom <john.tornblom@gmail.com>
Wed, 9 Jan 2013 15:00:57 +0000 (16:00 +0100)
src/dvb/dvb.h
src/dvb/dvb_multiplex.c
src/webui/webui.c

index 1b61f57695ec745a969a5bbc35611527996b828a..5ff64f63329070e64dcdb63b38767c669833f18f 100644 (file)
@@ -548,7 +548,10 @@ void dvb_lnb_get_frequencies(const char *id,
 struct th_subscription;
 struct th_subscription *dvb_subscription_create_from_tdmi(th_dvb_mux_instance_t *tdmi,
                                                          const char *name,
-                                                         streaming_target_t *st);
+                                                         streaming_target_t *st,
+                                                         const char *hostname,
+                                                         const char *username,
+                                                         const char *client);
 
 #endif /* DVB_H_ */
 
index e129ae63e7f1b3aeaf4350b548c8e84819cdfe94..abce0ec802e320dd02d5a6f54f4caf0de280d6fb 100644 (file)
@@ -1293,13 +1293,16 @@ th_dvb_mux_instance_t *dvb_mux_find
 th_subscription_t *
 dvb_subscription_create_from_tdmi(th_dvb_mux_instance_t *tdmi,
                                  const char *name,
-                                 streaming_target_t *st)
+                                 streaming_target_t *st, 
+                                 const char *hostname,
+                                 const char *username, 
+                                 const char *client)
 {
   th_subscription_t *s;
   th_dvb_adapter_t *tda = tdmi->tdmi_adapter;
 
   s = subscription_create(INT32_MAX, name, st, SUBSCRIPTION_RAW_MPEGTS, 
-                         NULL, NULL, NULL, NULL);
+                         NULL, hostname, username, client);
   
 
   s->ths_tdmi = tdmi;
index 37c6ee916bb191774c1a0048f4a2b90a402274bd..d5c8357b055213479e99c022bfcdb297ee9abc7e 100644 (file)
@@ -638,7 +638,10 @@ http_stream_tdmi(http_connection_t *hc, th_dvb_mux_instance_t *tdmi)
   const char *name;
   streaming_queue_init(&sq, SMT_PACKET);
 
-  s = dvb_subscription_create_from_tdmi(tdmi, "HTTP", &sq.sq_st);
+  s = dvb_subscription_create_from_tdmi(tdmi, "HTTP", &sq.sq_st,
+                                       inet_ntoa(hc->hc_peer->sin_addr),
+                                       hc->hc_username,
+                                       http_arg_get(&hc->hc_args, "User-Agent"));
   name = strdupa(tdmi->tdmi_identifier);
   pthread_mutex_unlock(&global_lock);
   http_stream_run(hc, &sq, name, MC_PASS, 1);