• src/xpdev/sockwrap.c

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sunday, December 01, 2024 20:17:35
    https://gitlab.synchro.net/main/sbbs/-/commit/1ad5e791f021bedaf6884b42
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix typo in get_socket_errno() definition
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thursday, January 02, 2025 10:25:53
    https://gitlab.synchro.net/main/sbbs/-/commit/dc6a8901e1b62a031afb399a
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Some more Coverity paranoia.

    This ones does require SSIZE_MAX... so let's see what the pipes say...
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thursday, January 02, 2025 10:31:21
    https://gitlab.synchro.net/main/sbbs/-/commit/8b8e70ac870bb4dd29dc7e85
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Actually we only need to not pass rd, SSIZE_MAX doesn't matter
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Friday, January 03, 2025 01:38:06
    https://gitlab.synchro.net/main/sbbs/-/commit/2f78d96038cd3ce3581b75da
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Bring some sanity to sendfilesocket()

    Not that there's any need to, it appears that it was written for
    the web server, then discarded for that purpose and now is only
    called from the JS Socket.sendfile() method, which always passes
    NULL and 0 for the last two parameters, and has a copy/pasted
    implementation for TLS sockets. The only consumer of that in
    the tree appears to be gopher_service.js.

    It was apparently to use as a wrapper for the high-performance
    FreeBSD sendfile(), but that code behaved differently than all
    the other platforms, and was disabled (behind USE_SENDFILE, which
    isn't defined anywhere).

    This should really just be folded into either js_socket_sendfilesocket()
    or js_sendfile() with the extra knobs broken off and all the TODO
    comments I'm adding here addressed.

    Though, since Socket.sendfile() returns a bool where true indicates
    that either the size of the file at the start of the function
    was sent, or an EOF was reached, and false indicates that
    "something else happened", some of the TODO comments don't really
    need to be addressed.

    Basically, this is a crap function and it's only used by an even
    more crap JS wrapper, it should be tucked into a backward
    compatibility function, removed from the JSDocs, and forgotten
    about.

    If Coverity keeps complaining about this, I'll wait until after
    the next release and drag this out back and shoot it. Otherwise,
    I'll just forget it ever existed.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Friday, January 03, 2025 08:59:56
    https://gitlab.synchro.net/main/sbbs/-/commit/8c4af199650226fd7a11fd74
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    *Sigh* Borland.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Monday, March 02, 2026 22:42:57
    https://gitlab.synchro.net/main/sbbs/-/commit/2773f92cddcec6b459d6a17b
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    nonblocking_connect() must return non-zero upon failure to connect

    on Windows, after the call to the socket_writable() timed out (failed)
    calling getsockopt(... SO_ERROR ...) was setting the result to 0, indicating a successful connection.

    So if getsockopt() reports the socket errno value is 0, don't use that value for the result, default to ETIMEDOUT (60) instead.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Monday, March 02, 2026 22:53:57
    https://gitlab.synchro.net/main/sbbs/-/commit/05695d68d4d420b7b2f00dbc
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix Borland C compile error

    Yup, still using ancient tools to build xpdev
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Monday, March 02, 2026 23:05:36
    https://gitlab.synchro.net/main/sbbs/-/commit/f0faf99aab62e7855c5de682
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Minimize the diff of these last couple of commits to nonblocking_connect()

    No functional change.

    We're not retaining the original conect() error value, so don't need the new/additional variable (and associated line changes).
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)