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

  1. 24 Sep, 2021 1 commit
  2. 10 Jun, 2021 1 commit
    • Rob Swindell's avatar
      Standardize on "metadata" as the description of a file's "tail" dfield · 3549be9f
      Rob Swindell authored
      It's anticipated that this will be used for JS-populated file metadata in JSON format in the future (and not just "archive contents" in .ini format).
      Also, fix the double-free issue that was occurring when moving files with extended file descriptions (sbbs_t::movefile()). This was actually the primary problem I was fixing here, but noticed the metadata issue: metadata would not have been moved along with the other file info between bases.
  3. 02 May, 2021 1 commit
    • Rob Swindell's avatar
      Store contents (list) of archive files in filebase (in the "msg tail") · 5374a113
      Rob Swindell authored
      This will allow fast/easy display of archive contents without actually reading the archive files.
      Introduces some new functions:
      - list_archive_contents()
      - smb_adddfile_withlist()
      A new SMB convenience variable ("tail", aliased as "content" for a file).
      A new file detail level ("file_detail_content", exposed in JS as FileBase.DETAIL.CONTENTS) which adds a "content" array property to file metadata objects for JS FileBase.get().
      Files already added to the new filebases won't have this archive content automatically - I'm looking into that now (likely a new or updated JS script to run).
  4. 04 Apr, 2021 1 commit
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · fcf58640
      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...
  5. 11 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Support forwarding of single-part HTML emails, add "Fwd:" subject prefix · d79e9514
      Rob Swindell authored
      When forwarding a single-part MIME-encoded HTML email, the preamble (original message header info) and any user comments, need to be HTML-encoded.
      Add the commonly-used "Fwd: " prefix to the default message subject, when forwarding.
      This required that smb_getplaintext() no longer always-NULLify the message's text_subtype (e.g. "html"). For single-part messages, this element was getting freed and NULLed.
      Add/use a new SMBLIB convenience function to add a string header field, but only if non-NULL: smb_hfield_string()
  6. 26 Sep, 2020 1 commit
    • Rob Swindell's avatar
      Add smb_msg_type() and smb_msg_count() for index-based msg counting. · a3e430e0
      Rob Swindell authored
      In support of message bases with vote-messages and poll-closures:
      smb_msg_type() returns an enum smb_msg_type inferred from the combination
      of attribute flags specified (should match msghdr_t.type).
      smb_msg_count() calculates the number of message index records of the
      specified type(s) (a bit-field) by reading the message base index file. This
      value should only used for info/display purposes, so no locking is performed
      to return the result as fast as possible.
      This allows an accurate number of "posts" (posted *messages*) to be queried
      and displayed to a user when appropriate (e.g. instead of
      smb.status.total_msgs or just the size of the index file divided by the size
      of an index record). In that case, since vote messages and poll closures
      aren't displayed as messages to users, exclude those from the count to reduce
      confusion. For message bases that don't support voting, this scheme is not
  7. 16 Aug, 2020 1 commit
  8. 25 May, 2020 1 commit
  9. 19 Mar, 2020 1 commit
    • rswindell's avatar
      New function: smb_msghdr_str_list() which returns a message header as a string · 942b0218
      rswindell authored
      list (str_list_t) where each string is a header field (variable or fixed) in
      "<name> <value>" format. This format more closely resembles the output
      of the sbbs_t::msghdr() function which is used to dump message headers
      (e.g. for sysops/sub-ops).
      I intend to replace the duplicate logic in sbbs_t::msghdr() with this new
      I would have liked to have used a list of named strings (named_string_t), but
      I don't yet have a library to alloc/add items to a named string list.
  10. 30 Jul, 2019 1 commit
    • rswindell's avatar
      Define some new SMB hfield types: · a8709616
      rswindell authored
      - REPLYTOLIST (a mime-decoded version of RFC822REPLYTO)
      - RECIPIENTLIST (a mime-decoded version of RC822TO)
      - RFC822CC (a mime-encoded version of SMB_CARBONCOPY)
      - RFC822ORG (a mime-encoded version of SMB_ORGANIZATION)
      - RFC822SUBJECT (a mime-encoded version of SUBJECT)
      The RFC822* hfields are only created when necessary: there was a MIME-encoded
      hfield value received (e.g. by the mailsrvr) for the corresponding hfield.
      The to_list and replyto_list convenience pointers now point to the MIME-decoded
      (plain text) version of these header fields, since that's what everyone
      normally wants to see and use.
      The MIME-encoded flavors (RFC822*) are stored for relaying via SMTP or POP3
      and retaining all data (no normalization or decoding).
      A new auxattr bit has been defined: MSG_HFIELDS_UTF8 (happens to be the same
      as P_UTF8 - snicker). This bit will be set in msg.hdr.auxattr when one or more
      hfield values are in UTF-8 format. When this flag is not set, all hfield values
      are assumed to be CP437 for backwards compatibility.
      Since we are using a single flag, all header fields have to use the same
      encoding (either CP437 or UTF-8). When the hfield values are all plain ASCII,
      there's no difference between CP437 and UTF-8 and the MSG_HFIELDS_UTF8 flag
      is not expected to be set, though setting it shouldn't hurt. The RFC822* hfield
      values should also include US-ASCII text (using MIME-encoding for any 8-bit
      smb_get_hfield() function prototype change: the 3rd argument changed from
      an hfield_t* to an hfield_t**, so that the caller can actually change the
      hfield type (in memory) if they wish. Nobody seemed to be passing any non-NULL
      3rd argument value, so this changed appeared safe to make.
  11. 25 Jul, 2019 1 commit
    • rswindell's avatar
      Store FidoNet charset control line values as their own (new) SMB hfield type: · 6000e4f1
      rswindell authored
      with its own smbmsg_t convenience pointer: ftn_charset.
      this allows greater control over when/how this header field is exported.
      Constify smb_msg_is_utf8().
      Note that the "Editor" hfield type should hold any FTN "NOTE" control line
      values (where msg editor details/version are normally propagated over FidoNet).
  12. 06 Jul, 2019 1 commit
    • rswindell's avatar
      Created new SMBLIB function: smb_msg_is_utf8() which reutrns TRUE if the passed · d2df590f
      rswindell authored
      message body is UTF-8 encoded. This works for either messages received via FTN
      (with the "CHRS: UTF-8" control paragraph) or MIME-encoded messages (e.g.
      Internet e-mail).
      This is to be used by things to display messages. If the viewer (e.g. user's
      terminal) supports UTF-8, just send through as-is. If not, translation (e.g. to
      CP437) or filtering may be needed.
  13. 29 Jun, 2019 1 commit
  14. 04 May, 2019 1 commit
    • rswindell's avatar
      smb_getplaintext and smb_getmsgtxt(...,GETMSGTXT_PLAIN) will now fall-back · 41edfbbc
      rswindell authored
      to a text/html part of a multi-part MIME encoded message if no text/plain part
      Changed smbmsg_t.charset to smbmsg_t.text_charset.
      Added smbmsg_t.text_subtype (e.g. "plain" or "html").
      Fixed issue with parsing parsed plain-text when the charset was the last
      element of the MIME-part header.
  15. 10 Apr, 2019 3 commits
  16. 09 Apr, 2019 1 commit
  17. 22 Mar, 2019 1 commit
    • rswindell's avatar
      Use default calling convention (__cdecl) for DLL funcs in Borland builds. · bf82a889
      rswindell authored
      Fix age-old bug with Borland/C++Builder built executables (Windows):
      to achieve compatibility with  the default __cdecl symbol naming rules of
      Visual C++, we were using __stdcall convention for DLL functions when
      building code with Borland/C++Builder tools and using the default (__cdecl)
      convention when building with Microsoft (Visual C++) tools. Although this
      allowed symbols to be located when linking, the calling convention mismatch
      caused a stack cleanup issue that very rarely manifested itself in a bug
      (e.g. exception of some kind in sbbsctrl.exe, usually). Mismatching
      the calling conventions was unintentional (I thought the default for MSVC
      DLL functions was __stdcall) - but since the calls to MSVC-Built DLL functions
      worked 99% of the time, I didn't realize there was an underlying issue. So I
      now work-around the DLL symbol naming mismatch using a command-line option (-a)
      passed to implib in src/sbbs3/ctrl/makelibs.bat
      I had previously worked-around exceptions when calling MSVC DLL functions in
      sbbsctrl.exe by calling the problematic DLL functions from a timer tick handler
      rather than a user control (e.g. button) event handler. Those work-arounds can
      now be removed.
      The erroneous "DLLCALL" definition design pattern was replicated (copy/pasted)
      to many other projects' header files in In the future, we may
      want to just remove all instances of *CALL since they now serve no purpose and
      appear as useless "Kruft" (but do allow us to more-easily globally change DLL
      function calling conventions if/when necessary in the future).
  18. 24 Jul, 2018 1 commit
    • rswindell's avatar
      Singificantlly improve message scan pointer initialization (e.g. for new · 264cb38c
      rswindell authored
      users) and adjusting scan ptrs by date or set to "Last msg" while online:
      - speed (on my system, reduced from 12 to < 2 seconds)
        This involved 2 enhancements: check msgbase index file timestamp (fast)
        before opening any files. When opening the msgbase, just open the index
        file (no other msgbase files) - required new smblib function: smb_open_index.
      - fixed off-by-one when setting by date (when setting the new-scan ptr to
        Jan-1-2018, you want that first message posted on/after Jan-1-2018 to be
        found as "new", not the first message posted *after* that date.
      - re-added the fixmsgptrs() call in putmsgptrs(), inadvertently removed
        in the .ixb -> .ini ptr storage update in rev 1.192 of userdat.c.
  19. 08 Jul, 2018 1 commit
    • rswindell's avatar
      Re-write of smb_getmsgidx_by_time() - using a proper binary search · 3002a275
      rswindell authored
      algorithm now. Also, now returns the index offset of the matched index
      (if found), negative error value otherwise.
      I was testing something and noticed that the old smb_getmsgidx_by_time()
      implementation could sometimes return the index of a message posted before
      the requested time. That was fixed by re-writing the binary search logic.
      Also, I found it useful in my testing to have this function return the
      offset of the matching index (in addition to the index record itself), so
      checks of the return value need to compare >= SMB_SUCCESS, not just ==
      or != SMB_SUCCESS.
  20. 27 Nov, 2017 1 commit
  21. 26 Nov, 2017 1 commit
  22. 25 Nov, 2017 1 commit
    • rswindell's avatar
      Created smb_initsmbhdr() which performs a subset of what smb_create() does, · adfd3ac7
      rswindell authored
      it justs initializes/re-initializes the SMB header and status header
      Created smb_t.continue_on_error which (currently) allows an smb_open() to
      continue event though some (normally fatal) errors have been detected
      (e.g. corrupted SMB header).
      This is all in the name of being able to recover message bases after more
      forms of corruption.
  23. 06 Dec, 2016 1 commit
    • rswindell's avatar
      New functions: · f6e9f886
      rswindell authored
      - smb_next_in_thread
      - smb_last_in_branch
      - smb_last_in_thread
  24. 05 Dec, 2016 1 commit
  25. 24 Nov, 2016 1 commit
  26. 18 Nov, 2016 1 commit
    • rswindell's avatar
      Introduced 2 new poll concepts: · 5ea459df
      rswindell authored
      - Closures (polls can be closed for new voting by the pollster)
      - Results can have configurable visibility:
        a. Only to voters (and the pollster) - the default
        b. Everyone
        c. Everyone once the poll has closed
        d. Only the pollster
      Changes to smb_getmsgtxt():
      Main change: poll questions can now be quoted when replying to a posted poll
      (the results cannot be quoted).
      Also: there's now automatically a blank line inserted between comment header
      fields and poll answers or the msg body text.
      Also: upon any malloc failure, the function now returns NULL.
      New functions: smb_msg_is_from() and smb_addpollclosure().
  27. 16 Nov, 2016 1 commit
    • rswindell's avatar
      Changed SMB_MSG_TYPE_VOTE to SMB_MSG_TYPE_BALLOT: · 09ff4974
      rswindell authored
      There (will be) the possibilty to cast mutliple votes in a single vote-msg
      (ballot), when multi-choice polls are introduced later. There were just too
      many things call vote/votes and it was getting confusing in my own head. So the
      msg type for messages that contain votes is now "ballot".
      smb_voted_already() now returns uint16_t (instead of BOOL), returns the votes
      of the user (for polls) or just 1 for up/downvotes of msgs.
  28. 15 Nov, 2016 1 commit
  29. 12 Nov, 2016 2 commits
  30. 08 Nov, 2016 1 commit
    • rswindell's avatar
      Inspired by the U.S. presdential election: · 68a90f31
      rswindell authored
      The beginnings of an SMB-based voting system - very experimental:
      The concept is that a "vote" message can be used to reply to:
      1. A normal message, as either an upvote or a downvote, ala social media
      2. A poll, polls can either allow a single choice answer or multiple answers
      Vote messages won't be visible as normal messages (e.g. when reading messages
      online) and SMB processing software (e.g. SBBSecho) should ignore these
      messages because they have no body text.
      Polls are going to need more work, but the idea is to have the poll question as
      a single (newly defined) hfield and the possible answers as dfields.
  31. 06 Dec, 2015 1 commit
    • rswindell's avatar
      smb_hfield_add_netaddr(), and by extension, the smb_hfield_netaddr() macro, · a760467d
      rswindell authored
      If the specified or detected net_type is not Internet, only store the address
      portion of the email address in the *NETADDR hfield.
      If the net_type argument is a NULL pointer, automatically add the *NETTYPE
      hfield too.
      New functions:
      - smb_netaddr_type() - returns the string/name of a specified net_type.
      - smb_get_net_type_by_addr() - parses just the network address field.
      Change short/ushort's to int16_t/uint16_t's.
      Remove date from copyright.
  32. 26 Nov, 2015 2 commits
    • rswindell's avatar
    • rswindell's avatar
      Long requested feature: · bc9b40c4
      rswindell authored
      smb_getmsgtxt() can now return *just* the plain-text part of a multipart MIME
      encoded message by setting the GETMSGTXT_PLAIN bit in the mode argument.
      This is useful for reading (many) MIME encoded emails via the Terminal server.
      The full MIME body text is left in place for those message viewing methods
      which can nicely handle (e.g. display) non-plain-text parts.
  33. 16 Oct, 2011 1 commit
  34. 21 Jul, 2011 1 commit
  35. 24 Mar, 2009 2 commits