Skip to content
  • rswindell's avatar
    A couple of passthrough socket fixes: · de72e6c3
    rswindell authored
    1. when de-activating the passthru socket, give the passthru_thread some
       cycles to copy any remaining socket data into the outbuf before we let
       the node_thread continue on and spew its own data into the outbuf.
       This fixes the problem of final messages of a file transfer protocol
       being intermixed with BBS data (prompts, menus, and such) and causing
       file download finalization issues.
    2. Don't read from the passthru socket until there is enough room in the
       outbuf for the maximum possible telnet-expanded read size. This fixes
       streaming download protocol (ZMODEM and YMODEM-G) errors.
    
    Also, for good measure, check the passthru_socket for writability before
    send()ing on it and log a warning if it's ever not writable.
    de72e6c3