RE : [lwip-users] Weird behavior of lwIP with C functions
From:
Louis Filasky
Subject:
RE : [lwip-users] Weird behavior of lwIP with C functions
Date:
Tue, 10 Jul 2007 21:15:35 +0200
Hi Frederic,
Thank you for your quick reply,
Well, I was wondering about the netbuf_copy_partial function you talked to me about. Isnt it a socket api function? I am using the raw api and well, I can see what you mean when you say that there is a chain of pbuf when data is received and I am only taking the data of the first current pbuf received. You re right saying it could be handled better, still the command line I am sending to Virtex II are no more longer than 10 chars so I guess it shouldn't cause the software to crash. Besides I debugged the code by removing some parts and see how the server behaves. No problem appears to come before i check the commandType variable with a strncpy, then in this if, it starts behaving weirdly.
Anyway, regarding sprintf, is memcpy better?
Thanks again,
Antoine.
Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail et bénéficiez de 2 Go de stockage ! Windows Live Hotmail