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) (unidiff) | |
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; | |||
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; |
@@ -880,3 +885,2 @@ CString msg; | |||
880 | ASSERT(m_Daddy); | 885 | ASSERT(m_Daddy); |
881 | /*// *** | ||
882 | CString tmp; | 886 | CString tmp; |
@@ -884,3 +888,2 @@ CString tmp; | |||
884 | m_Daddy->LogLine(tmp); | 888 | m_Daddy->LogLine(tmp); |
885 | */ | ||
886 | tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg)); | 889 | tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg)); |
@@ -99,3 +99,3 @@ EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW | |||
99 | CAPTION " PumpKIN" | 99 | CAPTION " PumpKIN" |
100 | FONT 8, "MS Sans Serif" | 100 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
101 | BEGIN | 101 | BEGIN |
@@ -564,3 +564,3 @@ BEGIN | |||
564 | IDS_LOG_XFERSOURCETID "Packet from unexpected source" | 564 | IDS_LOG_XFERSOURCETID "Packet from unexpected source" |
565 | IDS_LOG_SENTTFTPERROR ":%u: %s" | 565 | IDS_LOG_SENTTFTPERROR ">> %u: %s" |
566 | IDS_LOG_GOTTFTPERROR "TFTP:%u: %s" | 566 | IDS_LOG_GOTTFTPERROR "TFTP:%u: %s" |
@@ -658,2 +658,3 @@ BEGIN | |||
658 | IDS_LOG_LOGERROR "Error logging to '%s'" | 658 | IDS_LOG_LOGERROR "Error logging to '%s'" |
659 | IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size" | ||
659 | END | 660 | END |
@@ -90,2 +90,4 @@ | |||
90 | #define IDS_LOG_LOGERROR 161 | 90 | #define IDS_LOG_LOGERROR 161 |
91 | #define IDS_TFTP_ERROR_TOOBIG 162 | ||
92 | #define IDS_LOG_DENYING 163 | ||
91 | #define IDC_KLEVERNET 1000 | 93 | #define IDC_KLEVERNET 1000 |