mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
make compile with g++ (fix invalid conversion from ‘void*’ to ‘ns_connection*’)
This commit is contained in:
1 parent
1ab704ac92
commit
c05b51bbfc
1 file changed
+1
-1
+1
-1
@@ -4930,7 +4930,7 @@ void mg_copy_listeners(struct mg_server *s, struct mg_server *to) {
|
|||||||
struct ns_connection *c;
|
struct ns_connection *c;
|
||||||
for (c = ns_next(&s->ns_mgr, NULL); c != NULL; c = ns_next(&s->ns_mgr, c)) {
|
for (c = ns_next(&s->ns_mgr, NULL); c != NULL; c = ns_next(&s->ns_mgr, c)) {
|
||||||
struct ns_connection *tmp;
|
struct ns_connection *tmp;
|
||||||
if ((c->flags & NSF_LISTENING) && (tmp = malloc(sizeof(*tmp))) != NULL) {
|
if ((c->flags & NSF_LISTENING) && (tmp = (ns_connection *)malloc(sizeof(*tmp))) != NULL) {
|
||||||
memcpy(tmp, c, sizeof(*tmp));
|
memcpy(tmp, c, sizeof(*tmp));
|
||||||
tmp->mgr = &to->ns_mgr;
|
tmp->mgr = &to->ns_mgr;
|
||||||
ns_add_conn(tmp->mgr, tmp);
|
ns_add_conn(tmp->mgr, tmp);
|
||||||
|
|||||||
Reference in new issue
Block a user