[prev in list] [next in list] [prev in thread] [next in thread]
List: proftpd-committers
Subject: [ProFTPD-committers] proftpd/modules mod_xfer.c, 1.297.2.4, 1.297.2.5
From: TJ Saunders <castaglia () users ! sourceforge ! net>
Date: 2014-04-28 17:12:59
Message-ID: E1Wep6z-0001KP-1M () sfs-ml-3 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Update of /cvsroot/proftp/proftpd/modules
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30829/modules
Modified Files:
Tag: B1_3_4
mod_xfer.c
Log Message:
Backporting tweaks from Bug#4046 in trunk to 1.3.4 branch.
Index: mod_xfer.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_xfer.c,v
retrieving revision 1.297.2.4
retrieving revision 1.297.2.5
diff -u -d -r1.297.2.4 -r1.297.2.5
--- mod_xfer.c 28 Apr 2014 17:06:22 -0000 1.297.2.4
+++ mod_xfer.c 28 Apr 2014 17:12:57 -0000 1.297.2.5
@@ -2358,11 +2358,11 @@
if (requested_sz > 0) {
const char *path;
- off_t avail_sz;
+ off_t avail_kb;
int res;
path = pr_fs_getcwd();
- res = pr_fs_getsize2((char *) path, &avail_sz);
+ res = pr_fs_getsize2((char *) path, &avail_kb);
if (res < 0) {
/* If we can't check the filesystem stats for any reason, let the request
* proceed anyway.
@@ -2372,14 +2372,17 @@
path, strerror(errno));
} else {
+ off_t requested_kb;
/* The requested size is in bytes; the size returned from
* pr_fs_getsize2() is in KB.
*/
- if (requested_sz > (avail_sz * 1024)) {
- pr_log_debug(DEBUG5, "%s requested %" PR_LU " bytes, only %" PR_LU
- " bytes available on '%s'", cmd->argv[0], (pr_off_t) requested_sz,
- (pr_off_t) (avail_sz * 1024), path);
+ requested_kb = requested_sz / 1024;
+
+ if (requested_kb > avail_kb) {
+ pr_log_debug(DEBUG5, "%s requested %" PR_LU " KB, only %" PR_LU
+ " KB available on '%s'", cmd->argv[0], (pr_off_t) requested_kb,
+ (pr_off_t) avail_kb, path);
pr_response_add_err(R_552, "%s: %s", cmd->arg, strerror(ENOSPC));
return PR_ERROR(cmd);
}
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic