[ECOS] Problems with accept() not awakening upon connection

Øyvind Harboe oyvind.harboe@zylin.com
Tue Apr 20 19:36:00 GMT 2004


Currently I'm trying to debug a echo.c app using sockets.

This is with bsd_tcpip and PPP.

If anyone has any insights to offer, it would be most appreciated. 


- It works fine when I compile and run it as a CygWin app, so I believe
the echo.c is using the sockets API correctly.
- When I run the same code under eCos, accept() does not return until I
kill the telnet app which is trying to connect. At that point the eCos
app receives all the data I typed into the telnet console. It appears
as if accept() simply isn't being awaken upon the connection.
- as an orthogonal test, the code below isn't awoken upon a connection
either. Placed just before accept() in echo.c. (Again works when I run
the same test as a CygWin app).


	fd_set in_fds;
	// Wait for a connection on either of the ports
    	FD_ZERO(&in_fds);
	FD_SET(sd, &in_fds);
	// not awoken until connecting telnet application is terminated
	select(sd+1, &in_fds, 0, 0, 0);
			        







-- 

Øyvind Harboe
http://www.zylin.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: echo.c
Type: text/x-c
Size: 1432 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20040420/4b7e063d/attachment.bin>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list