summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--PumpKINDlg.cpp7
-rw-r--r--pumpkin.rc5
-rw-r--r--resource.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index 2a01918..bb15211 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -777,8 +777,13 @@ CFileException e;
v.Format("%u",m_timeOut);
o[tftpoTOut]=v;
}
}
+ // XXX: see if we can enforce our preference regarding block size here.
+ if(m_xferSize >= (m_blkSize<<16)) {
+ Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
+ return TRUE;
+ }
state = stateXfer;
m_ACK=0;
if(o.GetCount()){
tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o));
@@ -877,13 +882,11 @@ void CXferSocket::PostError(UINT errCode,UINT errID)
{
CString msg;
msg.LoadString(errID);
ASSERT(m_Daddy);
-/* // ***
CString tmp;
tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg);
m_Daddy->LogLine(tmp);
- */
tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg));
err->SetOpcode(tftp::opERROR);
err->errSet(errCode,msg);
PostTFTP(err);
diff --git a/pumpkin.rc b/pumpkin.rc
index 5ce2438..adca112 100644
--- a/pumpkin.rc
+++ b/pumpkin.rc
@@ -96,9 +96,9 @@ END
IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193
STYLE DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW
CAPTION " PumpKIN"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "List1",IDC_CONNECTIONS,"SysListView32",LVS_REPORT |
LVS_AUTOARRANGE | WS_BORDER | WS_TABSTOP,7,7,295,108,
WS_EX_DLGMODALFRAME
@@ -561,9 +561,9 @@ BEGIN
IDS_LOG_XFERRECEIVE "Error on xfer socket"
IDS_LOG_XFERSEND "Error on xfer socket"
IDS_LOG_XFERUDPRECEIVE "UDP packet receive failed"
IDS_LOG_XFERSOURCETID "Packet from unexpected source"
- IDS_LOG_SENTTFTPERROR ":%u: %s"
+ IDS_LOG_SENTTFTPERROR ">> %u: %s"
IDS_LOG_GOTTFTPERROR "TFTP:%u: %s"
IDS_LOG_XFEROPCODE "Invalid opcode (%u) during transfer received"
IDS_LOG_XFERRRQFINISHED "Transfer of '%s' has successfully completed"
IDS_TITLE_OPTIONS "Options"
@@ -655,8 +655,9 @@ END
STRINGTABLE DISCARDABLE
BEGIN
IDS_INVALID_RULE "Invalid access rule."
IDS_LOG_LOGERROR "Error logging to '%s'"
+ IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/resource.h b/resource.h
index 1bdce59..7961e5e 100644
--- a/resource.h
+++ b/resource.h
@@ -87,8 +87,10 @@
#define IDS_INVALID_IP 158
#define IDS_INVALID_NETMASK 159
#define IDS_INVALID_RULE 160
#define IDS_LOG_LOGERROR 161
+#define IDS_TFTP_ERROR_TOOBIG 162
+#define IDS_LOG_DENYING 163
#define IDC_KLEVERNET 1000
#define IDC_CONNECTIONS 1001
#define IDC_LOG 1003
#define IDC_GET 1004