Fixed default port detection in HTTP connector.
This commit is contained in:
		
							parent
							
								
									8d25b45eac
								
							
						
					
					
						commit
						f236d1c1f2
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -332,11 +332,12 @@ namespace Connector_HTTP {
 | 
			
		|||
          const std::string & cName = ( *it)["connector"].asStringRef();
 | 
			
		||||
          //if the connector has a port,
 | 
			
		||||
          if (capabilities.isMember(cName) && capabilities[cName].isMember("optional") && capabilities[cName]["optional"].isMember("port")){
 | 
			
		||||
            //and a URL - then list the URL
 | 
			
		||||
            if (capabilities[cName].isMember("url_rel")){
 | 
			
		||||
            //get the default port if none is set
 | 
			
		||||
            if (( *it)["port"].asInt() == 0){
 | 
			
		||||
              ( *it)["port"] = capabilities[cName]["optional"]["port"]["default"];
 | 
			
		||||
            }
 | 
			
		||||
            //and a URL - then list the URL
 | 
			
		||||
            if (capabilities[cName].isMember("url_rel")){
 | 
			
		||||
              addSources(streamname, capabilities[cName]["url_rel"].asStringRef(), sources, host, ( *it)["port"].asString(), capabilities[cName], ServConf["streams"][streamname]["meta"]);
 | 
			
		||||
            }
 | 
			
		||||
            //check each enabled protocol separately to see if it depends on this connector
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue