diff options
author | Ingo Albrecht <prom@berlin.ccc.de> | 2010-03-07 06:49:57 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-07 12:04:21 +0100 |
commit | 1bef8f33da8fe9d5cbc8eedcdc5b7a6141c989f4 (patch) | |
tree | 553f92c8422e6383193c911fd93e56bbd4d32c41 /src/host/osmocon | |
parent | a731ef52980f1c31008688f9d451b7d0fdd49e7e (diff) |
Handle EAGAIN. Print errors properly.
Diffstat (limited to 'src/host/osmocon')
-rw-r--r-- | src/host/osmocon/osmocon.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 6376e3d1..8147a102 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -529,7 +529,10 @@ static int un_tool_read(struct bsc_fd *fd, unsigned int flags) goto close; } if(rc < 0) { - fprintf(stderr, "Err from socket: \n", strerror(errno)); + if(errno == EAGAIN) { + continue; + } + fprintf(stderr, "Err from socket: %s\n", strerror(errno)); goto close; } c += rc; @@ -545,7 +548,10 @@ static int un_tool_read(struct bsc_fd *fd, unsigned int flags) goto close; } if(rc < 0) { - fprintf(stderr, "Err from socket: \n", strerror(errno)); + if(errno == EAGAIN) { + continue; + } + fprintf(stderr, "Err from socket: %s\n", strerror(errno)); goto close; } c += rc; |