From e65b7d421c4254c19dc7d03cf5e4145182d66817 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 8 Jan 2025 16:40:39 +1000 Subject: [PATCH] Add accessor for handle->disable_dl_timeout Signed-off-by: Allan McRae --- lib/libalpm/alpm.h | 6 ++++++ lib/libalpm/handle.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index ce6c9570..abdea798 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -2257,6 +2257,12 @@ int alpm_option_set_remote_file_siglevel(alpm_handle_t *handle, int level); * @{ */ +/** Get the download timeout state + * @param handle the context handle + * @return 0 for enabled, 1 for disabled +*/ +int alpm_option_get_disable_dl_timeout(alpm_handle_t *handle); + /** Enables/disables the download timeout. * @param handle the context handle * @param disable_dl_timeout 0 for enabled, 1 for disabled diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 01e1d891..36afd0a5 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -935,6 +935,12 @@ int SYMEXPORT alpm_option_get_remote_file_siglevel(alpm_handle_t *handle) } } +int SYMEXPORT alpm_option_get_disable_dl_timeout(alpm_handle_t *handle) +{ + CHECK_HANDLE(handle, return -1); + return handle->disable_dl_timeout; +} + int SYMEXPORT alpm_option_set_disable_dl_timeout(alpm_handle_t *handle, unsigned short disable_dl_timeout) {