• src/sbbs3/prntfile.cpp

    From rswindell@VERT to CVS commit on Thu Apr 23 22:33:39 2020
    src/sbbs3 prntfile.cpp 1.40 1.41
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv12380

    Modified Files:
    prntfile.cpp
    Log Message:
    Fix bug reported by Nelgin in printfile(), when called with-OUT the P_OPENCLOSE mode flag, an EOF @-code would not stop the output since it calls putmsg()
    for *each* line of the file and was not checking the return value of putmsg() for an abnormal/early-termination indicator.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Fri May 1 23:09:38 2020
    src/sbbs3 prntfile.cpp 1.42 1.43
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv20164

    Modified Files:
    prntfile.cpp
    Log Message:
    Keep Deuce from killing Vert by viewing 16GB log files:
    Don't use P_OPENCLOSE printfile() mode for any files > 2MB in size.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat May 2 00:55:21 2020
    src/sbbs3 prntfile.cpp 1.43 1.44
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10676

    Modified Files:
    prntfile.cpp
    Log Message:
    Make printtail() not load entire files into memory, but instead read the last part of the file, assuming lines are not >8K (on average).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sun Nov 22 00:14:40 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/a5b344c97eebf2879f563371
    Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Convert menu paths (e.g. /sbbs/text/menu/../filename) to full paths

    If text/menu is a symlink (on *nix), then the path above would actually
    point to a filename in the parent of the symlink target, which is not
    what we want (we want the filename in the text dir). Fixed by using
    FULLPATH.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Dec 5 19:26:39 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/bba2a9d5f6426be4cec140f8
    Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Don't print a CRLF in printfile() (called by menu) if no file exists

    printfile() assumes you want the file displayed starting in column 0, so will send a CRLF to insure that it does (unless the P_NOCRLF mode flag is specified). But this CRLF printing was happening before the file was opened and when the P_NOERROR mode flag is specified, this should be a silent failure with no print output. So move the CRLF printing to *after* the file is opened.

    This expose an issue in the latest xtrn_sec.js where it makes several calls to bbs.menu() with the P_NOERROR mode flag set, expecting nothing to happen if/when the optional display files (e.g. xtrn*_tail.*) don't exist.

    Reported by JC via IRC.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Git commit to main/sbbs/master on Sat Dec 5 19:32:24 2020
    Re: src/sbbs3/prntfile.cpp
    By: Rob Swindell to Git commit to main/sbbs/master on Sat Dec 05 2020 07:26 pm

    https://gitlab.synchro.net/main/sbbs/-/commit/bba2a9d5f6426be4cec140f8 Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Don't print a CRLF in printfile() (called by menu) if no file exists

    printfile() assumes you want the file displayed starting in column 0, so will send a CRLF to insure that it does (unless the P_NOCRLF mode flag is specified). But this CRLF printing was happening before the file was opened and when the P_NOERROR mode flag is specified, this should be a silent failure with no print output. So move the CRLF printing to *after* the file is opened.

    This expose an issue in the latest xtrn_sec.js where it makes several calls to bbs.menu() with the P_NOERROR mode flag set, expecting nothing to happen if/when the optional display files (e.g. xtrn*_tail.*) don't exist.

    Reported by JC via IRC.

    Correction: reported by Dan_C.
    --
    digital man

    Synchronet/BBS Terminology Definition #49:
    MODEM = Modulator/Demodulator
    Norco, CA WX: 60.5øF, 22.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Aug 26 17:10:47 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/46c603ce3c9eba660f425cc4
    Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Fix NULL pointer deref in random_menu()

    When no files with extensions are found, though they matched the glob() pattern, a NULL pointer deref would result (segfault).

    This could happen if the only files matching the pattern had no extenions or were directories (not files).

    Fix for issue #779

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Oct 10 22:23:27 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/b656e19ff168e27583a33c26
    Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Report error when menu() can't find a display file and P_NOERROR not used

    This issue was introduced in commit d02fc1a2 (3 years ago), where menu() would silenty fail (just return false) if no display file matching the supported menu/display file types/extensions could be found.

    Previous to commit d02fc1a2, we would log a NOTICE-level message and display
    a "File not found" message to the user (what sbbs_t::printfile() does), but since d02fc1a2, we no longer even call printfile() when the file doesn't
    exist, so no error was logged or message displayed to the user.

    Of course, when using the P_NOERROR mode flag, silent failure is expected and that's still what happens in that case.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Oct 13 02:26:14 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/639781e2ad929914bf27f469
    Modified Files:
    src/sbbs3/prntfile.cpp
    Log Message:
    Don't use global menu_dir for calls to menu() with path starting with '.'

    For scripts that set the global menu_dir (e.g. via JS bbs.menu_dir), let's
    not require that all the files moved from text to text/menu (for example).

    Problem reported by Amessyroom when using his custom shell and bullseye.js.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net