On Sep 7, 10:02 pm, HISONA <hison...@gmail.com> wrote: > When, I call recvfrom function, but "struct sockaddr *addr" parameter > returns NULL value. [...] > int udp_read(int socket_no, char *str, int len, struct sockaddr > *addr) > { > int read; > > return recvfrom(socket_no, str, len, 0, addr, &read);
The last argument is a value-result parameter ("fromlen") that should hold sizeof(struct sockaddr) on entry. You're passing in an uninitialized value. This will work or not depending on what value happens to be passed in. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en