// Let's find out which external socket has the data
SocketCallbackInfo ex_sock;
+ bool found = false;
{
std::lock_guard<std::mutex> lock(callbacks_mutex_);
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
continue;
}
+ found = true;
// something received over external socket
if (s.callback_) {
// layer access without integrating any specific features
// in IfaceMgr
ex_sock.callback_(ex_sock.socket_);
-
+ }
+ if (found) {
return (Pkt4Ptr());
}
}
// Let's find out which socket has the data
SocketCallbackInfo ex_sock;
+ bool found = false;
{
std::lock_guard<std::mutex> lock(callbacks_mutex_);
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
continue;
}
+ found = true;
// something received over external socket
if (s.callback_) {
// layer access without integrating any specific features
// in IfaceMgr
ex_sock.callback_(ex_sock.socket_);
-
+ }
+ if (found) {
return (Pkt4Ptr());
}
// Let's find out which socket has the data
SocketCallbackInfo ex_sock;
+ bool found = false;
{
std::lock_guard<std::mutex> lock(callbacks_mutex_);
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
continue;
}
+ found = true;
// something received over external socket
if (s.callback_) {
// layer access without integrating any specific features
// in IfaceMgr
ex_sock.callback_(ex_sock.socket_);
-
+ }
+ if (found) {
return (Pkt6Ptr());
}
// Let's find out which external socket has the data
SocketCallbackInfo ex_sock;
+ bool found = false;
{
std::lock_guard<std::mutex> lock(callbacks_mutex_);
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
continue;
}
+ found = true;
// something received over external socket
if (s.callback_) {
// layer access without integrating any specific features
// in IfaceMgr
ex_sock.callback_(ex_sock.socket_);
-
+ }
+ if (found) {
return (Pkt6Ptr());
}
}