- Apr 02, 2021
- Mar 31, 2021
-
-
Deucе authored
Rather than depending on _WIN32 which is silly, make it clear what exactly is being done and why. Note that the spy socket stuff and some external stuff on *nix have had the select() implementation removed. To support using select() on !Win32 will require de-refactoring that's not really worth doing. Instead, just use #error and reference the commit where the old code can be found.
-
- Mar 30, 2021
-
-
Deucе authored
Still needs updates in services_thread(), CGI stuff in websrvr.c, and sbbs_t::external()
-
- Mar 17, 2021
-
-
Deucе authored
While errors on transmit seem to be handled well, errors on receive do not, especially through js_recv_line() which has been seen to trigger a large number (hundreds) of ECONNRESET errors. To prevent this, simply close the socket when an otherwise unhandled error occurs. Almost certainly fixes that issue, but the underlying cause is still undetermined. The calling script (imapservice.js) was checking Socket.is_connected after each recv_line() call, so if the socket was actually reset, it would be expected to only call it once. An alternative would be to explicitly handle the error that is seen (CRYPT_ERROR_PARAM1), but let's try a generic fix first and see of anything breaks because of it. Most likely issue would be an inability to recv() data after calling shutdown(), but I don't think many people do that except to move the TIME_WAIT to where they want it.
-
- Feb 22, 2021
-
-
Rob Swindell authored
-
- Feb 16, 2021
-
-
Rob Swindell authored
The socket set allocated by xpms_create() was never freed. Found by Coverity.
-
Deucе authored
-
Rob Swindell authored
-
Rob Swindell authored
-
- Feb 15, 2021
-
-
Rob Swindell authored
Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
-
Rob Swindell authored
Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
-
Rob Swindell authored
Hopefully not introducing any bugs in the process.
-
Rob Swindell authored
Hopefully not introducing any bugs in the process.
-
- Nov 26, 2020
-
-
Rob Swindell authored
Only observed on Windows, the option value variable (val) was uninitialized so querying byte-sized options using WinSock getsockopt() would leave the MSB of the value as undefined (garbage), resulting in sockinfo.js output like this: KEEPALIVE = -858993663 instead of this: KEEPALIVE = 1
-
- Nov 22, 2020
-
-
Rob Swindell authored
-
- Nov 20, 2020
-
-
Deon George authored
-
- Nov 19, 2020
-
-
Deucе authored
-
- Nov 06, 2020
-
-
Rob Swindell authored
I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values. This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service). The new macros names are bit more descriptive as well.
-
- Sep 25, 2020
-
-
Rob Swindell authored
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- Aug 09, 2020
- Apr 09, 2020
-
-
deuce authored
-
- Sep 17, 2019
-
-
deuce authored
Instead, just return -1 from js_socket_recv().
-
- Sep 09, 2019
-
-
deuce authored
function for external sockets. However, service thrads that use TLS were relying on the finalize function to clean up the TLS session. Revert 1.242, and add a finalize parameter to do_js_close() which will only avoid the shutdown() call rather than completely avoid do_js_close() completely. This fixes a TLS session leak that would eventually prevent any new encrypted connections.
-
- Aug 27, 2019
-
-
deuce authored
-
- Aug 21, 2019
- Aug 17, 2019
-
-
rswindell authored
-
- Aug 15, 2019
-
-
rswindell authored
-
- Aug 06, 2019
- Aug 05, 2019
-
-
deuce authored
-
deuce authored
-
deuce authored
These have a large number of optional parameters, so these are placed in a separate argument as an object: ie: var s = new ConnectedSocket("synchro.net", "finger", {type:SOCK_DGRAM}); ie: var s = new ListeningSocket(["::","0.0.0.0"], "printer", "spooler", {retry_count:15});
-
- Aug 04, 2019
- Jun 21, 2019
-
-
deuce authored
This introduces a new request field send_content which indicates if the content should be sent. This covers various cases like HEAD responses where there's an entity, but no content is sent as well as 204, 304, and 1xx responses where there is not even an entity. writebuf() will now enforce this, so there's no need for various checks throughout the code to see if data should be sent or not. Also, we now only set sent_headers after the headers are sent.
-