| 109 |
|
int err = 0; |
| 110 |
|
socklen_t len = sizeof(err); |
| 111 |
|
|
| 112 |
< |
if (-1 < fd && !getsockopt(fd, SOL_SOCKET, SO_ERROR, (char*) &err, (socklen_t *)&len)) |
| 112 |
> |
if (-1 < fd && !getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len)) |
| 113 |
|
{ |
| 114 |
|
if (err) |
| 115 |
|
errtmp = err; |
| 159 |
|
int fd = va_arg(args, int); |
| 160 |
|
int opt = 1; |
| 161 |
|
|
| 162 |
< |
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *) &opt, sizeof(opt)); |
| 162 |
> |
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); |
| 163 |
|
|
| 164 |
|
#ifdef IPTOS_LOWDELAY |
| 165 |
|
opt = IPTOS_LOWDELAY; |
| 166 |
< |
setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &opt, sizeof(opt)); |
| 166 |
> |
setsockopt(fd, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)); |
| 167 |
|
#endif |
| 168 |
|
|
| 169 |
|
#ifndef _WIN32 |
| 362 |
|
#ifdef HAVE_LIBCRYPTO |
| 363 |
|
if (listener->flags & LISTENER_SSL) |
| 364 |
|
{ |
| 365 |
< |
if ((new_client->localClient->fd.ssl = SSL_new(ServerInfo.ctx)) == NULL) |
| 365 |
> |
if ((new_client->localClient->fd.ssl = SSL_new(ServerInfo.server_ctx)) == NULL) |
| 366 |
|
{ |
| 367 |
|
ilog(L_CRIT, "SSL_new() ERROR! -- %s", |
| 368 |
|
ERR_error_string(ERR_get_error(), NULL)); |