Get rid of psock.h (bad idea); Add logic to clone the socket structure when wrapping the telnet connection as a character driver

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4349 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-01-30 23:13:29 +00:00
parent 1e4d04d53b
commit 019b83fc54
8 changed files with 80 additions and 335 deletions
+8 -8
View File
@@ -185,20 +185,20 @@ int net_releaselist(FAR struct socketlist *list)
if (crefs <= 0)
{
/* Close each open socket in the list
* REVISIT: psock_close() will attempt to use semaphores.
* If we actually are in the IDLE thread, then could this cause
* problems? Probably not, it the task has exited and crefs is
* zero, then there probably could not be a contender for the
* semaphore.
*/
/* Close each open socket in the list
* REVISIT: psock_close() will attempt to use semaphores.
* If we actually are in the IDLE thread, then could this cause
* problems? Probably not, if the task has exited and crefs is
* zero, then there probably could not be a contender for the
* semaphore.
*/
for (ndx = 0; ndx < CONFIG_NSOCKET_DESCRIPTORS; ndx++)
{
FAR struct socket *psock = &list->sl_sockets[ndx];
if (psock->s_crefs > 0)
{
(void)psock_close(psock);
(void)psock_close(psock);
}
}