summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2010-09-30 10:10:59 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-30 10:10:59 -0700
commit92cb1a026a2d6c594a63c18d8906271147eed85b (patch)
treeb58a18a7ef4913370754d3d3be4c70284a6b551f /cmds
parentc79e74ec1d30f95de89568ee645a9b1577ae73b3 (diff)
parent2cbb56f961e4893a3bf7ded560d4bdbf45eabd01 (diff)
downloadframeworks_base-92cb1a026a2d6c594a63c18d8906271147eed85b.zip
frameworks_base-92cb1a026a2d6c594a63c18d8906271147eed85b.tar.gz
frameworks_base-92cb1a026a2d6c594a63c18d8906271147eed85b.tar.bz2
am 2cbb56f9: Merge "KeyStore: Fix the return value when send() or recv() has an error." into gingerbread
Merge commit '2cbb56f961e4893a3bf7ded560d4bdbf45eabd01' into gingerbread-plus-aosp * commit '2cbb56f961e4893a3bf7ded560d4bdbf45eabd01': KeyStore: Fix the return value when send() or recv() has an error.
Diffstat (limited to 'cmds')
-rw-r--r--cmds/keystore/keystore_get.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/keystore/keystore_get.h b/cmds/keystore/keystore_get.h
index 141f69b..4b4923e 100644
--- a/cmds/keystore/keystore_get.h
+++ b/cmds/keystore/keystore_get.h
@@ -32,7 +32,7 @@ extern "C" {
#endif
/* This function is provided for native components to get values from keystore.
- * Users are required to link against libcutils. Keys are values are 8-bit safe.
+ * Users are required to link against libcutils. Keys and values are 8-bit safe.
* The first two arguments are the key and its length. The third argument
* specifies the buffer to store the retrieved value, which must be an array of
* KEYSTORE_MESSAGE_SIZE bytes. This function returns the length of the value or
@@ -65,7 +65,10 @@ static int keystore_get(const char *key, int length, char *value)
}
offset += n;
}
+ } else {
+ length = -1;
}
+
close(sock);
return length;
}