From 80d9fbcda4fd1895c769556eb71177ea1e38e3f4 Mon Sep 17 00:00:00 2001 From: valenok Date: Sat, 5 Mar 2011 08:49:50 +0000 Subject: [PATCH] Passing user_data into MG_INIT_SSL as 3rd parameter --- mongoose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 1d1344a9..bf0eef05 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3574,7 +3574,8 @@ static int set_ssl_option(struct mg_context *ctx) { if ((CTX = SSL_CTX_new(SSLv23_server_method())) == NULL) { cry(fc(ctx), "SSL_CTX_new error: %s", ssl_error()); } else if (ctx->user_callback != NULL) { - ctx->user_callback(MG_INIT_SSL, (struct mg_connection *) CTX, NULL); + ctx->user_callback(MG_INIT_SSL, (struct mg_connection *) CTX, + ctx->user_data); } if (CTX != NULL && SSL_CTX_use_certificate_file(CTX, pem,