Hello community,

here is the log from the commit of package libfilezilla for openSUSE:Factory 
checked in at 2020-02-07 15:58:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libfilezilla (Old)
 and      /work/SRC/openSUSE:Factory/.libfilezilla.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libfilezilla"

Fri Feb  7 15:58:07 2020 rev:29 rq:771213 version:0.19.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libfilezilla/libfilezilla.changes        
2019-12-03 12:42:54.554123995 +0100
+++ /work/SRC/openSUSE:Factory/.libfilezilla.new.26092/libfilezilla.changes     
2020-02-07 16:00:38.627703690 +0100
@@ -1,0 +2,15 @@
+Fri Feb  7 11:16:30 UTC 2020 - [email protected]
+
+- Update to 0.19.3
+  * Bugfixes and minor changes:
+    - Rate limiting: Fix a divide by zero when distributing
+      overflow
+- Changes from 0.19.2
+  * New features:
+    - Rate limiting: Added debt repay mechanism to bucket removal
+  * Bugfixes and minor changes:
+    - *nix: Fix returned permissions in 
+      fz::local_filesys::get_file_info/get_next_file
+- Run spec-cleaner.
+
+-------------------------------------------------------------------
@@ -399 +413,0 @@
-

Old:
----
  libfilezilla-0.19.1.tar.bz2

New:
----
  libfilezilla-0.19.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libfilezilla.spec ++++++
--- /var/tmp/diff_new_pack.VhR4zD/_old  2020-02-07 16:00:40.611704702 +0100
+++ /var/tmp/diff_new_pack.VhR4zD/_new  2020-02-07 16:00:40.611704702 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libfilezilla
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,11 +16,11 @@
 #
 
 
-%define major          2
+%define major          3
 %define libname                %{name}%{major}
 %define develname      %{name}-devel
 Name:           libfilezilla
-Version:        0.19.1
+Version:        0.19.3
 Release:        0
 Summary:        C++ library for filezilla
 License:        GPL-2.0-or-later
@@ -73,21 +73,18 @@
 
 # Need %%lang_package expanded for an extra conflict with an old library 
package
 %package lang 
+# FIXME: consider using %%lang_package macro
 Summary:        Translations for package %{name} 
 # in libfilezilla 0.18.x, we wrongly shipped the languages files directly in 
the library package
 Group:          System/Localization 
-Conflicts:      libfilezilla0 < 0.19
-
 Requires:       %{name} = %{version} 
-
+Conflicts:      libfilezilla0 < 0.19
 Provides:       %{name}-lang-all = %{version} 
 BuildArch:      noarch 
 
 %description lang 
 Provides translations for the "%{name}" package.
 
-
-
 %prep
 %setup -q
 %patch0
@@ -95,10 +92,10 @@
 %build
 autoreconf -fi
 %configure --disable-static
-make %{?_smp_mflags}
+%make_build
 
 pushd doc
-make %{?_smp_mflags} html
+%make_build html
 popd
 
 %install
@@ -109,7 +106,7 @@
 cp -r doc/doxygen-doc/* %{buildroot}%{_docdir}/%{develname}/
 rm -f %{buildroot}%{_docdir}/%{develname}/latex/refman.tex
 %fdupes -s %{buildroot}%{_docdir}/%{develname}
-%find_lang %name
+%find_lang %{name}
 
 %post -n %{libname} -p /sbin/ldconfig
 %postun -n %{libname} -p /sbin/ldconfig

++++++ libfilezilla-0.19.1.tar.bz2 -> libfilezilla-0.19.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/NEWS new/libfilezilla-0.19.3/NEWS
--- old/libfilezilla-0.19.1/NEWS        2019-11-15 14:21:44.000000000 +0100
+++ new/libfilezilla-0.19.3/NEWS        2019-12-19 16:16:48.000000000 +0100
@@ -1,3 +1,12 @@
+0.19.3 (2019-12-19)
+
+- Rate limiting: Fix a divide by zero when distributing overflow
+
+0.19.2 (2019-12-19)
+
++ Rate limiting: Added debt repay mechanism to bucket removal
+- *nix: Fix returned permissions in 
fz::local_filesys::get_file_info/get_next_file
+
 0.19.1 (2019-11-15)
 
 + Return error information to fz::local_filesys::begin_find_files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/configure 
new/libfilezilla-0.19.3/configure
--- old/libfilezilla-0.19.1/configure   2019-11-15 14:21:56.000000000 +0100
+++ new/libfilezilla-0.19.3/configure   2019-12-19 16:16:53.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libfilezilla 0.19.1.
+# Generated by GNU Autoconf 2.69 for libfilezilla 0.19.3.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libfilezilla'
 PACKAGE_TARNAME='libfilezilla'
-PACKAGE_VERSION='0.19.1'
-PACKAGE_STRING='libfilezilla 0.19.1'
+PACKAGE_VERSION='0.19.3'
+PACKAGE_STRING='libfilezilla 0.19.3'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL='https://lib.filezilla-project.org/'
 
@@ -1442,7 +1442,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libfilezilla 0.19.1 to adapt to many kinds of systems.
+\`configure' configures libfilezilla 0.19.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1513,7 +1513,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libfilezilla 0.19.1:";;
+     short | recursive ) echo "Configuration of libfilezilla 0.19.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1664,7 +1664,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libfilezilla configure 0.19.1
+libfilezilla configure 0.19.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2109,7 +2109,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libfilezilla $as_me 0.19.1, which was
+It was created by libfilezilla $as_me 0.19.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2464,7 +2464,7 @@
 # If any interfaces have been added since the last public release, then 
increment age.
 # If any interfaces have been removed or changed since the last public 
release, then set age to 0.
 # CURRENT:REVISION:AGE
-LIBRARY_VERSION=2:0:0
+LIBRARY_VERSION=3:1:0
 
 
 ac_config_headers="$ac_config_headers lib/libfilezilla/private/config.hpp"
@@ -2985,7 +2985,7 @@
 
 # Define the identity of the package.
  PACKAGE='libfilezilla'
- VERSION='0.19.1'
+ VERSION='0.19.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -22220,7 +22220,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libfilezilla $as_me 0.19.1, which was
+This file was extended by libfilezilla $as_me 0.19.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -22287,7 +22287,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libfilezilla config.status 0.19.1
+libfilezilla config.status 0.19.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/configure.ac 
new/libfilezilla-0.19.3/configure.ac
--- old/libfilezilla-0.19.1/configure.ac        2019-11-15 14:21:44.000000000 
+0100
+++ new/libfilezilla-0.19.3/configure.ac        2019-12-19 16:16:48.000000000 
+0100
@@ -1,4 +1,4 @@
-AC_INIT([libfilezilla],[0.19.1],[[email protected]],[],[https://lib.filezilla-project.org/])
+AC_INIT([libfilezilla],[0.19.3],[[email protected]],[],[https://lib.filezilla-project.org/])
 
 # Update the version information only immediately before a public release of 
your software
 # If the library source code has changed at all since the last update, then 
increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
@@ -6,7 +6,7 @@
 # If any interfaces have been added since the last public release, then 
increment age.
 # If any interfaces have been removed or changed since the last public 
release, then set age to 0.
 # CURRENT:REVISION:AGE
-LIBRARY_VERSION=2:0:0
+LIBRARY_VERSION=3:1:0
 
 
 AC_CONFIG_HEADERS([lib/libfilezilla/private/config.hpp])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/libfilezilla/buffer.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/buffer.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/buffer.hpp 2019-08-15 
09:39:04.000000000 +0200
+++ new/libfilezilla-0.19.3/lib/libfilezilla/buffer.hpp 2019-12-19 
15:10:30.000000000 +0100
@@ -13,7 +13,7 @@
  * \brief The buffer class is a simple buffer where data can be appended at 
the end and consumed at the front.
  * Think of it as a deque with contiguous storage.
  *
- * This class is useful when buffering data for sending over the network, or 
for buffering data for further 
+ * This class is useful when buffering data for sending over the network, or 
for buffering data for further
  * piecemeal processing after having received it.
  *
  * In general, copying/moving data around is expensive and allocations are 
even more expensive. Using this
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libfilezilla-0.19.1/lib/libfilezilla/private/visibility.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/private/visibility.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/private/visibility.hpp     
2015-11-02 14:47:31.000000000 +0100
+++ new/libfilezilla-0.19.3/lib/libfilezilla/private/visibility.hpp     
2019-12-19 15:10:30.000000000 +0100
@@ -7,7 +7,7 @@
 
   // Two cases when building: Windows, other platform
   #ifdef FZ_WINDOWS
- 
+
     // Under Windows we can either use Visual Studio or a proper compiler
     #ifdef _MSC_VER
       #ifdef DLL_EXPORT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libfilezilla-0.19.1/lib/libfilezilla/rate_limiter.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/rate_limiter.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/rate_limiter.hpp   2019-11-07 
16:51:12.000000000 +0100
+++ new/libfilezilla-0.19.3/lib/libfilezilla/rate_limiter.hpp   2019-12-19 
15:10:30.000000000 +0100
@@ -159,6 +159,13 @@
         */
        virtual void unlock_tree() { mtx_.unlock(); }
 
+       /**
+        * \brief Gather unspent tokens during removal to repay debt
+        *
+        * When called, this is locked, children are not.
+        */
+       virtual std::array<rate::type, 2> gather_unspent_for_removal() = 0;
+
        mutex mtx_{false};
        rate_limit_manager * mgr_{};
        void * parent_{};
@@ -222,6 +229,7 @@
 
        void pay_debt(direction::type const d);
 
+       virtual std::array<rate::type, 2> gather_unspent_for_removal() override;
 
        std::vector<bucket_base*> buckets_;
        std::vector<size_t> scratch_buffer_;
@@ -278,6 +286,8 @@
 
        virtual void unlock_tree() override;
 
+       virtual std::array<rate::type, 2> gather_unspent_for_removal() override;
+
        struct data_t {
                rate::type available_{rate::unlimited};
                rate::type overflow_multiplier_{1};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/libfilezilla/shared.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/shared.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/shared.hpp 2018-09-21 
10:18:48.000000000 +0200
+++ new/libfilezilla-0.19.3/lib/libfilezilla/shared.hpp 2019-12-19 
15:10:30.000000000 +0100
@@ -8,7 +8,7 @@
 */
 namespace fz {
 
-/** \brief shared_optional is like std::shared_ptr but with relational 
operators acting like 
+/** \brief shared_optional is like std::shared_ptr but with relational 
operators acting like
  * C++17's std::optional
  *
  * \tparam T that can be stored in the shared_optional
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/libfilezilla/socket.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/socket.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/socket.hpp 2019-11-07 
16:51:12.000000000 +0100
+++ new/libfilezilla-0.19.3/lib/libfilezilla/socket.hpp 2019-12-19 
15:10:30.000000000 +0100
@@ -92,13 +92,18 @@
  *
  * If the error value is non-zero for the connection, read and write events,
  * the socket has failed and needs to be closed. Doing anything else with
- * failed sockets is undefined behavior. 
+ * failed sockets is undefined behavior.
  * Failure events can be received at any time.
  *
  * Read and write events are edge-triggered:
- * - After receiving a read event for a socket, it will not be sent again 
unless
- * a subsequent call to socket::read has returned EAGAIN.
- * - The same holds for the write event and socket::write
+ * - After receiving a read event for a socket, it will not be sent again
+ *   unless a subsequent call to socket_interface::read or
+ *   socket_interface::shutdown_read has returned EAGAIN.
+ * - The same holds for the write event and socket_interface::write and
+ *   socket_interface::shutdown
+ *
+ * It is a grave violation to call the read/write/shutdown functions
+ * again after they returned EAGAIN without first waiting for the event.
  */
 typedef simple_event<socket_event_type, socket_event_source*, 
socket_event_flag, int> socket_event;
 
@@ -352,9 +357,14 @@
         *
         * Only disallows further sends, does not affect reading from the
         * socket.
+        *
+        * Returns 0 on success, an erorr code otherwise.
+        * If it returns EGAIN, shutdown is not yet complete. Call shutdown
+        * again after the next write event.
         */
        virtual int shutdown() = 0;
 
+       /// \see socket_layer::shutdown_read
        virtual int shutdown_read() = 0;
 
 protected:
@@ -524,6 +534,8 @@
  *
  * For safe closing of a layer hierarchy, both the write and read side
  * should be shut down first, otherwise pending data might get discarded.
+ * The shutdown and shutdown_read functions may return EAGAIN, in which
+ * case they must be called again after the next write/read event.
  */
 class FZ_PUBLIC_SYMBOL socket_layer : public socket_interface
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/libfilezilla/tls_layer.hpp 
new/libfilezilla-0.19.3/lib/libfilezilla/tls_layer.hpp
--- old/libfilezilla-0.19.1/lib/libfilezilla/tls_layer.hpp      2019-06-17 
15:31:43.000000000 +0200
+++ new/libfilezilla-0.19.3/lib/libfilezilla/tls_layer.hpp      2019-12-19 
15:10:30.000000000 +0100
@@ -39,8 +39,8 @@
         *
         * If the handshake is started, wait for a connection event for the 
result.
         *
-        * The certificate negotiated that eventually gets negotiated for the 
session]
-        * must match the passed required_certificate, either in DER or PEM, 
+        * The certificate negotiated that eventually gets negotiated for the 
session
+        * must match the passed required_certificate, either in DER or PEM,
         * or the handshake will fail.
         */
        bool client_handshake(std::vector<uint8_t> const& required_certificate, 
std::vector<uint8_t> const& session_to_resume = std::vector<uint8_t>(), 
native_string const& session_hostname = native_string());
@@ -52,7 +52,7 @@
         *
         * If the handshake is started, wait for a connection event for the 
result.
         *
-        * If a verification handler is passed, it will receive a 
+        * If a verification handler is passed, it will receive a
         * certificate_verification_event event upon which it must call
         * set_verification_result.
         * If no verification handler is passed, verification is done soley 
using the system
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/local_filesys.cpp 
new/libfilezilla-0.19.3/lib/local_filesys.cpp
--- old/libfilezilla-0.19.1/lib/local_filesys.cpp       2019-11-15 
14:21:44.000000000 +0100
+++ new/libfilezilla-0.19.3/lib/local_filesys.cpp       2019-12-19 
15:10:30.000000000 +0100
@@ -147,7 +147,7 @@
        }
 
        if (mode) {
-               *mode = buf.st_mode & 0x777;
+               *mode = buf.st_mode & 0777;
        }
 
        if (S_ISDIR(buf.st_mode)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/process.cpp 
new/libfilezilla-0.19.3/lib/process.cpp
--- old/libfilezilla-0.19.1/lib/process.cpp     2019-08-02 11:15:48.000000000 
+0200
+++ new/libfilezilla-0.19.3/lib/process.cpp     2019-12-19 15:10:30.000000000 
+0100
@@ -85,7 +85,7 @@
 
        // Treat newlines as whitespace just to be sure, even if MSDN doesn't 
mention it
        if (arg.find_first_of(fzT(" \"\t\r\n\v")) != native_string::npos) {
-               // Quite horrible, as per MSDN: 
+               // Quite horrible, as per MSDN:
                // Backslashes are interpreted literally, unless they 
immediately precede a double quotation mark.
                // If an even number of backslashes is followed by a double 
quotation mark, one backslash is placed in the argv array for every pair of 
backslashes, and the double quotation mark is interpreted as a string delimiter.
                // If an odd number of backslashes is followed by a double 
quotation mark, one backslash is placed in the argv array for every pair of 
backslashes, and the double quotation mark is "escaped" by the remaining 
backslash, causing a literal double quotation mark (") to be placed in argv.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/lib/rate_limiter.cpp 
new/libfilezilla-0.19.3/lib/rate_limiter.cpp
--- old/libfilezilla-0.19.1/lib/rate_limiter.cpp        2019-11-07 
16:51:12.000000000 +0100
+++ new/libfilezilla-0.19.3/lib/rate_limiter.cpp        2019-12-19 
16:16:48.000000000 +0100
@@ -154,6 +154,10 @@
                                        parent->buckets_[idx_] = other;
                                }
                                parent->buckets_.pop_back();
+                               std::array<rate::type, 2> unspent = 
gather_unspent_for_removal();
+                               for (size_t i = 0; i < 2; ++i) {
+                                       parent->data_[i].debt_ -= 
std::min(parent->data_[i].debt_, unspent[i]);
+                               }
                                parent->mtx_.unlock();
                                break;
                        }
@@ -308,7 +312,7 @@
                size_t weight = weight_ ? weight_ : 1;
                rate::type debt_reduction = std::min(data.merged_tokens_, 
data.debt_ / weight);
                data.merged_tokens_ -= debt_reduction;
-               data.debt_ -= debt_reduction;
+               data.debt_ -= debt_reduction * weight;
        }
        else {
                data.debt_ = 0;
@@ -365,7 +369,7 @@
        data.overflow_ = 0;
        scratch_buffer_.clear();
        for (size_t i = 0; i < buckets_.size(); ++i) {
-               size_t overflow = buckets_[i]->add_tokens(d, 
data.merged_tokens_, merged_limit);
+               rate::type overflow = buckets_[i]->add_tokens(d, 
data.merged_tokens_, merged_limit);
                if (overflow) {
                        data.overflow_ += overflow;
                }
@@ -406,21 +410,19 @@
        rate::type remaining = overflow_sum;
 
        while (true) {
-               size_t size{};
+               data.unsaturated_ = 0;
                for (auto idx : scratch_buffer_) {
-                       size += buckets_[idx]->unsaturated(d);
+                       data.unsaturated_ += buckets_[idx]->unsaturated(d);
                }
-               data.unsaturated_ = size;
 
-               if (!remaining || scratch_buffer_.empty()) {
-                       break;
+               rate::type const extra_tokens = data.unsaturated_ ? (remaining 
/ data.unsaturated_) : 0;
+               if (data.unsaturated_) {
+                       remaining %= data.unsaturated_;
                }
-
-               rate::type const extra_tokens = remaining / size;
-               remaining %= size;
                for (size_t i = 0; i < scratch_buffer_.size(); ) {
-                       rate::type sub_overflow = 
buckets_[scratch_buffer_[i]]->distribute_overflow(d, extra_tokens);
-                       if (sub_overflow) {
+                       auto & bucket = *buckets_[scratch_buffer_[i]];
+                       rate::type sub_overflow = bucket.distribute_overflow(d, 
extra_tokens);
+                       if (sub_overflow || !bucket.unsaturated(d)) {
                                remaining += sub_overflow;
                                scratch_buffer_[i] = scratch_buffer_.back();
                                scratch_buffer_.pop_back();
@@ -430,6 +432,10 @@
                        }
                }
                if (!extra_tokens) {
+                       data.unsaturated_ = 0;
+                       for (auto idx : scratch_buffer_) {
+                               data.unsaturated_ += 
buckets_[idx]->unsaturated(d);
+                       }
                        break;
                }
        }
@@ -462,6 +468,25 @@
        }
 }
 
+std::array<rate::type, 2> rate_limiter::gather_unspent_for_removal()
+{
+       std::array<rate::type, 2> ret = {0, 0};
+
+       for (auto & bucket : buckets_) {
+               scoped_lock l(bucket->mtx_);
+               auto u = bucket->gather_unspent_for_removal();
+               ret[0] += u[0];
+               ret[1] += u[1];
+       }
+
+       for (size_t i = 0; i < 2; ++i) {
+               rate::type debt_reduction = std::min(ret[i], data_[i].debt_);
+               ret[i] -= debt_reduction;
+               data_[i].debt_ -= debt_reduction;
+       }
+
+       return ret;
+}
 
 bucket::~bucket()
 {
@@ -602,4 +627,17 @@
        }
 }
 
+std::array<rate::type, 2> bucket::gather_unspent_for_removal()
+{
+       std::array<rate::type, 2> ret = {0, 0};
+       for (size_t i = 0; i < 2; ++i) {
+               if (data_[i].available_ != rate::unlimited) {
+                       ret[i] = data_[i].available_;
+                       data_[i].available_ = 0;
+               }
+       }
+
+       return ret;
+}
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libfilezilla-0.19.1/locales/ar.po 
new/libfilezilla-0.19.3/locales/ar.po
--- old/libfilezilla-0.19.1/locales/ar.po       2019-06-17 15:31:43.000000000 
+0200
+++ new/libfilezilla-0.19.3/locales/ar.po       2019-12-19 15:10:30.000000000 
+0100
@@ -6,10 +6,10 @@
 msgstr ""
 "Project-Id-Version: FileZilla3\n"
 "Report-Msgid-Bugs-To: https://trac.filezilla-project.org/\n";
-"POT-Creation-Date: 2019-06-10 12:22+0200\n"
-"PO-Revision-Date: 2019-05-08 17:35+0300\n"
-"Last-Translator: awadh alghaamdi _ عوض الغامدي <awadh_al_ghaamdi@hotmail."
-"com>\n"
+"POT-Creation-Date: 2019-08-08 08:49+0200\n"
+"PO-Revision-Date: 2019-11-27 23:26+0300\n"
+"Last-Translator: عوض الغامدي - منتديات عميد التعريب "
+"<[email protected]>\n"
 "Language-Team: Awadh Al-Ghaamdi <[email protected]>\n"
 "Language: ar\n"
 "MIME-Version: 1.0\n"
@@ -17,14 +17,14 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=6; plural= n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
-"X-Generator: Poedit 2.2.1\n"
+"X-Generator: Poedit 2.2.4\n"
 "X-Poedit-SourceCharset: UTF-8\n"
 
-#: ../lib/tls_layer_impl.cpp:1324
+#: ../lib/tls_layer_impl.cpp:1370
 msgid "A certificate in the chain was signed using an insecure algorithm"
 msgstr "تم التوقيع على شهادة في السلسلة باستخدام خوارزمية غير آمنة"
 
-#: ../lib/tls_layer_impl.cpp:1328
+#: ../lib/tls_layer_impl.cpp:1374
 msgid "An issuer in the certificate chain is not a certificate authority"
 msgstr "أحد الناشرين في سلسلة الشهادة له شهادة باطلة"
 
@@ -36,7 +36,7 @@
 msgid "Bad file descriptor"
 msgstr "واصف ملف غير صالح"
 
-#: ../lib/tls_layer_impl.cpp:1314
+#: ../lib/tls_layer_impl.cpp:1360
 msgid "Beware! Certificate has been revoked"
 msgstr "أنتبه! تم إبطال الشهادة"
 
@@ -44,11 +44,15 @@
 msgid "Cannot assign requested address"
 msgstr "لا يمكن تعيين العنوان المطلوب"
 
-#: ../lib/tls_layer_impl.cpp:1379
+#: ../lib/tls_layer_impl.cpp:265
+msgid "Certificate file too big."
+msgstr "ملف الشهادة كبير جدا."
+
+#: ../lib/tls_layer_impl.cpp:1425
 msgid "Certificate of connection does not match expected certificate."
 msgstr "لا تتطابق شهادة الاتصال مع الشهادة المتوقعة."
 
-#: ../lib/tls_layer_impl.cpp:1320
+#: ../lib/tls_layer_impl.cpp:1366
 msgid "Certificate signature verification failed"
 msgstr "فشل التحقق من صحة التوقيع للشهادة"
 
@@ -72,15 +76,15 @@
 msgid "Connection reset by peer"
 msgstr "إعادة تعيين الاتصال بواسطة النظير"
 
-#: ../lib/tls_layer_impl.cpp:1461
+#: ../lib/tls_layer_impl.cpp:1507
 msgid "Could not add certificate to temporary trust list"
 msgstr "لا يمكن إضافة الشهادة إلى قائمة الثقة المؤقتة"
 
-#: ../lib/tls_layer_impl.cpp:1453
+#: ../lib/tls_layer_impl.cpp:1499
 msgid "Could not copy certificate"
 msgstr "تعذر نسخ الشهادة"
 
-#: ../lib/tls_layer_impl.cpp:1109
+#: ../lib/tls_layer_impl.cpp:1138
 msgid ""
 "Could not get distinguished name of certificate issuer, "
 "gnutls_x509_get_issuer_dn failed"
@@ -88,18 +92,34 @@
 "لا يمكن الحصول على الإسم الفارق من ناشر الشهادة , فشل "
 "gnutls_x509_get_issuer_dn"
 
-#: ../lib/tls_layer_impl.cpp:1095
+#: ../lib/tls_layer_impl.cpp:1124
 msgid ""
 "Could not get distinguished name of certificate subject, gnutls_x509_get_dn "
 "failed"
 msgstr ""
 "لا يمكن الحصول على الإسم الفارق لموضوع الشهادة , فشل gnutls_x509_get_dn"
 
-#: ../lib/tls_layer_impl.cpp:1297
+#: ../lib/tls_layer_impl.cpp:260
+msgid "Could not open certificate file."
+msgstr "تعذر فتح ملف الشهادة."
+
+#: ../lib/tls_layer_impl.cpp:241
+msgid "Could not open key file."
+msgstr "تعذر فتح ملف المفتاح."
+
+#: ../lib/tls_layer_impl.cpp:272
+msgid "Could not read certificate file."
+msgstr "تعذر قراءه ملف الشهادة."
+
+#: ../lib/tls_layer_impl.cpp:253
+msgid "Could not read key file."
+msgstr "تعذر قراءه ملف المفتاح."
+
+#: ../lib/tls_layer_impl.cpp:1343
 msgid "Could not sort peer certificates"
 msgstr "لا يمكن ترتيب شهادات النظير"
 
-#: ../lib/tls_layer_impl.cpp:1424 ../lib/tls_layer_impl.cpp:1475
+#: ../lib/tls_layer_impl.cpp:1470 ../lib/tls_layer_impl.cpp:1521
 msgid "Failed to verify peer certificate"
 msgstr "فشل في التحقق من شهادة النظير"
 
@@ -107,22 +127,22 @@
 msgid "File descriptor not a socket"
 msgstr "واصف الملف ليس مأخذ للتوصيل"
 
-#: ../lib/tls_layer_impl.cpp:447
+#: ../lib/tls_layer_impl.cpp:448
 #, c-format
 msgid "GnuTLS error %d"
 msgstr "GnuTLS خطأ %d"
 
-#: ../lib/tls_layer_impl.cpp:450
+#: ../lib/tls_layer_impl.cpp:451
 #, c-format
 msgid "GnuTLS error %d in %s"
 msgstr "GnuTLS خطأ %d في %s"
 
-#: ../lib/tls_layer_impl.cpp:442
+#: ../lib/tls_layer_impl.cpp:443
 #, c-format
 msgid "GnuTLS error %d in %s: %s"
 msgstr "GnuTLS خطأ %d في %s: %s"
 
-#: ../lib/tls_layer_impl.cpp:439
+#: ../lib/tls_layer_impl.cpp:440
 #, c-format
 msgid "GnuTLS error %d: %s"
 msgstr "GnuTLS خطأ %d: %s"
@@ -151,6 +171,10 @@
 msgid "Invalid value for hints"
 msgstr "قيمة غير صالحة للتلميحات"
 
+#: ../lib/tls_layer_impl.cpp:246
+msgid "Key file too big."
+msgstr "ملف المفتاح كبير جدا."
+
 #: ../lib/socket_errors.cpp:46
 msgid "Local address in use"
 msgstr "العنوان المحلي قيد الاستخدام"
@@ -159,6 +183,10 @@
 msgid "Local endpoint has been closed"
 msgstr "تم إغلاق نقطة النهاية المحلية"
 
+#: ../lib/tls_layer_impl.cpp:1558
+msgid "Man-in-the-Middle attack detected, aborting connection."
+msgstr "اكتشاف هجوم Man-in-the-Middle ، قطع الاتصال."
+
 #: ../lib/socket_errors.cpp:88
 msgid "Memory allocation failure"
 msgstr "فشل في تخصيص الذاكرة"
@@ -233,23 +261,23 @@
 msgid "Protocol not supported on given socket type"
 msgstr "بروتوكول غير معتمد على نوع مأخذ التوصيل"
 
-#: ../lib/tls_layer_impl.cpp:461
+#: ../lib/tls_layer_impl.cpp:462
 #, c-format
 msgid "Received TLS alert from the server: %s (%d)"
 msgstr "تلقي تنبيه TLS من الملقم: %s (%d)"
 
-#: ../lib/tls_layer_impl.cpp:1342
+#: ../lib/tls_layer_impl.cpp:1388
 #, c-format
 msgid ""
 "Received certificate chain could not be verified. Verification status is %d."
 msgstr "لا يمكن التحقق من سلسلة الشهادة الواردة. حالة التحقق هي %d."
 
-#: ../lib/tls_layer_impl.cpp:464
+#: ../lib/tls_layer_impl.cpp:465
 #, c-format
 msgid "Received unknown TLS alert %d from the server"
 msgstr "تلقي تنبيه TLS غير معروف %d من الملقم"
 
-#: ../lib/tls_layer_impl.cpp:1031
+#: ../lib/tls_layer_impl.cpp:1060
 msgid "Remote certificate not trusted."
 msgstr "الشهادة البعيدة غير موثوق بها."
 
@@ -261,11 +289,11 @@
 msgid "Resource temporarily unavailable"
 msgstr "المصدر غير متوفر مؤقتا"
 
-#: ../lib/tls_layer_impl.cpp:923
+#: ../lib/tls_layer_impl.cpp:946
 msgid "Server did not properly shut down TLS connection"
 msgstr "الخادم ربما لم يغلق إتصال TLS بشكل صحيح"
 
-#: ../lib/tls_layer_impl.cpp:1288
+#: ../lib/tls_layer_impl.cpp:1334
 msgid ""
 "Server sent unsorted certificate chain in violation of the TLS specifications"
 msgstr "أرسل الملقم سلسلة الشهادة لم يتم فرزها في انتهاك لمواصفات TLS"
@@ -310,14 +338,14 @@
 msgid "The ai_socktype member is not supported"
 msgstr "أعضاء ai_socktype غير معتمدين"
 
-#: ../lib/tls_layer_impl.cpp:1337
+#: ../lib/tls_layer_impl.cpp:1383
 msgid ""
 "The certificate requires the server to include an OCSP status in its "
 "response, but the OCSP status is missing."
 msgstr ""
 "تتطلب الشهادة ان تضمين الملقم حاله ocsp في استجابته, لكن حاله ocsp مفقودة."
 
-#: ../lib/tls_layer_impl.cpp:1332
+#: ../lib/tls_layer_impl.cpp:1378
 msgid "The server's hostname does not match the certificate's hostname"
 msgstr "لا يطابق اسم مضيف الملقم مع اسم المضيف للشهادة"
 
@@ -333,23 +361,23 @@
 msgid "The specified network name is no longer available"
 msgstr "لم يعد اسم شبكة الاتصال المحدد متوفرا"
 
-#: ../lib/tls_layer_impl.cpp:1357
+#: ../lib/tls_layer_impl.cpp:1403
 msgid "Unsupported certificate type"
 msgstr "نوع شهادة غير مدعومة"
 
-#: ../lib/tls_layer_impl.cpp:1496
+#: ../lib/tls_layer_impl.cpp:1542
 msgid "Verifying certificate..."
 msgstr "جاري فحص الشهادة..."
 
-#: ../lib/tls_layer_impl.cpp:1251
+#: ../lib/tls_layer_impl.cpp:1297
 msgid "gnutls_certificate_get_peers returned no certificates"
 msgstr "gnutls_certificate_get_peers لم يرجع بشهادات"
 
-#: ../lib/tls_layer_impl.cpp:1263
+#: ../lib/tls_layer_impl.cpp:1309
 msgid "gnutls_pem_base64_encode2 failed"
 msgstr "gnutls_pem_base64_encode2 فشل"
 
-#: ../lib/tls_layer_impl.cpp:1555 ../lib/tls_layer_impl.cpp:1571
-#: ../lib/tls_layer_impl.cpp:1587 ../lib/tls_layer_impl.cpp:1603
+#: ../lib/tls_layer_impl.cpp:1602 ../lib/tls_layer_impl.cpp:1618
+#: ../lib/tls_layer_impl.cpp:1634 ../lib/tls_layer_impl.cpp:1650
 msgid "unknown"
 msgstr "غير معروف"


Reply via email to