// Find an endpoint that's connected to the entry and has the requested path
for(unsigned i=0; i<eps.size(); ++i)
- if(i!=_entry && (eps[i].paths&(1<<path)) && (eps[i].paths&eps[_entry].paths))
+ if(i!=_entry && eps[i].has_path(path) && eps[i].has_common_paths(eps[_entry]))
return i;
return -1;