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

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

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) ...@@ -1159,8 +1159,8 @@ js_handle_events(JSContext *cx, js_callback_t *cb, volatile int *terminated)
cfd++; cfd++;
#else #else
FD_SET(ev->[0], &rfds); FD_SET(ev->[0], &rfds);
if (ev->data.sock > hsock) if (ev->[0] > hsock)
hsock = ev->data.sock; hsock = ev->[0];
#endif #endif
break; break;
...@@ -976,7 +976,7 @@ js_connect_event(JSContext *cx, uintN argc, jsval *arglist, js_socket_private_t ...@@ -976,7 +976,7 @@ js_connect_event(JSContext *cx, uintN argc, jsval *arglist, js_socket_private_t
ev->cb = ecb; ev->cb = ecb;
ev->[0] = sv[0]; ev->[0] = sv[0];
ev->[1] = sv[1]; ev->[1] = sv[1];
ev->data.sock = p->sock; ev->data.connect.sock = p->sock;
ev->id = cb->next_eid++; ev->id = cb->next_eid++;
p->js_cb = cb; p->js_cb = cb;
cb->events = ev; 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