Browse Source

Fix NetDriver (network errors)

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2455 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
moret 17 years ago
parent
commit
3fa859b50c
2 changed files with 8 additions and 1 deletions
  1. +6
    -1
      common/JackNetDriver.cpp
  2. +2
    -0
      common/JackNetTool.h

+ 6
- 1
common/JackNetDriver.cpp View File

@@ -116,6 +116,8 @@ namespace Jack
//then tell the master we are ready
jack_info ( "Initializing connection with %s...", fParams.fMasterNetName );
status = SendMasterStartSync();
if ( status == NET_ERROR )
return false;
}
while ( status != ROLLING );

@@ -217,7 +219,10 @@ namespace Jack
//tell the master to start
SetPacketType ( &fParams, START_MASTER );
if ( send ( fSockfd, &fParams, sizeof ( session_params_t ), MSG_DONTWAIT ) < 0 )
{
jack_error ( "Error in send : %s", strerror ( errno ) );
return ( ( errno == ECONNABORTED ) || ( errno == ECONNREFUSED ) || ( errno == ECONNRESET ) ) ? NET_ERROR : SEND_ERROR;
}
return ROLLING;
}

@@ -237,7 +242,7 @@ namespace Jack
fTxBuffer = NULL;
fRxBuffer = NULL;
fNetAudioCaptureBuffer = NULL;
fNetAudioCaptureBuffer = NULL;
fNetAudioPlaybackBuffer = NULL;
fNetMidiCaptureBuffer = NULL;
fNetMidiPlaybackBuffer = NULL;
fMidiCapturePortList = NULL;


+ 2
- 0
common/JackNetTool.h View File

@@ -57,6 +57,8 @@ namespace Jack
{
SOCKET_ERROR,
CONNECT_ERROR,
NET_ERROR,
SEND_ERROR,
RECV_ERROR,
CONNECTED,
ROLLING


Loading…
Cancel
Save