From 226a3600f9c29cdf5860b10db0d1a59eedf32691 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Mon, 10 Jun 2013 17:28:45 +0100 Subject: [PATCH] mpegts: fixed some issues with input init --- src/input/mpegts/linuxdvb/linuxdvb_device.c | 1 - src/input/mpegts/linuxdvb/linuxdvb_hardware.c | 2 -- src/input/mpegts/mpegts_input.c | 4 ++++ src/prop.c | 1 + src/webui/extjs_dvb.c | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_device.c b/src/input/mpegts/linuxdvb/linuxdvb_device.c index 75478834..0fa22ec1 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_device.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_device.c @@ -318,7 +318,6 @@ void linuxdvb_device_init ( int adapter_mask ) if ((s = hts_settings_load_r(1, "input/linuxdvb/devices"))) { HTSMSG_FOREACH(f, s) { if (!(e = htsmsg_get_map_by_field(f))) continue; - if (!(e = htsmsg_get_map(e, "config"))) continue; (void)linuxdvb_device_create0(f->hmf_name, e); } } diff --git a/src/input/mpegts/linuxdvb/linuxdvb_hardware.c b/src/input/mpegts/linuxdvb/linuxdvb_hardware.c index 9b8b3883..d73c7714 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_hardware.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_hardware.c @@ -83,8 +83,6 @@ const idclass_t linuxdvb_hardware_class = .ic_get_title = linuxdvb_hardware_class_get_title, .ic_get_childs = linuxdvb_hardware_class_get_childs, .ic_properties = (const property_t[]){ - { PROPDEF1("enabled", "Enabled", - PT_BOOL, linuxdvb_hardware_t, mi_enabled) }, { PROPDEF1("displayname", "Name", PT_STR, linuxdvb_hardware_t, lh_displayname) }, {} diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index e6c6c067..9e150276 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -30,6 +30,7 @@ * Class definition * *************************************************************************/ +#if 0 static const char * mpegts_input_class_get_name ( void *in ) { @@ -41,6 +42,7 @@ mpegts_input_class_get_name ( void *in ) *buf = 0; return buf; } +#endif const idclass_t mpegts_input_class = { @@ -51,10 +53,12 @@ const idclass_t mpegts_input_class = PROPDEF1("enabled", "Enabled", PT_BOOL, mpegts_input_t, mi_enabled) }, +#if 0 { PROPDEF0("displayname", "Name", PT_STR, PO_NOSAVE | PO_RDONLY), .str_get = mpegts_input_class_get_name }, +#endif {} } }; diff --git a/src/prop.c b/src/prop.c index f791199c..566532f2 100644 --- a/src/prop.c +++ b/src/prop.c @@ -56,6 +56,7 @@ prop_write_values(void *obj, const property_t *pl, htsmsg_t *m) //fprintf(stderr, "Property %s unmappable\n", f->hmf_name); continue; } + if(p->options & PO_NOSAVE) continue; void *val = obj + p->off; switch(TO_FROM(p->type, f->hmf_type)) { diff --git a/src/webui/extjs_dvb.c b/src/webui/extjs_dvb.c index 162c52d2..10c0ec45 100644 --- a/src/webui/extjs_dvb.c +++ b/src/webui/extjs_dvb.c @@ -268,6 +268,7 @@ extjs_mpegts_network return HTTP_STATUS_BAD_REQUEST; } mm = mn->mn_mux_create2(mn, conf); + if(mm) mm->mm_config_save(mm); pthread_mutex_unlock(&global_lock); if (!mm) return HTTP_STATUS_BAD_REQUEST; // TODO: error message } else {