Re-verficatin of examples/telnetd after refactoring of fgets/readline functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4358 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
53e5347643
commit
db676edee2
@ -417,6 +417,19 @@ examples/nsh
|
|||||||
CONFIGURED_APPS += tftp
|
CONFIGURED_APPS += tftp
|
||||||
CONFIGURED_APPS += webclient
|
CONFIGURED_APPS += webclient
|
||||||
|
|
||||||
|
If the Telnet console is enabled, then the appconfig file (apps/.config)
|
||||||
|
should also include:
|
||||||
|
|
||||||
|
CONFIGURED_APPS += netutils/telnetd
|
||||||
|
|
||||||
|
Also if the Telnet console is enabled, make sure that you have the
|
||||||
|
following set in the NuttX configuration file or else the performance
|
||||||
|
will be very bad (because there will be only one character per TCP
|
||||||
|
transfer):
|
||||||
|
|
||||||
|
CONFIG_STDIO_BUFFER_SIZE - Some value >= 64
|
||||||
|
CONFIG_STDIO_LINEBUFFER=y
|
||||||
|
|
||||||
examples/nx
|
examples/nx
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
@ -932,6 +945,19 @@ examples/telnetd
|
|||||||
10.0.0.1
|
10.0.0.1
|
||||||
CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
|
||||||
|
|
||||||
|
The appconfig file (apps/.config) should include:
|
||||||
|
|
||||||
|
CONFIGURED_APPS += examples/telnetd
|
||||||
|
CONFIGURED_APPS += netutils/uiplib
|
||||||
|
CONFIGURED_APPS += netutils/telnetd
|
||||||
|
|
||||||
|
Also, make sure that you have the following set in the NuttX configuration
|
||||||
|
file or else the performance will be very bad (because there will be only
|
||||||
|
one character per TCP transfer):
|
||||||
|
|
||||||
|
CONFIG_STDIO_BUFFER_SIZE - Some value >= 64
|
||||||
|
CONFIG_STDIO_LINEBUFFER=y
|
||||||
|
|
||||||
examples/thttpd
|
examples/thttpd
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -44,8 +44,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <net/if.h>
|
||||||
|
|
||||||
#include <apps/netutils/telnetd.h>
|
#include <apps/netutils/telnetd.h>
|
||||||
#include <apps/netutils/uiplib.h>
|
#include <apps/netutils/uiplib.h>
|
||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -518,8 +518,12 @@ static int telnetd_close(FAR struct file *filep)
|
|||||||
|
|
||||||
psock_close(&priv->td_psock);
|
psock_close(&priv->td_psock);
|
||||||
|
|
||||||
/* Release the driver memory. What if there are threads
|
/* Release the driver memory. What if there are threads waiting on
|
||||||
* waiting on td_exclsem? They will never be awakened!
|
* td_exclsem? They will never be awakened! How could this happen?
|
||||||
|
* crefs == 1 so there are no other open references to the driver.
|
||||||
|
* But this could have if someone were trying to re-open the driver
|
||||||
|
* after every other thread has closed it. That really should not
|
||||||
|
* happen in the intended usage model.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEBUGASSERT(priv->td_exclsem.semcount == 0);
|
DEBUGASSERT(priv->td_exclsem.semcount == 0);
|
||||||
@ -733,6 +737,8 @@ FAR char *telnetd_driver(int sd, FAR struct telnetd_s *daemon)
|
|||||||
|
|
||||||
/* Initialize the allocated driver instance */
|
/* Initialize the allocated driver instance */
|
||||||
|
|
||||||
|
sem_init(&priv->td_exclsem, 0, 1);
|
||||||
|
|
||||||
priv->td_state = STATE_NORMAL;
|
priv->td_state = STATE_NORMAL;
|
||||||
priv->td_crefs = 0;
|
priv->td_crefs = 0;
|
||||||
priv->td_pending = 0;
|
priv->td_pending = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user