Minor Update:
- Fix log error on port close
This commit is contained in:
@@ -646,7 +646,7 @@ int CSelectableCore::OpenForkPipe( THandle * Handle )
|
|||||||
if ((pipe( pipefd ) == -1) || (pipefd[0] == -1) || (pipefd[1] == -1))
|
if ((pipe( pipefd ) == -1) || (pipefd[0] == -1) || (pipefd[1] == -1))
|
||||||
{
|
{
|
||||||
// Log event
|
// Log event
|
||||||
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Could not open Pipe", Name, Handle->Name );
|
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Could not open Pipe (%s)", Name, Handle->Name, strerror(errno) );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -661,7 +661,7 @@ int CSelectableCore::OpenForkPipe( THandle * Handle )
|
|||||||
Handle->FD = -1;
|
Handle->FD = -1;
|
||||||
|
|
||||||
// Log event
|
// Log event
|
||||||
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Could not Fork process", Name, Handle->Name );
|
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Could not Fork process, %s", Name, Handle->Name, strerror(errno) );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (Handle->ChildPID > 0)
|
else if (Handle->ChildPID > 0)
|
||||||
@@ -1294,7 +1294,7 @@ bool CSelectableCore::Read( THandle * Handle )
|
|||||||
{
|
{
|
||||||
// Log if there is an error
|
// Log if there is an error
|
||||||
if (Log && (BytesWaiting < 1))
|
if (Log && (BytesWaiting < 1))
|
||||||
Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Error: [%d] $s", Name, Handle->Name, errno, strerror(errno) );
|
Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Data waiting error (%s)", Name, Handle->Name, strerror(errno) );
|
||||||
|
|
||||||
// Close Handle
|
// Close Handle
|
||||||
Close( Handle, false );
|
Close( Handle, false );
|
||||||
@@ -1314,7 +1314,7 @@ bool CSelectableCore::Read( THandle * Handle )
|
|||||||
// Error on port
|
// Error on port
|
||||||
if (BytesWaiting < 0)
|
if (BytesWaiting < 0)
|
||||||
{
|
{
|
||||||
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Error: [%d] $s", Name, Handle->Name, errno, strerror(errno) );
|
if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Data waiting error (%s)", Name, Handle->Name, strerror(errno) );
|
||||||
|
|
||||||
// Close Handle
|
// Close Handle
|
||||||
Close( Handle, false );
|
Close( Handle, false );
|
||||||
@@ -1329,7 +1329,7 @@ bool CSelectableCore::Read( THandle * Handle )
|
|||||||
// // Error on port
|
// // Error on port
|
||||||
// if (BytesWaiting < 0)
|
// if (BytesWaiting < 0)
|
||||||
// {
|
// {
|
||||||
// if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Error: [%d] $s", Name, Handle->Name, errno, strerror(errno) );
|
// if (Log) Log->Message( LogLevel, dlMedium, "%s: Handle '%s' - Data waiting error (%s)", Name, Handle->Name, strerror(errno) );
|
||||||
//
|
//
|
||||||
// // Close Handle
|
// // Close Handle
|
||||||
// Close( Handle, false );
|
// Close( Handle, false );
|
||||||
|
|||||||
Reference in New Issue
Block a user