Skip to content
Snippets Groups Projects
  1. Mar 24, 2019
  2. Mar 22, 2019
    • 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 cvs.synchro.net. 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).
      bf82a889
  3. Mar 19, 2019
    • rswindell's avatar
      37e55ca3
    • rswindell's avatar
    • rswindell's avatar
      Fix the off-by-one error in the COLS kludge line parsing logic. · 3da89611
      rswindell authored
      Don't store a columns value of 0 (the default).
      Use SAFEPRINTF in place of sprintf() in parse_control_line().
      3da89611
    • rswindell's avatar
      Export/import the original message editor column width (when known) as a new · 3a1923d8
      rswindell authored
      FidoNet "Kludge line" (control line): "\1COLS: <columns>\r" where <columns>
      is a value between 0 and 255 and a value of 0 is special, meaning "unknown"
      and not normally specified (this is the default assumption when there is no
      "columns"/COLS header field). When a message editor column width is unknown,
      is is normally assumed to have been 80 columns for word-wrapping/re-wrapping
      purposes when displaying the message text.
      
      This feature has worked well for Synchronet's QWK networking (i.e. there are
      far fewer instances of word-wrapping/re-wrapping issues when viewing messages
      on DOVE-Net), so I decided to support this message header field over FTN
      (SBBSecho) as well. Hopefully other FidoNet software authors will notice and
      support this header field in the future as there are still numerous examples
      of word-wrap issues when viewing FidoNet messages. At least Synchronet <->
      Synchronet systems over FidoNet should be able to re-wrap and display all
      message text nicely when both ends support this kludge line.
      
      Incremented SBBSecho version number to 3.07.
      3a1923d8
  4. Mar 16, 2019
    • rswindell's avatar
      When adding a listfile (e.g. files.bbs), be a bit more strict: · e27d4a8f
      rswindell authored
      - filenames must begin with an alpha-numeric char. Might want to relax this in
        the future if it's a problem, but generally filenames on BBSes do begin with
        alpha-numeric characters and this will help us to identify an ignore
        "garbage" filenames in listfiles.
      - always check if the file actually exists, even when parsing the length of
        the file from the listfile. This will also help us to ignore garbage
        filenames.
      - also removed an inexplicable unpadfname() call. Filenames in file lists
        should *not* normally be padded (like "this    .txt") - so I'm not sure why
        this was in there. Perhaps for lists generated from filelist.exe (?). Anyway,
        out of an abundance of caution, removed it. Padded filenames are going away.
      e27d4a8f
    • rswindell's avatar
      MsgBase.get_all_msg_headers() is now more tolerant of corrupted msg bases, · 6f4324d9
      rswindell authored
      or more specifically, if the index (.sid) file is of an unexpected size
      (too big or too small) handle that situation gracefully.
      6f4324d9
  5. Mar 13, 2019
  6. Mar 10, 2019
  7. Mar 08, 2019
  8. Mar 07, 2019
    • deuce's avatar
      There appears to be data corruption in cryptlib if a private key is added · 211a2a1a
      deuce authored
      to a second thread before the first has the session set active.  Add calls
      to lock/unlock the certificate to prevent this.
      
      The better options is likely to have a function that adds the key and socket
      and sets the session active in one call and handles the locking internally.
      
      But I'm lazy, so we get the lock functions.
      211a2a1a
  9. Feb 21, 2019
  10. Feb 20, 2019
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  11. Feb 19, 2019
    • rswindell's avatar
      Fix long-standing bug in js_ParseMsgHeaderObject which is only (currently) · 121e87b7
      rswindell authored
      used by js_post_msg() (the JS bbs.post_msg() method when used with the
      reply_header object argument) - the private data attached to a message
      header object is of type privatemsg_t, not private_t. This caused the
      dereferences of and assignments to p->smb_result in parse_header_object()
      to corrupt the privatemsg_t->msg memory causing heap corruption (caught
      on Windows debug builds in js_get_msg_header_finalize()) and stack faults
      (caught on Linux-gcc in parse_recipient_object()). This one was hard to
      find. <whew!>
      121e87b7
    • rswindell's avatar
      Re-work the column-counting in outchar(). · 27c9842c
      rswindell authored
      I noticed that printable ctrl chars (e.g. 0x18 and 0x19) were not causing the
      current column position to increment, so that got me looking at this code and
      wondering why the LF/FF checking was outside the if(!outchar_esc) condition
      and being executed when CON_R_ECHO is off. So now, using a switch statement,
      it's cleaner and all the printable ctrl chars move the current column position
      correctly.
      27c9842c
    • rswindell's avatar
      sbbs_t::postmsg() and JS's bbs.post_msg() changes: · d95d30ea
      rswindell authored
      When the WM_QUOTE mode flag is set and the 'remsg' is specified, the original
      message will quoted (excluding message tails, using the proper word-wrapping).
      If the quote file already exists before calling postmsg()/bbs.post_msg(), it
      will be over-written. This allows JS script to initiate reply-posts with quoted
      text without having to create their own quotes file. It also means there's no
      need to call sbbs_t::quotemsg() before calling sbbs_t::postmsg().
      sbbs_t::quotemsg() now takes an smb_t* arg (stop using the sbbs_t 'global'
      smb) and now returns bool.
      d95d30ea
    • rswindell's avatar
      Fix bbs.post_msg() JSDOC description: mode defaults to WM_NONE, not WM_MODE. · 2c82a9dd
      rswindell authored
      Renamed js_postmsg() -> js_post_msg() for good measure.
      2c82a9dd
  12. Feb 18, 2019
  13. Feb 17, 2019
  14. Feb 16, 2019
Loading