Differences From Artifact [f84809166c]:
- File src/OFDDPSocket.m — part of check-in [6ed8be900e] at 2022-11-06 20:31:24 on branch trunk — OFDatagramSocket: Make sender nullable (user: js, size: 7171) [annotate] [blame] [check-ins using]
To Artifact [d532fdd70f]:
- File
src/OFDDPSocket.m
— part of check-in
[4d97d89c32]
at
2022-11-06 21:37:11
on branch trunk
— Fix OFDDPSocket on NetBSD
While Linux just ignores the protocol, NetBSD insists on it being 0.
Since this code path was also used by Windows, which requires it to be
ATPROTO_BASE + protocol, this means an extra code path for Windows is
needed now. (user: js, size: 7267) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
42 43 44 45 46 47 48 | unsigned int flags; struct at_addr address, router; unsigned short netStart, netEnd; at_nvestr_t zoneName; }; #endif | < < < < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | unsigned int flags; struct at_addr address, router; unsigned short netStart, netEnd; at_nvestr_t zoneName; }; #endif @implementation OFDDPSocket @dynamic delegate; - (OFSocketAddress)bindToNetwork: (uint16_t)network node: (uint8_t)node port: (uint8_t)port protocolType: (uint8_t)protocolType |
︙ | ︙ | |||
71 72 73 74 75 76 77 | @throw [OFInvalidArgumentException exception]; if (_socket != OFInvalidSocketHandle) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; address = OFSocketAddressMakeAppleTalk(network, node, port); | | | > > > | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | @throw [OFInvalidArgumentException exception]; if (_socket != OFInvalidSocketHandle) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; address = OFSocketAddressMakeAppleTalk(network, node, port); #if defined(OF_MACOS) if ((_socket = socket(address.sockaddr.at.sat_family, SOCK_RAW | SOCK_CLOEXEC, protocolType)) == OFInvalidSocketHandle) #elif defined(OF_WINDOWS) if ((_socket = socket(address.sockaddr.at.sat_family, SOCK_DGRAM | SOCK_CLOEXEC, ATPROTO_BASE + protocolType)) == OFInvalidSocketHandle) #else if ((_socket = socket(address.sockaddr.at.sat_family, SOCK_DGRAM | SOCK_CLOEXEC, 0)) == OFInvalidSocketHandle) #endif @throw [OFBindDDPSocketFailedException exceptionWithNetwork: network node: node port: port protocolType: protocolType socket: self |
︙ | ︙ |