Skip to content
Snippets Groups Projects
  1. Jun 03, 2023
    • Rob Swindell's avatar
      Add a 60-second timeout to sbbs_t::passthru_socket_activate() · ca7ab040
      Rob Swindell authored
      Keyop reported an issue via irc whereby a user that failed to download a file
      would leave the node "hung" in "downloading via telnet" node status even
      though the user had long since disconnected and the log reflected that the
      terminal server was aware of this:
      
      term Node 4 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 4 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 4 <user> external Timeout waiting for output buffer to empty
      <minutes later>
      term Node 4 connection reset by peer on send
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 disconnected
      term Node 4 !ERROR 32 sending on socket 102
      
      and
      
      term Node 3 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 3 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 3 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 3 <user> external Timeout waiting for output buffer to empty
      <minutes later>
      term Node 3 connection reset by peer on receive
      term Node 3 !ERROR 32 sending on socket 96
      
      These nodes were then locked up in call to passthru_socket_activate(false)
      as reported by gdb, e.g.
      
      Looking at passthru_socket_activate(), the deactivation path (called at the
      end of external() in this case), it was clear that this could be an infinite
      loop in the case the user had disconnected:
      
          do { // Allow time for the passthru_thread to move any pending socket data to the outbuf
              SLEEP(100); // Before the node_thread starts sending its own data to the outbuf
          } while(RingBufFull(&outbuf));
      
      These flush/purge loops aren't strictly needed if the user has disconnected,
      but as can be seen by the above logs, the terminal server may not know that
      (the socket may not indicate disconnect) before passthru_socket_activate()
      is called by external().
      
      So... worst case, just do the activation and deactivation buffer flushes
      and purges for 60 seconds.
      ca7ab040
  2. Jun 02, 2023
  3. Jun 01, 2023
  4. May 31, 2023
    • Deucе's avatar
      Add support for XTerm "Bracketed Paste" · 353530d9
      Deucе authored
      At the same time, add BD, BE, PE, and PS to the terminfo entry.
      
      Note that it seems this is "normally" detected by seeing if $TERM
      contains "xterm" which shouldn't work with SyncTERM (which is wildly
      incompatible), but the terminfo source file here:
      https://invisible-island.net/ncurses/terminfo.ti.html
      Gives us hope in the form of this comment:
      
      https://invisible-island.net/xterm/xterm-paste64.html
      
      Bracketed paste was introduced by xterm patch #203 in May 2005, as part of a
      larger feature for manipulating the clipboard selection.  Few terminals aside
      from xterm fully implement the clipboard feature, but several copy this
      detail.  The names for the extended capabilities here were introduced by vim
      in January 2017, but used internally.  In 2023, vim patch 9.0.1117 is needed
      to work with this change.
      
      That is to say that it likely won't work on anyone's system today
      (except maybe Cyan's), but it may magically start working in the
      future... assuming tic supports these capnames.  No real clue there
      since there's absolutely no termcap support, and I use FreeBSD.
      353530d9
    • Deucе's avatar
      Fix off-by-one in delete lines · cda7525d
      Deucе authored
      Previously, delete lines would erase the line above the current one.
      This was visible in vim which makes extensive use of delete line
      to scroll.
      cda7525d
    • Deucе's avatar
      Use /bin/pwd instead of pwd to get the PWD. · 730d4729
      Deucе authored
      Some shell pwd implementations default to the "Logical" PWD, which
      can contain symlinks.  The POSIX standard for /bin/pwd is to return
      the "Physical" PWD with all symlinks resolved.  Some shells don't
      support the -P option the the built-in pwd, so we don't want to
      reply on that.
      
      For some reason, we're redefining the PWD env variable which should
      by the phyical path, but I'm not really interested in tracking down
      all the windy history for this.
      
      Basically, this bit me once, and now it's fixed.
      730d4729
    • Deucе's avatar
      Call SetStretchBltMode(HDC, HALFTONE) before StretchBlt · 365542f1
      Deucе authored
      In theory, this will allow higher quality scaling in GDI mode if
      the graphics driver supports it...
      
      It doesn't look like the drive used for VirtualBox does though, so
      I can't tell if it does anything or not.
      365542f1
    • Deucе's avatar
      More X11 improvements · dd115688
      Deucе authored
      Use the default visual and depth instead of "best"
      Use Xrender for sclaing when library is available and server supports it
      Set VisualIsRGB8 when possible
      dd115688
    • Rob Swindell's avatar
      Create localdefs.mk for the source archive · 66ebcec9
      Rob Swindell authored
      Don't require Git when building from tarball
      66ebcec9
    • Rob Swindell's avatar
      Log a message when sending a telegram · 75cfa892
      Rob Swindell authored
      Clear console abort flag after prompting for destination user
      75cfa892
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      Add -out=filename as redirection isn't always an option · 12155a2b
      Rob Swindell authored
      e.g. when running filelist.js as a timed event, you can't redirect stdout
      (without running via jsexec), so let's support specifying an output
      filename with an option (-out=filename).
      12155a2b
    • Rob Swindell's avatar
      Truncate trailing whitespace from FidoNet message header fields · d6eadf36
      Rob Swindell authored
      It's unclear whether trailing whitespace is supposed to be significant or not
      (FidoNet specs don't say), but I don't see any reason why "John Doe" and
      "John Doe " should be considered unique senders or recipients. Remove any
      trailing whitespace from message subjects too.
      
      This change makes the trailing whitespace truncation in SMB hash functions
      unnecessary (at least for SBBSecho-imported messages), but most (all?) other
      message transports don't allow for this nonsense in the first place.
      d6eadf36
  5. May 30, 2023
    • Rob Swindell's avatar
      Strip the "in-transit" attribute flag from imported packed-messages · b1852011
      Rob Swindell authored
      Log a warning message when either the "local" or "in-transit" flag has been
      stripped from ("Sanitized") imported packed-messages.
      
      Keyop reported a chksmb warning on a FidoNet message that contained the
      'in-transit' attribute:
      <Keyop> Message flagged as 'In Transit'     (?): 1
      <Keyop> fidonet_fidosoft Message Base has Errors!
      
      The message in question appears just to be a corrupted echomail msg coming
      from HPT:
      Sender           '56:43 '
      To               Tommi Koivula
      Subject          test
      X-FTN-AREA       FIDOSOFT.HUSKY
      X-FTN-TID        hpt/os2-wc 1.9.0-cur 2021-03-14
      
      SBBSecho didn't use to convert/import the "in-transit" flag on imported
      netmail or echomail messages, ... until commit 446ab0ef, which
      was needed to support the TickFix robot. So now, let's just sanitize the
      packed-message attributes a little sooner in the import process and log a
      warning when such sanitization has taken place.
      b1852011
Loading