Differences From Artifact [c2070c1b40]:
- File
src/OFTCPSocket+SOCKS5.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 3450) [annotate] [blame] [check-ins using]
To Artifact [4fe5e359bb]:
- File
src/OFTCPSocket+SOCKS5.m
— part of check-in
[c658e97994]
at
2017-05-21 20:03:06
on branch trunk
— Cast several socket-related arguments to void *
This is required to make it work on MorphOS with -noixemul, as socket
functions take UBYTE * arguments instead then, resulting in a warning
about signedness because char is signed. (user: js, size: 3472) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
29 30 31 32 33 34 35 |
/* Reference for static linking */
int _OFTCPSocket_SOCKS5_reference;
static void
send_or_exception(OFTCPSocket *self, of_socket_t socket, char *buffer,
int length)
{
| | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
/* Reference for static linking */
int _OFTCPSocket_SOCKS5_reference;
static void
send_or_exception(OFTCPSocket *self, of_socket_t socket, char *buffer,
int length)
{
if (send(socket, (const void *)buffer, length, 0) != length)
@throw [OFWriteFailedException
exceptionWithObject: self
requestedLength: length
errNo: of_socket_errno()];
}
static void
recv_exact(OFTCPSocket *self, of_socket_t socket, char *buffer, int length)
{
while (length > 0) {
ssize_t ret = recv(socket, (void *)buffer, length, 0);
if (ret < 0)
@throw [OFReadFailedException
exceptionWithObject: self
requestedLength: length
errNo: of_socket_errno()];
|
| ︙ | ︙ |