Eagor's Forums » CEN6520 - Project 2 » Message munging
Author Topic: Message munging
David Mauk
Posts: 17
  Date Posted: 2005-02-12 01:45

When I send a message I am receiving the message with 8 bytes tacked onto the front of the message. Has anyone else come across this?

When I print out the message that I am sending everything is fine, but when I print out the message received the message has 8 bytes that were appended to the front of the message.

Any ideas?
 
David Mauk
Posts: 17
Date Posted: 2005-02-12 14:38

Nevermind

When I was passing in the message buffer to the sendto() I accidentally passed in the address of the pointer to the array (ie &message->buf ) I had forgotten that in C the name of any array is also a pointer to the beginning of the array. So in affect I was passing a pointer to a pointer that just happened to be declared 8 bytes in advance of the array itself. :)

I hope noone else has this problem.