Skip to content
Snippets Groups Projects
Commit 9fd43505 authored by Sergey Lyubka's avatar Sergey Lyubka
Browse files

Setting user_data for fake connection

parent 3156ac97
No related branches found
No related tags found
No related merge requests found
...@@ -667,6 +667,8 @@ static void cry(struct mg_connection *conn, const char *fmt, ...) { ...@@ -667,6 +667,8 @@ static void cry(struct mg_connection *conn, const char *fmt, ...) {
static struct mg_connection *fc(struct mg_context *ctx) { static struct mg_connection *fc(struct mg_context *ctx) {
static struct mg_connection fake_connection; static struct mg_connection fake_connection;
fake_connection.ctx = ctx; fake_connection.ctx = ctx;
// See https://github.com/cesanta/mongoose/issues/236
fake_connection.request_info.user_data = ctx->user_data;
return &fake_connection; return &fake_connection;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment