summaryrefslogtreecommitdiffstats
path: root/core/jni/android_bluetooth_HeadsetBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/jni/android_bluetooth_HeadsetBase.cpp')
-rw-r--r--core/jni/android_bluetooth_HeadsetBase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp
index bad0186..71279b2 100644
--- a/core/jni/android_bluetooth_HeadsetBase.cpp
+++ b/core/jni/android_bluetooth_HeadsetBase.cpp
@@ -396,7 +396,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
LOGE("select() on RFCOMM socket: %s (%d)",
strerror(errno),
errno);
- return -1;
+ return -errno;
}
return 0;
}
@@ -429,7 +429,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
fcntl(nat->rfcomm_sock, F_SETFL, nat->rfcomm_sock_flags);
close(nat->rfcomm_sock);
nat->rfcomm_sock = -1;
- return -1;
+ return -errno;
}
}
/* Restore the blocking properties of the socket. */