From 32c76642250b3ba3b173d0576c0d00b0190320a9 Mon Sep 17 00:00:00 2001 From: Fabiano Fidêncio Date: Jan 23 2017 17:46:37 +0000 Subject: RESPONDER: Don't expose client_idle_handler() It's been only used by reset_client_idle_handler(). So, no need to expose this function. Related: https://fedorahosted.org/sssd/ticket/3245 Signed-off-by: Fabiano Fidêncio Reviewed-by: Pavel Březina Reviewed-by: Jakub Hrozek Reviewed-by: Lukáš Slebodník --- diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h index f9e18ee..860b55f 100644 --- a/src/responder/common/responder.h +++ b/src/responder/common/responder.h @@ -318,10 +318,6 @@ bool sss_utf8_check(const uint8_t *s, size_t n); void responder_set_fd_limit(rlim_t fd_limit); errno_t reset_client_idle_timer(struct cli_ctx *cctx); -void client_idle_handler(struct tevent_context *ev, - struct tevent_timer *te, - struct timeval current_time, - void *data); #define GET_DOMAINS_DEFAULT_TIMEOUT 60 diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index ec2575f..e4b0b7e 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -517,6 +517,22 @@ static void accept_fd_handler(struct tevent_context *ev, return; } +static void client_idle_handler(struct tevent_context *ev, + struct tevent_timer *te, + struct timeval current_time, + void *data) +{ + /* This connection is idle. Terminate it */ + struct cli_ctx *cctx = talloc_get_type(data, struct cli_ctx); + + DEBUG(SSSDBG_TRACE_INTERNAL, + "Terminating idle client [%p][%d]\n", + cctx, cctx->cfd); + + /* The cli_ctx destructor will handle the rest */ + talloc_free(cctx); +} + errno_t reset_client_idle_timer(struct cli_ctx *cctx) { struct timeval tv = @@ -534,23 +550,6 @@ errno_t reset_client_idle_timer(struct cli_ctx *cctx) return EOK; } -void client_idle_handler(struct tevent_context *ev, - struct tevent_timer *te, - struct timeval current_time, - void *data) -{ - /* This connection is idle. Terminate it */ - struct cli_ctx *cctx = - talloc_get_type(data, struct cli_ctx); - - DEBUG(SSSDBG_TRACE_INTERNAL, - "Terminating idle client [%p][%d]\n", - cctx, cctx->cfd); - - /* The cli_ctx destructor will handle the rest */ - talloc_free(cctx); -} - static int sss_dp_init(struct resp_ctx *rctx, struct sbus_iface_map *sbus_iface, const char *cli_name,