changeset 103:a4ed486f64cc

8072914: IOException is not thrown if not SPI/I2C device is connected Summary: Use correct status variable to compare Reviewed-by: alkonsta
author snazarki
date Wed, 11 Feb 2015 13:44:37 +0300
parents ef756a3c97d0
children 56c334d1408c
files src/se/native/com/oracle/dio/i2cbus/impl/jni_i2c.cpp src/se/native/com/oracle/dio/spibus/impl/jni_spi.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/i2cbus/impl/jni_i2c.cpp	Wed Feb 11 12:17:04 2015 +0300
+++ b/src/se/native/com/oracle/dio/i2cbus/impl/jni_i2c.cpp	Wed Feb 11 13:44:37 2015 +0300
@@ -174,7 +174,7 @@
                                              (char*)(directArray + off + pos),
                                              lim - pos,
                                              &bytesTransferred);
-                            if (result != JAVACALL_DIO_OK) {
+                            if ((javacall_int32)status != (javacall_int32)JAVACALL_DIO_OK) {
                                 // notified status has higher proirity
                                 result = (javacall_dio_result)(javacall_int32)status;
                             }
--- a/src/se/native/com/oracle/dio/spibus/impl/jni_spi.cpp	Wed Feb 11 12:17:04 2015 +0300
+++ b/src/se/native/com/oracle/dio/spibus/impl/jni_spi.cpp	Wed Feb 11 13:44:37 2015 +0300
@@ -202,7 +202,7 @@
                                              (const char*)(srcDirectArray + srcOff + srcPos),
                                              (char*)(dstDirectArray + dstOff + dstPos),
                                              dstLim - dstPos);
-                            if (result != JAVACALL_DIO_OK) {
+                            if ((javacall_int32)status != (javacall_int32)JAVACALL_DIO_OK) {
                                 // the notified status has higher priority
                                 result = (javacall_dio_result)(javacall_int32)status;
                             }