commit
33b2ae6f88
|
|
@ -223,7 +223,7 @@ static void do_send()
|
||||||
}
|
}
|
||||||
|
|
||||||
err = poll(fds, 1, 1000);
|
err = poll(fds, 1, 1000);
|
||||||
if (err == 0 || (err == -1 && errno != -EINTR)) {
|
if (err == 0 || (err == -1 && errno != EINTR)) {
|
||||||
perror("poll()");
|
perror("poll()");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,7 @@ static int j1939cat_send_loop(struct j1939cat_priv *priv, int out_fd, char *buf,
|
||||||
|
|
||||||
ret = poll(&fds, 1, priv->polltimeout);
|
ret = poll(&fds, 1, priv->polltimeout);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
if (errno == -EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
@ -575,7 +575,7 @@ static int j1939cat_recv(struct j1939cat_priv *priv)
|
||||||
|
|
||||||
ret = poll(&fds, 1, priv->polltimeout);
|
ret = poll(&fds, 1, priv->polltimeout);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
if (errno == -EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue