]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Don't crash if we cannot figure out the adapter type when constructing the list of...
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 18 Nov 2009 19:03:56 +0000 (19:03 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Wed, 18 Nov 2009 19:03:56 +0000 (19:03 +0000)
src/dvb/dvb_preconf.c
src/webui/extjs.c

index d58ee151c3a7477e253efd2135623c85d422d792..21148c9b6ee94f2eae33cfad8652e1217abd3e6f 100644 (file)
@@ -183,6 +183,7 @@ dvb_mux_preconf_get_node(int fetype, const char *node)
     nr = sizeof(regions_ATSC) / sizeof(regions_ATSC[0]);
     break;
   default:
+    tvhlog(LOG_ERR, "DVB", "No built-in config for fetype %d", fetype);
     return NULL;
   }
   
index 29ae6aaa233626d5e9ba808850ef31329b3ad5b1..0ebf368ea9d69e17b62eaa97726f53e1c75cf6ff 100644 (file)
@@ -468,7 +468,8 @@ extjs_dvbnetworks(http_connection_t *hc, const char *remain, void *opaque)
 
   pthread_mutex_unlock(&global_lock);
 
-  out = dvb_mux_preconf_get_node(tda->tda_type, s);
+  if((out = dvb_mux_preconf_get_node(tda->tda_type, s)) == NULL)
+    return 404;
 
   htsmsg_json_serialize(out, hq, 0);
   htsmsg_destroy(out);