From: Tollef Fog Heen Date: Tue, 27 Oct 2009 20:35:57 +0000 (+0100) Subject: Pass ykc_config to request handler X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8849308dd6dc22014a6a9c32e517f0a9af78874;p=yubikey-server-c Pass ykc_config to request handler --- 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");