1. 29 Apr, 2022 1 commit
    • Rob Swindell's avatar
      When running 16-bit DOS commands "offline" on Windows, don't use dosxtrn · 47e60472
      Rob Swindell authored
      We shouldn't need a virtual UART/FOSSIL driver to execute "offline" program (e.g. timed events) in the first place, and our virtual UART/FOSSIL for Windows wouldn't work right in the scenario anyway even if it did load successfully.
      
      This resolves the reported issues with timed events configured as not "native" returning error 255 (and not running successfully) on Windows with SBBS v3.19. I'm not even sure what changed exactly in xtrn.cpp, dosxtrn.c, and sbbexec.c between v3.18 and v3.19 that's causing this to now fail, but it (using DOSXTRN to run offline DOS programs) really shouldn't have been attempted in the first place. So that was just a design issue that happened to kind of sort of work up until v3.19.
      47e60472
  2. 28 Apr, 2022 8 commits
  3. 26 Apr, 2022 2 commits
  4. 25 Apr, 2022 6 commits
  5. 22 Apr, 2022 4 commits
    • Rob Swindell's avatar
      Fix segfault when printing Bad-echo name after failing to load cfg · 2962e4a5
      Rob Swindell authored
      This is a weird one: sbbsecho ran right as I was saving msgs.cnf via
      SCFG and it seems like it loaded 0-byte msgs.cnf into memory and this
      segfault was a result of trying to print sub[INVALID_SUB]->code.
      
      The use of [f]nopen() with proper share perms should have prevented this
      (truncated msgs.cnf read) from happening, so there's something else afoot here.
      2962e4a5
    • Rob Swindell's avatar
      Use smb_open_sub() for the "mail" base too · dc4b1bd9
      Rob Swindell authored
      This restores the ability for JS MsgBase() to be used to create the
      initial mail message base properly, if needed.
      
      This means that the 'subnum' should now be equal to scfg.total_subs
      when referencing an arbitrary SMB via path (not in the configuration).
      dc4b1bd9
    • Rob Swindell's avatar
      Restore ability for MsgBase.open() to open an arbitrary SMB msgbase · 1e62752a
      Rob Swindell authored
      Before commit 5da26eca, you could pass Msgbase() the path to an SMB
      on the disk and open() it, no configuration needed. As of 2 years
      ago, I broke that, and passing a path to an SMB would open the "mail" base
      instead - most unexpected. This is a feature of smb_open_sub() which we
      switched to using (from smb_open()), so go back to using smb_open() when
      an unrecognized code is pass to the constructor.
      
      This has the negative consequence that the "mail" base can't be created
      via JS. Probably should fix that.
      1e62752a
    • Rob Swindell's avatar
      Limit door.sys numeric values to 32767 · 6b36b379
      Rob Swindell authored
      The DoorFrame door library will about with "Overflow Error" if it reads a door.sys file with lines 16 (calls), 42 (minute credits), or 52 (posted messages) with a value > 32767, the maximum positive value of a signed 16-bit integer. So cap these values in the door.sys file at that maximum. This does potentially break/limit doors that give minutes using the door.sys drop file, so use that "modify user data" option in SCFG with care.
      
      Electrosys initially reported this problem with the Lemonade! door game which was barfing on a line 42 value of 449632.
      6b36b379
  6. 19 Apr, 2022 2 commits
  7. 18 Apr, 2022 2 commits
  8. 16 Apr, 2022 3 commits
  9. 15 Apr, 2022 3 commits
  10. 14 Apr, 2022 4 commits
  11. 13 Apr, 2022 1 commit
    • Rob Swindell's avatar
      Fix packet filename in "Gruned message" log entry on Win32 · 414d34ec
      Rob Swindell authored
      e.g. "Grunged message (type 2) from 4:80/1 at offset 58 in packet: (null)"
      
      off_t is 64-bit, but long in 32-bit (on Win32), so needs a typecast here in
      lprintf() call (otherwise, the upper 4 bytes of the offset are interpreted
      as the string address for the corresponding '%s' argument, the filename).
      414d34ec
  12. 12 Apr, 2022 2 commits
  13. 11 Apr, 2022 1 commit
    • Rob Swindell's avatar
      Install OperationCallback for all executed JS scripts · 9d752c75
      Rob Swindell authored
      JS doors with the "Use Shell or New Context" option enabled in SCFG and JS
      modules installed a global hot key handlers would not automatically terminate
      when the user disconnected (and js.auto_terminate was true, the default).
      I'm not sure why the operation callback was only installed when scope==NULL
      but always installing it fixes the issue with some global hot key modules
      and JS doors becoming "zombies" when a user disconnects while running them.
      9d752c75
  14. 09 Apr, 2022 1 commit
    • Rob Swindell's avatar
      Check for user disconnection in CheckTerminate() · dee6266e
      Rob Swindell authored
      A user disconnecting while running tw2 would just result in an infinite loop
      checking node status and waiting for the user's allowed time to run out (which
      may never happen) or for the server to be locally terminated.
      
      This has been happening for years on Vertrauen. Finally now I see why.
      dee6266e