summaryrefslogtreecommitdiffstats
path: root/src/host/osmocon
diff options
context:
space:
mode:
authorIngo Albrecht2010-03-07 06:49:57 +0100
committerHarald Welte2010-03-07 12:04:21 +0100
commit1bef8f33da8fe9d5cbc8eedcdc5b7a6141c989f4 (patch)
tree553f92c8422e6383193c911fd93e56bbd4d32c41 /src/host/osmocon
parentFixed transmit path of osmocon in various ways. (diff)
downloadosmocom-1bef8f33da8fe9d5cbc8eedcdc5b7a6141c989f4.tar.gz
osmocom-1bef8f33da8fe9d5cbc8eedcdc5b7a6141c989f4.tar.xz
osmocom-1bef8f33da8fe9d5cbc8eedcdc5b7a6141c989f4.zip
Handle EAGAIN. Print errors properly.
Diffstat (limited to 'src/host/osmocon')
-rw-r--r--src/host/osmocon/osmocon.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 6376e3d..8147a10 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;