mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-25 12:04:47 +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
@@ -5,8 +5,7 @@ void mg_rpc_add(struct mg_rpc **head, struct mg_str method,
|
||||
void (*fn)(struct mg_rpc_req *), void *fn_data) {
|
||||
struct mg_rpc *rpc = (struct mg_rpc *) calloc(1, sizeof(*rpc));
|
||||
if (rpc != NULL) {
|
||||
rpc->method.buf = mg_mprintf("%.*s", method.len, method.buf);
|
||||
rpc->method.len = method.len;
|
||||
rpc->method = mg_strdup(method);
|
||||
rpc->fn = fn;
|
||||
rpc->fn_data = fn_data;
|
||||
rpc->next = *head, *head = rpc;
|
||||
|
||||
Reference in new issue
Block a user