ESP32: Fix event id for post_net_accept() (#1869)

* ESP32: Fix event id for post_net_accept()
This commit is contained in:
Arnim Läuger 2017-03-19 14:51:51 +01:00 committed by Johny Mattsson
parent 4b647d007f
commit 21e1cadf05
1 changed files with 2 additions and 2 deletions

View File

@ -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)
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);