diff options
Diffstat (limited to 'apps/examples/poll')
-rw-r--r-- | apps/examples/poll/net_listener.c | 2 | ||||
-rw-r--r-- | apps/examples/poll/poll_listener.c | 4 | ||||
-rw-r--r-- | apps/examples/poll/select_listener.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/examples/poll/net_listener.c b/apps/examples/poll/net_listener.c index 2be98673c..3ec02704f 100644 --- a/apps/examples/poll/net_listener.c +++ b/apps/examples/poll/net_listener.c @@ -155,7 +155,7 @@ static inline bool net_incomingdata(struct net_listener_s *nls, int sd) { if (errno != EINTR) { - message("net_listener: Send failed sd=%d: \n", sd, errno); + message("net_listener: Send failed sd=%d: %d\n", sd, errno); net_closeclient(nls, sd); return false; } diff --git a/apps/examples/poll/poll_listener.c b/apps/examples/poll/poll_listener.c index fe1c95089..4c5e602c3 100644 --- a/apps/examples/poll/poll_listener.c +++ b/apps/examples/poll/poll_listener.c @@ -145,7 +145,7 @@ void *poll_listener(pthread_addr_t pvarg) } else if (ret > NPOLLFDS) { - message("poll_listener: ERROR poll reported: %d\n"); + message("poll_listener: ERROR poll reported: %d\n", errno); } else { @@ -172,7 +172,7 @@ void *poll_listener(pthread_addr_t pvarg) } else if (fds[i].revents != 0) { - message("poll_listener: ERROR unexpected revents[i]=%02x\n", + message("poll_listener: ERROR unexpected revents[%d]=%02x\n", i, fds[i].revents); } } diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c index 5cb7e7805..12c4e4453 100644 --- a/apps/examples/poll/select_listener.c +++ b/apps/examples/poll/select_listener.c @@ -120,7 +120,7 @@ void *select_listener(pthread_addr_t pvarg) if (ret < 0) { - message("select_listener: ERROR select failed: %d\n"); + message("select_listener: ERROR select failed: %d\n", errno); } else if (ret == 0) { @@ -131,7 +131,7 @@ void *select_listener(pthread_addr_t pvarg) { if (ret != 1) { - message("select_listener: ERROR poll reported: %d\n"); + message("select_listener: ERROR poll reported: %d\n", ret); } else { @@ -140,7 +140,7 @@ void *select_listener(pthread_addr_t pvarg) if (!FD_ISSET(fd, rfds)) { - message("select_listener: ERROR fd=%d not in fd_set\n"); + message("select_listener: ERROR fd=%d not in fd_set\n", fd); } } |