Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 57981cf2 authored by Deucе's avatar Deucе 👌🏾

Fix errors with callback-based connect()

Non-poll used the wrong value for calculating the high socket (which
is ignored on Win32, the only non-poll() user), and the socket was
being set in the wrong union member.
parent 702f73cc
Pipeline #1829 passed with stage
in 10 minutes and 7 seconds
......@@ -1159,8 +1159,8 @@ js_handle_events(JSContext *cx, js_callback_t *cb, volatile int *terminated)
cfd++;
#else
FD_SET(ev->data.connect.sv[0], &rfds);
if (ev->data.sock > hsock)
hsock = ev->data.sock;
if (ev->data.connect.sv[0] > hsock)
hsock = ev->data.connect.sv[0];
#endif
break;
case JS_EVENT_INTERVAL:
......
......@@ -976,7 +976,7 @@ js_connect_event(JSContext *cx, uintN argc, jsval *arglist, js_socket_private_t
ev->cb = ecb;
ev->data.connect.sv[0] = sv[0];
ev->data.connect.sv[1] = sv[1];
ev->data.sock = p->sock;
ev->data.connect.sock = p->sock;
ev->id = cb->next_eid++;
p->js_cb = cb;
cb->events = ev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment