Re: [RTnet-developers] examples/generic/linux_server.c bugfix
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2007-10-17 19:28:47
|
Wolfgang K=F6bler wrote: > Hello, >=20 > There is a bug in rtnet-0.9.9/examples/generic/linux_server.c as well > as in current SVN.=20 >=20 > 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. >=20 > Fix: > just add clientLength initialization. see attached patch. Very true. Thanks, just applied it. Jan PS: Did you worked on the RTnet wiki entry page? Thanks for your contribution! I have one suggestion, though: What about pushing the detailed structure section into a dedicated page? |