Changeset bf43de9fc6e2ee0e927bcb143110685e1af80450

Show
Ignore:
Timestamp:
02/09/10 22:03:18 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1265752998 +0000
git-parent:

[0be295055302f1118f893a50937072790a2c35bb]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1265752998 +0000
Message:

fixes #251

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_listener.c

    rc35ae3a rbf43de9  
    286286  } 
    287287  else { 
    288     s.addr6.sin6_family = family; 
    289     s.addr6.sin6_port = htons(port); 
    290     memcpy(&s.addr6.sin6_addr, &a, sizeof(a)); 
     288    if(family == AF_INET6) { 
     289      s.addr6.sin6_family = family; 
     290      s.addr6.sin6_port = htons(port); 
     291      memcpy(&s.addr6.sin6_addr, &a.addr6, sizeof(a.addr6)); 
     292    } 
     293    else { 
     294      s.addr4.sin_family = family; 
     295      s.addr4.sin_port = htons(port); 
     296      memcpy(&s.addr4.sin_addr, &a.addr4, sizeof(a.addr4)); 
     297    } 
    291298    sockaddr_len = (family == AF_INET) ?  sizeof(s.addr4) : sizeof(s.addr6); 
    292299  }