Socket library and Config library restructuring, improvement to UDP socket reliability

This commit is contained in:
Thulinma 2020-06-25 23:34:26 +02:00
parent 97752f2c2d
commit 3d26741148
37 changed files with 151 additions and 110 deletions

View file

@ -80,7 +80,7 @@ namespace Mist{
// If we have a streamname option, set internal streamname to that option
if (!streamName.size() && config->hasOption("streamname")){
streamName = config->getString("streamname");
Util::Config::streamName = streamName;
Util::streamName = streamName;
}
/*LTS-START*/
@ -321,7 +321,7 @@ namespace Mist{
JSON::Value strCnf = Util::getStreamConfig(streamName);
if (strCnf && strCnf["fallback_stream"].asStringRef().size()){
streamName = strCnf["fallback_stream"].asStringRef();
Util::Config::streamName = streamName;
Util::streamName = streamName;
INFO_MSG("Switching to configured fallback stream '%s'", streamName.c_str());
reconnect();
return;
@ -352,7 +352,7 @@ namespace Mist{
newStrm.c_str());
std::string origStream = streamName;
streamName = newStrm;
Util::Config::streamName = streamName;
Util::streamName = streamName;
if (!Util::startInput(streamName, "", true, isPushing())){
onFail("Stream open failed (fallback stream for '" + origStream + "')", true);
return;