diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-01-30 23:13:29 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-01-30 23:13:29 +0000 |
commit | 019b83fc5459a0f7df9a5f1e8bfcff7251447f7e (patch) | |
tree | 29e758d4ad659422a03a1379ada5d5453db2c049 /nuttx/net | |
parent | 1e4d04d53bf7b7f1cf97e33a51638decc723ce4c (diff) | |
download | px4-firmware-019b83fc5459a0f7df9a5f1e8bfcff7251447f7e.tar.gz px4-firmware-019b83fc5459a0f7df9a5f1e8bfcff7251447f7e.tar.bz2 px4-firmware-019b83fc5459a0f7df9a5f1e8bfcff7251447f7e.zip |
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
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/net_clone.c | 4 | ||||
-rw-r--r-- | nuttx/net/net_internal.h | 1 | ||||
-rw-r--r-- | nuttx/net/net_sockets.c | 16 |
3 files changed, 10 insertions, 11 deletions
diff --git a/nuttx/net/net_clone.c b/nuttx/net/net_clone.c index 8100e63d2..ada223484 100644 --- a/nuttx/net/net_clone.c +++ b/nuttx/net/net_clone.c @@ -1,8 +1,8 @@ /**************************************************************************** * net/net_clone.c * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 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/nuttx/net/net_internal.h b/nuttx/net/net_internal.h index 4046070ab..190d57815 100644 --- a/nuttx/net/net_internal.h +++ b/nuttx/net/net_internal.h @@ -48,7 +48,6 @@ #include <time.h> #include <nuttx/net.h> -#include <net/psock.h> #include <net/uip/uip.h> /**************************************************************************** diff --git a/nuttx/net/net_sockets.c b/nuttx/net/net_sockets.c index 31c1709d7..0ff4b57ad 100644 --- a/nuttx/net/net_sockets.c +++ b/nuttx/net/net_sockets.c @@ -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); } } |