summaryrefslogtreecommitdiffabout
path: root/PumpKINDlg.cpp
Unidiff
Diffstat (limited to 'PumpKINDlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--PumpKINDlg.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index 2a01918..bb15211 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -775,12 +775,17 @@ CFileException e;
775 if(m__timeOut){ 775 if(m__timeOut){
776 m_timeOut=m__timeOut; 776 m_timeOut=m__timeOut;
777 v.Format("%u",m_timeOut); 777 v.Format("%u",m_timeOut);
778 o[tftpoTOut]=v; 778 o[tftpoTOut]=v;
779 } 779 }
780 } 780 }
781 // XXX: see if we can enforce our preference regarding block size here.
782 if(m_xferSize >= (m_blkSize<<16)) {
783 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
784 return TRUE;
785 }
781 state = stateXfer; 786 state = stateXfer;
782 m_ACK=0; 787 m_ACK=0;
783 if(o.GetCount()){ 788 if(o.GetCount()){
784 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o)); 789 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o));
785 ASSERT(p); 790 ASSERT(p);
786 p->SetOpcode(tftp::opOACK); 791 p->SetOpcode(tftp::opOACK);
@@ -875,17 +880,15 @@ void CXferSocket::Deny(CFileException* e)
875 880
876void CXferSocket::PostError(UINT errCode,UINT errID) 881void CXferSocket::PostError(UINT errCode,UINT errID)
877{ 882{
878CString msg; 883CString msg;
879 msg.LoadString(errID); 884 msg.LoadString(errID);
880 ASSERT(m_Daddy); 885 ASSERT(m_Daddy);
881 /*// ***
882CString tmp; 886CString tmp;
883 tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg); 887 tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg);
884 m_Daddy->LogLine(tmp); 888 m_Daddy->LogLine(tmp);
885 */
886tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg)); 889tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg));
887err->SetOpcode(tftp::opERROR); 890err->SetOpcode(tftp::opERROR);
888 err->errSet(errCode,msg); 891 err->errSet(errCode,msg);
889 PostTFTP(err); 892 PostTFTP(err);
890} 893}
891 894