Skip to content

Commit

Permalink
#111 This adds more print statements
Browse files Browse the repository at this point in the history
so we know which of the 3 possible exit contidions it actually is.
  • Loading branch information
madhephaestus committed May 22, 2020
1 parent 5d6d4e6 commit 5856ab3
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 3 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.
11 changes: 8 additions & 3 deletions src/main/c/src/SerialImp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4189,8 +4189,10 @@ int initialise_event_info_struct( struct event_info_struct *eis )

eis->send_event = (*env)->GetMethodID( env, eis->jclazz, "sendEvent",
"(IZ)Z" );
if(eis->send_event == NULL)
if(eis->send_event == NULL){
report_error("initialise_event_info_struct: eis->send_event == NULL!\n");
goto fail;
}
end:
FD_ZERO( &eis->rfds );
if (eis->fd < FD_SETSIZE && eis->fd > 0) {
Expand All @@ -4199,11 +4201,14 @@ int initialise_event_info_struct( struct event_info_struct *eis )
eis->tv_sleep.tv_usec = 100 * 1000;
eis->initialised = 1;
return( 1 );
} else {
} else if(eis->fd >= FD_SETSIZE ){
// you can reduce this limitation only with migration to epool or something like that.
report_error("initialise_event_info_struct: eis->fd >= FD_SETSIZE!\n");
} else if(eis->fd <= 0 ){
// you can reduce this limitation only with migration to epool or something like that.
report_error("initialise_event_info_struct: eis->fd <= 0!\n");
}
fail:
report_error("initialise_event_info_struct: initialise failed!\n");
finalize_event_info_struct( eis );
return( 0 );
}
Expand Down

0 comments on commit 5856ab3

Please sign in to comment.