mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Fix #2612 - struct mg_str::ptr -> buf
This commit is contained in:
1 parent
e93d18d200
commit
e0e599ffa1
61 files changed
+684
-686
No files matched your search
@@ -33,7 +33,7 @@ static void *thread_function(void *param) {
|
||||
struct thread_data *p = (struct thread_data *) param;
|
||||
sleep(2); // Simulate long execution
|
||||
mg_wakeup(p->mgr, p->conn_id, "hi!", 3); // Respond to parent
|
||||
free((void *) p->message.ptr); // Free all resources that were
|
||||
free((void *) p->message.buf); // Free all resources that were
|
||||
free(p); // passed to us
|
||||
return NULL;
|
||||
}
|
||||
@@ -56,7 +56,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
}
|
||||
} else if (ev == MG_EV_WAKEUP) {
|
||||
struct mg_str *data = (struct mg_str *) ev_data;
|
||||
mg_http_reply(c, 200, "", "Result: %.*s\n", data->len, data->ptr);
|
||||
mg_http_reply(c, 200, "", "Result: %.*s\n", data->len, data->buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user