diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-30 12:57:25 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-30 12:57:25 +0200 |
commit | f0fa4e0c9085e0b4476b144185040ce9fbdc11e3 (patch) | |
tree | 21945650e08f76ad9ee2dc008ff8edfdb9b678bd /src | |
parent | 7f33ccb920df2c308aa3076522bea683c66cb83d (diff) | |
download | fastd-f0fa4e0c9085e0b4476b144185040ce9fbdc11e3.tar fastd-f0fa4e0c9085e0b4476b144185040ce9fbdc11e3.zip |
Demote some sendmsg warnings to debug and debug2 levels
Diffstat (limited to 'src')
-rw-r--r-- | src/send.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -115,8 +115,25 @@ static void send_type(fastd_context_t *ctx, const fastd_socket_t *sock, const fa ret = sendmsg(sock->fd, &msg, 0); } while (ret < 0 && errno == EINTR); - if (ret < 0) - pr_warn_errno(ctx, "sendmsg"); + if (ret < 0) { + switch (errno) { + case EAGAIN: +#if EAGAIN != EWOULDBLOCK + case EWOULDBLOCK: +#endif + pr_debug2_errno(ctx, "sendmsg"); + break; + + case ENETDOWN: + case ENETUNREACH: + case EHOSTUNREACH: + pr_debug_errno(ctx, "sendmsg"); + break; + + default: + pr_warn_errno(ctx, "sendmsg"); + } + } fastd_buffer_free(buffer); } |