@@ -405,11 +405,11 @@ if (port > 0) return port; #ifndef __wii__ addrLen = sizeof(addr.storage); - if (getsockname(_socket, (struct sockaddr*)&addr, &addrLen)) { + if (getsockname(_socket, (struct sockaddr*)&addr.storage, &addrLen)) { close(_socket); _socket = INVALID_SOCKET; @throw [OFBindFailedException exceptionWithHost: host port: port socket: self]; @@ -504,11 +504,11 @@ @throw [OFNotConnectedException exceptionWithSocket: self]; if (_address == NULL) @throw [OFInvalidArgumentException exception]; - return of_address_to_string(_address, _addressLength); + return of_address_to_string_and_port(_address, _addressLength, NULL); } - (bool)isListening { return _listening;