From 3714e3430e3f44578d7799d163809ad0a77f7460 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Fri, 19 Aug 2011 10:31:20 +0200 Subject: Fix GB<->ICS sharing. Should throw an IOException() whenever recv() failed. Also changed recv error return value to be -1, to be more in line with common sockets. Change-Id: If65fe9e22c76f0a4558a9a6dedc0662bac038ee8 --- jni/com_android_nfc_NativeLlcpSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jni') diff --git a/jni/com_android_nfc_NativeLlcpSocket.cpp b/jni/com_android_nfc_NativeLlcpSocket.cpp index b2784f6..8ad281a 100644 --- a/jni/com_android_nfc_NativeLlcpSocket.cpp +++ b/jni/com_android_nfc_NativeLlcpSocket.cpp @@ -311,7 +311,7 @@ static jint com_android_nfc_NativeLlcpSocket_doReceive(JNIEnv *e, jobject o, jby phLibNfc_Handle hLlcpSocket; phNfc_sData_t sReceiveBuffer = {NULL, 0}; struct nfc_jni_callback_data cb_data; - jint result = 0; + jint result = -1; /* Retrieve handles */ hRemoteDevice = nfc_jni_get_p2p_device_handle(e,o); -- cgit v1.1