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 7a8b54b9 authored by Deucе's avatar Deucе 👌🏾

Fix some bugs around sock.on('write'...) and sock.clearOn()

parent d7385b0b
Pipeline #1857 passed with stage
in 8 minutes and 54 seconds
......@@ -170,7 +170,7 @@ remove_js_socket_event(JSContext *cx, js_callback_t *cb, SOCKET sock)
for (ev = cb->events; ev; ev = nev) {
nev = ev->next;
if (ev->type == JS_EVENT_SOCKET_READABLE || ev->type == JS_EVENT_SOCKET_READABLE_ONCE
|| ev->type == JS_EVENT_SOCKET_READABLE || ev->type == JS_EVENT_SOCKET_READABLE_ONCE) {
|| ev->type == JS_EVENT_SOCKET_WRITABLE || ev->type == JS_EVENT_SOCKET_WRITABLE_ONCE) {
if (ev->data.sock == sock) {
if (ev->next)
ev->next->prev = ev->prev;
......@@ -2206,7 +2206,7 @@ js_on(JSContext *cx, uintN argc, jsval *arglist)
static JSBool
js_clearOn(JSContext *cx, uintN argc, jsval *arglist)
{
return js_clear_socket_event(cx, argc, arglist, TRUE);
return js_clear_socket_event(cx, argc, arglist, FALSE);
}
/* Socket Object Properties */
......
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