Prevent adding "master" to a group

This commit is contained in:
Robin Gareus 2017-03-08 17:49:01 +01:00
parent a67008a5cb
commit 46fe83cfff

View File

@ -155,6 +155,10 @@ RouteGroup::~RouteGroup ()
int
RouteGroup::add (boost::shared_ptr<Route> r)
{
if (r->is_master()) {
return 0;
}
if (find (routes->begin(), routes->end(), r) != routes->end()) {
return 0;
}