Skip to content
Snippets Groups Projects
Commit 52d9a03d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Apply socket options from sockopts.ini to sockets created by ListeningSocket()

This socket constructor did not get the global socket options treatment when
created (years ago).

This should fix issue #402 as reported by Nelgin and more recently by Keyop.
parent 6db6bc6e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -3359,6 +3359,17 @@ js_listening_socket_constructor(JSContext *cx, uintN argc, jsval *arglist)
}
}
for (i = 0; (jsuint)i < set->sock_count; ++i) {
char error[256] = "";
if (set_socket_options(scfg, set->socks[i].sock, protocol, error, sizeof(error)) != 0) {
JS_ReportError(cx, "Error (%s) setting socket options (for %s) on socket %d"
,error, protocol, set->socks[i].sock);
free(protocol);
free(set);
return JS_FALSE;
}
}
obj=JS_NewObject(cx, &js_socket_class, NULL, NULL);
JS_SET_RVAL(cx, arglist, OBJECT_TO_JSVAL(obj));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment