• src/xpdev/sockwrap.c

    From deuce@VERT to CVS commit on Fri Aug 30 19:35:54 2013
    src/xpdev sockwrap.c 1.43 1.44
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv21272

    Modified Files:
    sockwrap.c
    Log Message:
    Whitespace


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Sat Aug 31 20:54:57 2013
    src/xpdev sockwrap.c 1.45 1.46
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv9463

    Modified Files:
    sockwrap.c
    Log Message:
    Set the address to "<unknown address>" when it's not IPv4 or IPv6



    ---
    þ Synchronet þ Vertrauen
  • From deuce@VERT to CVS commit on Tue Sep 3 17:24:53 2013
    src/xpdev sockwrap.c 1.48 1.49
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv16252

    Modified Files:
    sockwrap.c
    Log Message:
    Fumble around in the DLL for WSAAddressToString() just in case we're running
    on an unsupported version of Windows like Win32S or Win98 or whatever.

    I have no idea why we do this.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Wed Sep 4 00:58:38 2013
    src/xpdev sockwrap.c 1.50 1.51
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv3932

    Modified Files:
    sockwrap.c
    Log Message:
    Add support for AF_UNIX sockets in inet_addrtop()


    ---
    þ Synchronet þ Vertrauen þ Home of Synchron
  • From deuce@VERT to CVS commit on Wed Sep 4 16:06:52 2013
    src/xpdev sockwrap.c 1.52 1.53
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv23914

    Modified Files:
    sockwrap.c
    Log Message:
    Fix incorrect union member usage.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://ver
  • From deuce@VERT to CVS commit on Fri Feb 7 11:55:46 2014
    src/xpdev sockwrap.c 1.55 1.56
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv28318

    Modified Files:
    sockwrap.c
    Log Message:
    Fix function name. The documented Windows function "WSAAddressToString"
    is, obviously, named WSAAddressToStringA() or WSAAddressToStringU().


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Fri Feb 7 19:21:41 2014
    src/xpdev sockwrap.c 1.56 1.57
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv1992

    Modified Files:
    sockwrap.c
    Log Message:
    Use getnameinfo() instead of WSAAddressToString 'cause it's more better.



    ---
    þ Synchronet þ Ver
  • From deuce@VERT to CVS commit on Fri Mar 7 15:55:07 2014
    src/xpdev sockwrap.c 1.58 1.59
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv27743

    Modified Files:
    sockwrap.c
    Log Message:
    Make nonblocking_connect() also select() for exceptional conditions since
    Win32 make connect() failure an exceptional condition.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Wed Apr 23 22:30:28 2014
    src/xpdev sockwrap.c 1.59 1.60
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv30388

    Modified Files:
    sockwrap.c
    Log Message:
    Return a meaningful error value from nonblocking_connect() whenever possible. Specifically, if select(), getsockopt(), or connect() fails, return ERROR_VALUE instead of SOCKET_ERROR.

    Found by Coverity since we never checked the return value of getsockopt()



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Wed Apr 23 23:22:06 2014
    src/xpdev sockwrap.c 1.60 1.61
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv30888

    Modified Files:
    sockwrap.c
    Log Message:
    Coverity: Unlikely memory leak in unused recvfilesocket() function.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Thu Aug 20 00:23:12 2015
    src/xpdev sockwrap.c 1.61 1.62
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv11844

    Modified Files:
    sockwrap.c
    Log Message:
    Fix multiple memory-corruption buts in inet_ptoaddr()
    (only impacts active FTP transfers via IPv6).



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Wed Aug 26 00:32:47 2015
    src/xpdev sockwrap.c 1.63 1.64
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv28990

    Modified Files:
    sockwrap.c
    Log Message:
    A little more detail for inet_addrtop() failures, but still not working for failed login attempt client IP addresses on Windows.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Sun Apr 19 21:35:48 2020
    src/xpdev sockwrap.c 1.67 1.68
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv19496

    Modified Files:
    sockwrap.c
    Log Message:
    Added EXCLUSIVEADDRUSE support (WinSock only).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 8 10:22:50 2020
    src/xpdev sockwrap.c 1.69 1.70
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv8156

    Modified Files:
    sockwrap.c
    Log Message:
    Use Microsoft magic to "ignore regular line breaks in the message definition text." of socket error strings on Windows:
    strips the embedded line-feeds from the socket error description.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 8 11:04:02 2020
    src/xpdev sockwrap.c 1.70 1.71
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv11757

    Modified Files:
    sockwrap.c
    Log Message:
    Trim trailing-whitespace off of Windows socket error description strings.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sat Aug 8 19:13:57 2020
    src/xpdev sockwrap.c 1.73 1.74
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv9008

    Modified Files:
    sockwrap.c
    Log Message:
    socket_strerror() needs to auto-correct for WinSock error ranges.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to sbbs/master on Fri Nov 20 17:10:50 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/54f165161d3c8a9cb68090c5
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix bugs in last commit... continue abusing the CI infra.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to sbbs/master on Fri Nov 20 17:12:44 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/804b4bf2af968c901e74f7fc
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    And finally, take a pointer, return success properly.

    This one should build even on Win32.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 21 04:38:19 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/2890ff74180bd24979b1a98b
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    A poll() failure with EINTR does not mean a socket is closed.

    This won't impact Synchronet as it has a separate signal handling
    thread, but we still need to behave properly for processes that
    don't. I'm also saying that ENOMEM does not indicate a disconnection,
    though it may be better to pretend it was disconnected...
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 21 10:43:22 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/9765a2ea6673ef0fef41ece4
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix poll()-based socket_check() implementation

    Was returning disconnected when it wasn't at times.
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 21 14:31:12 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/c53a903d90ffc62b681e059b
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    We still need to peek a byte to tell that recv is done with poll()

    Not all implementations set POLLHUP when a TCP socket is half-closed.
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Mar 22 21:45:51 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e6e83a5d66d8e38f00000c4d
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Properly set buffer size when calling getsockopt()
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Apr 10 13:08:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/90ca5a36c511c97538784089
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Finally document socket_check() behaviour.

    Tweak the poll() implementation to match.

    Should fix #248
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Apr 10 13:13:56 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/3fa3ad981f51aa082c07abf8
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Add more detail to socket_check() comment
    ---
    ï¿­ 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:04:42 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/baa72abe9c9ed0b56bfde91e
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Make inet_ptoaddr() not crash and work with IPv4 address strings
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Apr 30 18:56:34 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/6de0ebc0d5c8fc4a5fba8064
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix xp_inet_pton: was just writing 0x02 (address family)to 'dst', always

    Tried using this function in a new project and didn't work. My guess: it wasn't tested. <looks at Deuce>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 21 06:36:38 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5bc000c5ba8137ff5be8d3b8
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix warning on Win64 build
    ---
    ï¿­ 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 Dec 1 20:17:35 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/1ad5e791f021bedaf6884b42
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    Fix typo in get_socket_errno() definition
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Jan 2 10:25:53 2025
    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...
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thu Jan 2 10:31:21 2025
    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
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 3 01:38:06 2025
    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.
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 3 08:59:56 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/8c4af199650226fd7a11fd74
    Modified Files:
    src/xpdev/sockwrap.c
    Log Message:
    *Sigh* Borland.
    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net