diff options
author | 2009-10-22 16:07:57 +0000 | |
---|---|---|
committer | 2009-10-22 16:07:57 +0000 | |
commit | 1562b36f5b02024981242eaa67b660b63a91ffb7 (patch) | |
tree | 0b573ea98f9515516c99a79526d09b59fbada82d /net-ftp/pure-ftpd | |
parent | initial version of VDPAU info gathering application (diff) | |
download | historical-1562b36f5b02024981242eaa67b660b63a91ffb7.tar.gz historical-1562b36f5b02024981242eaa67b660b63a91ffb7.tar.bz2 historical-1562b36f5b02024981242eaa67b660b63a91ffb7.zip |
Fix REST when using throttling on mmap_send(), patch thanks to redeeman
Package-Manager: portage-2.2_rc46/cvs/Linux x86_64
Diffstat (limited to 'net-ftp/pure-ftpd')
-rw-r--r-- | net-ftp/pure-ftpd/ChangeLog | 10 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/Manifest | 5 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/files/pure-ftpd-1.0.22-fix_rest_with_throttling.patch | 77 | ||||
-rw-r--r-- | net-ftp/pure-ftpd/pure-ftpd-1.0.22-r1.ebuild (renamed from net-ftp/pure-ftpd/pure-ftpd-1.0.22.ebuild) | 3 |
4 files changed, 91 insertions, 4 deletions
diff --git a/net-ftp/pure-ftpd/ChangeLog b/net-ftp/pure-ftpd/ChangeLog index d3c0d2e5de41..f774c8b425b3 100644 --- a/net-ftp/pure-ftpd/ChangeLog +++ b/net-ftp/pure-ftpd/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-ftp/pure-ftpd # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.80 2009/10/16 12:42:37 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/ChangeLog,v 1.81 2009/10/22 16:07:57 voyageur Exp $ + +*pure-ftpd-1.0.22-r1 (22 Oct 2009) + + 22 Oct 2009; Bernard Cafarelli <voyageur@gentoo.org> + -pure-ftpd-1.0.22.ebuild, +pure-ftpd-1.0.22-r1.ebuild, + +files/pure-ftpd-1.0.22-fix_rest_with_throttling.patch: + Fix REST when using throttling on mmap_send(), patch thanks to + redeeman@metanurb.dk *pure-ftpd-1.0.22 (16 Oct 2009) diff --git a/net-ftp/pure-ftpd/Manifest b/net-ftp/pure-ftpd/Manifest index 9d0a7e02810e..e313cbc1cb47 100644 --- a/net-ftp/pure-ftpd/Manifest +++ b/net-ftp/pure-ftpd/Manifest @@ -1,4 +1,5 @@ AUX pure-ftpd-1.0.21-pam.patch 586 RMD160 3246183eb4914dd605c181da17aa02c8e1e99726 SHA1 df99422a026e403ccecfe95ae9a1e13a7138b4d2 SHA256 4eab3ab63c403e02782df0b07d2f83b741b0b07cb10e37046dc2c874682509a6 +AUX pure-ftpd-1.0.22-fix_rest_with_throttling.patch 2142 RMD160 fcfb45d6fbd25636041ed08f4309c37f0bff278a SHA1 bcd16824b448e8f85fc6c03a81bdb350029f10e4 SHA256 77c2208e2b65677f4a1e64a1c057c87536c49dadd9ba2d90579f3f3056aa4788 AUX pure-ftpd-1.0.22-pam.patch 568 RMD160 510901acb42629a948124bc2e4618b073c6de746 SHA1 fcfc8662096d6bf62626f508117f1d3dc9327353 SHA256 37c4dba7711769da29504840cfdddc5acf8fd970117f8b26bc4caeec4d00e58b AUX pure-ftpd.conf_d 3378 RMD160 82d5d319b35e1262e8d72cff46c328429e3e3bce SHA1 93c4f65ce1592ad1ccbe8e04250c4cc1c9cdb5f2 SHA256 4361690c4217fd1cdae0c050015629ce6e74046446def2c7d646020d0682a579 AUX pure-ftpd.rc6 1455 RMD160 5bb57d4e162e08d113da9c349cf57480244948f7 SHA1 54b0abe7e27f10bdec9a22917e57f5ed625ebca3 SHA256 d554e4bab0c11a23c19e8fac9070c2550ca461dce72047745ca9f3fcf2660770 @@ -6,6 +7,6 @@ AUX pure-ftpd.xinetd 247 RMD160 5789f98ffc48dcd5f67ad4777cbc70e158e89de6 SHA1 a6 DIST pure-ftpd-1.0.21.tar.bz2 476117 RMD160 1ad61243c1f8a8d1055ee839eec0d9117681cf20 SHA1 1405ff2b9b9c3616c4e390eb99779884173a3347 SHA256 f2f03e5bb42325b470b88e8ee7e6014226518b620beb5dd8cf1f07bcdb64559c DIST pure-ftpd-1.0.22.tar.bz2 497237 RMD160 e7715813f66a561024911b3f8064d1f067969e7f SHA1 38b88f9645cef6c1b6f20a2f7e73ef9289e3314b SHA256 64659df4da59aa2ef5f455674ae1c3b4b56b4649bac1cac582b895942d0059cf EBUILD pure-ftpd-1.0.21-r1.ebuild 3761 RMD160 78c15227586a89745901fd77bbb147c4f5716fba SHA1 034df50ad5f5eeaa729b78c6c45efdeeeab1ab55 SHA256 44b581e4633283fd356a58050ecf464bcbf34c9e9875cc670f4cb7afc3478b54 -EBUILD pure-ftpd-1.0.22.ebuild 3724 RMD160 34620f8fc78915dc36aa13fdd9e54294920a21be SHA1 e7393bd59d85d01a567b1e7159adfb3112a699ed SHA256 6922a22ade21ef114678fd3016fe3b5d70fc40858af0dcd9911b101cb89138a6 -MISC ChangeLog 11882 RMD160 4a4fd8b642ab29c78de65d7be56f74813c41e54d SHA1 55d110d0115e887f79f8457355f079072a9982e1 SHA256 3ea62d5414b850b8449f2530343ee92d9b8921fab3cf1f4d290bcac2680c4131 +EBUILD pure-ftpd-1.0.22-r1.ebuild 3785 RMD160 c274c99c5e297e62b61b88b7ddc1e15eafdb7f88 SHA1 55db604898f6cf75a15d4c5c1afde595475a6aef SHA256 2de0386861314051e6843be9918170d96b57e8f4b0b2f00504d764e1e5a4af0a +MISC ChangeLog 12177 RMD160 8cf73ee89207719735d723ad3c86d10ff4d4927e SHA1 a64469eff1c518d4c3da61bb6fb19ec77f6b18e3 SHA256 a2a4bf708da2f3a1720cf33379b62676b559fde5f0675e1d20c9156a96d525f2 MISC metadata.xml 1048 RMD160 20c962a5b9b6a0fe6e75346847cc67a079e66870 SHA1 6423ca1d2067eeb0f009b7d8b0a7a35c94ff14b7 SHA256 1d0113e0866ac5d9c4df3a690d141881ad75baf0ad394959025c798bf3af4be0 diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.22-fix_rest_with_throttling.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.22-fix_rest_with_throttling.patch new file mode 100644 index 000000000000..d9b2a25ff5d8 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.22-fix_rest_with_throttling.patch @@ -0,0 +1,77 @@ +--- src/ftpd.c.orig 2009-10-22 16:58:51.000000000 +0200 ++++ src/ftpd.c 2009-10-22 17:06:18.000000000 +0200 +@@ -3096,25 +3096,23 @@ + + int mmap_send(int f, struct stat st, double *started) + { +- off_t s; + off_t skip; + off_t o; +- char *p, *buf; +- off_t left; ++ char *buf; + # ifdef THROTTLING + double ended; + off_t transmitted = 0; + # endif + +- o = restartat & ~(map_size - 1); +- skip = restartat - o; ++ skip = restartat % page_size; ++ o = restartat - skip; + while (o < st.st_size) { + # ifdef FTPWHO + if (shm_data_cur != NULL) { + shm_data_cur->download_current_size = o; + } + # endif +- left = st.st_size - o; ++ off_t left = st.st_size - o; + if (left > (off_t) dl_chunk_size) { + left = (off_t) dl_chunk_size; + } +@@ -3125,19 +3123,19 @@ + error(451, MSG_MMAP_FAILED); + return -1; + } +- p = buf; ++ + o += left; +- s = left; ++ off_t s = left; + while (left > skip) { + ssize_t w; + + # ifdef WITH_TLS + if (enforce_tls_auth && data_protection_level == CPL_PRIVATE) { +- w = secure_safe_write (p + skip, (size_t) (left - skip)); ++ w = secure_safe_write (buf + (s - left) + skip, (size_t) left - skip ); + } else + # endif + { +- while ((w = write(xferfd, p + skip, (size_t) (left - skip))) < ++ while ((w = write(xferfd, buf + (s - left) + skip, (size_t) left) - skip) < + (ssize_t) 0 && errno == EINTR); + } + if (w < (ssize_t) 0) { +@@ -3180,9 +3178,9 @@ + } + downloaded += (unsigned long long) w; + left -= w; +- p += w; ++ + # ifdef THROTTLING +- if (throttling_bandwidth_dl > 0UL) { ++ if (throttling_bandwidth_dl > 0UL && o < st.st_size) { + long double delay; + + ended = get_usec_time(); +@@ -3201,7 +3199,7 @@ + } + # endif + } +- skip = (off_t) 0; ++ skip = 0; + (void) munmap(buf, s); + } + diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.22.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.22-r1.ebuild index 20720fe6d1e4..06e70b52030f 100644 --- a/net-ftp/pure-ftpd/pure-ftpd-1.0.22.ebuild +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.22-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.22.ebuild,v 1.1 2009/10/16 12:42:37 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.22-r1.ebuild,v 1.1 2009/10/22 16:07:57 voyageur Exp $ EAPI=2 inherit eutils confutils flag-o-matic @@ -31,6 +31,7 @@ RDEPEND="${DEPEND} src_prepare() { epatch "${FILESDIR}"/${P}-pam.patch + epatch "${FILESDIR}"/${P}-fix_rest_with_throttling.patch } src_configure() { |