summaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 59e1bbca4f..88efa05331 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -160,7 +160,7 @@ struct tor_tls_t {
/** Callback to invoke whenever a client tries to renegotiate more
than once. */
- void (*excess_renegotiations_callback)(evutil_socket_t, short, void *);
+ void (*excess_renegotiations_callback)(void *);
/** Argument to pass to negotiated_callback. */
void *callback_arg;
@@ -1326,10 +1326,8 @@ tor_tls_got_client_hello(tor_tls_t *tls)
callback, so we set a libevent timer that triggers in the next
event loop and closes the connection. */
- struct timeval zero_seconds_timer = {0,0};
-
- if (tor_event_base_once(tls->excess_renegotiations_callback,
- tls->callback_arg, &zero_seconds_timer) < 0) {
+ if (tor_run_in_libevent_loop(tls->excess_renegotiations_callback,
+ tls->callback_arg) < 0) {
log_warn(LD_GENERAL, "Didn't manage to set a renegotiation limiting callback.");
}
}
@@ -1557,7 +1555,7 @@ tor_tls_set_logged_address(tor_tls_t *tls, const char *address)
void
tor_tls_set_renegotiate_callbacks(tor_tls_t *tls,
void (*cb)(tor_tls_t *, void *arg),
- void (*cb2)(evutil_socket_t, short, void *),
+ void (*cb2)(void *),
void *arg)
{
tls->negotiated_callback = cb;