const char v2sig[] = PP2_SIGNATURE;
int tlv_length = 0;
int tlv_offset = 0;
+ int ret;
/* we might have been called just after an asynchronous shutr */
if (conn->flags & CO_FL_SOCK_RD_SH)
return 0;
do {
- trash.data = recv(conn->handle.fd, trash.area, trash.size,
- MSG_PEEK);
- if (trash.data < 0) {
+ ret = recv(conn->handle.fd, trash.area, trash.size, MSG_PEEK);
+ if (ret < 0) {
if (errno == EINTR)
continue;
if (errno == EAGAIN) {
}
goto recv_abort;
}
+ trash.data = ret;
} while (0);
if (!trash.data) {
char *line;
uint32_t hdr_len;
uint8_t ip_v;
+ int ret;
/* we might have been called just after an asynchronous shutr */
if (conn->flags & CO_FL_SOCK_RD_SH)
return 0;
do {
- trash.data = recv(conn->handle.fd, trash.area, trash.size,
- MSG_PEEK);
- if (trash.data < 0) {
+ ret = recv(conn->handle.fd, trash.area, trash.size, MSG_PEEK);
+ if (ret < 0) {
if (errno == EINTR)
continue;
if (errno == EAGAIN) {
}
goto recv_abort;
}
+ trash.data = ret;
} while (0);
if (!trash.data) {