• exec/load/binkp.js

    From rswindell@1:103/705 to CVS commit on Fri Apr 10 00:01:25 2020
    exec/load binkp.js 1.122 1.123
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv22684

    Modified Files:
    binkp.js
    Log Message:
    When a file fails to open, log the error value, e.g. this:
    Error 24 opening '../fido/outbound/5e7a2520.pkt'. Not sending.
    instead of this:
    Unable to open '../fido/outbound/5e7ab832.pkt'. Not sending.

    Error 24 is "too many open files", btw. Another problem to solve.

    --- SBBSecho 3.10-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Nov 25 22:01:38 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/d1566e7d7b3a9e013f244cea
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Don't assume the BinkP VER message contains 3-space-delimited fields.According to both FTS-1026 and FSP-1024, the "mailer version" portion of thismsg may contain spaces. Some mailers (e.g. Internet Rex), provide their versioninformation with spaces, e.g. "Internet Rex 2.67 beta 1a OS/2 (binkp/1.1)",which also include a non-conformant protocol version indicator: " (binkp/1.1)" instead of " binkp/1.1".Additionally, only require that "binkp/" exist in the string, to find andparse the protocol version number, which is apparently critical to the properoperation of the protocol. This should resolve issue #185 reported by altere.I'm also storing the entire VER response in the binkp.remote_ver property andthis will break the older Mystic/BinkP work-arounds in binkit.js. I dont' thinkwe really need those workarounds any longer however. We'll soon see I guess.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Wed Nov 25 23:00:10 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/b846192f8b436fac248fd9d9
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Just parse VER using /^VER (.*) ([^ ]*?)$/This restores the meaning of remote_ver and still has a hack forbroken, unfixable mailers that don't advertise protocol v1.1correctly (ie: Irex)
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Wed Nov 25 23:09:24 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/6b6a6f506c94d2ae98735741
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Log warning when peer does not indicate binkp/1.1 correctly, butwe assume it's 1.1 anyway.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Wed Nov 25 23:12:02 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/aba949fa751a58c9e781372d
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Add comment containing what Internet Rex sends.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Fri Nov 27 00:45:41 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/d218c8de9ff3cd359f101409
    Modified Files:
    exec/load/binkp.js
    Log Message:
    "Handle" frames with a data length of zero.These frames were already not allowed in the binkp/1.0 protocol,and it is mentioned in the spec (issued in 2005) as "Some oldimplementations do send empty frames as the last frame.".It's certainly not allowed now, and any mailer which does it isbroken.For zero-length data packets, it will be seen as a frame containingzero data bytes which will also be logged as being after the fileif it comes after the file has already been completely transferred.A zero-length command packet will abort with M_ERR, logging an errorregarding command number NaN or something like that.This may fix #185 since attempting a recv() of zero bytes andsucceeding is the only way I can see for a zero second timeout tohave been logged in receving frame data. The software assumed thatreceiving zero bytes was a timeout, but if that's what you asked for,it's actually success. --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Fri Nov 27 01:02:50 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/f6cc52385b146eb2def3ad21
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Apparently we're editing file revisions like cavemen now.Call this one "2"Flashbacks to manually editing zone files here.I may end up going with YYYYMMDD numbers like I sometimes did inzone files, but maybe I'll just do the single number thing... notreally sure yet.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Wed Dec 2 12:49:20 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/a0b4a7cf8e4e1b79e75805ed
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Perform super-graceful shutdown of the socket on success.This should guard against a RST being sent on success. It's possiblethat the remote has sent data (ie: M_EOB) we would recv() after wecommit to ending the session. If the script terminates while thereis data to be read, this would result in sending a RST.To prevent this, we call shutdown(sock, SHUT_WR) via setting is_writeableto false (because that's how we roll), then recv() all data until theremote closes the session, or the timeout passes.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Thu Dec 3 19:40:33 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/4322be29d519e065d4ba114a
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Fix this.sock is undefined error.Not sure how we get a successful shutdown after closing the socket,but the issue was reported by altere as happening in the wild.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Fri Dec 4 16:45:53 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/3b166abe0fbe19a8bbfd8f01
    Modified Files:
    exec/load/binkp.js
    Log Message:
    The property is ver1_1, not ver_1.1This should fix the binkd issue.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Fri Dec 4 16:46:17 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/b3a0377ee41701681e2723c2
    Modified Files:
    exec/load/binkp.js
    Log Message:
    And bump rev.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to Git commit to main/sbbs/master on Mon Dec 28 11:49:37 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/93c9d7e0bf770a5a3b626ec4
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Log the error on first-byte recv() timeout.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sun Jan 3 17:57:37 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/8ef5e6c9dbaa2e086e2adc5a
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Address "TypeError: buf is null" reported by Melkor
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Nov 4 10:24:17 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/4dd32231f18bcb4f67833c36
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Resolve undetected or infinitely-retried socket-send failuresMy hub (1:218/700) is currently having what appears to be a TCP/IPconnectivity issue that was resulting in infinite "Send failure"log messages and "We got an M_EOB, but there are still N files pending M_GOT"log messages.I first added better socket-send failure detection (checking return value ofsendCmd() and sendData() where needed) and then noticed that failure to senda file was not detected (the sending.file.position is advanced even ifsendData() fails), so now handling that condition too.Also added more diagnostics around socket-send failures (is socket writable?)in this particular case, the socket is not writable and socket-send isreturning 0.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Mon Nov 28 12:18:49 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/c3a41492a79aa3c6b3a41b37
    Modified Files:
    exec/load/binkp.js
    Log Message:
    More errno details in file open and socket-send failure warning log msgs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Mon Nov 28 12:57:49 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/0ea1ce1d2600b79a77d41b7e
    Modified Files:
    exec/load/binkp.js
    Log Message:
    Use socket.poll() to check socket for writability before send()This is the real fix for infinite-wait on send() problem that was attemptedin commit f0127e9d457, but caused other issues. Thanks Deuce.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)