Allow closing config elems with </> if from envvar
The Cyclone DDS configuration is in principle an XML document, but it is possible to write configuration fragments directly in the CYCLONEDDS_URI environment variable. In that case, it is quite annoying to have to enter the full closing tags all the time, and so it now allows closing elements with a simple </> when not reading them from a file. While it would be trivial to also allow this when reading the configuration from a file, it seems that promulgating invalid XML would be bad form ... and besides, in that case editors can help keep everything in order. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									b8e4b2a49b
								
							
						
					
					
						commit
						5ca66f5bda
					
				
					 3 changed files with 21 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -2685,7 +2685,7 @@ struct cfgst * config_init (const char *configfile)
 | 
			
		|||
      if (tok[0] == '<') {
 | 
			
		||||
        /* Read XML directly from input string */
 | 
			
		||||
        qx = ddsrt_xmlp_new_string (tok, cfgst, &cb);
 | 
			
		||||
        ddsrt_xmlp_set_requireEOF (qx, 0);
 | 
			
		||||
        ddsrt_xmlp_set_options (qx, DDSRT_XMLP_ANONYMOUS_CLOSE_TAG);
 | 
			
		||||
        fp = NULL;
 | 
			
		||||
      } else {
 | 
			
		||||
        char *comma;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue