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();
|
const std::string & cName = ( *it)["connector"].asStringRef();
|
||||||
//if the connector has a port,
|
//if the connector has a port,
|
||||||
if (capabilities.isMember(cName) && capabilities[cName].isMember("optional") && capabilities[cName]["optional"].isMember("port")){
|
if (capabilities.isMember(cName) && capabilities[cName].isMember("optional") && capabilities[cName]["optional"].isMember("port")){
|
||||||
//and a URL - then list the URL
|
//get the default port if none is set
|
||||||
if (capabilities[cName].isMember("url_rel")){
|
|
||||||
if (( *it)["port"].asInt() == 0){
|
if (( *it)["port"].asInt() == 0){
|
||||||
( *it)["port"] = capabilities[cName]["optional"]["port"]["default"];
|
( *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"]);
|
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
|
//check each enabled protocol separately to see if it depends on this connector
|
||||||
|
|
Loading…
Add table
Reference in a new issue