diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-31 06:10:25 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-31 06:11:31 +0200 |
commit | 6ed0948d5df69ff81404a702cfbebe3217fa2f90 (patch) | |
tree | 6ddaf5523639c2f6f81f479b12745a2f9926a52e /src/send.c | |
parent | 73f7d5048c0e2ad4817ad208de02adee73938ed0 (diff) | |
download | fastd-6ed0948d5df69ff81404a702cfbebe3217fa2f90.tar fastd-6ed0948d5df69ff81404a702cfbebe3217fa2f90.zip |
Remove EINTR handling where signals are blocked anyways
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -128,10 +128,7 @@ static void send_type(const fastd_socket_t *sock, const fastd_peer_address_t *lo if (!msg.msg_controllen) msg.msg_control = NULL; - int ret; - do { - ret = sendmsg(sock->fd, &msg, 0); - } while (ret < 0 && errno == EINTR); + int ret = sendmsg(sock->fd, &msg, 0); if (ret < 0 && errno == EINVAL && msg.msg_controllen) { pr_debug2("sendmsg failed, trying again without pktinfo"); @@ -142,10 +139,7 @@ static void send_type(const fastd_socket_t *sock, const fastd_peer_address_t *lo msg.msg_control = NULL; msg.msg_controllen = 0; - do { - ret = sendmsg(sock->fd, &msg, 0); - } while (ret < 0 && errno == EINTR); - + ret = sendmsg(sock->fd, &msg, 0); } if (ret < 0) { |