Imported Upstream version 2.7.3

This commit is contained in:
Arnaud Quette 2015-04-30 15:53:36 +02:00
parent a356b56d11
commit fd413a3168
283 changed files with 14978 additions and 6511 deletions

View file

@ -238,23 +238,24 @@ static void sock_connect(int sock)
}
/* enable nonblocking I/O */
if (!do_synchronous) {
ret = fcntl(fd, F_GETFL, 0);
ret = fcntl(fd, F_GETFL, 0);
if (ret < 0) {
upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed");
close(fd);
return;
}
if (ret < 0) {
upslog_with_errno(LOG_ERR, "fcntl get on unix fd failed");
close(fd);
return;
ret = fcntl(fd, F_SETFL, ret | O_NDELAY);
if (ret < 0) {
upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed");
close(fd);
return;
}
}
ret = fcntl(fd, F_SETFL, ret | O_NDELAY);
if (ret < 0) {
upslog_with_errno(LOG_ERR, "fcntl set O_NDELAY on unix fd failed");
close(fd);
return;
}
conn = xcalloc(1, sizeof(*conn));
conn->fd = fd;