[En-Nut-Discussion] NutTcpConnect and NutTcpCloseSocket problem

CAMBON, Olivier Olivier.CAMBON at astrium.eads.net
Wed Aug 8 11:26:48 CEST 2012


Hello everyone,
i am a new use of Ethernut and the board 2.1C.
First, I would like to thank all the developers of the Nut OS and all
the libraries.
The project is really good and easy to use ! Thank you very much !

But, I have a problem with NutTcpConnect.
I use this function to test if a computer of my network is started and
its program is ready to listen.
The problem is when the computer is offline, in the following code,
NutTcpCloseSocket does a reset of the board :

  if(NutTcpConnect(sock, rip, port) != 0) { NutTcpCloseSocket(sock);
return -1; }

If I remove NutTcpCloseSocket the board doesn't reset but I have a
memory leak as the socket has not been removed from the socket list.

I also tried with NutTcpDestroySocket but it also does a reset of the
board.

I saw on the WIKI that sometimes it could have problem with
NutTcpConnect when the connection fails...
But there is no more information.

Could you help me ?
Thanks a lot.

Olivier.



Ce courriel (incluant ses eventuelles pieces jointes) peut contenir des informations confidentielles et/ou protegees ou dont la diffusion est restreinte. Si vous avez recu ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu a quiconque. Merci d'en avertir immediatement l'expediteur et d'effacer ce courriel de votre systeme. Astrium decline toute responsabilite en cas de corruption par virus, d'alteration ou de falsification de ce courriel lors de sa transmission par voie electronique.
This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. 
---------------------------------------------------------------------
Astrium SAS (393 341 516 RCS Nanterre) - Capital: 16.587.728 EUR - Siege social: 12 rue Pasteur, 92150 Suresnes, France



More information about the En-Nut-Discussion mailing list