diff options
author | Jens Gulin <jens.gulin@sonymobile.com> | 2012-07-19 14:10:46 +0200 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-07-27 15:18:23 +0200 |
commit | c20d0f3993ebb0d3dec958a306a68ebb48bfeadd (patch) | |
tree | 730e43282d52f7a419a46baf3d6998e976e1651b /libc/bionic/system_properties.c | |
parent | f6ee33cee717f9878d3a43bf76c35547649676d7 (diff) | |
download | bionic-c20d0f3993ebb0d3dec958a306a68ebb48bfeadd.zip bionic-c20d0f3993ebb0d3dec958a306a68ebb48bfeadd.tar.gz bionic-c20d0f3993ebb0d3dec958a306a68ebb48bfeadd.tar.bz2 |
Correction to use of TEMP_FAILURE_RETRY in send_prop_msg
RETRY macro may retry command if result is -1. In this
case the command was "connect < 0" instead of just
connect. The comparison will not return -1 and thus
retry is never done. This is now corrected so that
interrupts will cause retry instead of fail.
(There was no other negative side effect of the bug.
The result code from RETRY was used in an if-statement
and it would be true for all negative connect results.
This was according to expectations.)
Change-Id: Ie206b39878e9befea4e3be9a4061ee39eb232d80
Diffstat (limited to 'libc/bionic/system_properties.c')
-rw-r--r-- | libc/bionic/system_properties.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/bionic/system_properties.c b/libc/bionic/system_properties.c index 0f4e70c..caa5ca6 100644 --- a/libc/bionic/system_properties.c +++ b/libc/bionic/system_properties.c @@ -176,7 +176,7 @@ static int send_prop_msg(prop_msg *msg) addr.sun_family = AF_LOCAL; alen = namelen + offsetof(struct sockaddr_un, sun_path) + 1; - if(TEMP_FAILURE_RETRY(connect(s, (struct sockaddr *) &addr, alen) < 0)) { + if(TEMP_FAILURE_RETRY(connect(s, (struct sockaddr *) &addr, alen)) < 0) { close(s); return result; } |