[openbeosnetteam] Re: Error in util/misc.c

> struct sockaddr {
> uint8 sa_len;
> uint8 sa_family;
> uint8 sa_data[30];
> };
>
> from in util/misc.c
>
> int compare_sockaddr(struct sockaddr *a, struct sockaddr *b)
> {
> if (a->sa_len == 4) /* IPv4 address, basically a uint32 */
> return (*(a->sa_data) = *(b->sa_data));
> the above line contains three errors
> and should be:
> return (*(uint32 *)(a->sa_data) == *(uint32 *)(b->sa_data));

What happens if it's an ipv6 address?

>
> BTW, David did you have any success debugging the malloc crash yet?

Well, I added some debug_malloc code and decided that experimenting with
spinlocks would be sueful, but to be honest they've caused so much grief I'm
about to remove them! I'm hopeful it will show the problem :) Been down the
pub and then the kebab shop on the way home! Starting to do some work now...
(not sure how good it'll be after the drink though :))

david



Other related posts: