• src/sbbs3/js_global.c

    From rswindell@VERT to CVS commit on Friday, April 06, 2018 02:47:00
    src/sbbs3 js_global.c 1.373 1.374
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_global.c
    Log Message:
    Resolve GCC warning: cast from pointer to integer of different size
    in expansion of macro 'JS_ARGS_OFFSET':
    unsigned long is the same size as a pointer (rather than unsigned int)
    on the supported target platforms/tool-chains.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, April 23, 2019 05:32:00
    src/sbbs3 js_global.c 1.377 1.378
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25955

    Modified Files:
    js_global.c
    Log Message:
    Add missing comma to JSDOC line



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, May 06, 2019 01:58:00
    src/sbbs3 js_global.c 1.380 1.381
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv20279

    Modified Files:
    js_global.c
    Log Message:
    html_decode() - add support for the following HTML 4 entities:
    - "lsaquo" and "rsaquo" (angled versions of "lsquo" and "rsquo")
    - "zwj" and "znnj" (zero-width joiner / non-joiner)


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, May 09, 2019 21:01:00
    src/sbbs3 js_global.c 1.381 1.382
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_global.c
    Log Message:
    Added todo comment about require() behavior which is unexpected when the passesd filename is not found - function reports the symbol was not
    defined rather than file not found or something similar.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, May 20, 2019 06:59:00
    src/sbbs3 js_global.c 1.382 1.383
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_global.c
    Log Message:
    Fix require(): if load() fails with exception, don't report a "symbol
    not defined" exception, just report the load() exception - whatever it was (e.g. could not open load-file).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, July 14, 2019 08:18:32
    src/sbbs3 js_global.c 1.384 1.385
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9081

    Modified Files:
    js_global.c
    Log Message:
    New JS global method: file_chmod(), changes a file's mode value ala *nix chmod. Really only useful on *nix since Windows only allows the setting/clearing of
    a single mode flag: user-writeable, 0x80, 0200.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, July 15, 2019 02:53:42
    src/sbbs3 js_global.c 1.385 1.386
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26683

    Modified Files:
    js_global.c
    Log Message:
    New global JS function: file_mode()

    This function behaves the same as file_attrib() on *nix, but on Windows, file_mode() returns a *nix/stat style st_mode value (compatible with file_chmod) while file_attrib() returns the struct _finddata_t 'attrib' value, which is a quite different value (e.g. indicates Windows/DOS centric file attributes like "archive", "hidden", etc.) and is *incompatible* with file_chmod(). So if you're going to modify a file's permissions (mode), use file_mode() to read them and file_chmod() to save them.

    file_attrib() should really only be used on Windows and only for checking for attributes like "hidden", "archive", etc. (which don't exist on *nix).




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, August 04, 2019 08:26:01
    src/sbbs3 js_global.c 1.386 1.387
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21380

    Modified Files:
    js_global.c
    Log Message:
    Make it clear, hopefully, that resolve_ip() can only return an array upon success. Upon failure to resolve, resolve_ip() returns null.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, August 08, 2019 03:53:45
    src/sbbs3 js_global.c 1.387 1.388
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_global.c
    Log Message:
    Debug-level log message when invoking a background-load()
    Fixed typo in other log msg.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, August 20, 2019 17:33:49
    src/sbbs3 js_global.c 1.388 1.389
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5097

    Modified Files:
    js_global.c
    Log Message:
    Make the load()/require() search path of last resort the CWD. This makes the error message if failure to find the file to load less confusing.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, August 25, 2019 07:06:37
    src/sbbs3 js_global.c 1.389 1.390
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9152

    Modified Files:
    js_global.c
    Log Message:
    New global methods:
    utf8_encode(): to convert a CP437 string or a single Unicode codepoint (number)
    to UTF-8 encoded string
    utf8_decode(): to convert a UTF-8 encoded string to a CP437 string

    Move the require() enumeration to just below load() so it's documented closer to its dad in jsdocs.html



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, August 26, 2019 22:26:33
    src/sbbs3 ringbuf.c 1.31 1.32
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv30956

    Modified Files:
    ringbuf.c
    Log Message:
    Implement a simple bound-checker in RingBufWrite():
    if the ringbuf is shared among multiple threads (e.g. the sbbs->out
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 17:40:35
    src/sbbs3 js_global.c 1.391 1.392
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25850

    Modified Files:
    js_global.c
    Log Message:
    Search the current scope for the js object to locate the current scope in,
    not the global scope. This appears to be a systemic issue, and could even
    be the root cause of the background log problem...




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 18:06:29
    src/sbbs3 js_global.c 1.392 1.393
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8511

    Modified Files:
    js_global.c
    Log Message:
    Search for the js and log objects in the current scope, not in the global object.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 19:15:24
    src/sbbs3 js_global.c 1.393 1.394
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17159

    Modified Files:
    js_global.c
    Log Message:
    Check the object scope after checking the current scope when looking for
    the "js" object.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 19:16:48
    src/sbbs3 js_global.c 1.394 1.395
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17443

    Modified Files:
    js_global.c
    Log Message:
    Also check the object scope for the log function.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, August 27, 2019 21:37:47
    src/sbbs3 js_global.c 1.395 1.396
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv3811

    Modified Files:
    js_global.c
    Log Message:
    Don't leave a pending exception on exit from js_global_resolve().




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, August 28, 2019 01:40:45
    src/sbbs3 js_global.c 1.396 1.397
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10351

    Modified Files:
    js_global.c
    Log Message:
    Renaned utf8_width() to utf8_get_width()
    New global functions:
    - str_is_utf8()
    - str_is_ascii()
    - str_has_ctrl()

    Return a more sensible value when 'null' is passed to the utf8_* functions. Updated some JSDOCS strings in regards to "extended-ASCII" and what that
    means (in some cases, specifically CP437, in others, any non-ASCII chars).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, August 28, 2019 04:24:35
    src/sbbs3 js_global.c 1.397 1.398
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1603

    Modified Files:
    js_global.c
    Log Message:
    New global JS function: str_is_utf16(), returns true if the passed string contains one or more UTF-16 encoded characters.

    utf8_encode() can now accept a UTF-16 encoded string (e.g. "\u0f00") and will return the UTF-8 encoded version.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wednesday, September 04, 2019 03:27:19
    src/sbbs3 js_global.c 1.398 1.399
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv3090

    Modified Files:
    js_global.c
    Log Message:
    Add an additional for of socket_select() that is passed multiple arrays.
    It will return an object with properties corresponding to the passed
    arrays, and the write parameter will be ignored. This allows usage very
    much like the select() syscall, and allows a traditional non-blocking
    server to be written.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wednesday, September 04, 2019 18:06:20
    src/sbbs3 js_global.c 1.399 1.400
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv489

    Modified Files:
    js_global.c
    Log Message:
    Fix single-array socket_select broken in previous commit.
    This should fix the crash in ircd.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, September 17, 2019 05:29:55
    src/sbbs3 js_global.c 1.400 1.401
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv29158

    Modified Files:
    js_global.c
    Log Message:
    Do not re-create the result arrays for each socket that's read (derp).
    This only impacts the new socket_select() method with multiple arrays.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, September 19, 2019 06:52:21
    src/sbbs3 js_global.c 1.401 1.402
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28762

    Modified Files:
    js_global.c
    Log Message:
    Fix resource leak from background-load()'s:
    The created message queue for each background-load()ed script was never detached-from by the child thread, so the linked-lists (and their semaphores) were never freed. Calling msgQueueDetach() before ending the background_thread fixes that leak.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From mark lewis@VERT to rswindell on Saturday, September 21, 2019 04:19:42
    On 2019 Sep 18 23:52:20, you wrote to CVS commit:

    src/sbbs3 js_global.c 1.401 1.402
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28762

    Modified Files:
    js_global.c
    Log Message:
    Fix resource leak from background-load()'s:
    The created message queue for each background-load()ed script was never detached-from by the child thread, so the linked-lists (and their semaphores) were never freed. Calling msgQueueDetach() before ending the background_thread fixes that leak.

    so did my questioning about the background loading of dnshelper.js assist in finding this problem?? if so, YAY!

    the main thing that triggered my thoughts on it, which i think i also asked about, was about using load vs require... i was thinking about other recent changes that switched from load to require to prevent multiple loadings of the same code which was also leading to problems of some sort...

    in any case, this looks like it was a deep dig to root out... GoodJob!<tm> :)

    )\/(ark

    Once men turned their thinking over to machines in the hope that this would set
    them free. But that only permitted other men with machines to enslave them.
    ... People who pun deserve to be drawn and quoted.
    ---
    * Origin: (1:3634/12.73)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to mark lewis on Saturday, September 21, 2019 09:02:14
    Re: src/sbbs3/js_global.c
    By: mark lewis to rswindell on Fri Sep 20 2019 09:19 pm

    so did my questioning about the background loading of dnshelper.js assist in finding this problem?? if so, YAY!

    I don't recall that being discussed. It just a shot in the dark that lead to some clues.

    digital man

    Synchronet/BBS Terminology Definition #31:
    FTP = File Transfer Protocol
    Norco, CA WX: 63.0F, 86.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Digital Man on Saturday, September 21, 2019 18:38:34
    Re: src/sbbs3/js_global.c
    By: Digital Man to mark lewis on Sat Sep 21 2019 02:02:14

    so did my questioning about the background loading of dnshelper.js assist in finding this problem?? if so, YAY!

    I don't recall that being discussed. It just a shot in the dark that lead to some clues.

    yeah, sorry, that was with my other account, wkitty42, on IRC on the 15th...

    double spaced to try to prevent word wrapping from making dog's breakfast out of it... time stamps are UTC-0400...

    ----- snip -----

    Sep 15 10:04:20 <wkitty42> why is dnshelper.js loaded by ircd.js multiple times? should it be "required" so it is loaded once and used for all? could this be one of the leaks being seen?

    Sep 15 10:04:21 <wkitty42> Routing: from sestar.synchro.net: Received SQUIT *.synchro.net from wkitty42[wkitty42@sestar.synchro.net] (wkitty42)

    Sep 15 10:04:21 <wkitty42> Routing: from sestar.synchro.net: Closing Link: cvs.synchro.net (wkitty42)

    Sep 15 10:04:21 <wkitty42> Routing: Auto-connecting to *.synchro.net

    Sep 15 10:04:21 <wkitty42> Routing: Connected! Sending info...

    Sep 15 10:04:21 <wkitty42> 0006 Accepted new connection: 71.95.196.34 port 6667

    Sep 15 10:04:21 <wkitty42> JavaScript Background Load: /sbbs/exec/load/dnshelper.js

    Sep 15 10:04:21 <wkitty42> Routing: Auto-connecting to *.synchro.net

    Sep 15 10:04:21 <wkitty42> Routing: Connected! Sending info...

    Sep 15 10:04:21 <wkitty42> 0008 Accepted new connection: 71.95.196.36 port 6667

    Sep 15 10:04:21 <wkitty42> JavaScript Background Load: /sbbs/exec/load/dnshelper.js

    [...]

    Sep 15 10:21:09 <wkitty42> yeah, that's why i asked my question ;) i've seen vert having problems lately with such... not sure if that's because it is being run from services or not, though... i run mine from jsexec specifically to prevent it from bouncing all the time when i'm working on the board...

    Sep 15 10:22:19 <wkitty42> so maybe that's why i don't see the problem that vert sees? does anyone else see the problem on their system? do they run from services or via jsexec?

    ----- snip -----


    )\/(ark

    ---
    Synchronet The SouthEast Star Mail HUB - SESTAR
  • From Digital Man@VERT to Rampage on Saturday, September 21, 2019 17:50:05
    Re: src/sbbs3/js_global.c
    By: Rampage to Digital Man on Sat Sep 21 2019 11:38 am

    Re: src/sbbs3/js_global.c
    By: Digital Man to mark lewis on Sat Sep 21 2019 02:02:14

    so did my questioning about the background loading of dnshelper.js assist in finding this problem?? if so, YAY!

    I don't recall that being discussed. It just a shot in the dark that lead to some clues.

    yeah, sorry, that was with my other account, wkitty42, on IRC on the 15th...

    double spaced to try to prevent word wrapping from making dog's breakfast out of it... time stamps are UTC-0400...

    ----- snip -----

    Sep 15 10:04:20 <wkitty42> why is dnshelper.js loaded by ircd.js multiple times? should it be "required" so it is loaded once and used for all? could this be one of the leaks being seen?

    I don't recall seeing that. No, require() would not be of use there. Yes, the bg-load was the issue (not specific to dnshelper.js).


    digital man

    Synchronet "Real Fact" #43:
    Synchronet added Baja/PCMS support with v2.00a (1994).
    Norco, CA WX: 82.1F, 45.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, September 25, 2019 04:18:23
    src/sbbs3 js_global.c 1.402 1.403
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24674

    Modified Files:
    js_global.c
    Log Message:
    Fix bug introduced in previous commit (rev 1.402) of this file:
    The js_finalize_queue() is eventually called when garbage is collected and js_finalize_queue() calls msgQueueDetach(), so bg-load()s did not "leak" semaphores and this "fix" actually introduced a problem where the queue was detached too many times, leaving the ref count 0 while there was actually
    a lingering reference (in the parent), leading to a crash as reported by echto (thanks, echto!).


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, August 09, 2020 01:53:52
    src/sbbs3 js_global.c 1.408 1.409
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_global.c
    Log Message:
    Bug-fix: global socket_errno_str property returned numeric value (not string).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sunday, September 27, 2020 01:24:35
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/7c12761d51ebc0a33482d62f
    Modified Files:
    src/sbbs3/js_global.c
    Log Message:
    Add global methods: strerror() and socket_strerror()

    If you have a stored errno value (or Socket.error), these are how you convert that number to an error description.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, December 02, 2020 08:09:17
    https://gitlab.synchro.net/main/sbbs/-/commit/d083d463917d83c4e0e3fd02
    Modified Files:
    src/sbbs3/js_global.c
    Log Message:
    Don't log an error when JS resolve_ip() fails

    e.g. don't log the error "term !ERROR resolve_ip example.com failed with error -2", just let the script deal with the failure and log an error if it wishes.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Monday, January 11, 2021 04:39:46
    https://gitlab.synchro.net/main/sbbs/-/commit/292c4acccd7805e22af91d7e
    Modified Files:
    src/sbbs3/js_global.c
    Log Message:
    String processing functions return null (instead of "null") when passed null

    This was initially just done for lfexpand(), but then I realized there were a lot of these string processing functions that just checked for VOID
    (undefined) argumnet value, but not null.

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