diff options
author | Harald Welte <laforge@netfilter.org> | 2009-12-24 12:49:43 +0100 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-12-24 12:49:43 +0100 |
commit | da956931fab20413f658961d6aab798336acf2d7 (patch) | |
tree | ea63182397befcef39aa662415d693322650ac02 /openbsc/src/ipaccess | |
parent | 5b8ed4398ef5bf9c70384ce5e974844f07bfd921 (diff) |
if we recv() from an abis-ip socket, don't consider -EAGAIN an error
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-proxy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c index dd9d6b1b5..61c3c5b75 100644 --- a/openbsc/src/ipaccess/ipaccess-proxy.c +++ b/openbsc/src/ipaccess/ipaccess-proxy.c @@ -321,7 +321,8 @@ static int handle_udp_read(struct bsc_fd *bfd) hh = (struct ipaccess_head *) msg->data; ret = recv(bfd->fd, msg->data, msg->data_len, 0); if (ret < 0) { - DEBUGP(DINP, "recv error %s\n", strerror(errno)); + if (ret != -EAGAIN) + DEBUGP(DINP, "recv error %s\n", strerror(errno)); msgb_free(msg); return ret; } @@ -634,7 +635,8 @@ struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error) hh = (struct ipaccess_head *) msg->data; ret = recv(bfd->fd, msg->data, 3, 0); if (ret < 0) { - LOGP(DINP, LOGL_ERROR, "recv error: %s\n", strerror(errno)); + if (ret != -EAGAIN) + LOGP(DINP, LOGL_ERROR, "recv error: %s\n", strerror(errno)); msgb_free(msg); *error = ret; return NULL; |