Skip to content
Snippets Groups Projects
Commit d39a78a9 authored by patacongo's avatar patacongo
Browse files

Centralize TCP loss-of-connection bit twiddling

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5542 42af7a65-404d-4744-a932-0658087f49c3
parent b4cff0fa
No related branches found
No related tags found
No related merge requests found
/****************************************************************************
* apps/netutils/telnetd_driver.c
*
* Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* This is a leverage of similar logic from uIP which has a compatible BSD
......@@ -593,6 +593,13 @@ static ssize_t telnetd_read(FAR struct file *filep, FAR char *buffer, size_t len
}
while (ret == 0);
/* Return:
*
* ret > 0: The number of characters copied into the user buffer by
* telnetd_receive().
* ret <= 0: Loss of connection or error events reported by recv().
*/
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment