summaryrefslogtreecommitdiff
path: root/nuttx/examples
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples')
-rw-r--r--nuttx/examples/poll/net_listener.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/examples/poll/net_listener.c b/nuttx/examples/poll/net_listener.c
index bc9840cd8..957f48fc0 100644
--- a/nuttx/examples/poll/net_listener.c
+++ b/nuttx/examples/poll/net_listener.c
@@ -181,11 +181,13 @@ static inline boolean net_connection(struct net_listener_s *nls)
for (;;)
#endif
{
- message("net_listener: Accepting accepting connection on sd=%d\n", nls->listensd);
+ message("net_listener: Accepting new connection on sd=%d\n", nls->listensd);
+
sd = accept(nls->listensd, NULL, NULL);
if (sd < 0)
{
- message("net_listener: accept failed: %d\n", sd);
+ message("net_listener: accept failed: %d\n", errno);
+
if (errno != EINTR)
{
return FALSE;
@@ -195,6 +197,8 @@ static inline boolean net_connection(struct net_listener_s *nls)
{
/* Add the new connection to the master set */
+ message("net_listener: Connection accepted for sd=%d\n", sd);
+
FD_SET(sd, &nls->master);
if (sd > nls->mxsd)
{