TCP/TCPListener.m
changeset 32 b3254a2f6d6c
parent 22 8b883753394a
child 38 f090fd705556
child 43 aab592ac36fc
     1.1 --- a/TCP/TCPListener.m	Sun Jul 13 10:42:50 2008 -0700
     1.2 +++ b/TCP/TCPListener.m	Wed Apr 29 13:57:10 2009 -0700
     1.3 @@ -156,10 +156,13 @@
     1.4          addr6.sin6_port = htons(_port);
     1.5          memcpy(&(addr6.sin6_addr), &in6addr_any, sizeof(addr6.sin6_addr));
     1.6          
     1.7 -        _ipv6socket = [self _openProtocol: PF_INET6 address: (struct sockaddr*)&addr6 error: outError];
     1.8 +        NSError *error;
     1.9 +        _ipv6socket = [self _openProtocol: PF_INET6 address: (struct sockaddr*)&addr6 error: &error];
    1.10          if( ! _ipv6socket ) {
    1.11              _ipv4socket = closeSocket(_ipv4socket);
    1.12 -            return [self _failedToOpen: *outError];
    1.13 +            [self _failedToOpen: error];
    1.14 +            if (outError) *outError = error;
    1.15 +            return NO;
    1.16          }
    1.17      }
    1.18