• src/sbbs3/js_internal.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jan 16 15:20:34 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/da7c67c99b965eb7e77bf699
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix js.exec() returned nul" unless exit() was called explicitly

    Don't use the "exit_code" property value as the return value of js.exec() unless it's a number. As reported by mlong (thanks).

    Also, "exit_code" was being set to null (instead of void/undefined) in js_PrepareToExecute(). I think this was just an oversight or typo by Deuce from his commit of 5 years ago (f3256d81). Since we're comparing exit_code with JSVAL_VOID in other places to determine if it was actually set, this appears to be a long standing bug.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jan 16 17:37:43 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/a4fd167b477a07103a95e6b9
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Deuce wants js.exec() to support non-number return values via exit_code

    <@Deuce> Just saying that if someone does the work of exit_code = {thing: function(x) { return secretsauce }); exit(); they should get away with it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Mar 6 02:32:38 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/7e2022cbb881808a346e9a97
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Add a js.options property to report the option flags used for the JS ctx

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Apr 4 18:51:56 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/78146ab20d2874f439e06614
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix event listener removal

    Was terribly broken.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Apr 4 19:05:54 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/a1797cc6f087047e19f29afe
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Add js.setImmediate(callback[, thisObj)

    I haven't added a clearImmediate() because there's currently no way
    of manipulating the run queue, and I can't come up with a reason
    someone would actually need it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Apr 4 19:10:10 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/6a290b4bee1274a152d84747
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Clarify that dispatchEvent() adds to the end of the run queue

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Apr 4 20:24:55 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/3513bba392c0759260c9ecc7
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Keep running the event loop while the run queue is not empty

    Previously, timed or polled callbacks were required to keep the
    event loop running.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Apr 7 23:26:16 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/77933477bdedaf7d0c8bc80c
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix sizeof() target.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tue Apr 13 16:54:50 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/13cc4027f25c56980ca6ad3d
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Delete one-shot events before running the callback.

    If a callback deletes the one-shot event that invoked it, the
    event pointer in the caller would be to free()d memory with
    hilarious results.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri May 21 20:43:02 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/b6fe381f0ee21b9eac16cb87
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix console and connect events when using select()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Feb 22 18:32:00 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/78ae75b368cb4d8a877a135b
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Update JSDOCs on timer-related methods

    - setInterval() returns a Number, not an Object.
    - typos fixed
    - markup added

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sun Feb 12 22:54:28 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/4bbe7434dcbe92221eaff726
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Descriptions of js.exec_file and exec_dir were reversed

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Fri Jul 21 12:42:28 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/c2c3cdfc4a890fc622e36cf7
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix js.exec() error message when specified script can't be found

    If the search up the scope tree for js.exec_dir fails, the script 'path' would be left blank leading to a weird error message.
    e.g. !JavaScript default.js line 249: Error: Script file () does not exist

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Rob Swindell (on Windows) on Fri Jul 21 14:55:45 2023
    Re: src/sbbs3/js_internal.c
    By: Rob Swindell (on Windows) to Git commit to main/sbbs/master on Fri Jul 21 2023 12:42 pm

    Fix js.exec() error message when specified script can't be found

    If the search up the scope tree for js.exec_dir fails, the script 'path' would be left blank leading to a weird error message.
    e.g. !JavaScript default.js line 249: Error: Script file () does not exist

    I just did an update and rebuilt my Synchronet binaries (and updated my default.js as well). That seems to fix the issue we were seeing with DDMsgReader and default.js. But now I'm seeing the same error in a different situation.

    In my command shell (custom JS), I have this command to run my file area chooser:

    bbs.exec("?../xtrn/DigDist/AreaChoosers/DDFileAreaChooser.js");

    That works. However, I also have a JS script in my sbbs/mods directory that I use as a test sandbox to try out new things, which I usually run from my main menu. I tried using the same line above in my test script to run my DDFileAreaChooser.js, but when I run that, I get the error:

    !JavaScript DigitalDistortionTest.js line 8: Error: Script file () does not exist

    It seems this might be a recent issue, as I've done similar things in my sandbox test script, and I don't remember seeing this before.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Fri Jul 21 16:38:18 2023
    Re: src/sbbs3/js_internal.c
    By: Nightfox to Rob Swindell (on Windows) on Fri Jul 21 2023 02:55 pm

    Re: src/sbbs3/js_internal.c
    By: Rob Swindell (on Windows) to Git commit to main/sbbs/master on Fri Jul 21 2023 12:42 pm

    Fix js.exec() error message when specified script can't be found

    If the search up the scope tree for js.exec_dir fails, the script 'path' would be left blank leading to a weird error message.
    e.g. !JavaScript default.js line 249: Error: Script file () does not exist

    I just did an update and rebuilt my Synchronet binaries (and updated my default.js as well). That seems to fix the issue we were seeing with DDMsgReader and default.js. But now I'm seeing the same error in a different situation.

    In my command shell (custom JS), I have this command to run my file area chooser:

    bbs.exec("?../xtrn/DigDist/AreaChoosers/DDFileAreaChooser.js");

    That works. However, I also have a JS script in my sbbs/mods directory that I use as a test sandbox to try out new things, which I usually run from my main menu. I tried using the same line above in my test script to run my DDFileAreaChooser.js, but when I run that, I get the error:

    !JavaScript DigitalDistortionTest.js line 8: Error: Script file () does not exist

    That error message looks to be from js.exec(), not bbs.exec(). The error message itself (the empty parens) was fixed in git today. It doesn't appear you have that fix.

    It seems this might be a recent issue, as I've done similar things in my sandbox test script, and I don't remember seeing this before.

    No recent changes to either js.exec() or bbs.exec() that I'm aware of (other than the error message fix I just mentioned).
    --
    digital man (rob)

    Sling Blade quote #10:
    Morris: I stand on the hill, not for thrill, but for the breath of a fresh kill Norco, CA WX: 89.0øF, 30.0% humidity, 11 mph SSE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Fri Jul 21 17:25:47 2023
    Re: src/sbbs3/js_internal.c
    By: Digital Man to Nightfox on Fri Jul 21 2023 04:38 pm

    In my command shell (custom JS), I have this command to run my file
    area chooser:

    bbs.exec("?../xtrn/DigDist/AreaChoosers/DDFileAreaChooser.js");

    That works. However, I also have a JS script in my sbbs/mods
    directory that I use as a test sandbox to try out new things, which I
    usually run from my main menu. I tried using the same line above in
    my test script to run my DDFileAreaChooser.js, but when I run that, I
    get the error:

    !JavaScript DigitalDistortionTest.js line 8: Error: Script file ()
    does not
    exist

    That error message looks to be from js.exec(), not bbs.exec(). The error message itself (the empty parens) was fixed in git today. It doesn't appear you have that fix.

    It was something silly on my part.. I had a line above it using js.exec(), and I thought I had removed that but it was still in there.

    Also, I had to check out a fresh copy of the repo in order to rebuild successfully. In the copy of the repo I had, it was getting a build error ('no rule to make target' for something, but I don't remember what it was now). But it's building now, and all is good.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Sep 1 12:32:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/3e1aa12ec62d240e54d6fe0d
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Don't use scope argument value to js.exec() if it's null

    Fixes issue #611

    ---
    þ 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 Feb 26 23:07:48 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/b1e8d3070d100a5a0ec090aa
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Update docs for js.auto_terminate to clarify: disconnection will trigger too

    User disconnection will trigger auto-terminate (eventually) as well. But only in the terminal server.

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