Lines Matching defs:length
36 * The first two arguments are the key and its length. The third argument
38 * KEYSTORE_MESSAGE_SIZE bytes. This function returns the length of the value or
40 static int keystore_get(const char *key, int length, char *value)
42 uint8_t bytes[2] = {length >> 8, length};
46 if (length < 0 || length > KEYSTORE_MESSAGE_SIZE) {
55 send(sock, key, length, 0) == length && shutdown(sock, SHUT_WR) == 0 &&
59 length = bytes[0] << 8 | bytes[1];
60 while (offset < length) {
61 int n = recv(sock, &value[offset], length - offset, 0);
63 length = -1;
69 length = -1;
73 return length;