mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-14 10:20:01 +00:00
bring mg_strdup() back
This commit is contained in:
1 parent
a4e0225c69
commit
ab75bfa6e7
11 files changed
+46
-16
No files matched your search
@@ -50,8 +50,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
// Multithreading code path
|
||||
struct thread_data *data =
|
||||
(struct thread_data *) calloc(1, sizeof(*data)); // Worker owns it
|
||||
data->message.buf = mg_mprintf("%.*s", hm->message.len, hm->message.buf);
|
||||
data->message.len = hm->message.len; // Pass message
|
||||
data->message = mg_strdup(hm->message); // Pass message
|
||||
data->conn_id = c->id;
|
||||
data->mgr = c->mgr;
|
||||
start_thread(thread_function, data); // Start thread and pass data
|
||||
|
||||
Reference in new issue
Block a user