Hi, Can you disable the nagle algorithm to be sure? (in this case, you should also have 3 frames, but, if the problem is in segment concatenation, you should got good datas)
About your sample, since you write : send(SmtpState.iSocket, "012345", 5, 0); // Send_1 You should got "abdcdefgh01234ABCDEF" (without the "5"). Right? ==================================== Frédéric BERNON HYMATOM SA Chef de projet informatique Microsoft Certified Professional Tél. : +33 (0)4-67-87-61-10 Fax. : +33 (0)4-67-70-85-44 Email : [EMAIL PROTECTED] Web Site : http://www.hymatom.fr ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Winformatik Info Envoyé : mercredi 22 août 2007 10:15 À : Mailing list for lwIP users Objet : [lwip-users] Problem with socket send() Hi I have written a SMTP client and used the socket programming. I did the programming with an old version of lwIP (prior 1.20 but newer than 1.10... I think). With this version the SMTO client works like expected. After switching to the latest CVS HEAD the SMTP client does not work well any more. The problem happens if the SMTP code calls 3 times the send() function, one after another and only if any of the first two calls of send() is called with a odd number of bytes to send, like (pseudo code): send(SmtpState.iSocket, "abcdefgh", 8, 0); // Send_0 send(SmtpState.iSocket, "012345", 5, 0); // Send_1 send(SmtpState.iSocket, "ABCDEF", 6, 0); // Send_2 If the "Send_1" would be called with an even number of bytes the problem does not occur. After recording the frames with the Wireshark software. I found, that the three calls of send() resulting in one frame which is send over the Ethernet (I use a CS8900 Ethernet chip with 16Bit access). But the data content of the this frame seems to be wrong. It looks like : "abdcdefgh012345 ABCDEF" instead of "abdcdefgh012345ABCDEF" It seems, that the different buffers (or the data inside) used by the three send() calls are not merged the right way. I tracked down the problem to the functions tcp_output() and tcp_output_segment(), but the code is very difficult to understand. BTW: If I insert a time-out (I use a RTOS) between the send() calls the data is send correct, of course in separate frames. I did verified the problem on to different architectures (a H8S and an ARM7 Hardware; means a 16- and a 32-bit system). The problem is the same on both systems. Does somebody have an idea what's going wrong here ? Does somebody could verify this behaviour ? Thank you very much for any help. Kind regards Roland _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
BEGIN:VCARD VERSION:2.1 N:BERNON;Frédéric;;M. FN:Frédéric BERNON ORG:HYMATOM SA;Recherche et Développement TITLE:Chef de projet informatique TEL;WORK;VOICE:04-67-87-61-10 TEL;WORK;FAX:04-67-70-85-44 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE; LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D= =0AFrance URL;WORK:http://www.hymatom.fr ROLE:Chef de projet informatique EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020404T083210Z END:VCARD
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
