Browse Source

More robust ActivePortsFromNetwork.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4501 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
bf94bee633
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      common/JackNetInterface.cpp
  2. +5
    -1
      common/JackNetTool.h

+ 1
- 1
common/JackNetInterface.cpp View File

@@ -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;
}



+ 5
- 1
common/JackNetTool.h View File

@@ -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++;
}
}


Loading…
Cancel
Save