58 |
|
"Comm Error" }; |
59 |
|
|
60 |
|
static void comm_connect_callback(fde_t *, int); |
61 |
< |
static PF comm_connect_timeout; |
61 |
> |
static void comm_connect_timeout(fde_t *, void *); |
62 |
|
static void comm_connect_dns_callback(void *, const struct irc_ssaddr *, const char *, size_t); |
63 |
< |
static PF comm_connect_tryconnect; |
63 |
> |
static void comm_connect_tryconnect(fde_t *, void *); |
64 |
|
|
65 |
|
|
66 |
|
/* get_sockerr - get the error value from the socket or the current errno |
217 |
|
* read/write events if necessary. |
218 |
|
*/ |
219 |
|
static void |
220 |
< |
ssl_handshake(int fd, struct Client *client_p) |
220 |
> |
ssl_handshake(fde_t *fd, void *data) |
221 |
|
{ |
222 |
+ |
struct Client *client_p = data; |
223 |
|
X509 *cert = NULL; |
224 |
|
int ret = 0; |
225 |
|
|
235 |
|
{ |
236 |
|
case SSL_ERROR_WANT_WRITE: |
237 |
|
comm_setselect(&client_p->localClient->fd, COMM_SELECT_WRITE, |
238 |
< |
(PF *)ssl_handshake, client_p, 30); |
238 |
> |
ssl_handshake, client_p, 30); |
239 |
|
return; |
240 |
|
|
241 |
|
case SSL_ERROR_WANT_READ: |
242 |
|
comm_setselect(&client_p->localClient->fd, COMM_SELECT_READ, |
243 |
< |
(PF *)ssl_handshake, client_p, 30); |
243 |
> |
ssl_handshake, client_p, 30); |
244 |
|
return; |
245 |
|
|
246 |
|
default: |
343 |
|
|
344 |
|
AddFlag(client_p, FLAGS_SSL); |
345 |
|
SSL_set_fd(client_p->localClient->fd.ssl, fd); |
346 |
< |
ssl_handshake(0, client_p); |
346 |
> |
ssl_handshake(NULL, client_p); |
347 |
|
} |
348 |
|
else |
349 |
|
#endif |
383 |
|
* Set the timeout for the fd |
384 |
|
*/ |
385 |
|
void |
386 |
< |
comm_settimeout(fde_t *fd, time_t timeout, PF *callback, void *cbdata) |
386 |
> |
comm_settimeout(fde_t *fd, time_t timeout, void (*callback)(fde_t *, void *), void *cbdata) |
387 |
|
{ |
388 |
|
assert(fd->flags.open); |
389 |
|
|
405 |
|
* comm_close() is replaced with fd_close() in fdlist.c |
406 |
|
*/ |
407 |
|
void |
408 |
< |
comm_setflush(fde_t *fd, time_t timeout, PF *callback, void *cbdata) |
408 |
> |
comm_setflush(fde_t *fd, time_t timeout, void (*callback)(fde_t *, void *), void *cbdata) |
409 |
|
{ |
410 |
|
assert(fd->flags.open); |
411 |
|
|
426 |
|
{ |
427 |
|
int i; |
428 |
|
fde_t *F; |
429 |
< |
PF *hdl; |
429 |
> |
void (*hdl)(fde_t *, void *); |
430 |
|
void *data; |
431 |
|
|
432 |
|
for (i = 0; i < FD_HASH_SIZE; i++) |