@@ -30,11 +30,11 @@ #ifndef NSPROTO_SPX # define NSPROTO_SPX 0 #endif -#define SPX_PACKET_TYPE 5 +static const uint8_t SPXPacketType = 5; @interface OFSPXStreamSocket () - (int)of_createSocketForAddress: (const OFSocketAddress *)address errNo: (int *)errNo; - (bool)of_connectSocketToAddress: (const OFSocketAddress *)address @@ -326,11 +326,11 @@ if ((_socket = socket(address.sockaddr.sockaddr.sa_family, SOCK_STREAM | SOCK_CLOEXEC, NSPROTO_SPX)) == OFInvalidSocketHandle) @throw [OFBindFailedException exceptionWithPort: port - packetType: SPX_PACKET_TYPE + packetType: SPXPacketType socket: self errNo: OFSocketErrNo()]; _canBlock = true; @@ -344,11 +344,11 @@ closesocket(_socket); _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port - packetType: SPX_PACKET_TYPE + packetType: SPXPacketType socket: self errNo: errNo]; } memset(&address, 0, sizeof(address)); @@ -361,23 +361,23 @@ closesocket(_socket); _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port - packetType: SPX_PACKET_TYPE + packetType: SPXPacketType socket: self errNo: errNo]; } if (address.sockaddr.sockaddr.sa_family != AF_IPX) { closesocket(_socket); _socket = OFInvalidSocketHandle; @throw [OFBindFailedException exceptionWithPort: port - packetType: SPX_PACKET_TYPE + packetType: SPXPacketType socket: self errNo: EAFNOSUPPORT]; } return address; } @end