Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Love is the only game that is not called on account of darkness. -- M. Hirschfield


dovenet / Synchronet Programming / src/syncterm/telnet_io.c

SubjectAuthor
o src/syncterm/telnet_io.cRob Swindell (on Windows 11)

1
src/syncterm/telnet_io.c

<66276276.49485.syncprog@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=3498&group=DOVE-Net.Synchronet_Programming#3498

  copy link   Newsgroups: DOVE-Net.Synchronet_Programming
From: rob.swindell.(on.windows.11)@VERT (Rob Swindell (on Windows 11))
To: Git commit to main/sbbs/master
Subject: src/syncterm/telnet_io.c
Message-ID: <66276276.49485.syncprog@vert.synchro.net>
Date: Tue, 23 Apr 2024 00:25:42 -0700
X-Comment-To: Git commit to main/sbbs/master
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Programming
X-FTN-PID: Synchronet 3.20a-Linux master/af28c04c2 Apr 10 202 GCC 12.2.0
X-FTN-MSGID: 49485.syncprog@1:103/705 2a8d59c3
X-FTN-CHRS: CP437 2
WhenImported: 20240423002542-0700 c1e0
WhenExported: 20240423060654-0700 c1e0
ExportedFrom: VERT syncprog 49485
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Rob Swindell (on Win - Tue, 23 Apr 2024 07:25 UTC

https://gitlab.synchro.net/main/sbbs/-/commit/2bae9a96e637c06d8f48c8c6
Modified Files:
src/syncterm/telnet_io.c
Log Message:
Track Telnet Binary TX mode set by server via Telnet (IAC) commands

As reported by Chris/akacastor (21:1/162), SyncTERM would always assume the
Telnet session was in ASCII mode until/unless conn_binary_mode_on() was called
which is only called at the beginning of a file transfer, which sets the
conn_api.binary_mode accordingly. Unfortunately, if the Telnet server
requested binary mode itself (e.g. during initial connection), SyncTERM would
(try to) set the connection back to ASCII mode after any file transfer. :-(

With this change, the conn_api.binary_mode will track the actual binary TX
mode whether initiated locally or remotely (by the server), but it'll only be
set to true when *both* directions are succesfully set to binary mode. And
this way, if the connection was already in binary mode before any file
transfer, it'll remain in binary mode as was apparently desired by the server.

Also with this change, we could probably remove the setting of
conn_api.binary_mode to true/false in conn_binary_mode_on()/off() functions,
but it shouldn't hurt anything if it's left there I suppose (in case some
*other* terminal transport protocols have the concept of binary mode?).

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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor