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
This commit is contained in:
parent
b4cff0fa72
commit
d39a78a910
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user