Files
markbase/data/scp_1mb_test.bin
Warren bebfa391d8 Add sftp_input_buffer for SFTP packet accumulation (Critical fix preparation)
**Problem Diagnosed**:
- SFTP packet incomplete errors: expected 32797 bytes, have 8192
- SCP/rsync large files create empty files (0B)
- SSH splits large SFTP packets into multiple SSH_MSG_CHANNEL_DATA

**Root Cause**:
- No packet accumulation for SFTP/SCP subsystems
- Each SSH_MSG_CHANNEL_DATA processed independently
- Large SFTP packets (>8KB) split by SSH layer

**Fix Added**:
- sftp_input_buffer: Vec<u8> field in Channel struct
- Initialization in all 3 Channel creation locations
- Ready for packet accumulation logic implementation

**Testing Results**:
- SSH command execution: SUCCESS 
- Small file rsync (<=1MB): SUCCESS  (MD5 verified)
- Large file rsync (>=2MB): FAILED 
- SFTP/SCP: Packet parsing errors 

**Phase 14.2 Status**:
- Poll mechanism: 100% complete 
- SFTP/SCP subsystem: Needs packet accumulation fix
- Next: Implement accumulation logic in handle_channel_data()

**Progress**: SSH 95% complete, Critical fix identified
2026-06-16 12:49:40 +08:00

0 B