From f8849308dd6dc22014a6a9c32e517f0a9af78874 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Tue, 27 Oct 2009 21:35:57 +0100 Subject: [PATCH] Pass ykc_config to request handler --- src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index db1a0d6..d3c5f99 100644 --- a/src/main.c +++ b/src/main.c @@ -357,7 +357,7 @@ free_mem: return r; } -static int handle_request(void * UNUSED(data), +static int handle_request(void * priv, struct MHD_Connection *conn, const char * url, const char *UNUSED(method), @@ -373,6 +373,7 @@ static int handle_request(void * UNUSED(data), size_t shared_secret_len; yubikey_token_st token; struct ykc_stats stats; + struct ykc_config *conf = (struct ykc_config*) priv; memset(&token, '\0', sizeof(token)); memset(&stats, '\0', sizeof(stats)); @@ -592,7 +593,7 @@ int main(int argc, char ** argv) NULL, /* Access policy handler */ NULL, /* Data to access policy handler */ handle_request, /* default handler for all URIs */ - NULL, /* Data for default handler */ + &conf, /* Data for default handler */ MHD_OPTION_END); if (d == NULL) { syslog(LOG_ERR, "could not start daemon, unsure why\n"); -- 2.39.5