Fixed error reporting in LLCP receive method.
In this method, reporting that zero bytes have been read means
that an error occured. There is no need for error codes.
Change-Id: I14912effe74375a4bda73c20fa8a42cef7c3ef07
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 9553671..d17decf 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1118,14 +1118,9 @@
/* find the socket in the hmap */
socket = (NativeLlcpSocket) findSocket(nativeHandle);
if (socket != null) {
- receiveLength = socket.doReceive(receiveBuffer);
- if (receiveLength != 0) {
- return receiveLength;
- } else {
- return ErrorCodes.ERROR_IO;
- }
+ return socket.doReceive(receiveBuffer);
} else {
- return ErrorCodes.ERROR_IO;
+ return 0;
}
}