Commit bf94bee6 authored by sletz's avatar sletz
Browse files

More robust ActivePortsFromNetwork.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4501 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 73de093c
......@@ -477,7 +477,7 @@ namespace Jack
int rx_bytes = Recv(fParams.fMtu, MSG_PEEK);
if ((rx_bytes == 0) || (rx_bytes == SOCKET_ERROR)) {
// O bytes considered an error (lost connection)
// 0 bytes considered an error (lost connection)
return SOCKET_ERROR;
}
......
......@@ -637,7 +637,11 @@ namespace Jack
for (uint port_index = 0; port_index < port_num; port_index++) {
// Use -1 when port is actually connected on other side
fPortBuffer[*active_port_address] = (sample_t*)-1;
if (*active_port_address >= 0 && *active_port_address < fNPorts) {
fPortBuffer[*active_port_address] = (sample_t*)-1;
} else {
jack_error("ActivePortsFromNetwork: incorrect port = %d", *active_port_address);
}
active_port_address++;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment