Hi,
Actually am trying to use the libcli with eCos.
Am able to integrate it with my eCos (embedded) application.
Now i just renamed main() with a telnet_start() function and calling under a
eCos thread.
I am able to telnet to the embedded system and able to complete
authentication, etc.
Its executing the commands well.
Problem:
Once i start giving either 'quit'/'exit' - which is calling the quit
command function and
returning CLI_QUIT and coming out of cli_loop() function.
Its calling close(x).
But not sending any FIN on that close, to my telnet client on my PC.
when i do netstat, its showing the connection still establish.
But when compile under cygwin and run on the PC as process and trying
to telnet from telnet client, and close (ie., quit/exit) closing the
application also, working fine.
Here my question is, once integrate with some embedded OS, will there
be any other options to
be set on the socket, such as SO_LINGER etc. to properly see the
socket close() and send the FIN to the application indicating to close
it.
Please help me out, how to get rid of this problem.
best regards,
srinivas.
|