Skip to content
Snippets Groups Projects
  1. Apr 02, 2021
    • Deucе's avatar
      Initial work on setTimeout() · 19289739
      Deucе authored
      This appears to work and the event handler *should* work on other
      event types already.
      
      Note, this is *nix-only due to the use of poll().  select() will
      need to be used for Windows to keep XP compatability.
      19289739
    • Deucе's avatar
      Fix Socket.connect() · 5a45abac
      Deucе authored
      Broken with the poll() update
      5a45abac
  2. Mar 31, 2021
    • Deucе's avatar
      Use new PREFER_POLL define to control poll() usage · 663ca552
      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.
      663ca552
  3. Mar 30, 2021
    • Deucе's avatar
      Initial poll() work · 0821142a
      Deucе authored
      Still needs updates in services_thread(), CGI stuff in websrvr.c,
      and sbbs_t::external()
      0821142a
  4. Mar 17, 2021
    • Deucе's avatar
      Close Socket on unhandled TLS errors · ba5759c2
      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.
      ba5759c2
  5. Feb 22, 2021
  6. Feb 16, 2021
  7. Feb 15, 2021
  8. Nov 26, 2020
    • Rob Swindell's avatar
      Fix bug with Socket.getoption() of byte-sized options · 51e31575
      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
      51e31575
  9. Nov 22, 2020
  10. Nov 20, 2020
  11. Nov 19, 2020
  12. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      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.
      ec20d959
  13. Sep 25, 2020
  14. Aug 16, 2020
  15. Aug 09, 2020
  16. Apr 09, 2020
  17. Sep 17, 2019
  18. Sep 09, 2019
    • deuce's avatar
      Revision 1.242 prevented do_js_close() from being called in the finalize · 3e073461
      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.
      3e073461
  19. Aug 27, 2019
  20. Aug 21, 2019
  21. Aug 17, 2019
  22. Aug 15, 2019
  23. Aug 06, 2019
  24. Aug 05, 2019
  25. Aug 04, 2019
  26. Jun 21, 2019
    • deuce's avatar
      Fix handling of responses with no content. · b311c1c3
      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.
      b311c1c3
Loading