aboutsummaryrefslogtreecommitdiff
path: root/src/tftp.rs
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-10-07 10:52:04 +0100
committerdiogo464 <[email protected]>2025-10-07 10:52:04 +0100
commit8af019b563870c5f5441da299c1d226f87f2fcdb (patch)
tree133d1a339a1f9102374a1029350d9485a181a83a /src/tftp.rs
parent180ba2b9627964def860350b1ec0f93fbdb30784 (diff)
tftp split done
Diffstat (limited to 'src/tftp.rs')
-rw-r--r--src/tftp.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tftp.rs b/src/tftp.rs
index 681d036..d986a44 100644
--- a/src/tftp.rs
+++ b/src/tftp.rs
@@ -305,7 +305,7 @@ pub fn serve(dir: impl AsRef<Path>) -> Result<()> {
305 }; 305 };
306 306
307 Some(TftpPacket::OAck(TftpOAckPacket { 307 Some(TftpPacket::OAck(TftpOAckPacket {
308 tsize: req.tsize, 308 tsize: tsize_response,
309 blksize: req.blksize, 309 blksize: req.blksize,
310 })) 310 }))
311 } else { 311 } else {
@@ -361,7 +361,6 @@ pub fn serve(dir: impl AsRef<Path>) -> Result<()> {
361 println!("Sending to {addr}: {response:#?}"); 361 println!("Sending to {addr}: {response:#?}");
362 response.write(&mut writer).unwrap(); 362 response.write(&mut writer).unwrap();
363 let (response, _) = writer.split(); 363 let (response, _) = writer.split();
364 println!("Sending {} bytes to {addr}: {response:#?}", response.len());
365 socket.send_to(&response, addr).unwrap(); 364 socket.send_to(&response, addr).unwrap();
366 } 365 }
367 } 366 }