浏览代码

Passing user_data into MG_INIT_SSL as 3rd parameter

valenok 14 年之前
父节点
当前提交
80d9fbcda4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      mongoose.c

+ 2 - 1
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,