Differences From Artifact [61fa5cfa02]:
- File
src/OFUDPSocket.m
— part of check-in
[25adea9a23]
at
2022-08-06 21:14:31
on branch trunk
— Don't use struct sockaddr in OFSocketAddress
struct sockaddr can contain a variable length array, which breaks the
union. (user: js, size: 5043) [annotate] [blame] [check-ins using] [more...]
To Artifact [fd8f9dff29]:
- File src/OFUDPSocket.m — part of check-in [72db6b3c6f] at 2022-10-22 16:00:37 on branch trunk — Split OFBindSocketFailedException into subclasses (user: js, size: 5099) [annotate] [blame] [check-ins using] [more...]
| ︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + - + | #import "OFDNSResolver.h" #import "OFData.h" #import "OFSocket.h" #import "OFSocket+Private.h" #import "OFThread.h" #import "OFAlreadyConnectedException.h" |
| ︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + |
if (bind(_socket, (struct sockaddr *)&address->sockaddr,
address->length) != 0) {
int errNo = OFSocketErrNo();
closesocket(_socket);
_socket = OFInvalidSocketHandle;
|
| ︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + | int errNo = OFSocketErrNo(); OFString *host = OFSocketAddressString(address); port = OFSocketAddressPort(address); closesocket(_socket); _socket = OFInvalidSocketHandle; |
| ︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - + - + - + |
if (OFGetSockName(_socket, (struct sockaddr *)&address->sockaddr,
&address->length) != 0) {
int errNo = OFSocketErrNo();
closesocket(_socket);
_socket = OFInvalidSocketHandle;
|
| ︙ |