#include <stdlib.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
num_bytes);
if (nw == -1)
{
- if (errno == EWOULDBLOCK)
+ if (get_socket_errno() == EWOULDBLOCK)
{
break;
}
- else if (errno != EINTR)
+ else if (get_socket_errno() != EINTR)
{
client->error= errno;
return PROTOCOL_BINARY_RESPONSE_EIO;
.extlen= 4,
.bodylen= htonl(bodylen + keylen + 4),
},
- .message.body.flags= htonl(flags),
};
+ response.message.body.flags= htonl(flags);
+
protocol_binary_response_status rval;
const protocol_binary_response_status success= PROTOCOL_BINARY_RESPONSE_SUCCESS;
if ((rval= client->root->spool(client, response.bytes, sizeof(response.bytes))) != success ||