diff options
Diffstat (limited to 'apps/examples/poll')
-rw-r--r-- | apps/examples/poll/host.c | 9 | ||||
-rw-r--r-- | apps/examples/poll/net_listener.c | 4 | ||||
-rw-r--r-- | apps/examples/poll/net_reader.c | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/apps/examples/poll/host.c b/apps/examples/poll/host.c index 47f2c3e53..302cceb0f 100644 --- a/apps/examples/poll/host.c +++ b/apps/examples/poll/host.c @@ -1,8 +1,8 @@ /**************************************************************************** * examples/poll/host.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -137,6 +137,11 @@ int main(int argc, char **argv, char **envp) message("client: recv failed: %d\n", errno); goto errout_with_socket; } + else if (nbytesrecvd == 0) + { + message("client: The server broke the connections\n"); + goto errout_with_socket; + } inbuf[nbytesrecvd] = '\0'; message("client: Received '%s' (%d bytes)\n", inbuf, nbytesrecvd); diff --git a/apps/examples/poll/net_listener.c b/apps/examples/poll/net_listener.c index 4d425c608..4bde567fb 100644 --- a/apps/examples/poll/net_listener.c +++ b/apps/examples/poll/net_listener.c @@ -1,8 +1,8 @@ /**************************************************************************** * examples/poll/net_listener.c * - * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/examples/poll/net_reader.c b/apps/examples/poll/net_reader.c index b0cf94316..ea0accc8d 100644 --- a/apps/examples/poll/net_reader.c +++ b/apps/examples/poll/net_reader.c @@ -1,8 +1,8 @@ /**************************************************************************** * examples/poll/net_reader.c * - * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions |