[RTnet-developers] examples/generic/linux_server.c bugfix
Brought to you by:
bet-frogger,
kiszka
|
From: Wolfgang <wk...@ko...> - 2007-10-17 10:24:16
|
Hello, There is a bug in rtnet-0.9.9/examples/generic/linux_server.c as well as in current SVN. Details: The variable clientLength is not initialized before it is passed to recvfrom. Yet, according to "man 2 recvfrom" (debian etch) it should be "initialized to the size of the buffer associated with from". I tried the program without my bugfix (below) and it did not work (AFAIR "recvfrom() invalid parameter" or wrong address displayed after RCV), with the fix it worked as expected. Fix: just add clientLength initialization. see attached patch. Bye, Wolfgang |