Skip to content

Commit

Permalink
Re-add print statements on actual error
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Apr 14, 2020
1 parent 76c07f3 commit f151c10
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 9 deletions.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv5.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv6.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv6_HF.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv7.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv7_HF.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv8.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_32/libNRJavaSerialv8_HF.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/ARM_64/libNRJavaSerialv8.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/x86_32/libNRJavaSerial.so
Binary file not shown.
Binary file modified src/main/c/resources/native/linux/x86_64/libNRJavaSerial.so
Binary file not shown.
Binary file modified src/main/c/resources/native/windows/x86_32/libNRJavaSerial.dll
Binary file not shown.
Binary file modified src/main/c/resources/native/windows/x86_64/libNRJavaSerial.dll
Binary file not shown.
20 changes: 11 additions & 9 deletions src/main/c/src/SerialImp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5445,23 +5445,25 @@ int fhs_lock( const char *filename, int pid )
fd = open( file, O_CREAT | O_WRONLY | O_EXCL, 0666 );
if( fd < 0 )
{
// sprintf( message,
// "RXTX fhs_lock() Error: opening lock file: %s: %s.",
// file, strerror(errno) );
// report_error( message );

fd = open( file, O_WRONLY );
if( fd < 0 ){
// sprintf( message,
// " FAILED TO OPEN: %s\n",
// strerror(errno) );
// report_error( message );
sprintf( message,
" FAILED TO OPEN: %s\n",
strerror(errno) );
report_error( message );
return 1;
}

if(check_lock_pid( file, pid )==0){
// report_error(" It is mine\n" );
}else{
sprintf(message, "RXTX fhs_lock() Error: opening lock file: %s: %s.", file,
strerror(errno));
report_error( message );
report_error(" It is NOT mine\n" );
}
// report_error( "\n" );
report_error( "\n" );
close( fd );
return 1;
}
Expand Down

0 comments on commit f151c10

Please sign in to comment.