Differences From Artifact [74ced9f7d1]:
- File
src/OFTCPSocket.m
— part of check-in
[a54730b88f]
at
2022-10-22 18:41:45
on branch trunk
— OFSocket: Don't combine port for IP and IPX
While it works for those two protocols, it's a bad precedent as other
protocols have different types for ports. (user: js, size: 11410) [annotate] [blame] [check-ins using] [more...]
To Artifact [246d2d6fc1]:
- File src/OFTCPSocket.m — part of check-in [64fc4f6344] at 2022-10-22 18:51:16 on branch trunk — Fix overlooked OFSocketAddress(Set)Port (user: js, size: 11412) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
353 354 355 356 357 358 359 | for (;;) { uint16_t rnd = 0; int ret; while (rnd < 1024) rnd = (uint16_t)rand(); | | | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | for (;;) { uint16_t rnd = 0; int ret; while (rnd < 1024) rnd = (uint16_t)rand(); OFSocketAddressSetIPPort(&address, rnd); if ((ret = bind(_socket, (struct sockaddr *)&address.sockaddr, address.length)) == 0) { port = rnd; break; } |
︙ | ︙ |