Discussion:
[nuttx] nshlib: nsh_parse.c: np_flags are used even if DISABLE_SCRIPT
Sebastien Lorquet sebastien@lorquet.fr [nuttx]
2018-01-22 10:53:07 UTC
Permalink
hello

upgrading from 7.20 to 7.23 (we were eaten by this issue)

in nsh_parse.c at line 1172 np_flags is being read inconditionnally (this is the
only usage in this file, there may be more)

however in apps/nshlib/nsh.h

np_flags is not defined if CONFIG_NSH_DISABLESCRIPT=y

This is also present in the master branch.


CONFIG_NSH_DISABLESCRIPT is active in my configuration. For the moment I worked
this around by allowing scripting.


I dont know if the np_flags should be enabled with less restrictive conditions,
or if the tests should be protected by the config.

Can you please fix this? Sorry I dont have one, I need your input for a rational
decision.

Sebastien
Sebastien Lorquet sebastien@lorquet.fr [nuttx]
2018-01-22 12:54:43 UTC
Permalink
informative note: we were eaten by the issue fixed in this commit:

https://bitbucket.org/nuttx/nuttx/commits/5ffd034f401fd4e28e757b7eb49cfbdd2550e64b

In a few words, unplugging the ethernet cable before any data has been sent is
OK, but hardfauts after the first write :)

Seemed to happen only happens because of TCP write buffering, which is enabled
in our code.

Sebastien
Post by Sebastien Lorquet ***@lorquet.fr [nuttx]
 
hello
upgrading from 7.20 to 7.23 (we were eaten by this issue)
in nsh_parse.c at line 1172 np_flags is being read inconditionnally (this is the
only usage in this file, there may be more)
however in apps/nshlib/nsh.h
np_flags is not defined if CONFIG_NSH_DISABLESCRIPT=y
This is also present in the master branch.
CONFIG_NSH_DISABLESCRIPT is active in my configuration. For the moment I worked
this around by allowing scripting.
I dont know if the np_flags should be enabled with less restrictive conditions,
or if the tests should be protected by the config.
Can you please fix this? Sorry I dont have one, I need your input for a rational
decision.
Sebastien
spudarnia@yahoo.com [nuttx]
2018-01-22 14:32:55 UTC
Permalink
Try bb6877ed783f757a6a5573ddd0594e6f305a9fcc
Sebastien Lorquet sebastien@lorquet.fr [nuttx]
2018-01-22 14:47:05 UTC
Permalink
it works, and saves me 2.6k of flash in the ~300k total :)

I have also seen you changes about CONFIG_NETDEV_IOCTL

Thanks for these changes.

Sebastien
 
Try bb6877ed783f757a6a5573ddd0594e6f305a9fcc
Loading...