recvfrom Clobber
recvfrom Clobber
- Subject: recvfrom Clobber
- From: Scott Minter <email@hidden>
- Date: Mon, 24 Feb 2003 15:42:35 -0500
I have the following three lines of code in a program:
Initialize_Frame(f); /* Initialize the values to zero */
n = 0;
n = recvfrom(sockfd, f, sizeof(*f), 0, sender_address,
&sender_address_length);
When I debugged this code I put a breakpoint at the middle line.
I entered the expression: sizeof(f) and saw that it was 220.
As I follow the code to the recvfrom step I can see that n = 220.
This means that the length of my message was 220 and my pointer
structure = 220. Everything looks good.
BUT, I also watch another pointer named head_of_event_table and as soon
as my recvfrom executes this other pointer gets clobbered.
Viewing the address of the two pointers shows they point to different
addresses. They also point to different types of structures.
Any ideas how recvfrom is clobbering this other pointer?
Absolutely puzzled in FL,
- Scott Minter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.