author | Michael Krelin <hacker@klever.net> | 2006-10-13 19:13:18 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-10-13 19:13:18 (UTC) |
commit | 325e7fc43721df3efaa8539190fada6e6e3aa8fa (patch) (side-by-side diff) | |
tree | ec03bf74e17eb497e0fcd31b521192b0b14bd83e | |
parent | 577427e68ef10a4d2b75d28e42b22952ae3bcf23 (diff) | |
download | pumpkin-325e7fc43721df3efaa8539190fada6e6e3aa8fa.zip pumpkin-325e7fc43721df3efaa8539190fada6e6e3aa8fa.tar.gz pumpkin-325e7fc43721df3efaa8539190fada6e6e3aa8fa.tar.bz2 |
Enabled logging of outgoing errors, added reject with explicit error message
when file is too large for the block size set.
git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@192 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | PumpKINDlg.cpp | 7 | ||||
-rw-r--r-- | pumpkin.rc | 5 | ||||
-rw-r--r-- | resource.h | 2 |
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 @@ -780,2 +780,7 @@ CFileException e; }
+ // 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;
@@ -880,3 +885,2 @@ CString msg; ASSERT(m_Daddy);
-/* // ***
CString tmp;
@@ -884,3 +888,2 @@ CString tmp; m_Daddy->LogLine(tmp);
- */
tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg));
@@ -99,3 +99,3 @@ EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW CAPTION " PumpKIN"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
@@ -564,3 +564,3 @@ BEGIN IDS_LOG_XFERSOURCETID "Packet from unexpected source"
- IDS_LOG_SENTTFTPERROR ":%u: %s"
+ IDS_LOG_SENTTFTPERROR ">> %u: %s"
IDS_LOG_GOTTFTPERROR "TFTP:%u: %s"
@@ -658,2 +658,3 @@ BEGIN IDS_LOG_LOGERROR "Error logging to '%s'"
+ IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size"
END
@@ -90,2 +90,4 @@ #define IDS_LOG_LOGERROR 161
+#define IDS_TFTP_ERROR_TOOBIG 162
+#define IDS_LOG_DENYING 163
#define IDC_KLEVERNET 1000
|