Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
21e1cadf
Commit
21e1cadf
authored
Mar 19, 2017
by
Arnim Läuger
Committed by
Johny Mattsson
Mar 20, 2017
Browse files
ESP32: Fix event id for post_net_accept() (#1869)
* ESP32: Fix event id for post_net_accept()
parent
4b647d00
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/modules/net.c
View file @
21e1cadf
...
@@ -313,7 +313,7 @@ static bool post_net_accept (lnet_userdata *ud, struct tcp_pcb *newpcb) {
...
@@ -313,7 +313,7 @@ static bool post_net_accept (lnet_userdata *ud, struct tcp_pcb *newpcb) {
lnet_event *ev = (lnet_event *)malloc (sizeof (lnet_event));
lnet_event *ev = (lnet_event *)malloc (sizeof (lnet_event));
if (!ev)
if (!ev)
return false;
return false;
ev
->
event
=
SENTDATA
;
ev->event =
ACCEPT
;
ev->ud = ud;
ev->ud = ud;
ev->accept_newpcb = newpcb;
ev->accept_newpcb = newpcb;
if (!task_post_medium (net_event, (task_param_t)ev)) {
if (!task_post_medium (net_event, (task_param_t)ev)) {
...
@@ -1021,7 +1021,7 @@ static void laccept_cb (lua_State *L, lnet_userdata *ud, struct tcp_pcb *newpcb)
...
@@ -1021,7 +1021,7 @@ static void laccept_cb (lua_State *L, lnet_userdata *ud, struct tcp_pcb *newpcb)
lua_rawgeti(L, LUA_REGISTRYINDEX, ud->server.cb_accept_ref);
lua_rawgeti(L, LUA_REGISTRYINDEX, ud->server.cb_accept_ref);
lnet_userdata *nud = net_create(L, TYPE_TCP_CLIENT);
lnet_userdata *nud = net_create(L, TYPE_TCP_CLIENT);
lua_pushvalue
(
L
,
2
);
lua_pushvalue(L,
-1
);
nud->self_ref = luaL_ref(L, LUA_REGISTRYINDEX);
nud->self_ref = luaL_ref(L, LUA_REGISTRYINDEX);
nud->tcp_pcb = newpcb;
nud->tcp_pcb = newpcb;
tcp_arg(nud->tcp_pcb, nud);
tcp_arg(nud->tcp_pcb, nud);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment