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

  1. 28 Aug, 2019 3 commits
  2. 27 Aug, 2019 18 commits
  3. 26 Aug, 2019 5 commits
    • rswindell's avatar
      Implement a simple bound-checker in RingBufWrite(): · e3892691
      rswindell authored
      if the ringbuf is shared among multiple threads (e.g. the sbbs->outbuf is
      shared between output_thread() and passthru_thread()) - it was possible
      for a race condition to occur between the caller would call RingBufFree
      to determine the available space in the ringbuf and the call to RingBufWrite
      which would happily overflow the allocated buffer if more data was
      written to the ringbuf (by another thread) in the unprotected time between the
      RingBufFree and RingBufWrite calls.
      
      Now, RingBufWrite() can perform short-writes and will return a length less
      than what was requested to write when there is not enough available space
      to write the requested length.
      
      Hopefully this resolves the corruption/crash issue Deuce is seeing in
      sbbs's passthru_thread().
      e3892691
    • rswindell's avatar
      New global function: utf8_width() · f3e14e0d
      rswindell authored
      - returns the fixed printed-width of the specified UTF-8 encoded string
      f3e14e0d
    • rswindell's avatar
      In *nix builds, change the second almost identical log "Executing external" · 38e30cd4
      rswindell authored
      log message to:
      - only log the message if the "full command line" is different than the
        command-line argument to the external() function. I'm pretty sure that was
        the reason for the addition of this log message, for debugging Linux-DOSEMU
        issues where the fullcmdline != cmdline.
      - change from INFO to DEBUG log level
      - change the message from "executing external: " to "Executing cmd-line: "
      38e30cd4
    • rswindell's avatar
      Re-enable socket optoins and blocking configuration for the client_socket_dup · 801631e5
      rswindell authored
      when de-activating the passthru_socket.
      801631e5
    • deuce's avatar
      If an exception is thrown by the exec()d script, return it instead of the · 5309058a
      deuce authored
      exit_code, and don't throw the exception in the caller.
      
      Remove support for js_scope == scope.  It sorta defeats the whole purpose
      of js.exec().
      5309058a
  4. 25 Aug, 2019 14 commits
    • rswindell's avatar
      Include undeprecated property sheet. · cace1113
      rswindell authored
      cace1113
    • rswindell's avatar
      Include undeprecate property sheet. · 7f24ec19
      rswindell authored
      7f24ec19
    • rswindell's avatar
      Include the undeprecate property sheet. · 45a45c94
      rswindell authored
      45a45c94
    • rswindell's avatar
      Remove Windows 9x support, finally. · aaf03142
      rswindell authored
      Remove DEBUG.LOG file support for Win32-debug builds, never really looked-at.
      aaf03142
    • rswindell's avatar
      Fix typo in previous commit. Thanks, NotBert. · d114d05b
      rswindell authored
      d114d05b
    • deuce's avatar
      Add js.exec(). · d53cddaf
      deuce authored
      This allows executing a new script in a specified scope, much like load().
      There are important differences however...
      1) js.exec() *must* specify a scope.
      2) js.exec()d scripts can call exit() and their handlers are ran then,
         rather than when the parent script exists as in js.load().
      3) The js object is installed in the scope with the real JS object as the
         prototype.  This generally shouldn't be an issue, but if you're doing
         strange things, stranger things may happen.
      4) As part of #3, the exec_path/exec_dir/exec_file/startup_dir/scope
         properties of the JS object represent the new script, not the calling
         one.
      5) js.exec() only searches in the passed startup dir (if specified) and the
         current js.exec_dir path.  It does not search the load paths or the mods
         directory at all.
      
      This API is also subject to change.
      d53cddaf
    • rswindell's avatar
      New global methods: · 62f75de0
      rswindell authored
      utf8_encode(): to convert a CP437 string or a single Unicode codepoint (number)
        to UTF-8 encoded string
      utf8_decode(): to convert a UTF-8 encoded string to a CP437 string
      
      Move the require() enumeration to just below load() so it's documented closer
      to its dad in jsdocs.html
      62f75de0
    • rswindell's avatar
      A couple of passthrough socket fixes: · de72e6c3
      rswindell authored
      1. when de-activating the passthru socket, give the passthru_thread some
         cycles to copy any remaining socket data into the outbuf before we let
         the node_thread continue on and spew its own data into the outbuf.
         This fixes the problem of final messages of a file transfer protocol
         being intermixed with BBS data (prompts, menus, and such) and causing
         file download finalization issues.
      2. Don't read from the passthru socket until there is enough room in the
         outbuf for the maximum possible telnet-expanded read size. This fixes
         streaming download protocol (ZMODEM and YMODEM-G) errors.
      
      Also, for good measure, check the passthru_socket for writability before
      send()ing on it and log a warning if it's ever not writable.
      de72e6c3
    • rswindell's avatar
      Create/use passthru_socket_activate() function which will purge the · 59f896e6
      rswindell authored
      client_socket_dup before activating the passthru_socket. This resolves the
      issue of external programs receiving stale data from the previous passthru
      session - data that was not sucessfully read by the last external program
      invoked.
      59f896e6
    • rswindell's avatar
      Fix a 14-year old bug with ZMODEM-send. If the receiver already has the · fba33a15
      rswindell authored
      file named in the ZFILE frame, they will usually compute the local CRC
      value and request the sender to compute and send its CRC of the file it
      wants to send. If the CRCs match, the receiver will send a ZSKIP frame
      next ("skip this file, I already have it"). However, when I implemented
      the ZCRC frame support in zmodem_send_file(), I added the ZCRC frame
      check *after* the check to see if its a ZSKIP frame, when in fact, they
      will normally come in the other order (ZCRC, then ZSKIP). This would result
      in multiple ZCRC request/response, then ZSKIP requests that were ignored
      by the sender (who just send a ZFILE frame again). Simple fix: check for
      ZCRC frame before ZSKIP frame.
      fba33a15
    • rswindell's avatar
      More debug-level log messages. · 3389febf
      rswindell authored
      3389febf
    • rswindell's avatar
      Log a debug-level message when exiting. · 1c163a5d
      rswindell authored
      1c163a5d
    • rswindell's avatar
    • rswindell's avatar