@@ -1338,6 +1338,7 @@ static void _parse_root(xmlDocPtr doc,
13381338 } else if (xmlStrcmp (node -> name , XMLSTR ("mount" )) == 0 ) {
13391339 _parse_mount (doc , node , configuration );
13401340 } else if (xmlStrcmp (node -> name , XMLSTR ("directory" )) == 0 ) {
1341+ __found_bad_tag (configuration , node , BTR_OBSOLETE , "Use a <yp-directory> block." );
13411342 _parse_oldstyle_directory (doc , node -> xmlChildrenNode , configuration );
13421343 } else if (xmlStrcmp (node -> name , XMLSTR ("yp-directory" )) == 0 ) {
13431344 _parse_yp_directory (doc , node , configuration );
@@ -2446,6 +2447,7 @@ static void _parse_yp_directory(xmlDocPtr doc,
24462447
24472448 url = (char * )xmlGetProp (node , XMLSTR ("url" ));
24482449 if (url == NULL ) {
2450+ __found_bad_tag (configuration , node , BTR_INVALID , NULL );
24492451 ICECAST_LOG_ERROR ("Missing mandatory attribute 'url' for <yp-directory>." );
24502452 return ;
24512453 }
@@ -2461,6 +2463,7 @@ static void _parse_yp_directory(xmlDocPtr doc,
24612463 options = config_parse_options (node );
24622464 for (config_options_t * opt = options ; opt ; opt = opt -> next ) {
24632465 if (!opt -> name || !opt -> value ) {
2466+ __found_bad_tag (configuration , node , BTR_INVALID , NULL );
24642467 ICECAST_LOG_WARN ("Invalid <option>, missing 'name' and 'value' attributes." );
24652468 continue ;
24662469 }
@@ -2479,6 +2482,7 @@ static void _parse_yp_directory(xmlDocPtr doc,
24792482 /* FIXME: Pass the correct node to config_href_to_id(). */
24802483 yp_dir -> listen_socket_id = config_href_to_id (configuration , NULL , opt -> value );
24812484 } else {
2485+ __found_bad_tag (configuration , node , BTR_INVALID , NULL );
24822486 ICECAST_LOG_WARN ("Invalid YP <option> with unknown 'name' attribute." );
24832487 }
24842488 }
0 commit comments