Skip to content
Snippets Groups Projects
  1. Jan 26, 2025
    • Rob Swindell's avatar
      Make the fully-supported (lib)archive file types/formats configurable · 7cb684c3
      Rob Swindell authored
      Before now, the archive formats/types (e.g. for creating QWK/REP packets or
      temp file download archives) supported by libarchive have been *hard-coded* in
      Synchronet to "zip, 7z, tgz", but if you really want to support the creation
      of more archive formats using the internal (libarchive) support in Synchronet,
      and your system supports it (e.g. confirmed using archive.js), you can add
      those types to this list or remove any that are problematic.
      
      This list does not impact the archive types that can be viewed or extracted
      using libarchive.
      7cb684c3
  2. Jan 14, 2025
  3. Jan 20, 2024
  4. Mar 13, 2023
    • Rob Swindell's avatar
      Fix issue with DIZ extraction creating subdirs in temp · 67d6cf3c
      Rob Swindell authored
      For archives with directories, the first call to extract_files_from_archive() from extract_diz() would create sub-directories in the target (temp) directory, but no files within them.
      
      To correctly solve the original problem identified in commit 79a302f4, introduce/use a new 'recurse' argument to extract_files_from_archive() which means to recursively apply the file_list filter (if specified). Always pass 'with_path' argument as false to prevent sub-dir creation.
      
      The JS Archive.extract() method now excepts an additional boolean argument (recurse) following the file list arguments, default is false.
      
      Remove extra whitespace in Archive JSDOC method descriptions to be consistent with other object/class docs.
      67d6cf3c
  5. Jan 04, 2022
    • Rob Swindell's avatar
      Add overwrite argument to extract_file_from_archive and Archive.extract · 45ab903f
      Rob Swindell authored
      Previously, extracted files were always overwritten (so that is the "default" for Archive.extract() and mostly what I'm specifying in the C/C++ code by default now), but this caused a problem with DIZ extraction: archives that contained multiple DIZ files (e.g in sub-directories), the last to be extracted would be used. A maximum of 3 DIZs can be extracted, so it would usually be the 3rd DIZ in the archive if there were that many.
      
      Another solution would be to *only* extract DIZ files from the root of the archive and I should look into that as well, but the always-overwrite behavior also seemed to be wrong, so that *also* needed fixing (allow caller to control behavior).
      
      This fixes issue #317, at least for archives where the root DIZ exists *before* any nested DIZ files. I'll have to try and create a purposeful archive to test the other conditions (where the root DIZ would appear *after* the nested DIZ(s)).
      45ab903f
  6. Apr 04, 2021
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · 925e3b0a
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      925e3b0a
  7. Dec 21, 2020
    • Rob Swindell's avatar
      Update to previous fix for REP packing · 43062b2e
      Rob Swindell authored
      Thanks to TRMB for being the guinea pig, I see now that REP packets can't be opened in append mode because we write and then seek back and write some more in msgtoqwk(). Oops.
      43062b2e
    • Rob Swindell's avatar
      Fix 18 year old bug with updating/appending existing REP packets · 355f9712
      Rob Swindell authored
      18 years, 10 months ago I introduced a bug whereby .MSG files in outgoing REP packets were *always* truncated before newly-exported messages were added. Even though the log message would say "Updating /path/to/HUBID.REP" (rather than the usual "Creating ...") it was actually truncating the .MSG file, thus discarding any existing messages that were not previously successfully sent (!). I'm not sure what the problem was I was trying to solve at the time (some "Unix .rep creation bug") - but the change I made at the time was most definitely was not the correct fix. :-(
      
      How I noticed this problem was the HEADERS.DAT Conference Number check I added to qwk_parse_header_list() back in August of 2019. I've been catching/logging those errors here on Vertrauen and collecting *.rep.bad files from occasional QWKnet node-submitted REP packets, but I didn't look into the cause until today: the HEADERS.DAT and VOTING.DAT files were being correctly appended even though the .MSG file was being truncated, so the files would be out-of-sync and this was the root-cause of the crossed-up message bodies/headers seen on DOVE-Net a year or more ago and apparently also the cause of occasionally lost messages from QWKnet (e.g. DOVE-Net) nodes.
      
      To trigger this bug from the node side, you'd have to create a REP packet with one or more message in it and then fail to send it to your hub (e.g. VERT), for any reason. And then when you attempt another pack/call-out, the previously packed messages would be lost and the HEADERS.DAT file would contain stale/out-of-sync information. 
      
      To simplify things, I'm now just using fopen(..., "ab") (append, binary) - fnopen() should not be needed when opening files in the temp_dir. In append mode, no subsequent fseek(..., SEEK_END) should be needed, so don't do that. And use fprintf() for its intended purpose.
      355f9712
  8. Oct 11, 2020
    • Rob Swindell's avatar
      Better error detection in msgtoqwk() · 2bd03362
      Rob Swindell authored
      Have msgtoqwk() return a negative number upon error (e.g. blank message, failed to read to body text), which means *no* message header was written to the messages.dat file, so don't increment the record (block) counter used to create the index (NDX) file.
      
      If msgtoqwk() returns 0, that means that a header was written, but no body text (e.g. a vote message) and that is different than an error.
      2bd03362
  9. Aug 16, 2020
  10. Apr 11, 2020
    • rswindell's avatar
      Two unrelated changes, but since they touched sbbs.h, I'm committing them · 0d73dbc4
      rswindell authored
      together to keep things atomic:
      1. Eliminate eprintf() as sbbs_t::lputs() and sbbs_t::lprintf() do the
         "right thing" (e.g. log to the event log when called from the event_thread).
      2. Moved upload_stats() and download_stats() from ftpsrvr.c to getstats.c where
          I plan to make use of them for JS-based upload/download file support.
      0d73dbc4
  11. Aug 17, 2019
  12. Apr 10, 2019
  13. Apr 07, 2018
  14. Apr 06, 2018
  15. Oct 23, 2017
    • rswindell's avatar
      * Implemented support for new LIB_DIRS option: · 11e529d4
      rswindell authored
        Automatically detect child sub-directories and make them available as virtual
        directories for users to download from - only useful via FTP currently.
      * Implemented Sorting options for Message Groups and File Libraries:
        Sub-boards within groups and directories within library can now be
        automatically sorted based on the sysop's chosen sort field (long name, short
        name, or internal code)
        - Required that sub-boards are now stored/saved in msgs.cnf based on groups
        - Required QWKnet hub sub-board reference dynamic renumbering
      * Implemented "Template" toggle option for sub-boards and file directories:
        A sub-board or directory marked as "template" will be used for newly created
        (or imported) subs/dirs for that group/lib. Clone Options via SCFG will now
        use the "template" item as the source of the cloned settings, if available.
      11e529d4
  16. Nov 23, 2016
    • rswindell's avatar
      New QWKnet hub configuration settings (with defaults): · 40b2188a
      rswindell authored
      - Include Kludge Lines     (Yes)
      - Include VOTING.DAT File   (Yes)
      - Include HEADERS.DAT File   (Yes)
      - Extended (QWKE) Packets    (No)
      - Exported Ctrl-A Codes    (Strip)
      
      SBBS/QWKnet nodes now have more control over the REP packet files created
      by their systems. If the "uplink" (hub) is complaining about receiving
      unsupported files (e.g. VOTING.DAT) or kluge lines (e.g. @TZ), just turn them
      off.
      
      Also, Ctrl-A codes may now be retained in QWKnetmail. And the @REPLYTO kludge
      line enabled for the first time (!).
      40b2188a
  17. Nov 20, 2016
    • rswindell's avatar
      Solved the networked-voting "ordering problem". QWK/REP packets that contained · 3258eca3
      rswindell authored
      normal messages along with voting data (polls, ballots, etc.) would always be
      imported in this order: msgs, polls, ballots/votes, and then poll-closures.
      This could result in a confusing order of messages in the local msg base where
      there were messages in reply to a poll before the poll appears and other
      oddities. Anyway, this is now resolved by placing a msg "header block" for each
      vote-data item in the MESSAGES.DAT file. Since there is no body/text blocks,
      it should be ignored under normal circumstances, but these header blocks are
      only created if VOTING.DAT is enabled anyway.
      And now, the VOTING.DAT contains an extra line (empty .ini section) with the
      HEADERS.DAT offset associated with the chronology of the item. The format
      is still backwards compatible with the earlier builds that included VOTING.DAT
      support.
      
      Also, fixed the vote/poll/closure Message-IDs containing a msg number of 0
      (while not technically a problem, it wasn't the intention) with the use of the
      new function: get_new_msg_number().
      3258eca3
  18. Nov 16, 2016
    • rswindell's avatar
      loadmsg() now returns < 0 on error, >= 0 on success, this change was necessary · 742f1901
      rswindell authored
      to be able to delete messages that have no hfields, for example, with sub-op
      'D' command.
      Now support polls with comments (displayed before the poll answers).
      Poll results/statistics are only displayed to sub-ops and users who have voted
      already. This may be optoinal behavior determined by the pollster in the future.
      Sub-ops can now add comments to any post using the 'A' command from the
      [O]perator menu - use with caution.
      742f1901
  19. Nov 10, 2016
    • rswindell's avatar
      Message voting via QWKnet is now fully implemented: · 74902cee
      rswindell authored
      - Users can be restricted from voting with the 'V' restriction
      - Sub-boards can be disalbled for voting in SCFG
      - VOTING.DAT can be include/excluded from QWK packets via user cfg
        (when a VOTING.DAT is received in a REP, the user cfg flag is auto-set)
      - Adds several new text.dat lines (if not present in yours, uses the default)
      
      What's not yet implemented:
      - Notification of votes on your posted messages
      - Method to view/audit all votes
      - Polling
      - Any special handling to auto-exclude votes from msg-related JavaScripts
      74902cee
  20. May 02, 2015
    • rswindell's avatar
      Implemented the SCAN_UNREAD mode bit for scansubs(), scanallsubs(), · 0d51d960
      rswindell authored
      scanposts(), and listsub(). These functions are exposed in the JS 'bbs' object
      as scan_subs(), scan_msgs(), and list_msgs().
      Wherease previously, all of "your messages" (messages addressed to you)
      would be found/displayed if the user answered (Y)es to the "Subjects Only?"
      prompt, and only un-read message (to you) would be displayed if they answered
      (N)o to the "Subjects Only?", providing long-standing confusion about the
      different behavior, now the user is prompted whether to display un-read
      messages only (in scansubs/scanallsubs), and in the case of the logon
      question to "Search all subs for un-read messages to you?", only un-read
      messages are listed/displayed, regardless of how the user answers the
      "Subjects Only?" question.
      SCAN_UNREAD is only applicable when combined with SCAN_TOYOU.
      
      Added new commands to the msg reading prompt: 'N' (list new messages), 'U'
      list un-read messages to-you.
      
      2 new text.dat entries: DisplayUnreadMessagesOnlyQ and NoMessagesFound
      0d51d960
  21. Oct 24, 2012
  22. Jul 11, 2012
  23. Sep 21, 2011
  24. Dec 04, 2009
  25. Feb 23, 2008
  26. Jul 10, 2007
    • deuce's avatar
      Type changes trickle down: · bd9c141e
      deuce authored
      getlasgmsg() needs a uin32_t* as the second arg.
      loadmail() needs an int32_t* as the second argument.
      loadposts() needs an int32_t as the first argument.
      bd9c141e
  27. Sep 25, 2005
  28. Sep 20, 2005
  29. Mar 12, 2005
  30. Mar 11, 2005
  31. Jan 05, 2005
  32. Jan 10, 2004
  33. Oct 24, 2003
  34. Aug 30, 2003
  35. May 01, 2003
  36. Apr 30, 2003
  37. Nov 10, 2002
Loading