GNUTLS: Rename the timeout callback in line with the other backends

This commit is contained in:
Aaron Jones 2016-09-16 12:20:01 +00:00
parent 992aa93b80
commit 5103d939d0
No known key found for this signature in database
GPG key ID: EC6F86EE9CD840B5

View file

@ -138,9 +138,11 @@ rb_ssl_clear_handshake_count(rb_fde_t *F)
} }
static void static void
rb_ssl_timeout(rb_fde_t *F, void *notused) rb_ssl_timeout_cb(rb_fde_t *F, void *notused)
{ {
lrb_assert(F->accept != NULL); lrb_assert(F->accept != NULL);
lrb_assert(F->accept->callback != NULL);
F->accept->callback(F, RB_ERR_TIMEOUT, NULL, 0, F->accept->data); F->accept->callback(F, RB_ERR_TIMEOUT, NULL, 0, F->accept->data);
} }
@ -206,7 +208,7 @@ rb_ssl_start_accepted(rb_fde_t *new_F, ACCB * cb, void *data, int timeout)
new_F->accept->callback = cb; new_F->accept->callback = cb;
new_F->accept->data = data; new_F->accept->data = data;
rb_settimeout(new_F, timeout, rb_ssl_timeout, NULL); rb_settimeout(new_F, timeout, rb_ssl_timeout_cb, NULL);
new_F->accept->addrlen = 0; new_F->accept->addrlen = 0;
@ -240,7 +242,7 @@ rb_ssl_accept_setup(rb_fde_t *F, rb_fde_t *new_F, struct sockaddr *st, int addrl
new_F->accept->callback = F->accept->callback; new_F->accept->callback = F->accept->callback;
new_F->accept->data = F->accept->data; new_F->accept->data = F->accept->data;
rb_settimeout(new_F, 10, rb_ssl_timeout, NULL); rb_settimeout(new_F, 10, rb_ssl_timeout_cb, NULL);
memcpy(&new_F->accept->S, st, addrlen); memcpy(&new_F->accept->S, st, addrlen);
new_F->accept->addrlen = addrlen; new_F->accept->addrlen = addrlen;