refactorized

git-svn-id: svn://code.dyne.org/veejay/trunk@159 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2005-01-27 19:08:51 +00:00
parent bdf93825ee
commit 344fa712a7
17 changed files with 632 additions and 628 deletions

View File

@@ -787,8 +787,8 @@ Boolean NetworkPacketWaiting(OSCPacketBuffer packet) {
int n;
NetworkReturnAddressPtr na = OSCPacketBufferGetClientAddr(packet);
if( use_mcast_ )
{
// if( use_mcast_ )
// {
fd_set fds;
struct timeval no_wait;
int status;
@@ -798,13 +798,16 @@ Boolean NetworkPacketWaiting(OSCPacketBuffer packet) {
status = select( na->sockfd + 1, &fds, 0, 0, &no_wait );
if(status <= 0)
return FALSE;
}
else
{
if( ioctl( na->sockfd, FIONREAD, &n, 0)==-1) return FALSE;
if( n==0 ) return FALSE;
}
return TRUE;
if(FD_ISSET( na->sockfd, &fds ))
return TRUE;
// }
// else
// {
// if( ioctl( na->sockfd, FIONREAD, &n, 0)==-1) return FALSE;
// if( n==0 ) return FALSE;
// }
// return TRUE;
return FALSE;
}
Boolean NetworkReceivePacket( OSCPacketBuffer packet ) {