Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libfilezilla for openSUSE:Factory checked in at 2023-02-24 18:08:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libfilezilla (Old) and /work/SRC/openSUSE:Factory/.libfilezilla.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libfilezilla" Fri Feb 24 18:08:38 2023 rev:50 rq:1067619 version:0.41.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libfilezilla/libfilezilla.changes 2023-01-25 17:49:40.910146630 +0100 +++ /work/SRC/openSUSE:Factory/.libfilezilla.new.31432/libfilezilla.changes 2023-02-24 18:08:44.649632953 +0100 @@ -1,0 +2,8 @@ +Fri Feb 24 15:15:41 UTC 2023 - ecsos <ec...@opensuse.org> + +- Update to 0.41.1 + * Bugfixes and minor changes: + - Fixed a crash signalling aio waiters + - Added listen_socket::from_descriptor + +------------------------------------------------------------------- Old: ---- libfilezilla-0.41.0.tar.bz2 New: ---- libfilezilla-0.41.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libfilezilla.spec ++++++ --- /var/tmp/diff_new_pack.Z7Pjwy/_old 2023-02-24 18:08:45.137635861 +0100 +++ /var/tmp/diff_new_pack.Z7Pjwy/_new 2023-02-24 18:08:45.145635908 +0100 @@ -16,11 +16,11 @@ # -%define major 34 +%define major 35 %define libname %{name}%{major} %define develname %{name}-devel Name: libfilezilla -Version: 0.41.0 +Version: 0.41.1 Release: 0 Summary: C++ library for filezilla License: GPL-2.0-or-later @@ -80,6 +80,8 @@ + + # Need %%lang_package expanded for an extra conflict with an old library package %package lang # FIXME: consider using %%lang_package macro ++++++ libfilezilla-0.41.0.tar.bz2 -> libfilezilla-0.41.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/NEWS new/libfilezilla-0.41.1/NEWS --- old/libfilezilla-0.41.0/NEWS 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/NEWS 2023-02-22 11:16:15.000000000 +0100 @@ -1,3 +1,8 @@ +0.41.1 (2023-02-22) + +- Fixed a crash signalling aio waiters +- Added listen_socket::from_descriptor + 0.41.0 (2023-01-12) + Added fz::xml::parser and fz::xml::namespace_parser diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/configure new/libfilezilla-0.41.1/configure --- old/libfilezilla-0.41.0/configure 2023-01-12 10:41:30.000000000 +0100 +++ new/libfilezilla-0.41.1/configure 2023-02-22 11:16:23.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.41.0. +# Generated by GNU Autoconf 2.69 for libfilezilla 0.41.1. # # Report bugs to <tim.ko...@filezilla-project.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libfilezilla' PACKAGE_TARNAME='libfilezilla' -PACKAGE_VERSION='0.41.0' -PACKAGE_STRING='libfilezilla 0.41.0' +PACKAGE_VERSION='0.41.1' +PACKAGE_STRING='libfilezilla 0.41.1' PACKAGE_BUGREPORT='tim.ko...@filezilla-project.org' PACKAGE_URL='https://lib.filezilla-project.org/' @@ -1451,7 +1451,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.41.0 to adapt to many kinds of systems. +\`configure' configures libfilezilla 0.41.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1522,7 +1522,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libfilezilla 0.41.0:";; + short | recursive ) echo "Configuration of libfilezilla 0.41.1:";; esac cat <<\_ACEOF @@ -1678,7 +1678,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libfilezilla configure 0.41.0 +libfilezilla configure 0.41.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2123,7 +2123,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.41.0, which was +It was created by libfilezilla $as_me 0.41.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2478,7 +2478,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=34:0:0 +LIBRARY_VERSION=35:0:0 ac_config_headers="$ac_config_headers config/config.hpp" @@ -2994,7 +2994,7 @@ # Define the identity of the package. PACKAGE='libfilezilla' - VERSION='0.41.0' + VERSION='0.41.1' cat >>confdefs.h <<_ACEOF @@ -22609,7 +22609,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.41.0, which was +This file was extended by libfilezilla $as_me 0.41.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22676,7 +22676,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.41.0 +libfilezilla config.status 0.41.1 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.41.0/configure.ac new/libfilezilla-0.41.1/configure.ac --- old/libfilezilla-0.41.0/configure.ac 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/configure.ac 2023-02-22 11:16:15.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libfilezilla],[0.41.0],[tim.ko...@filezilla-project.org],[],[https://lib.filezilla-project.org/]) +AC_INIT([libfilezilla],[0.41.1],[tim.ko...@filezilla-project.org],[],[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=34:0:0 +LIBRARY_VERSION=35:0:0 AC_CONFIG_HEADERS([config/config.hpp]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/aio/aio.cpp new/libfilezilla-0.41.1/lib/aio/aio.cpp --- old/libfilezilla-0.41.0/lib/aio/aio.cpp 2022-10-11 14:11:47.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/aio/aio.cpp 2023-02-22 11:16:15.000000000 +0100 @@ -70,7 +70,7 @@ void aio_waitable::remove_waiter(aio_waiter & h) { scoped_lock l(m_); - while (active_signalling_ == &h) { + while (is_signalling(&h)) { l.unlock(); yield(); l.lock(); @@ -104,7 +104,7 @@ void aio_waitable::remove_waiters() { scoped_lock l(m_); - while (active_signalling_) { + while (!active_signalling_.empty()) { l.unlock(); yield(); l.lock(); @@ -117,16 +117,33 @@ waiting_handlers_.clear(); } +bool aio_waitable::is_signalling(aio_waiter * w) const +{ + for (auto const* a : active_signalling_) { + if (a == w) { + return true; + } + } + return false; +} + void aio_waitable::signal_availibility() { scoped_lock l(m_); if (!waiting_.empty()) { - active_signalling_ = waiting_.back(); + auto w = waiting_.back(); + active_signalling_.emplace_back(w); waiting_.pop_back(); l.unlock(); - active_signalling_->on_buffer_availability(this); + w->on_buffer_availability(this); l.lock(); - active_signalling_ = nullptr; + for (size_t i = 0; i < active_signalling_.size(); ++i) { + if (active_signalling_[i] == w) { + active_signalling_[i] = active_signalling_.back(); + active_signalling_.pop_back(); + break; + } + } return; } if (!waiting_handlers_.empty()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/aio/aio.hpp new/libfilezilla-0.41.1/lib/libfilezilla/aio/aio.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/aio/aio.hpp 2022-09-05 15:38:02.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/aio/aio.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -45,7 +45,7 @@ nonowning_buffer buffer_; private: friend class aio_buffer_pool; - buffer_lease(nonowning_buffer b, aio_buffer_pool* pool) + FZ_PRIVATE_SYMBOL buffer_lease(nonowning_buffer b, aio_buffer_pool* pool) : buffer_(b) , pool_(pool) { @@ -104,10 +104,12 @@ void signal_availibility(); private: + bool FZ_PRIVATE_SYMBOL is_signalling(aio_waiter* w) const; + mutex m_; std::vector<aio_waiter*> waiting_; std::vector<event_handler*> waiting_handlers_; - aio_waiter* active_signalling_{}; + std::vector<aio_waiter*> active_signalling_; }; struct aio_buffer_event_type{}; @@ -184,7 +186,7 @@ private: friend class buffer_lease; - void release(nonowning_buffer && b); + void FZ_PRIVATE_SYMBOL release(nonowning_buffer && b); logger_interface & logger_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/aio/reader.hpp new/libfilezilla-0.41.1/lib/libfilezilla/aio/reader.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/aio/reader.hpp 2022-10-11 14:11:47.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/aio/reader.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -237,12 +237,12 @@ virtual bool seekable() const override; private: - virtual void do_close(scoped_lock & l) override; - virtual bool do_seek(scoped_lock & l) override; + virtual void FZ_PRIVATE_SYMBOL do_close(scoped_lock & l) override; + virtual bool FZ_PRIVATE_SYMBOL do_seek(scoped_lock & l) override; - virtual void on_buffer_availability(aio_waitable const* w) override; + virtual void FZ_PRIVATE_SYMBOL on_buffer_availability(aio_waitable const* w) override; - void entry(); + void FZ_PRIVATE_SYMBOL entry(); file file_; thread_pool & thread_pool_; @@ -283,11 +283,11 @@ virtual bool seekable() const override { return true; } private: - virtual std::pair<aio_result, buffer_lease> do_get_buffer(scoped_lock & l) override; - virtual void do_close(scoped_lock & l) override; - virtual bool do_seek(scoped_lock & l) override; + virtual std::pair<aio_result, buffer_lease> FZ_PRIVATE_SYMBOL do_get_buffer(scoped_lock & l) override; + virtual void FZ_PRIVATE_SYMBOL do_close(scoped_lock & l) override; + virtual bool FZ_PRIVATE_SYMBOL do_seek(scoped_lock & l) override; - virtual void on_buffer_availability(aio_waitable const* w) override; + virtual void FZ_PRIVATE_SYMBOL on_buffer_availability(aio_waitable const* w) override; std::string_view const view_; }; @@ -332,11 +332,11 @@ virtual bool seekable() const override { return true; } private: - virtual std::pair<aio_result, buffer_lease> do_get_buffer(scoped_lock & l) override; - virtual void do_close(scoped_lock & l) override; - virtual bool do_seek(scoped_lock & l) override; + virtual std::pair<aio_result, buffer_lease> FZ_PRIVATE_SYMBOL do_get_buffer(scoped_lock & l) override; + virtual void FZ_PRIVATE_SYMBOL do_close(scoped_lock & l) override; + virtual bool FZ_PRIVATE_SYMBOL do_seek(scoped_lock & l) override; - virtual void on_buffer_availability(aio_waitable const* w) override; + virtual void FZ_PRIVATE_SYMBOL on_buffer_availability(aio_waitable const* w) override; std::string const data_; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/aio/writer.hpp new/libfilezilla-0.41.1/lib/libfilezilla/aio/writer.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/aio/writer.hpp 2022-07-20 11:29:31.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/aio/writer.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -231,13 +231,11 @@ virtual bool set_mtime(datetime const&) override; -protected: - virtual void do_close(scoped_lock & l) override; - virtual aio_result continue_finalize(scoped_lock & l) override; - private: + virtual void FZ_PRIVATE_SYMBOL do_close(scoped_lock & l) override; + virtual aio_result FZ_PRIVATE_SYMBOL continue_finalize(scoped_lock & l) override; - void entry(); + void FZ_PRIVATE_SYMBOL entry(); file file_; @@ -296,8 +294,8 @@ virtual aio_result preallocate(uint64_t size) override; private: - virtual aio_result do_add_buffer(scoped_lock & l, buffer_lease && b) override; - virtual aio_result do_finalize(scoped_lock &) override { return error_ ? aio_result::error : aio_result::ok; } + virtual aio_result FZ_PRIVATE_SYMBOL do_add_buffer(scoped_lock & l, buffer_lease && b) override; + virtual aio_result FZ_PRIVATE_SYMBOL do_finalize(scoped_lock &) override { return error_ ? aio_result::error : aio_result::ok; } buffer & buffer_; size_t size_limit_{}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/aio/xml_writer.hpp new/libfilezilla-0.41.1/lib/libfilezilla/aio/xml_writer.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/aio/xml_writer.hpp 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/lib/libfilezilla/aio/xml_writer.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -15,8 +15,8 @@ void enable_pretty_log(logmsg::type t); private: - virtual aio_result do_add_buffer(scoped_lock &, buffer_lease && b) override; - virtual aio_result do_finalize(scoped_lock &) override; + virtual aio_result FZ_PRIVATE_SYMBOL do_add_buffer(scoped_lock &, buffer_lease && b) override; + virtual aio_result FZ_PRIVATE_SYMBOL do_finalize(scoped_lock &) override; xml::parser parser_; xml::parser::callback_t cb_; @@ -31,8 +31,8 @@ void enable_pretty_log(logmsg::type t); private: - virtual aio_result do_add_buffer(scoped_lock &, buffer_lease && b) override; - virtual aio_result do_finalize(scoped_lock &) override; + virtual aio_result FZ_PRIVATE_SYMBOL do_add_buffer(scoped_lock &, buffer_lease && b) override; + virtual aio_result FZ_PRIVATE_SYMBOL do_finalize(scoped_lock &) override; xml::namespace_parser parser_; std::optional<xml::pretty_logger> logger_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/ascii_layer.hpp new/libfilezilla-0.41.1/lib/libfilezilla/ascii_layer.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/ascii_layer.hpp 2022-09-05 15:38:02.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/ascii_layer.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -27,8 +27,8 @@ virtual void set_event_handler(event_handler* handler, fz::socket_event_flag retrigger_block = fz::socket_event_flag{}) override; private: - virtual void operator()(fz::event_base const& ev) override; - void on_socket_event(socket_event_source* s, socket_event_flag t, int error); + virtual FZ_PRIVATE_SYMBOL void operator()(fz::event_base const& ev) override; + void FZ_PRIVATE_SYMBOL on_socket_event(socket_event_source* s, socket_event_flag t, int error); std::optional<uint8_t> tmp_read_; buffer buffer_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/json.hpp new/libfilezilla-0.41.1/lib/libfilezilla/json.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/json.hpp 2022-09-05 15:52:21.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/json.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -159,8 +159,8 @@ void clear(); private: - uint64_t number_value_integer() const; - double number_value_double() const; + uint64_t FZ_PRIVATE_SYMBOL number_value_integer() const; + double FZ_PRIVATE_SYMBOL number_value_double() const; bool FZ_PRIVATE_SYMBOL check_type(json_type t); void FZ_PRIVATE_SYMBOL set_type(json_type t); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/rate_limiter.hpp new/libfilezilla-0.41.1/lib/libfilezilla/rate_limiter.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/rate_limiter.hpp 2022-09-13 11:39:49.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/rate_limiter.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -283,17 +283,17 @@ bool waiting(scoped_lock & l, direction::type d); private: - virtual void update_stats(bool & active) override; - virtual size_t unsaturated(direction::type const d) const override { return data_[d].unsaturated_ ? 1 : 0; } + virtual void update_stats(bool & active) override final; + virtual size_t unsaturated(direction::type const d) const override final { return data_[d].unsaturated_ ? 1 : 0; } - virtual rate::type add_tokens(direction::type const d, rate::type tokens, rate::type limit) override; - virtual rate::type distribute_overflow(direction::type const d, rate::type tokens) override; + virtual rate::type add_tokens(direction::type const d, rate::type tokens, rate::type limit) override final; + virtual rate::type distribute_overflow(direction::type const d, rate::type tokens) override final; - virtual void unlock_tree() override; + virtual void unlock_tree() override final; - virtual std::array<rate::type, 2> gather_unspent_for_removal() override; + virtual std::array<rate::type, 2> gather_unspent_for_removal() override final; - struct data_t { + struct FZ_PRIVATE_SYMBOL data_t { rate::type available_{rate::unlimited}; rate::type overflow_multiplier_{1}; rate::type bucket_size_{rate::unlimited}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/socket.hpp new/libfilezilla-0.41.1/lib/libfilezilla/socket.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/socket.hpp 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/lib/libfilezilla/socket.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -307,6 +307,8 @@ listen_socket(listen_socket const&) = delete; listen_socket& operator=(listen_socket const&) = delete; + static std::unique_ptr<listen_socket> from_descriptor(socket_descriptor && desc, thread_pool & pool, int & error, fz::event_handler * handler = nullptr); + /** * \brief Starts listening * @@ -320,7 +322,7 @@ std::unique_ptr<socket> accept(int& error, fz::event_handler * handler = nullptr); /** - * \brief Like accept, but only returns a socket descriptor. + * \brief Like accept, but only returns a socket descriptor. * * Best suited for tight accept loops where the descriptor is handed * off to other threads. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/string.hpp new/libfilezilla-0.41.1/lib/libfilezilla/string.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/string.hpp 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/lib/libfilezilla/string.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -4,6 +4,7 @@ #include "libfilezilla.hpp" #include <algorithm> +#include <cstdint> #include <string> #include <string_view> #include <vector> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/thread_pool.hpp new/libfilezilla-0.41.1/lib/libfilezilla/thread_pool.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/thread_pool.hpp 2022-04-01 14:35:07.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/thread_pool.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -74,7 +74,7 @@ async_task spawn(std::function<void()> && f); private: - pooled_thread_impl* get_or_create_thread(); + FZ_PRIVATE_SYMBOL pooled_thread_impl* get_or_create_thread(); friend class async_task; friend class pooled_thread_impl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/visibility_helper.hpp new/libfilezilla-0.41.1/lib/libfilezilla/visibility_helper.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/visibility_helper.hpp 2021-07-28 15:59:29.000000000 +0200 +++ new/libfilezilla-0.41.1/lib/libfilezilla/visibility_helper.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -38,7 +38,7 @@ /// Marks symbols as private, they won't be exported #define FZ_EXPORT_PRIVATE -/// Import symbols from a sharde library +/// Import symbols from a shared library #define FZ_IMPORT_SHARED /// Import symbols from a static library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/libfilezilla/xml.hpp new/libfilezilla-0.41.1/lib/libfilezilla/xml.hpp --- old/libfilezilla-0.41.0/lib/libfilezilla/xml.hpp 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/lib/libfilezilla/xml.hpp 2023-02-22 11:16:15.000000000 +0100 @@ -75,15 +75,15 @@ std::string get_error() const; private: - bool decode_ref(); - bool is_valid_tag_or_attr(std::string_view s) const; - bool normalize_value(); - - bool parse_valid_utf8(std::string_view data); - bool parse(char const* const begin, char const* const end); - void set_error(std::string_view msg, size_t offset); + bool FZ_PRIVATE_SYMBOL decode_ref(); + bool FZ_PRIVATE_SYMBOL is_valid_tag_or_attr(std::string_view s) const; + bool FZ_PRIVATE_SYMBOL normalize_value(); + + bool FZ_PRIVATE_SYMBOL parse_valid_utf8(std::string_view data); + bool FZ_PRIVATE_SYMBOL parse(char const* const begin, char const* const end); + void FZ_PRIVATE_SYMBOL set_error(std::string_view msg, size_t offset); - bool deduce_encoding(std::string_view & data); + bool FZ_PRIVATE_SYMBOL deduce_encoding(std::string_view & data); enum class state { content, @@ -184,10 +184,10 @@ void set_raw_callback(raw_callback_t && cb); void set_raw_callback(raw_callback_t const& cb); private: - std::string_view apply_namespaces(std::string_view in); - bool apply_namespace_to_path(); + std::string_view FZ_PRIVATE_SYMBOL apply_namespaces(std::string_view in); + bool FZ_PRIVATE_SYMBOL apply_namespace_to_path(); - bool on_callback(callback_event type, std::string_view path, std::string_view name, std::string && value); + bool FZ_PRIVATE_SYMBOL on_callback(callback_event type, std::string_view path, std::string_view name, std::string && value); parser parser_; @@ -216,8 +216,8 @@ virtual void on_line(std::string_view line) = 0; private: - void finish_line(); - void print_line(); + void FZ_PRIVATE_SYMBOL finish_line(); + void FZ_PRIVATE_SYMBOL print_line(); size_t depth_{}; std::string value_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.41.0/lib/socket.cpp new/libfilezilla-0.41.1/lib/socket.cpp --- old/libfilezilla-0.41.0/lib/socket.cpp 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.41.1/lib/socket.cpp 2023-02-22 11:16:15.000000000 +0100 @@ -1401,6 +1401,52 @@ return ret; } +std::unique_ptr<listen_socket> listen_socket::from_descriptor(socket_descriptor && desc, thread_pool & pool, int & error, fz::event_handler * handler) +{ + if (!desc) { + error = ENOTSOCK; + return nullptr; + } + +#ifndef FZ_WINDOWS + disable_sigpipe(); +#endif + + socket_t fd = desc.detach(); + +#if defined(SO_NOSIGPIPE) && !defined(MSG_NOSIGNAL) + // We do not want SIGPIPE if writing to socket. + const int value = 1; + setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &value, sizeof(int)); +#endif + + set_nonblocking(fd); + + auto pSocket = std::make_unique<listen_socket>(pool, nullptr); + if (!pSocket->socket_thread_) { + error = ENOMEM; + close_socket_fd(fd); + return nullptr; + } + pSocket->state_ = listen_socket_state::listening; + pSocket->fd_ = fd; + + pSocket->evt_handler_ = handler; + pSocket->socket_thread_->waiting_ = WAIT_ACCEPT; + + sockaddr_u addr; + socklen_t addr_len = sizeof(addr); + if (!getsockname(pSocket->fd_, &addr.sockaddr_, &addr_len)) { + pSocket->family_ = addr.sockaddr_.sa_family; + } + if (pSocket->socket_thread_->start()) { + error = ENOMEM; + pSocket.reset(); + } + + return pSocket; +} + socket_descriptor listen_socket::fast_accept(int &error) { if (!socket_thread_) {