Skip to content
Snippets Groups Projects
  1. Jan 05, 2025
  2. Dec 28, 2024
  3. Dec 24, 2024
  4. Dec 23, 2024
  5. Dec 22, 2024
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      When searching for unused nodes, skip nodes that have sockets in-use · 74724d0b
      Rob Swindell authored
      We already know such nodes are in-use, so no need to read their node.dab
      record and put extra contention on the node.dab file. Hoepfully this
      reduces or eliminates occurrences of the error:
          Node n status is WFC, but the node socket (s) and thread are still in use!
      Though I kind of expect occurrences of "NODE STATUS FIXUP" errors to likely
      return.
      
      We could in theory just track status of nodes in memory (for those
      nodes that this instance of sbbs controls), and not read the node.dab file at
      all when checking those nodes' status, but:
      - that would prevent out of process control of node status
        e.g. using the node utility to mark a node as offline
      - we'd have to protect instance of in-memory node status checking/changing
        with a mutex
      74724d0b
    • Rob Swindell's avatar
      Fix issue when receiving node messages while using down-arrow at pause prompt · e0931d6d
      Rob Swindell authored
      Hitting down-arrow key at a pause prompt normally displaye just one more line
      of the display text/file, but if you received a node message/telegram/notice
      after hitting down arrow, you'd get a screen full of text instead of just a
      single (one more) line, as you wanted.
      
      This looks to be because of the anti-recursive protection implemented in
      pause() - when it calls nodesync() after the key press, that displays
      node/user messages (if there are any) and if pause is called as a result
      (e.g. because the line counter was already set to cause a pause after the
      next line of output), it'd do nothing since that would be recursive. The fix
      is to simply set the line counter as a result of the down-arrow key press
      *after* the call to nodesync(), which might display multiple lines, but I
      think that's fine.
      e0931d6d
    • Rob Swindell's avatar
  6. Dec 21, 2024
    • Rob Swindell's avatar
      Encode local wallclock (not time_t) in SMB's when_t.time · 445394f9
      Rob Swindell authored
      Increment SMBLIB version to 3.10
      
      Fix issue #845: Changing system/OS time zone, changes dates/times of posted
      messages
      
      Sysops and users shouldn't notice any change unless they change the time zone
      of their system/OS (not accounting changes for daylight/standard time) and
      the result will be that message dates appear the same after such a change.
      
      For backward compatibily, any stored time_t's in msghdr_t.when_written.time
      (i.e. all existing SMB messages) will still be decoded and displayed properly.
      We detect a time_t value by the upper 6 bits being non-zero. When the upper
      6 bits of a when_written.time value are zero, then we know the 'year' is
      stored in the 16-bits before the when_written field (never used bits of the
      netattr field, now part of the when_t structure definition) and the Month,
      Day, Hour, Minute, and Second of the wallclock at the poster's site are
      encoded in the low 26 bits of the time field.
      
      This also eliminates more uses of 32-bit time_t that'll likely start being
      a problem 2038 and really fall over and die in 2106. At least messages'
      posting dates won't have any issue now. The "when_imported" values could use
      a similar treatment someday I suppose - and we could get rid of the
      when_imported.zone value as its not really needed we could use those 16-bits
      for the when_imported.year.
      
      Didn't change anything with filebases (still using time_t's though the
      when_written hdr field isn't used for much with regards to files).
      
      Yes, we could have converted all imported "broken down" message dates to
      UTC and continued to store them as a time_t using timegm() instead of mktime()
      for conversion to time_t, and I considered that. But we would have needed to
      create/use a flag in the message header to indicate such stored date/times
      (since they'd have to go through different adjustment for original time zone
      before display, basically reversing the logic of all the places we display the
      message dates/times using localtime verus gmtime/UTC C RTL functions),
      couldn't just initialize the time with a call to time() upon import of local
      messages (unless the local timezone happened to be UTC). And in the end, we'd
      still have a 32-bit time_t value. So this seemed the better path.
      
      I would have liked to have stored the date fields in a more human readable
      encoding (BCD or decimal, ala isoDate and isoTime_t), but I just didn't have
      the spare bits in the fixed portion of message headers to be wasteful like
      that.
      
      Here's an example from smbutil v of a message header posted after this change:
        when_written     03292595 41E0 Fri Dec 20 18:22:21 2024 PST
        when_imported    6766265D 41E0 Fri Dec 20 18:22:21 2024 PST
      
      Notice the difference in the hex encoding of the date/time between the 2
      header fields: when_imported still uses time_t. The when_written.year value
      isn't output here.
      445394f9
  7. Dec 20, 2024
    • Rob Swindell's avatar
      Add @-codes to display dates/times in UTC · 9f2c2e51
      Rob Swindell authored
      When the system time zone is not UTC, but the sysop wants to display some
      dates and times in UTC, they can now use these @-codes to do that:
      - TIME_UTC
      - DATE_UTC
      - UTC:fmt
      - DATETIME_UTC
      - MSG_DATE_UTC
      9f2c2e51
  8. Dec 19, 2024
    • Rob Swindell's avatar
      Go back to using non-blocking periodic/polling user.tab lock attempts · d0e0e8c9
      Rob Swindell authored
      This partially reverts commit 03b84df8.
      
      I observed deadlocks on Linux attempting locks of user.tab on Samba share,
      which also deadlocked my Windows nodes. Interestingly, the Windows nodes
      never deadlocked on their own (after a week of testing) when using blocking
      locks.
      
      Double the frequency of lock retries - this has helped reduce the observed
      user.tab lock failures on Vertrauen.
      d0e0e8c9
    • Rob Swindell's avatar
      Add "Auto" Local Time Zone option and make that the default for new install · 5434b904
      Rob Swindell authored
      As Deon pointed out in DOVE-Net / Synchronet Discussion, having a local time
      zone configured with a different UTC offset than your system time zone can
      produce strange/unexpected results (e.g. displayed age of messages). Since
      it's possible that not all sysops will complete the configuration wizard or
      actually set their timezone to the correct value (and ignore the startup
      warning message), we now make the default Local Time Zone to be
      "automatic" - query the OS every time the local time zone is needed/used.
      
      This has the downside of only storing (e.g. in message headers) the UTC
      offset of the current time zone (not the time zone abbreviation/name as
      encoded by SMB). I considered making an option to dynamically figure out
      the actual time zone (not just the UTC offset) and while I think that's
      doable, Deon just wanted his UTC offset (e.g. UTC+11:00) and not his
      time zone name (e.g. AEDT) stored in message headers, so this setting
      w...
      5434b904
    • Rob Swindell's avatar
      Fix default for "U.S. Time Zone" toggle when west of UTC · dbf8f666
      Rob Swindell authored
      ... when current timezone is negative offset from UTC, but not a US time zone,
      the default should be "No".
      dbf8f666
  9. Dec 17, 2024
  10. Dec 15, 2024
  11. Dec 14, 2024
  12. Dec 11, 2024
Loading