From e5f542157fa20aa11b7f5ef1167898d721db5aac Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 30 Jun 2009 09:56:01 +0000 Subject: [PATCH] Add a function to fetch the core configuration from the ykpers configuration --- ykpers.c | 8 ++++++++ ykpers.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ykpers.c b/ykpers.c index 26b61ee..72b2574 100644 --- a/ykpers.c +++ b/ykpers.c @@ -406,6 +406,14 @@ int ykp_read_config(YKP_CONFIG *cfg, return 0; } +YK_CONFIG *ykp_core_config(YKP_CONFIG *cfg) +{ + if (cfg) + return &cfg->ykcore_config; + ykp_errno = YKP_ENOCFG; + return 0; +} + int * const _ykp_errno_location(void) { static int tsd_init = 0; diff --git a/ykpers.h b/ykpers.h index 6e0dc8f..9c676dd 100644 --- a/ykpers.h +++ b/ykpers.h @@ -77,6 +77,8 @@ int ykp_read_config(YKP_CONFIG *cfg, void *userdata), void *userdata); +YK_CONFIG *ykp_core_config(YKP_CONFIG *cfg); + extern int * const _ykp_errno_location(void); #define ykp_errno (*_ykp_errno_location()) const char *ykp_strerror(int errnum); -- 2.39.5