Validate connection method per endpoint, not socket

this allows e.g. to ommit the socket method in config if all endpoints
specify the method modifier.
It still is fully backward compatible.
This commit is contained in:
mkrzewic
2016-11-13 14:22:51 +01:00
parent 892aa8008b
commit 94a4d599eb
2 changed files with 20 additions and 12 deletions

View File

@@ -208,6 +208,15 @@ void FairMQDevice::InitWrapper()
// fill the uninitialized list
uninitializedConnectingChannels.push_back(&(*vi));
}
else if (vi->fAddress.find_first_of("@+>") != string::npos)
{
// set channel name: name + vector index
stringstream ss;
ss << mi->first << "[" << vi - (mi->second).begin() << "]";
vi->fChannelName = ss.str();
// fill the uninitialized list
uninitializedConnectingChannels.push_back(&(*vi));
}
else
{
LOG(ERROR) << "Cannot update configuration. Socket method (bind/connect) not specified.";