spurious setsockopt in telnetd
Fernando RUIZ
correo at fernando-ruiz.com
Sun Dec 17 11:35:06 UTC 2006
HI,
Certainly the parameter '0' is not a good symbol.
if (setsockopt(des_socket,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(i)) == -1)
{
perror("telnetd:setsockopt(SO_REUSEADDR)");
close(des_socket);
rtems_task_delete(RTEMS_SELF);
};
If the function fails your server halts in next functions.
"Address already in use"
This happens only when the server restarts quickly.
The code has been borrowed from an old server sample code.
Sorry.
See you.
-----Mensaje original-----
De: rtems-users-bounces+correo=fernando-ruiz.com at rtems.org
[mailto:rtems-users-bounces+correo=fernando-ruiz.com at rtems.org]En nombre
de Nickolay Kolchin
Enviado el: dimanche 10 decembre 2006 08:49
Para: RTEMS - Mailing List
Asunto: spurious setsockopt in telnetd
Hi,
telnetd.c:rtems_task_telnetd contains strange setsockopt call (4.6,
CVS, probably all versions):
setsockopt(des_socket,SOL_SOCKET,0,&i,sizeof(i));
In theory this call should always fail. Is this a bug, or some
undocumented setsockopt feature?
-------
NBK
_______________________________________________
rtems-users mailing list
rtems-users at rtems.com
http://rtems.rtems.org/mailman/listinfo/rtems-users
More information about the users
mailing list