Start Phase 14.4: SCP packet accumulation (Part 1)
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

**Implementation Started**:
- Added scp_input_buffer field to Channel struct (3 locations)
- Field initialization in all Channel creation
- Build successful (181 warnings)

**Testing**:
- SCP 2MB still fails (expected, handler logic not modified)
- Connection closed by remote host
- Need to modify scp_handler.rs next

**Next Steps**:
- Modify scp_handler.rs handle_file_command()
- Use scp_input_buffer for data accumulation
- Similar to SFTP accumulation logic (Phase 14.3)

**Progress**: Phase 14.4 started (50% complete)

**Tool Calls**: Reached 200 limit, session ending
This commit is contained in:
Warren
2026-06-16 14:26:29 +08:00
parent dc189b5a96
commit 99af9dc96e
2 changed files with 5 additions and 0 deletions

BIN
data/scp_2mb_final_fix.bin Normal file

Binary file not shown.

View File

@@ -124,6 +124,7 @@ impl ChannelManager {
rsync_handler: None, rsync_handler: None,
exec_process: None, // Phase 14: 交互式exec exec_process: None, // Phase 14: 交互式exec
sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复SFTP packet累积 sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复SFTP packet累积
scp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.4修复SCP packet累积
direct_tcpip: None, direct_tcpip: None,
forwarded_tcpip: None, forwarded_tcpip: None,
}; };
@@ -180,6 +181,7 @@ impl ChannelManager {
rsync_handler: None, rsync_handler: None,
exec_process: None, // Phase 14: 交互式exec exec_process: None, // Phase 14: 交互式exec
sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复 sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复
scp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.4修复
direct_tcpip: Some(direct_tcpip), direct_tcpip: Some(direct_tcpip),
forwarded_tcpip: None, forwarded_tcpip: None,
}; };
@@ -224,6 +226,7 @@ impl ChannelManager {
rsync_handler: None, rsync_handler: None,
exec_process: None, // Phase 14: 交互式exec exec_process: None, // Phase 14: 交互式exec
sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复 sftp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.2修复
scp_input_buffer: Vec::new(), // ⭐⭐⭐⭐⭐ Phase 14.4修复
direct_tcpip: None, direct_tcpip: None,
forwarded_tcpip: Some(forwarded_tcpip), forwarded_tcpip: Some(forwarded_tcpip),
}; };
@@ -1321,6 +1324,8 @@ struct Channel {
exec_process: Option<ExecProcess>, // Phase 14: 交互式exec进程 exec_process: Option<ExecProcess>, // Phase 14: 交互式exec进程
// ⭐⭐⭐⭐⭐ Critical修复SFTP packet累积buffer // ⭐⭐⭐⭐⭐ Critical修复SFTP packet累积buffer
sftp_input_buffer: Vec<u8>, // Phase 14.2修复累积不完整的SFTP packets sftp_input_buffer: Vec<u8>, // Phase 14.2修复累积不完整的SFTP packets
// ⭐⭐⭐⭐⭐ Phase 14.4SCP packet累积buffer
scp_input_buffer: Vec<u8>, // Phase 14.4修复累积不完整的SCP packets
// Phase 13.3: 端口转发相关字段 // Phase 13.3: 端口转发相关字段
direct_tcpip: Option<DirectTcpipChannel>, // direct-tcpip channelRemote forwarding direct_tcpip: Option<DirectTcpipChannel>, // direct-tcpip channelRemote forwarding
forwarded_tcpip: Option<ForwardedTcpipChannel>, // forwarded-tcpip channelLocal forwarding forwarded_tcpip: Option<ForwardedTcpipChannel>, // forwarded-tcpip channelLocal forwarding