diff options
| author | 2012-06-14 20:33:56 -0700 | |
|---|---|---|
| committer | 2012-06-14 20:33:56 -0700 | |
| commit | 3199209c92fd31444e179a8ea05ebdf9347b8086 (patch) | |
| tree | 70d8268ffa6aa3bdb284c3c715337b26ac4bda95 | |
| parent | d71aae232972eb7e5bec1d0c3fa557a2be4e4410 (diff) | |
| parent | 8607127d8bd9bf87cce9dde5451c926a14548bfd (diff) | |
am 8607127d: am 839734bb: Merge "Handle ENITR failure for Headset control channel." into jb-dev
* commit '8607127d8bd9bf87cce9dde5451c926a14548bfd':
Handle ENITR failure for Headset control channel.
| -rw-r--r-- | core/jni/android_bluetooth_HeadsetBase.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp index 0df211ab197c..34447efc7e45 100644 --- a/core/jni/android_bluetooth_HeadsetBase.cpp +++ b/core/jni/android_bluetooth_HeadsetBase.cpp @@ -115,7 +115,7 @@ again: pfd.fd = fd; pfd.events = POLLIN; *err = errno = 0; - int ret = poll(&pfd, 1, timeout_ms); + int ret = TEMP_FAILURE_RETRY(poll(&pfd, 1, timeout_ms)); if (ret < 0) { ALOGE("poll() error\n"); *err = errno; @@ -136,7 +136,7 @@ again: while ((int)(bufit - buf) < (len - 1)) { errno = 0; - int rc = read(fd, bufit, 1); + int rc = TEMP_FAILURE_RETRY(read(fd, bufit, 1)); if (!rc) break; @@ -427,7 +427,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj, { char ch; errno = 0; - int nr = read(nat->rfcomm_sock, &ch, 1); + int nr = TEMP_FAILURE_RETRY(read(nat->rfcomm_sock, &ch, 1)); /* It should be that nr != 1 because we just opened a socket and we haven't sent anything over it for the other side to respond... but one can't be paranoid enough. |