TCP/TCPListener.m
changeset 36 5165944a89b3
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	Tue May 05 14:46:42 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