diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/AUTHORS eiskaltdcpp-2.2.10+583+g17a6b034/AUTHORS --- eiskaltdcpp-2.2.10+340+g44d8aea4/AUTHORS 2019-02-04 01:00:23.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/AUTHORS 2019-04-09 21:21:43.000000000 +0000 @@ -15,6 +15,7 @@ * release manager, 2010-2019 * lead developer, 2012-2019 * macOS maintainer, 2018-2019 + * MS Windows maintainer, 2019 2010-2017 Pavel Vatagin * MS Windows maintainer, 2010-2017 @@ -50,7 +51,7 @@ 2011-2014 Márk Lutring French translation (fr) - 2010-2018 Alexandre Wallimann aka Jellyffs + 2010-2019 Alexandre Wallimann aka Jellyffs Polish translation (pl) 2010-2012 Arahael @@ -68,7 +69,7 @@ 2014 Marko Trifunović Spanish translation (es) - 2010-2018 Gustavo Alvarez aka sL1pKn07 + 2010-2019 Gustavo Alvarez aka sL1pKn07 2012-2015 Francisco Blas Izquierdo Riera aka klondike Basque translation (eu) @@ -106,8 +107,8 @@ 2013 Syaoming Lai Swedish (Sweden) translation (sv_SE) - 2014-2018 Sopor + 2014-2019 Sopor Turkish translation (tr) - 2015-2018 mauron (https://www.transifex.com/user/profile/mauron/) + 2015-2019 mauron (https://www.transifex.com/user/profile/mauron/) diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/ChangeLog.txt eiskaltdcpp-2.2.10+583+g17a6b034/ChangeLog.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/ChangeLog.txt 2019-02-17 19:01:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/ChangeLog.txt 2019-05-06 22:23:37.000000000 +0000 @@ -1,17 +1,55 @@ --- 2.4.0 2019-xx-xx --- *** common changes *** * Added support of OpenSSL >= 1.1. +* Stop support of boost < 1.48.0. +* Huge amount of improvements for macOS. +* Huge amount of improvements for Haiku. +* Added official support of Debian GNU/Hurd. +* Updated list of hub list servers (with most popular public hubs). +* Removed Coral CDN support, since it's stopped running. +* Enable DHT by default. (Affects only new users.) In case you need you may + change this option at any time in Preferences dialog: + Connection --> Advanced --> Enable DHT. +* Added dht.fly-server.ru server to list of servers for bootstrapping of + initial list of available DHT nodes. +* Delete configuration option DO_NOT_USE_MUTEX: this workaround is not required + anymore with modern versions of compilers for MS Windows and Haiku. But part + of this code is still used for macOS. +* Delete configuration option LOCAL_MINIUPNP. +* Delete embedded copy of miniupnpc library: it was extremely outdated and in + any case system library is used now in builds for all supported systems. +* Stop support of miniupnpc versions older than 1.7. +* Serious code refactoring: + — improved program stability and performance + — decreased usage of boost: all possible is rewritten in C++14 + — use C++14 features where it is possible + — fixed static code analyzers (cppcheck, clang) notes +*** libeiskaltdcpp *** +* Partially sync with DC++ 0.868 core in non-critical sections. The diff is + still huge, but it was noticeably reduced. +* Add support of protocol negotiation via ALPN. + https://forum.dcbase.org/viewtopic.php?f=55&p=4021 *** eiskaltdcpp-qt *** * Fixed Quit action in builds with Qt 5.x. With Qt 4.x all worked fine. * Added configuration option: USE_PROGRESS_BARS. This option is especially important for macOS where progress bars do not allow to show text on them so - a lot of information is hidden from user. + a lot of information was hidden from users. +* Support relative paths for resources on Linux. This is necessary for correct + work of program packaged in snap, flatpak, AppImage, etc.. +* Update list of fake client tags in Favorite Hub settings. +* Improve support of nmdcs:// hubs. *** eiskaltdcpp-gtk *** -* GTK+ UI is not supported anymore. Use it at own risk. As far as we know - builds with GTK+ 3.x are almost unusable, but builds with GTK+ 2.x work - more or less fine. +* Fixed few bugs. +* Improve support of nmdcs:// hubs. +* GTK+ UI is still supported but with extremely low priority and we are going + to stop its support in one of future versions. Consider using of Qt UI even + in GTK+ based Desktop Environments. + +--- 2.3.0 2018-xx-xx --- +* This release was skipped due to problems with versions scheme. --- 2.2.10 2015-04-20 --- +* This is not a real release but just git tag. *** common changes *** * GCC < 4.6 and Clang < 3.1 are not supported anymore. * Added option (ShareSkipZeroByte) for skipping zero sized files from share. diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/cmake/CMakeLists.txt eiskaltdcpp-2.2.10+583+g17a6b034/cmake/CMakeLists.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/cmake/CMakeLists.txt 2018-08-24 17:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/cmake/CMakeLists.txt 2019-05-06 22:23:37.000000000 +0000 @@ -37,7 +37,7 @@ endmacro(GET_RELATIVE_SOURCES) -get_absolute_sources(abs_dcpp_sources "${DCPP_SRCS};${DCPP_HDRS}") +get_absolute_sources(abs_dcpp_sources "${DCPP_SRCS};${DCPP_HDRS};${DHT_SRCS}") get_relative_sources(rel_dcpp_sources "${dcpp_SOURCE_DIR}/po" "${abs_dcpp_sources}") file(MAKE_DIRECTORY "${dcpp_BINARY_DIR}/po") set(dcpp_files_from "${dcpp_BINARY_DIR}/po/libeiskaltdcpp_srcs.txt") diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/CMakeLists.txt eiskaltdcpp-2.2.10+583+g17a6b034/CMakeLists.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/CMakeLists.txt 2019-02-17 19:01:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/CMakeLists.txt 2019-05-06 22:23:37.000000000 +0000 @@ -1,16 +1,16 @@ project (eiskaltdcpp) cmake_minimum_required (VERSION 2.6.3) -if (APPLE) - set (PROJECT_NAME_GLOBAL EiskaltDC++) -else (APPLE) - set (PROJECT_NAME_GLOBAL eiskaltdcpp) -endif (APPLE) - set (PROJECT_NAME "EiskaltDC++") set (VERSION "2.3.0-devel") set (SOVERSION "2.4" ) +if (WIN32 OR APPLE OR HAIKU) + set (PROJECT_NAME_GLOBAL "EiskaltDC++") +else () + set (PROJECT_NAME_GLOBAL "eiskaltdcpp") +endif () + include (CheckIncludeFile) include (CheckIncludeFiles) include (CheckFunctionExists) @@ -47,7 +47,6 @@ option (WITH_DHT "DHT support for libeiskaltdcpp" ON) option (LUA_SCRIPT "Lua script" ON) option (USE_MINIUPNP "Use miniupnpc for forward ports" ON) -option (LOCAL_MINIUPNP "Use local miniupnpc" OFF) option (USE_ASPELL "Use aspell for spellchecking" ON) option (LOCAL_ASPELL_DATA "Use local aspell data files" OFF) option (FORCE_XDG "Respect freedesktop.org standards" ON) @@ -61,7 +60,7 @@ option (WITH_SOUNDS "Install sound files" ON) option (WITH_DEV_FILES "Install development files (headers for libeiskaltdcpp)" OFF) option (DBUS_NOTIFY "QtDbus support in Qt interface" ON) -option (USE_JS "QtScript support in Qt interface") +option (USE_JS "QtScript support in Qt interface" OFF) option (XMLRPC_DAEMON "Make daemon as xmlrpc server" OFF) option (PERL_REGEX "Use pcre lib for regex in perl style" ON) option (ENABLE_STACKTRACE "Show stacktrace when program receive SIGSEGV" OFF) @@ -74,14 +73,13 @@ option (USE_LIBCANBERRA "Use LibCanberra in GTK+ interface (sound notification)" OFF) option (INSTALL_RUNTIME_PATH "Install rpath" OFF) option (USE_GOLD "Use ld.gold instead ld.bfd" OFF) -option (DO_NOT_USE_MUTEX "Do not use mutex (necessary for Haiku and WINE)" OFF) option (LOCAL_JSONCPP "Use local JsonCpp" ON) option (LOCAL_BOOST "Use local boost headers" OFF) option (OPENSSL_MSVC "Use MSVC build openssl (only for Windows)" OFF) -option (STATIC "Static build (only for Windows)" OFF) -if (WIN32 OR HAIKU OR APPLE) - add_definitions ( -DDO_NOT_USE_MUTEX ) +if (WIN32) + option (STATIC "Static build (only for Windows)" OFF) + option (INSTALL_DEPENDENCIES "Install all necessary libraries and plugins (only for Windows)" OFF) endif () if (USE_QT OR USE_QT5 OR USE_GTK OR USE_GTK3) @@ -109,25 +107,18 @@ unset (LUA_LIBRARIES CACHE) unset (LUA_VERSION_STRING CACHE) message (STATUS "Building without Lua scripts support") -endif(LUA_SCRIPT) +endif (LUA_SCRIPT) if (USE_MINIUPNP) - message (STATUS "Building with UPNP support (miniupnpc)") + message (STATUS "Building with UPnP support (miniupnpc)") set (MINIUPNP_INCLUDE_DIR) set (MINIUPNP_LIBRARY) - if (LOCAL_MINIUPNP) - add_subdirectory (upnp) - set (MINIUPNP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/upnp") - set (MINIUPNP_LIBRARY "miniupnpc") - else (LOCAL_MINIUPNP) find_package (Miniupnpc REQUIRED) - endif (LOCAL_MINIUPNP) - -elseif (NOT USE_MINIUPNP) +else (USE_MINIUPNP) unset (MINIUPNP_INCLUDE_DIR CACHE) unset (MINIUPNP_LIBRARY CACHE) - message (STATUS "Building without UPNP support (miniupnpc)") -endif(USE_MINIUPNP) + message (STATUS "Building without UPnP support (miniupnpc)") +endif (USE_MINIUPNP) if (USE_QT OR USE_QT5) if (USE_PROGRESS_BARS) @@ -135,7 +126,7 @@ else (USE_PROGRESS_BARS) message (STATUS "Building with Qt UI with plain text labels instead of progress bars") endif (USE_PROGRESS_BARS) -endif() +endif () if (FREE_SPACE_BAR_C) message (STATUS "Building with free space indicator") @@ -167,15 +158,9 @@ file (REMOVE_RECURSE "${PROJECT_SOURCE_DIR}/boost") endif (BOOST_DIR_EXISTS) find_package (Boost REQUIRED) - if (Boost_VERSION VERSION_LESS 104200) - add_definitions(-DTIMER_OLD_BOOST) - endif() if (Boost_VERSION VERSION_GREATER 105000) find_package(Boost COMPONENTS system REQUIRED) endif() - if (Boost_VERSION VERSION_LESS 105300 AND WIN32) - add_definitions(-DFIX_FOR_OLD_BOOST) - endif() endif(LOCAL_BOOST) if (USE_ASPELL AND LOCAL_ASPELL_DATA) @@ -220,32 +205,38 @@ if (NOT SHARE_DIR) if (WIN32) set (SHARE_DIR "resources") - else (WIN32) + else () set (SHARE_DIR "share") - endif (WIN32) + endif () endif (NOT SHARE_DIR) if (APPLE) - set (CLIENT_DATA_DIR "${PROJECT_NAME_GLOBAL}.app") -elseif (WIN32 OR HAIKU) + set (CLIENT_DATA_DIR "${PROJECT_NAME_GLOBAL}.app/Contents/Resources/") + set (CLIENT_DOCS_DIR "${CLIENT_DATA_DIR}/docs") +elseif (WIN32) set (CLIENT_DATA_DIR "${SHARE_DIR}") -else (APPLE) + set (CLIENT_DOCS_DIR "docs") +elseif (HAIKU) + set (CLIENT_DATA_DIR ".") + set (CLIENT_DOCS_DIR "docs") +else () set (CLIENT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${SHARE_DIR}/${PROJECT_NAME_GLOBAL}") -endif (APPLE) + set (CLIENT_DOCS_DIR "${CLIENT_DATA_DIR}/docs") +endif () if (APPLE) - set (LOCALE_DIR "${PROJECT_NAME_GLOBAL}.app/locale") -elseif (WIN32 OR HAIKU) + set (LOCALE_DIR "${CLIENT_DATA_DIR}/locale") +elseif (WIN32) set (LOCALE_DIR "${SHARE_DIR}/locale") -else (APPLE) +elseif (HAIKU) + set (LOCALE_DIR "locale") +else () set (LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/${SHARE_DIR}/locale") -endif (APPLE) +endif () -if (APPLE) - set (MAN_DIR "${PROJECT_NAME_GLOBAL}.app/man/man1") -else (APPLE) +if (UNIX) set (MAN_DIR "${SHARE_DIR}/man/man1") -endif (APPLE) +endif (UNIX) message (STATUS "Data directory: ${CLIENT_DATA_DIR}") @@ -267,17 +258,18 @@ configure_file (${PROJECT_SOURCE_DIR}/Version.h.in ${PROJECT_BINARY_DIR}/VersionGlobal.h) -if (DO_NOT_USE_MUTEX) - add_definitions ( -DDO_NOT_USE_MUTEX ) -endif () - if (UNIX) add_definitions (-D_GNU_SOURCE) find_program (GZIP_CMD gzip) mark_as_advanced (GZIP_CMD) endif (UNIX) -set (CLIENT_TRANSLATIONS_DEST "${CLIENT_DATA_DIR}/qt/ts") +if (WIN32 OR APPLE OR HAIKU) + set (CLIENT_TRANSLATIONS_DEST "${CLIENT_DATA_DIR}/translations") +else () + set (CLIENT_TRANSLATIONS_DEST "${CLIENT_DATA_DIR}/qt/translations") +endif () + set (CLIENT_SOUNDS_DEST "${CLIENT_DATA_DIR}/sounds") set (CLIENT_ICONS_DEST "${CLIENT_DATA_DIR}/icons") @@ -292,7 +284,7 @@ endif(DEBUG) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pipe -Wformat -Werror=format-security -fpermissive") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pipe -Wformat -Werror=format-security") if (USE_GOLD) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-linker-plugin") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-linker-plugin") @@ -389,6 +381,10 @@ add_subdirectory (eiskaltdcpp-cli) endif () +if (WIN32 AND INSTALL_DEPENDENCIES) + include(${PROJECT_SOURCE_DIR}/windows/install-deps.cmake) +endif () + if (GETTEXT_FOUND) option (UPDATE_PO "Update po files" OFF) option (CREATE_MO "Create mo files" ON) diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/data/CMakeLists.txt eiskaltdcpp-2.2.10+583+g17a6b034/data/CMakeLists.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/data/CMakeLists.txt 2018-09-05 01:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/data/CMakeLists.txt 2019-05-01 11:00:26.000000000 +0000 @@ -20,30 +20,33 @@ install (DIRECTORY emoticons/ DESTINATION ${CLIENT_DATA_DIR}/emoticons) endif (WITH_EMOTICONS) -if (NOT HAIKU) - if (UNIX AND NOT APPLE) - set (CLIENT_ICONS_DEST1 ${SHARE_DIR}/icons) - else (UNIX AND NOT APPLE) - set (CLIENT_ICONS_DEST1 ${CLIENT_ICONS_DEST}) - endif (UNIX AND NOT APPLE) -endif (NOT HAIKU) + if (NOT HAIKU) + if (UNIX AND NOT APPLE) + set (CLIENT_ICONS_DEST1 ${SHARE_DIR}/icons) + else (UNIX AND NOT APPLE) + set (CLIENT_ICONS_DEST1 ${CLIENT_ICONS_DEST}) + endif (UNIX AND NOT APPLE) + endif (NOT HAIKU) -list(APPEND iconsize 16 22 24 32 48 64 128) -foreach (isize ${iconsize}) - if (NOT HAIKU AND NOT APPLE) - install (FILES icons/icon_${isize}x${isize}.png DESTINATION ${CLIENT_ICONS_DEST1}/hicolor/${isize}x${isize}/apps RENAME eiskaltdcpp.png) - endif (NOT HAIKU AND NOT APPLE) -endforeach (isize) -if (APPLE) - install (FILES icons/icon_128x128.png DESTINATION ${PROJECT_NAME_GLOBAL}.app/pixmaps/ RENAME eiskaltdcpp.png) -else (APPLE) - if (NOT HAIKU) - install (FILES icons/icon_128x128.png DESTINATION ${SHARE_DIR}/pixmaps/ RENAME eiskaltdcpp.png) - endif (NOT HAIKU) -endif (APPLE) + if (UNIX AND NOT APPLE AND NOT HAIKU) + list(APPEND iconsize 16 22 24 32 48 64 128) + foreach (isize ${iconsize}) + install (FILES icons/icon_${isize}x${isize}.png DESTINATION ${CLIENT_ICONS_DEST1}/hicolor/${isize}x${isize}/apps RENAME eiskaltdcpp.png) + endforeach (isize) + endif (UNIX AND NOT APPLE AND NOT HAIKU) + + if (UNIX AND NOT APPLE AND NOT HAIKU) + install (FILES icons/icon_128x128.png DESTINATION ${SHARE_DIR}/pixmaps/ RENAME eiskaltdcpp.png) + endif () endif (USE_QT OR USE_QT5 OR USE_GTK OR USE_GTK3) if (USE_ASPELL AND LOCAL_ASPELL_DATA) install (DIRECTORY aspell/ DESTINATION ${CLIENT_DATA_DIR}/aspell) -endif (USE_ASPELL AND LOCAL_ASPELL_DATA) +elseif (USE_ASPELL AND NOT LOCAL_ASPELL_DATA) + if (WIN32) + install (FILES ${CMAKE_SOURCE_DIR}/windows/Readme.aspell.txt DESTINATION "${CLIENT_DOCS_DIR}") + elseif (APPLE) + install (FILES ${CMAKE_SOURCE_DIR}/macos/Readme.aspell.txt DESTINATION "${CLIENT_DOCS_DIR}") + endif () +endif () diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcCommand.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcCommand.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcCommand.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcCommand.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -92,30 +91,30 @@ break; case ' ': // New parameter... - { - if((type == TYPE_BROADCAST || type == TYPE_DIRECT || type == TYPE_ECHO || type == TYPE_FEATURE) && !fromSet) { - if(cur.length() != 4) { - throw ParseException("Invalid SID length"); - } - from = toSID(cur); - fromSet = true; - } else if((type == TYPE_DIRECT || type == TYPE_ECHO) && !toSet) { - if(cur.length() != 4) { - throw ParseException("Invalid SID length"); - } - to = toSID(cur); - toSet = true; - } else if(type == TYPE_FEATURE && !featureSet) { - if(cur.length() % 5 != 0) { - throw ParseException("Invalid feature length"); - } - // Skip... - featureSet = true; - } else { - parameters.push_back(cur); + { + if((type == TYPE_BROADCAST || type == TYPE_DIRECT || type == TYPE_ECHO || type == TYPE_FEATURE) && !fromSet) { + if(cur.length() != 4) { + throw ParseException("Invalid SID length"); + } + from = toSID(cur); + fromSet = true; + } else if((type == TYPE_DIRECT || type == TYPE_ECHO) && !toSet) { + if(cur.length() != 4) { + throw ParseException("Invalid SID length"); } - cur.clear(); + to = toSID(cur); + toSet = true; + } else if(type == TYPE_FEATURE && !featureSet) { + if(cur.length() % 5 != 0) { + throw ParseException("Invalid feature length"); + } + // Skip... + featureSet = true; + } else { + parameters.push_back(cur); } + cur.clear(); + } break; default: cur += buf[i]; @@ -175,9 +174,9 @@ tmp.insert(i, "\\"); } else { switch(tmp[i]) { - case ' ': tmp.replace(i, 1, "\\s"); break; - case '\n': tmp.replace(i, 1, "\\n"); break; - case '\\': tmp.replace(i, 1, "\\\\"); break; + case ' ': tmp.replace(i, 1, "\\s"); break; + case '\n': tmp.replace(i, 1, "\\n"); break; + case '\\': tmp.replace(i, 1, "\\\\"); break; } } i+=2; @@ -225,9 +224,9 @@ string AdcCommand::getParamString(bool nmdc) const { string tmp; - for(auto i = getParameters().begin(); i != getParameters().end(); ++i) { + for(auto& i: getParameters()) { tmp += ' '; - tmp += escape(*i, nmdc); + tmp += escape(i, nmdc); } if(nmdc) { tmp += '|'; @@ -254,8 +253,8 @@ bool AdcCommand::hasFlag(const char* name, size_t start) const { for(auto i = start; i < getParameters().size(); ++i) { if(toCode(name) == toCode(getParameters()[i].c_str()) && - getParameters()[i].size() == 3 && - getParameters()[i][2] == '1') + getParameters()[i].size() == 3 && + getParameters()[i][2] == '1') { return true; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcCommand.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcCommand.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcCommand.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcCommand.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,21 +13,22 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "typedefs.h" +#include + +#include "forward.h" #include "Exception.h" -#include "Util.h" +#include "typedefs.h" namespace dcpp { -STANDARD_EXCEPTION(ParseException); +using std::string; -class CID; +STANDARD_EXCEPTION(ParseException); class AdcCommand { public: @@ -55,7 +57,7 @@ ERROR_PROTOCOL_GENERIC = 40, ERROR_PROTOCOL_UNSUPPORTED = 41, ERROR_CONNECT_FAILED = 42, - ERROR_INF_MISSING = 43, + ERROR_INF_FIELD = 43, ERROR_BAD_STATE = 44, ERROR_FEATURE_MISSING = 45, ERROR_BAD_IP = 46, @@ -180,33 +182,38 @@ template class CommandHandler { public: - void dispatch(const string& aLine, bool nmdc = false) { + inline void dispatch(const string& aLine) noexcept { + dispatch(aLine, false); + } + + template + void dispatch(const string& aLine, bool nmdc, ArgT&&... args) noexcept { try { AdcCommand c(aLine, nmdc); -#define C(n) case AdcCommand::CMD_##n: ((T*)this)->handle(AdcCommand::n(), c); break; +#define C(n) case AdcCommand::CMD_##n: ((T*)this)->handle(AdcCommand::n(), c, std::forward(args)...); break; switch(c.getCommand()) { - C(SUP); - C(STA); - C(INF); - C(MSG); - C(SCH); - C(RES); - C(CTM); - C(RCM); - C(GPA); - C(PAS); - C(QUI); - C(GET); - C(GFI); - C(SND); - C(SID); - C(CMD); - C(PSR); - C(NAT); - C(RNT); - C(ZON); - C(ZOF); + C(SUP); + C(STA); + C(INF); + C(MSG); + C(SCH); + C(RES); + C(CTM); + C(RCM); + C(GPA); + C(PAS); + C(QUI); + C(GET); + C(GFI); + C(SND); + C(SID); + C(CMD); + C(PSR); + C(NAT); + C(RNT); + C(ZON); + C(ZOF); default: dcdebug("Unknown ADC command: %.50s\n", aLine.c_str()); break; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcHub.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcHub.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcHub.cpp 2019-02-15 21:07:09.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcHub.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,30 +13,27 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "AdcHub.h" -#include - +#include "AdcCommand.h" #include "ChatMessage.h" #include "ClientManager.h" -#include "ShareManager.h" -#include "StringTokenizer.h" -#include "AdcCommand.h" #include "ConnectionManager.h" -#include "version.h" -#include "Util.h" -#include "UserCommand.h" +#include "ConnectivityManager.h" #include "CryptoManager.h" +#include "format.h" #include "LogManager.h" +#include "ShareManager.h" +#include "StringTokenizer.h" #include "ThrottleManager.h" #include "UploadManager.h" -#include "format.h" +#include "UserCommand.h" +#include "Util.h" +#include "version.h" #include @@ -62,7 +60,8 @@ const vector AdcHub::searchExts; -AdcHub::AdcHub(const string& aHubURL, bool secure) : Client(aHubURL, '\n', secure), oldPassword(false), sid(0) { +AdcHub::AdcHub(const string& aHubURL, bool secure) : + Client(aHubURL, '\n', secure, Socket::PROTO_ADC), oldPassword(false), sid(0) { TimerManager::getInstance()->addListener(this); } @@ -81,7 +80,7 @@ { Lock l(cs); - ou = users.insert(make_pair(aSID, new OnlineUser(p, *this, aSID))).first->second; + ou = users.emplace(aSID, new OnlineUser(p, *this, aSID)).first->second; } if(aSID != AdcCommand::HUB_SID) @@ -97,16 +96,16 @@ OnlineUser* AdcHub::findUser(const CID& aCID) const { Lock l(cs); - for(auto i = users.begin(); i != users.end(); ++i) { - if(i->second->getUser()->getCID() == aCID) { - return i->second; + for(auto& i: users) { + if(i.second->getUser()->getCID() == aCID) { + return i.second; } } return 0; } void AdcHub::putUser(const uint32_t aSID, bool disconnect) { - OnlineUser* ou = 0; + OnlineUser* ou = nullptr; { Lock l(cs); auto i = users.find(aSID); @@ -124,16 +123,16 @@ } void AdcHub::clearUsers() { - SIDMap tmp; + decltype(users) tmp; { Lock l(cs); users.swap(tmp); } - for(auto i = tmp.begin(); i != tmp.end(); ++i) { - if(i->first != AdcCommand::HUB_SID) - ClientManager::getInstance()->putOffline(i->second); - delete i->second; + for(auto& i: tmp) { + if(i.first != AdcCommand::HUB_SID) + ClientManager::getInstance()->putOffline(i.second); + delete i.second; } } @@ -154,8 +153,8 @@ nick = "[nick unknown]"; } fire(ClientListener::StatusMessage(), this, str(F_("%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring") - % u->getIdentity().getNick() % u->getIdentity().getSIDString() % cid % nick % AdcCommand::fromSID(c.getFrom())), - ClientListener::FLAG_IS_SPAM); + % u->getIdentity().getNick() % u->getIdentity().getSIDString() % cid % nick % AdcCommand::fromSID(c.getFrom())), + ClientListener::FLAG_IS_SPAM); return; } } else { @@ -172,11 +171,11 @@ return; } - for(auto i = c.getParameters().begin(); i != c.getParameters().end(); ++i) { - if(i->length() < 2) + for(auto& i: c.getParameters()) { + if(i.length() < 2) continue; - u->getIdentity().set(i->c_str(), i->substr(2)); + u->getIdentity().set(i.c_str(), i.substr(2)); } if(u->getIdentity().isBot()) { @@ -204,7 +203,7 @@ setHubIdentity(u->getIdentity()); fire(ClientListener::HubUpdated(), this); } else { - fire(ClientListener::UserUpdated(), this, *u); + updated(*u); } } @@ -213,13 +212,13 @@ return; bool baseOk = false; bool tigrOk = false; - for(auto i = c.getParameters().begin(); i != c.getParameters().end(); ++i) { - if(*i == BAS0_SUPPORT) { + for(auto& i: c.getParameters()) { + if(i == BAS0_SUPPORT) { baseOk = true; tigrOk = true; - } else if(*i == BASE_SUPPORT) { + } else if(i == BASE_SUPPORT) { baseOk = true; - } else if(*i == TIGR_SUPPORT) { + } else if(i == TIGR_SUPPORT) { tigrOk = true; } } @@ -254,28 +253,28 @@ if(c.getParameters().empty()) return; - ChatMessage message = { c.getParam(0), findUser(c.getFrom()) }; + ChatMessage message = { c.getParam(0), findUser(c.getFrom()), nullptr, nullptr, false, 0 }; - if(!message.from) - return; + if(!message.from) + return; - string temp; - if(c.getParam("PM", 1, temp)) { // add PM as well - message.to = findUser(c.getTo()); - if(!message.to) - return; + string temp; + if(c.getParam("PM", 1, temp)) { // add PM as well + message.to = findUser(c.getTo()); + if(!message.to) + return; - message.replyTo = findUser(AdcCommand::toSID(temp)); - if(!message.replyTo) - return; - } + message.replyTo = findUser(AdcCommand::toSID(temp)); + if(!message.replyTo) + return; + } - message.thirdPerson = c.hasFlag("ME", 1); + message.thirdPerson = c.hasFlag("ME", 1); - if(c.getParam("TS", 1, temp)) - message.timestamp = Util::toInt64(temp); + if(c.getParam("TS", 1, temp)) + message.timestamp = Util::toInt64(temp); - fire(ClientListener::Message(), this, message); + fire(ClientListener::Message(), this, message); } void AdcHub::handle(AdcCommand::GPA, AdcCommand& c) noexcept { @@ -291,32 +290,32 @@ uint32_t s = AdcCommand::toSID(c.getParam(0)); OnlineUser* victim = findUser(s); - if(victim) { + if(victim) { - string tmp; - if(c.getParam("MS", 1, tmp)) { - OnlineUser* source = 0; - string tmp2; - if(c.getParam("ID", 1, tmp2)) { - source = findUser(AdcCommand::toSID(tmp2)); - } + string tmp; + if(c.getParam("MS", 1, tmp)) { + OnlineUser* source = 0; + string tmp2; + if(c.getParam("ID", 1, tmp2)) { + source = findUser(AdcCommand::toSID(tmp2)); + } - if(source) { - tmp = str(F_("%1% was kicked by %2%: %3%") % victim->getIdentity().getNick() % - source->getIdentity().getNick() % tmp); - } else { - tmp = str(F_("%1% was kicked: %2%") % victim->getIdentity().getNick() % tmp); + if(source) { + tmp = str(F_("%1% was kicked by %2%: %3%") % victim->getIdentity().getNick() % + source->getIdentity().getNick() % tmp); + } else { + tmp = str(F_("%1% was kicked: %2%") % victim->getIdentity().getNick() % tmp); + } + fire(ClientListener::StatusMessage(), this, tmp, ClientListener::FLAG_IS_SPAM); } - fire(ClientListener::StatusMessage(), this, tmp, ClientListener::FLAG_IS_SPAM); - } - putUser(s, c.getParam("DI", 1, tmp)); - } + putUser(s, c.getParam("DI", 1, tmp)); + } if(s == sid) { - // this QUI is directed to us + // this QUI is directed to us - string tmp; + string tmp; if(c.getParam("TL", 1, tmp)) { if(tmp == "-1") { setAutoReconnect(false); @@ -325,9 +324,9 @@ setReconnDelay(Util::toUInt32(tmp)); } } - if(!victim && c.getParam("MS", 1, tmp)) { - fire(ClientListener::StatusMessage(), this, tmp, ClientListener::FLAG_NORMAL); - } + if(!victim && c.getParam("MS", 1, tmp)) { + fire(ClientListener::StatusMessage(), this, tmp, ClientListener::FLAG_NORMAL); + } if(c.getParam("RD", 1, tmp)) { fire(ClientListener::Redirect(), this, tmp); } @@ -335,18 +334,19 @@ } void AdcHub::handle(AdcCommand::CTM, AdcCommand& c) noexcept { + if(c.getParameters().size() < 3) + return; + OnlineUser* u = findUser(c.getFrom()); if(!u || u->getUser() == ClientManager::getInstance()->getMe()) return; - if(c.getParameters().size() < 3) - return; const string& protocol = c.getParam(0); const string& port = c.getParam(1); const string& token = c.getParam(2); bool secure = false; - if(protocol == CLIENT_PROTOCOL) { + if(protocol == CLIENT_PROTOCOL && !SETTING(REQUIRE_TLS)) { // Nothing special } else if(protocol == SECURE_CLIENT_PROTOCOL_TEST && CryptoManager::getInstance()->TLSOk()) { secure = true; @@ -360,7 +360,7 @@ return; } - ConnectionManager::getInstance()->adcConnect(*u, static_cast(Util::toInt(port)), token, secure); + ConnectionManager::getInstance()->adcConnect(*u, port, token, secure); } void AdcHub::handle(AdcCommand::RCM, AdcCommand& c) noexcept { @@ -376,7 +376,7 @@ const string& token = c.getParam(1); bool secure; - if(protocol == CLIENT_PROTOCOL) { + if(protocol == CLIENT_PROTOCOL && !SETTING(REQUIRE_TLS)) { secure = false; } else if(protocol == SECURE_CLIENT_PROTOCOL_TEST && CryptoManager::getInstance()->TLSOk()) { secure = true; @@ -385,20 +385,20 @@ return; } - if(isActive()) { - connect(*u, token, secure); - return; - } + if(isActive()) { + connect(*u, token, secure); + return; + } if (!u->getIdentity().supports(NAT0_FEATURE) && !BOOLSETTING(ALLOW_NATT)) - return; + return; - // Attempt to traverse NATs and/or firewalls with TCP. - // If they respond with their own, symmetric, RNT command, both - // clients call ConnectionManager::adcConnect. - send(AdcCommand(AdcCommand::CMD_NAT, u->getIdentity().getSID(), AdcCommand::TYPE_DIRECT). - addParam(protocol).addParam(Util::toString(sock->getLocalPort())).addParam(token)); - return; + // Attempt to traverse NATs and/or firewalls with TCP. + // If they respond with their own, symmetric, RNT command, both + // clients call ConnectionManager::adcConnect. + send(AdcCommand(AdcCommand::CMD_NAT, u->getIdentity().getSID(), AdcCommand::TYPE_DIRECT). + addParam(protocol).addParam(sock->getLocalPort()).addParam(token)); + return; } void AdcHub::handle(AdcCommand::CMD, AdcCommand& c) noexcept { @@ -431,7 +431,7 @@ void AdcHub::sendUDP(const AdcCommand& cmd) noexcept { string command; string ip; - uint16_t port; + string port; { Lock l(cs); auto i = users.find(cmd.getTo()); @@ -444,7 +444,7 @@ return; } ip = ou.getIdentity().getIp(); - port = static_cast(Util::toInt(ou.getIdentity().getUdpPort())); + port = ou.getIdentity().getUdpPort(); command = cmd.toString(ou.getUser()->getCID()); } try { @@ -471,36 +471,40 @@ switch(Util::toInt(c.getParam(0).substr(1))) { case AdcCommand::ERROR_BAD_PASSWORD: - { - setPassword(Util::emptyString); - break; - } + { + if(c.getType() == AdcCommand::TYPE_INFO) { + setPassword(Util::emptyString); + } + break; + } case AdcCommand::ERROR_COMMAND_ACCESS: - { - string tmp; - if(c.getParam("FC", 1, tmp) && tmp.size() == 4) - forbiddenCommands.insert(AdcCommand::toFourCC(tmp.c_str())); - break; - } + { + if(c.getType() == AdcCommand::TYPE_INFO) { + string tmp; + if(c.getParam("FC", 1, tmp) && tmp.size() == 4) + forbiddenCommands.insert(AdcCommand::toFourCC(tmp.c_str())); + } + break; + } case AdcCommand::ERROR_PROTOCOL_UNSUPPORTED: - { - string tmp; - if(c.getParam("PR", 1, tmp)) { - if(tmp == CLIENT_PROTOCOL) { - u->getUser()->setFlag(User::NO_ADC_1_0_PROTOCOL); - } else if(tmp == SECURE_CLIENT_PROTOCOL_TEST) { - u->getUser()->setFlag(User::NO_ADCS_0_10_PROTOCOL); - u->getUser()->unsetFlag(User::TLS); - } - // Try again... - ConnectionManager::getInstance()->force(u->getUser()); - } - return; + { + string tmp; + if(c.getParam("PR", 1, tmp)) { + if(tmp == CLIENT_PROTOCOL) { + u->getUser()->setFlag(User::NO_ADC_1_0_PROTOCOL); + } else if(tmp == SECURE_CLIENT_PROTOCOL_TEST) { + u->getUser()->setFlag(User::NO_ADCS_0_10_PROTOCOL); + u->getUser()->unsetFlag(User::TLS); } + // Try again... + ConnectionManager::getInstance()->force(u->getUser()); + } + return; } - ChatMessage message = { c.getParam(1), u }; + } + ChatMessage message = { c.getParam(1), u, nullptr, nullptr, false, 0 }; fire(ClientListener::Message(), this, message); } @@ -537,14 +541,14 @@ if(c.getParameters().size() > 0) { if(c.getParam(0) == "blom") { send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_PROTOCOL_GENERIC, - "Too few parameters for blom", AdcCommand::TYPE_HUB)); + "Too few parameters for blom", AdcCommand::TYPE_HUB)); } else { send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_TRANSFER_GENERIC, - "Unknown transfer type", AdcCommand::TYPE_HUB)); + "Unknown transfer type", AdcCommand::TYPE_HUB)); } } else { send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_PROTOCOL_GENERIC, - "Too few parameters for GET", AdcCommand::TYPE_HUB)); + "Too few parameters for GET", AdcCommand::TYPE_HUB)); } return; } @@ -590,11 +594,14 @@ } } void AdcHub::handle(AdcCommand::NAT, AdcCommand& c) noexcept { + if (c.getParameters().size() < 3) + return; + if (!BOOLSETTING(ALLOW_NATT)) return; OnlineUser* u = findUser(c.getFrom()); - if(!u || u->getUser() == ClientManager::getInstance()->getMe() || c.getParameters().size() < 3) + if(!u || u->getUser() == ClientManager::getInstance()->getMe()) return; const string& protocol = c.getParam(0); @@ -613,22 +620,25 @@ } // Trigger connection attempt sequence locally ... - dcdebug("triggering connecting attempt in NAT: remote port = %s, local IP = %s, local port = %d\n", port.c_str(), sock->getLocalIp().c_str(), sock->getLocalPort()); - ConnectionManager::getInstance()->adcConnect(*u, static_cast(Util::toInt(port)), sock->getLocalPort(), BufferedSocket::NAT_CLIENT, token, secure); + dcdebug("triggering connecting attempt in NAT: remote port = %s, local IP = %s, local port = %s\n", port.c_str(), sock->getLocalIp().c_str(), sock->getLocalPort().c_str()); + ConnectionManager::getInstance()->adcConnect(*u, port, sock->getLocalPort(), BufferedSocket::NAT_CLIENT, token, secure); // ... and signal other client to do likewise. send(AdcCommand(AdcCommand::CMD_RNT, u->getIdentity().getSID(), AdcCommand::TYPE_DIRECT).addParam(protocol). - addParam(Util::toString(sock->getLocalPort())).addParam(token)); + addParam(sock->getLocalPort()).addParam(token)); } void AdcHub::handle(AdcCommand::RNT, AdcCommand& c) noexcept { + if(c.getParameters().size() < 3) + return; + // Sent request for NAT traversal cooperation, which // was acknowledged (with requisite local port information). if(!BOOLSETTING(ALLOW_NATT)) return; OnlineUser* u = findUser(c.getFrom()); - if(!u || u->getUser() == ClientManager::getInstance()->getMe() || c.getParameters().size() < 3) + if(!u || u->getUser() == ClientManager::getInstance()->getMe()) return; const string& protocol = c.getParam(0); @@ -646,21 +656,26 @@ } // Trigger connection attempt sequence locally - dcdebug("triggering connecting attempt in RNT: remote port = %s, local IP = %s, local port = %d\n", port.c_str(), sock->getLocalIp().c_str(), sock->getLocalPort()); - ConnectionManager::getInstance()->adcConnect(*u, static_cast(Util::toInt(port)), sock->getLocalPort(), BufferedSocket::NAT_SERVER, token, secure); + dcdebug("triggering connecting attempt in RNT: remote port = %s, local IP = %s, local port = %s\n", port.c_str(), sock->getLocalIp().c_str(), sock->getLocalPort().c_str()); + ConnectionManager::getInstance()->adcConnect(*u, port, sock->getLocalPort(), BufferedSocket::NAT_SERVER, token, secure); } void AdcHub::handle(AdcCommand::ZON, AdcCommand& c) noexcept { - try { - sock->setMode(BufferedSocket::MODE_ZPIPE); - } catch (const Exception& e) { - dcdebug("AdcHub::handleZON failed with error: %s\n", e.getError().c_str()); + if(c.getType() == AdcCommand::TYPE_INFO) { + try { + sock->setMode(BufferedSocket::MODE_ZPIPE); + } catch (const Exception& e) { + dcdebug("AdcHub::handleZON failed with error: %s\n", e.getError().c_str()); + } } } + void AdcHub::handle(AdcCommand::ZOF, AdcCommand& c) noexcept { - try { - sock->setMode(BufferedSocket::MODE_LINE); - } catch (const Exception& e) { - dcdebug("AdcHub::handleZOF failed with error: %s\n", e.getError().c_str()); + if(c.getType() == AdcCommand::TYPE_INFO) { + try { + sock->setMode(BufferedSocket::MODE_LINE); + } catch (const Exception& e) { + dcdebug("AdcHub::handleZOF failed with error: %s\n", e.getError().c_str()); + } } } @@ -680,21 +695,21 @@ } proto = &SECURE_CLIENT_PROTOCOL_TEST; } else { - if(user.getUser()->isSet(User::NO_ADC_1_0_PROTOCOL)) { - /// @todo log + if(user.getUser()->isSet(User::NO_ADC_1_0_PROTOCOL) || SETTING(REQUIRE_TLS)) { + /// @todo log, consider removing from queue return; } proto = &CLIENT_PROTOCOL; } if(isActive()) { - uint16_t port = secure ? ConnectionManager::getInstance()->getSecurePort() : ConnectionManager::getInstance()->getPort(); - if(port == 0) { + const string port = secure ? ConnectionManager::getInstance()->getSecurePort() : ConnectionManager::getInstance()->getPort(); + if(port.empty()) { // Oops? - LogManager::getInstance()->message(str(F_("Not listening for connections - please restart %1%") % EISKALTDCPP_APPNAME)); + LogManager::getInstance()->message(str(F_("Not listening for connections - please restart %1%") % APPNAME)); return; } - send(AdcCommand(AdcCommand::CMD_CTM, user.getIdentity().getSID(), AdcCommand::TYPE_DIRECT).addParam(*proto).addParam(Util::toString(port)).addParam(token)); + send(AdcCommand(AdcCommand::CMD_CTM, user.getIdentity().getSID(), AdcCommand::TYPE_DIRECT).addParam(*proto).addParam(port).addParam(token)); } else { send(AdcCommand(AdcCommand::CMD_RCM, user.getIdentity().getSID(), AdcCommand::TYPE_DIRECT).addParam(*proto).addParam(token)); } @@ -731,9 +746,9 @@ } else { const string& to = command.getTo(); Lock l(cs); - for(auto i = users.begin(); i != users.end(); ++i) { - if(i->second->getIdentity().getNick() == to) { - privateMessage(*i->second, cmd); + for(auto& i: users) { + if(i.second->getIdentity().getNick() == to) { + privateMessage(*i.second, cmd); return; } } @@ -748,67 +763,17 @@ return searchExts; // the list is always immutable except for this function where it is initially being filled. - auto& xSearchExts = const_cast&>(searchExts); - - xSearchExts.resize(7); - - /// @todo simplify this as searchExts[0] = { "mp3", "etc" } when VC++ supports initializer lists - // these extensions *must* be sorted alphabetically! - - { - StringList& l = xSearchExts[0]; - l.push_back("ape"); l.push_back("flac"); l.push_back("m4a"); l.push_back("mid"); - l.push_back("mp3"); l.push_back("mpc"); l.push_back("ogg"); l.push_back("ra"); - l.push_back("wav"); l.push_back("wma"); - } + const_cast&>(searchExts) = { + // these extensions *must* be sorted alphabetically! + { "ape", "flac", "m4a", "mid", "mp3", "mpc", "ogg", "ra", "wav", "wma" }, + { "7z", "ace", "arj", "bz2", "gz", "lha", "lzh", "rar", "tar", "z", "zip" }, + { "doc", "docx", "htm", "html", "nfo", "odf", "odp", "ods", "odt", "pdf", "ppt", "pptx", "rtf", "txt", "xls", "xlsx", "xml", "xps" }, + { "app", "bat", "cmd", "com", "dll", "exe", "jar", "msi", "ps1", "vbs", "wsf" }, + { "bmp", "cdr", "eps", "gif", "ico", "img", "jpeg", "jpg", "png", "ps", "psd", "sfw", "tga", "tif", "webp" }, + { "3gp", "asf", "asx", "avi", "divx", "flv", "mkv", "mov", "mp4", "mpeg", "mpg", "ogm", "pxp", "qt", "rm", "rmvb", "swf", "vob", "webm", "wmv" }, + { "iso", "mdf", "mds", "nrg", "vcd", "bwt", "ccd", "cdi", "pdi", "cue", "isz", "img", "vc4" } +}; - { - StringList& l = xSearchExts[1]; - l.push_back("7z"); l.push_back("ace"); l.push_back("arj"); l.push_back("bz2"); - l.push_back("gz"); l.push_back("lha"); l.push_back("lzh"); l.push_back("rar"); - l.push_back("tar"); l.push_back("z"); l.push_back("zip"); - } - - { - StringList& l = xSearchExts[2]; - l.push_back("doc"); l.push_back("docx"); l.push_back("htm"); l.push_back("html"); - l.push_back("nfo"); l.push_back("odf"); l.push_back("odp"); l.push_back("ods"); - l.push_back("odt"); l.push_back("pdf"); l.push_back("ppt"); l.push_back("pptx"); - l.push_back("rtf"); l.push_back("txt"); l.push_back("xls"); l.push_back("xlsx"); - l.push_back("xml"); l.push_back("xps"); - } - - { - StringList& l = xSearchExts[3]; - l.push_back("app"); l.push_back("bat"); l.push_back("cmd"); l.push_back("com"); - l.push_back("dll"); l.push_back("exe"); l.push_back("jar"); l.push_back("msi"); - l.push_back("ps1"); l.push_back("vbs"); l.push_back("wsf"); - } - - { - StringList& l = xSearchExts[4]; - l.push_back("bmp"); l.push_back("cdr"); l.push_back("eps"); l.push_back("gif"); - l.push_back("ico"); l.push_back("img"); l.push_back("jpeg"); l.push_back("jpg"); - l.push_back("png"); l.push_back("ps"); l.push_back("psd"); l.push_back("sfw"); - l.push_back("tga"); l.push_back("tif"); l.push_back("webp"); - } - - { - StringList& l = xSearchExts[5]; - l.push_back("3gp"); l.push_back("asf"); l.push_back("asx"); l.push_back("avi"); - l.push_back("divx"); l.push_back("flv"); l.push_back("mkv"); l.push_back("mov"); - l.push_back("mp4"); l.push_back("mpeg"); l.push_back("mpg"); l.push_back("ogm"); - l.push_back("pxp"); l.push_back("qt"); l.push_back("rm"); l.push_back("rmvb"); - l.push_back("swf"); l.push_back("vob"); l.push_back("webm"); l.push_back("wmv"); - } - - { - StringList& l = xSearchExts[6]; - l.push_back("iso"); l.push_back("mdf"); l.push_back("mds"); l.push_back("nrg"); - l.push_back("vcd"); l.push_back("bwt"); l.push_back("ccd"); l.push_back("cdi"); - l.push_back("pdi"); l.push_back("cue"); l.push_back("isz"); l.push_back("img"); - l.push_back("vc4"); - } return searchExts; } @@ -841,8 +806,8 @@ c.addParam("LE", Util::toString(aSize)); } StringTokenizer st(aString, ' '); - for(auto i = st.getTokens().begin(); i != st.getTokens().end(); ++i) { - c.addParam("AN", *i); + for(auto& i: st.getTokens()) { + c.addParam("AN", i); } if(aFileType == SearchManager::TYPE_DIRECTORY) { c.addParam("TY", "2"); @@ -863,7 +828,7 @@ // gather the exts not present in any of the lists StringList temp(def.size() + exts.size()); temp = StringList(temp.begin(), set_symmetric_difference(def.begin(), def.end(), - exts.begin(), exts.end(), temp.begin())); + exts.begin(), exts.end(), temp.begin())); // figure out whether the remaining exts have to be added or removed from the set StringList rx_; @@ -901,14 +866,14 @@ c_gr.setFeatures('+' + SEGA_FEATURE); const auto& params = c.getParameters(); - for(auto i = params.cbegin(), iend = params.cend(); i != iend; ++i) - c_gr.addParam(*i); + for(auto& i: params) + c_gr.addParam(i); - for(auto i = exts.cbegin(), iend = exts.cend(); i != iend; ++i) - c_gr.addParam("EX", *i); + for(auto& i: exts) + c_gr.addParam("EX", i); c_gr.addParam("GR", Util::toString(gr)); - for(auto i = rx.cbegin(), iend = rx.cend(); i != iend; ++i) - c_gr.addParam("RX", *i); + for(auto& i: rx) + c_gr.addParam("RX", i); sendSearch(c_gr); @@ -918,8 +883,8 @@ } } - for(auto i = aExtList.cbegin(), iend = aExtList.cend(); i != iend; ++i) - c.addParam("EX", *i); + for(auto& i: aExtList) + c.addParam("EX", i); } sendSearch(c); @@ -946,7 +911,7 @@ return; if(!salt.empty()) { size_t saltBytes = salt.size() * 5 / 8; - boost::scoped_array buf(new uint8_t[saltBytes]); + std::unique_ptr buf(new uint8_t[saltBytes]); Encoder::fromBase32(salt.c_str(), &buf[0], saltBytes); TigerHash th; if(oldPassword) { @@ -973,7 +938,7 @@ c.addParam(var, value); } } else if(!value.empty()) { - lastInfoMap.insert(make_pair(var, value)); + lastInfoMap.emplace(var, value); c.addParam(var, value); } } @@ -986,8 +951,16 @@ AdcCommand c(AdcCommand::CMD_INF, AdcCommand::TYPE_BROADCAST); if (state == STATE_NORMAL) { - updateCounts(false); + updateCounts(false); + } + string app_name = string(APPNAME); + string app_version = string(VERSIONSTRING); + StringTokenizer st(getClientId(), ' '); + if(st.getTokens().size() == 2) { + app_name = st.getTokens().at(0); + app_version = st.getTokens().at(1); } + addParam(lastInfoMap, c, "ID", ClientManager::getInstance()->getMyCID().toBase32()); addParam(lastInfoMap, c, "PD", ClientManager::getInstance()->getMyPID().toBase32()); addParam(lastInfoMap, c, "NI", getCurrentNick()); @@ -1000,13 +973,14 @@ addParam(lastInfoMap, c, "HN", Util::toString(counts.normal)); addParam(lastInfoMap, c, "HR", Util::toString(counts.registered)); addParam(lastInfoMap, c, "HO", Util::toString(counts.op)); - addParam(lastInfoMap, c, "VE", getClientId().c_str()); + addParam(lastInfoMap, c, "AP", app_name); + addParam(lastInfoMap, c, "VE", app_version); addParam(lastInfoMap, c, "AW", Util::getAway() ? "1" : Util::emptyString); int limit = ThrottleManager::getInstance()->getDownLimit(); if (limit > 0 && BOOLSETTING(THROTTLE_ENABLE)) { addParam(lastInfoMap, c, "DS", Util::toString(limit * 1024)); } else { - addParam(lastInfoMap, c, "DS", Util::emptyString); + addParam(lastInfoMap, c, "DS", Util::emptyString); } limit = ThrottleManager::getInstance()->getUpLimit(); if (limit > 0 && BOOLSETTING(THROTTLE_ENABLE)) { @@ -1024,23 +998,23 @@ if (!getFavIp().empty()) { addParam(lastInfoMap, c, "I4", getFavIp()); - } else if(BOOLSETTING(NO_IP_OVERRIDE) && !SETTING(EXTERNAL_IP).empty()) { - addParam(lastInfoMap, c, "I4", Socket::resolve(SETTING(EXTERNAL_IP))); - } else { - addParam(lastInfoMap, c, "I4", "0.0.0.0"); - } - - if(isActive()) { - addParam(lastInfoMap, c, "U4", Util::toString(SearchManager::getInstance()->getPort())); - su += "," + TCP4_FEATURE; - su += "," + UDP4_FEATURE; - } else { + } else if(BOOLSETTING(NO_IP_OVERRIDE) && !SETTING(EXTERNAL_IP).empty()) { + addParam(lastInfoMap, c, "I4", Socket::resolve(SETTING(EXTERNAL_IP))); + } else { + addParam(lastInfoMap, c, "I4", "0.0.0.0"); + } + + if(isActive()) { + addParam(lastInfoMap, c, "U4", SearchManager::getInstance()->getPort()); + su += "," + TCP4_FEATURE; + su += "," + UDP4_FEATURE; + } else { if (BOOLSETTING(ALLOW_NATT)) su += "," + NAT0_FEATURE; else addParam(lastInfoMap, c, "I4", ""); addParam(lastInfoMap, c, "U4", ""); - } + } addParam(lastInfoMap, c, "SU", su); @@ -1052,8 +1026,8 @@ int64_t AdcHub::getAvailable() const { Lock l(cs); int64_t x = 0; - for(auto i = users.begin(); i != users.end(); ++i) { - x+=i->second->getIdentity().getBytesShared(); + for(auto& i: users) { + x+=i.second->getIdentity().getBytesShared(); } return x; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcHub.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcHub.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/AdcHub.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/AdcHub.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -36,9 +36,9 @@ }; #endif class AdcHub : public Client, public CommandHandler -#ifdef LUA_SCRIPT -, public AdcScriptInstance -#endif + #ifdef LUA_SCRIPT + , public AdcScriptInstance + #endif { public: using Client::send; @@ -47,18 +47,19 @@ void connect(const OnlineUser& user, const string& token); void connect(const OnlineUser& user, string const& token, bool secure); - void hubMessage(const string& aMessage, bool thirdPerson = false); - void privateMessage(const OnlineUser& user, const string& aMessage, bool thirdPerson = false); - void sendUserCmd(const UserCommand& command, const StringMap& params); - void search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken, const StringList& aExtList); - void password(const string& pwd); - void info(bool alwaysSend); - - size_t getUserCount() const { Lock l(cs); return users.size(); } - int64_t getAvailable() const; - - string escape(string const& str) const { return AdcCommand::escape(str, false); } - void send(const AdcCommand& cmd); + virtual void hubMessage(const string& aMessage, bool thirdPerson = false); + virtual void privateMessage(const OnlineUser& user, const string& aMessage, bool thirdPerson = false); + virtual void sendUserCmd(const UserCommand& command, const StringMap& params); + virtual void search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken, const StringList& aExtList); + virtual void password(const string& pwd); + virtual void info(bool alwaysSend); + + virtual size_t getUserCount() const { Lock l(cs); return users.size(); } + virtual int64_t getAvailable() const; + + static string escape(const string& str) { return AdcCommand::escape(str, false); } + void emulateCommand(const string& cmd) { dispatch(cmd); } + virtual void send(const AdcCommand& cmd); string getMySID() { return AdcCommand::fromSID(sid); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ADLSearch.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ADLSearch.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ADLSearch.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ADLSearch.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ /* @@ -24,10 +24,10 @@ #include "stdinc.h" #include "ADLSearch.h" -#include "QueueManager.h" -#include "ClientManager.h" +#include "ClientManager.h" #include "File.h" +#include "QueueManager.h" #include "SimpleXML.h" #include "StringTokenizer.h" @@ -37,42 +37,42 @@ namespace dcpp { ADLSearch::ADLSearch() : -searchString(_("")), -isActive(true), -isAutoQueue(false), -sourceType(OnlyFile), -minFileSize(-1), -maxFileSize(-1), -typeFileSize(SizeBytes), -destDir("ADLSearch"), -ddIndex(0), -bUseRegexp(false) + searchString(_("")), + isActive(true), + isAutoQueue(false), + sourceType(OnlyFile), + minFileSize(-1), + maxFileSize(-1), + typeFileSize(SizeBytes), + destDir("ADLSearch"), + ddIndex(0), + bUseRegexp(false) {} -void ADLSearch::Prepare(StringMap& params) { +void ADLSearch::prepare(StringMap& params) { // Prepare quick search of substrings stringSearchList.clear(); - #ifdef USE_PCRE +#ifdef USE_PCRE if(searchString.find("$Re:") == 0){ regexpstring.clear(); regexpstring=searchString.substr(4); bUseRegexp = true; } else { - #endif +#endif // Replace parameters such as %[nick] string stringParams = Util::formatParams(searchString, params, false); // Split into substrings StringTokenizer st(stringParams, ' '); - for(StringIter i = st.getTokens().begin(); i != st.getTokens().end(); ++i) { - if(!i->empty()) { + for(auto &t : st.getTokens()) { + if(!t.empty()) { // Add substring search - stringSearchList.push_back(StringSearch(*i)); + stringSearchList.push_back(StringSearch(t)); } } - #ifdef USE_PCRE +#ifdef USE_PCRE } - #endif +#endif } ADLSearch::SourceType ADLSearch::StringToSourceType(const string& s) { @@ -86,7 +86,8 @@ return OnlyFile; } } -string ADLSearch::SourceTypeToString(ADLSearch::SourceType t) { + +string ADLSearch::SourceTypeToString(SourceType t) { switch(t) { default: case OnlyFile: return "Filename"; @@ -109,7 +110,7 @@ } } -string ADLSearch::SizeTypeToString(ADLSearch::SizeType t) { +string ADLSearch::SizeTypeToString(SizeType t) { switch(t) { default: case SizeBytes: return "B"; @@ -128,7 +129,7 @@ } } -bool ADLSearch::MatchesFile(const string& f, const string& fp, int64_t size) { +bool ADLSearch::matchesFile(const string& f, const string& fp, int64_t size) { // Check status if(!isActive) { return false; @@ -150,11 +151,12 @@ switch(sourceType) { default: case OnlyDirectory: return false; - case OnlyFile: return SearchAll(f); - case FullPath: return SearchAll(fp); + case OnlyFile: return searchAll(f); + case FullPath: return searchAll(fp); } } -bool ADLSearch::MatchesDirectory(const string& d) { + +bool ADLSearch::matchesDirectory(const string& d) { // Check status if(!isActive) { return false; @@ -164,11 +166,11 @@ } // Do search - return SearchAll(d); + return searchAll(d); } -bool ADLSearch::SearchAll(const string& s) { - #ifdef USE_PCRE +bool ADLSearch::searchAll(const string& s) { +#ifdef USE_PCRE if(bUseRegexp){ pcrecpp::RE_Options options; options.set_utf8(true); @@ -179,22 +181,28 @@ else return false; } else { - #endif - // Match all substrings - for(StringSearch::List::iterator i = stringSearchList.begin(); i != stringSearchList.end(); ++i) { - if(!i->match(s)) { +#endif + // Match all substrings + for(auto& i : stringSearchList) { + if(!i.match(s)) { return false; } } return !stringSearchList.empty(); - #ifdef USE_PCRE +#ifdef USE_PCRE } - #endif +#endif } -/// Load old searches from disk -void ADLSearchManager::Load() -{ +ADLSearchManager::ADLSearchManager() : breakOnFirst(false), user(UserPtr(), Util::emptyString) { + load(); +} + +ADLSearchManager::~ADLSearchManager() { + save(); +} + +void ADLSearchManager::load() { // Clear current collection.clear(); @@ -254,16 +262,12 @@ } } } - } catch(const SimpleXMLException&) { - return; - } catch(const FileException&) { - return; } + catch(const SimpleXMLException&) { } + catch(const FileException&) { } } -/// Save current searches to disk -void ADLSearchManager::Save() -{ +void ADLSearchManager::save() { // Prepare xml string for saving try { SimpleXML xml; @@ -277,31 +281,21 @@ xml.stepIn(); // Save all searches - for(auto i = collection.begin(); i != collection.end(); ++i) { - ADLSearch& search = *i; + for(auto& search: collection) { if(search.searchString.empty()) { continue; } - string type = "type"; xml.addTag("Search"); xml.stepIn(); - xml.addTag("SearchString", search.searchString);; - + xml.addTag("SearchString", search.searchString); xml.addTag("SourceType", search.SourceTypeToString(search.sourceType)); - xml.addTag("DestDirectory", search.destDir); - xml.addTag("IsActive", search.isActive); - xml.addTag("MaxSize", search.maxFileSize); - xml.addTag("MinSize", search.minFileSize); - xml.addTag("SizeType", search.SizeTypeToString(search.typeFileSize)); - xml.addTag("IsAutoQueue", search.isAutoQueue); - xml.stepOut(); } @@ -315,24 +309,20 @@ fout.write(SimpleXML::utf8Header); fout.write(xml.toXML()); fout.close(); - } catch(const FileException&) { - return; - } - } catch(const SimpleXMLException&) { - return; - } + } catch(const FileException&) { } + } catch(const SimpleXMLException&) { } } -void ADLSearchManager::MatchesFile(DestDirList& destDirVector, DirectoryListing::File *currentFile, string& fullPath) { +void ADLSearchManager::matchesFile(DestDirList& destDirVector, DirectoryListing::File *currentFile, string& fullPath) { // Add to any substructure being stored - for(auto id = destDirVector.begin(); id != destDirVector.end(); ++id) { - if(id->subdir != NULL) { + for(auto& id: destDirVector) { + if(id.subdir != NULL) { DirectoryListing::File *copyFile = new DirectoryListing::File(*currentFile, true); - dcassert(id->subdir->getAdls()); + dcassert(id.subdir->getAdls()); - id->subdir->files.push_back(copyFile); + id.subdir->files.insert(copyFile); } - id->fileAdded = false; // Prepare for next stage + id.fileAdded = false; // Prepare for next stage } // Prepare to match searches @@ -342,19 +332,19 @@ string filePath = fullPath + "\\" + currentFile->getName(); // Match searches - for(auto is = collection.begin(); is != collection.end(); ++is) { - if(destDirVector[is->ddIndex].fileAdded) { + for(auto& is: collection) { + if(destDirVector[is.ddIndex].fileAdded) { continue; } - if(is->MatchesFile(currentFile->getName(), filePath, currentFile->getSize())) { + if(is.matchesFile(currentFile->getName(), filePath, currentFile->getSize())) { DirectoryListing::File *copyFile = new DirectoryListing::File(*currentFile, true); - destDirVector[is->ddIndex].dir->files.push_back(copyFile); - destDirVector[is->ddIndex].fileAdded = true; + destDirVector[is.ddIndex].dir->files.insert(copyFile); + destDirVector[is.ddIndex].fileAdded = true; - if(is->isAutoQueue){ + if(is.isAutoQueue){ try { QueueManager::getInstance()->add(SETTING(DOWNLOAD_DIRECTORY) + currentFile->getName(), - currentFile->getSize(), currentFile->getTTH(), getUser()); + currentFile->getSize(), currentFile->getTTH(), getUser()); } catch(const Exception&) { } } @@ -366,14 +356,14 @@ } } -void ADLSearchManager::MatchesDirectory(DestDirList& destDirVector, DirectoryListing::Directory* currentDir, string& fullPath) { +void ADLSearchManager::matchesDirectory(DestDirList& destDirVector, DirectoryListing::Directory* currentDir, string& fullPath) { // Add to any substructure being stored - for(auto id = destDirVector.begin(); id != destDirVector.end(); ++id) { - if(id->subdir != NULL) { + for(auto& id: destDirVector) { + if(id.subdir != NULL) { DirectoryListing::Directory* newDir = - new DirectoryListing::AdlDirectory(fullPath, id->subdir, currentDir->getName()); - id->subdir->directories.push_back(newDir); - id->subdir = newDir; + new DirectoryListing::AdlDirectory(fullPath, id.subdir, currentDir->getName()); + id.subdir->directories.insert(newDir); + id.subdir = newDir; } } @@ -383,14 +373,14 @@ } // Match searches - for(auto is = collection.begin(); is != collection.end(); ++is) { - if(destDirVector[is->ddIndex].subdir != NULL) { + for(auto& is: collection) { + if(destDirVector[is.ddIndex].subdir != NULL) { continue; } - if(is->MatchesDirectory(currentDir->getName())) { - destDirVector[is->ddIndex].subdir = - new DirectoryListing::AdlDirectory(fullPath, destDirVector[is->ddIndex].dir, currentDir->getName()); - destDirVector[is->ddIndex].dir->directories.push_back(destDirVector[is->ddIndex].subdir); + if(is.matchesDirectory(currentDir->getName())) { + destDirVector[is.ddIndex].subdir = + new DirectoryListing::AdlDirectory(fullPath, destDirVector[is.ddIndex].dir, currentDir->getName()); + destDirVector[is.ddIndex].dir->directories.insert(destDirVector[is.ddIndex].subdir); if(breakOnFirst) { // Found a match, search no more break; @@ -399,29 +389,39 @@ } } -void ADLSearchManager::PrepareDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root, StringMap& params) { +void ADLSearchManager::stepUpDirectory(DestDirList& destDirVector) { + for(auto& id: destDirVector) { + if(id.subdir != NULL) { + id.subdir = id.subdir->getParent(); + if(id.subdir == id.dir) { + id.subdir = NULL; + } + } + } +} + +void ADLSearchManager::prepareDestinationDirectories(DestDirList& destDirs, DirectoryListing::Directory* root, StringMap ¶ms) { // Load default destination directory (index = 0) - destDirVector.clear(); - auto id = destDirVector.insert(destDirVector.end(), DestDir()); - id->name = "ADLSearch"; - id->dir = new DirectoryListing::Directory(root, "<<<" + id->name + ">>>", true, true); + destDirs.clear(); + DestDir dir = { "ADLSearch", new DirectoryListing::Directory(root, "<<>>", true, true), nullptr, false }; + destDirs.push_back(std::move(dir)); // Scan all loaded searches - for(auto is = collection.begin(); is != collection.end(); ++is) { + for(auto& is: collection) { // Check empty destination directory - if(is->destDir.empty()) { + if(is.destDir.empty()) { // Set to default - is->ddIndex = 0; + is.ddIndex = 0; continue; } // Check if exists bool isNew = true; long ddIndex = 0; - for(id = destDirVector.begin(); id != destDirVector.end(); ++id, ++ddIndex) { - if(Util::stricmp(is->destDir.c_str(), id->name.c_str()) == 0) { + for(auto id = destDirs.cbegin(); id != destDirs.cend(); ++id, ++ddIndex) { + if(Util::stricmp(is.destDir.c_str(), id->name.c_str()) == 0) { // Already exists, reuse index - is->ddIndex = ddIndex; + is.ddIndex = ddIndex; isNew = false; break; } @@ -429,19 +429,33 @@ if(isNew) { // Add new destination directory - id = destDirVector.insert(destDirVector.end(), DestDir()); - id->name = is->destDir; - id->dir = new DirectoryListing::Directory(root, "<<<" + id->name + ">>>", true, true); - is->ddIndex = ddIndex; + DestDir dir = { is.destDir, new DirectoryListing::Directory(root, "<<<" + is.destDir + ">>>", true, true), nullptr, false }; + destDirs.push_back(std::move(dir)); + is.ddIndex = ddIndex; } } // Prepare all searches - for(auto ip = collection.begin(); ip != collection.end(); ++ip) { - ip->Prepare(params); + for(auto& ip: collection) { + ip.prepare(params); + } +} + +void ADLSearchManager::finalizeDestinationDirectories(DestDirList& destDirs, DirectoryListing::Directory* root) { + string szDiscard("<<<" + string(_("Discard")) + ">>>"); + + // Add non-empty destination directories to the top level + for(auto& i: destDirs) { + if(i.dir->files.empty() && i.dir->directories.empty()) { + delete i.dir; + } else if(Util::stricmp(i.dir->getName(), szDiscard) == 0) { + delete i.dir; + } else { + root->directories.insert(i.dir); + } } } -void ADLSearchManager::matchListing(DirectoryListing& aDirList) noexcept { +void ADLSearchManager::matchListing(DirectoryListing& aDirList) { StringMap params; params["userNI"] = ClientManager::getInstance()->getNicks(aDirList.getUser())[0]; params["userCID"] = aDirList.getUser().user->getCID().toBase32(); @@ -451,51 +465,30 @@ setUser(aDirList.getUser()); + const auto root = aDirList.getRoot(); + DestDirList destDirs; - PrepareDestinationDirectories(destDirs, aDirList.getRoot(), params); + prepareDestinationDirectories(destDirs, root, params); setBreakOnFirst(BOOLSETTING(ADLS_BREAK_ON_FIRST)); - string path(aDirList.getRoot()->getName()); - matchRecurse(destDirs, aDirList.getRoot(), path); + string path(root->getName()); + matchRecurse(destDirs, root, path); - FinalizeDestinationDirectories(destDirs, aDirList.getRoot()); + finalizeDestinationDirectories(destDirs, root); } void ADLSearchManager::matchRecurse(DestDirList &aDestList, DirectoryListing::Directory* aDir, string &aPath) { - for(DirectoryListing::Directory::Iter dirIt = aDir->directories.begin(); dirIt != aDir->directories.end(); ++dirIt) { - string tmpPath = aPath + "\\" + (*dirIt)->getName(); - MatchesDirectory(aDestList, *dirIt, tmpPath); - matchRecurse(aDestList, *dirIt, tmpPath); - } - for(DirectoryListing::File::Iter fileIt = aDir->files.begin(); fileIt != aDir->files.end(); ++fileIt) { - MatchesFile(aDestList, *fileIt, aPath); - } - StepUpDirectory(aDestList); -} - -void ADLSearchManager::StepUpDirectory(DestDirList& destDirVector) { - for(auto id = destDirVector.begin(); id != destDirVector.end(); ++id) { - if(id->subdir != NULL) { - id->subdir = id->subdir->getParent(); - if(id->subdir == id->dir) { - id->subdir = NULL; - } - } + for(auto& dirIt: aDir->directories) { + string tmpPath = aPath + "\\" + dirIt->getName(); + matchesDirectory(aDestList, dirIt, tmpPath); + matchRecurse(aDestList, dirIt, tmpPath); } -} -void ADLSearchManager::FinalizeDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root) { - string szDiscard("<<<" + string(_("Discard")) + ">>>"); - // Add non-empty destination directories to the top level - for(auto id = destDirVector.begin(); id != destDirVector.end(); ++id) { - if(id->dir->files.empty() && id->dir->directories.empty()) { - delete (id->dir); - } else if(Util::stricmp(id->dir->getName(), szDiscard) == 0) { - delete (id->dir); - } else { - root->directories.push_back(id->dir); - } + for(auto& fileIt: aDir->files) { + matchesFile(aDestList, fileIt, aPath); } + + stepUpDirectory(aDestList); } string ADLSearchManager::getConfigFile() { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ADLSearch.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ADLSearch.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ADLSearch.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ADLSearch.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ /* @@ -23,31 +22,32 @@ #pragma once -#include "Util.h" +#include "DirectoryListing.h" #include "SettingsManager.h" -#include "StringSearch.h" #include "Singleton.h" -#include "DirectoryListing.h" +#include "StringSearch.h" +#include "Util.h" namespace dcpp { + class AdlSearchManager; /// Class that represent an ADL search class ADLSearch { public: - - // Constructor ADLSearch(); - // Prepare search - void Prepare(StringMap& params); - // The search string + + /// The search string string searchString; - // Active search + + /// Active search bool isActive; - // Auto Queue Results + + /// Auto Queue Results bool isAutoQueue; - // Search source type + + /// Search source type enum SourceType { TypeFirst = 0, OnlyFile = TypeFirst, @@ -76,22 +76,29 @@ string SizeTypeToString(SizeType t); int64_t GetSizeBase(); - // Name of the destination directory (empty = 'ADLSearch') and its index + /// Name of the destination directory (empty = 'ADLSearch') and its index string destDir; unsigned long ddIndex; - // Search for file match - bool MatchesFile(const string& f, const string& fp, int64_t size); - // Search for directory match - bool MatchesDirectory(const string& d); private: friend class ADLSearchManager; + + /// Prepare search + void prepare(StringMap& params); + + /// Search for file match + bool matchesFile(const string& f, const string& fp, int64_t size); + /// Search for directory match + bool matchesDirectory(const string& d); + + bool searchAll(const string& s); + //decide if regexp should be used bool bUseRegexp; string regexpstring; + // Substring searches StringSearch::List stringSearchList; - bool SearchAll(const string& s); }; /// Class that holds all active searches @@ -104,44 +111,42 @@ DirectoryListing::Directory* dir; DirectoryListing::Directory* subdir; bool fileAdded; - DestDir() : name(""), dir(NULL), subdir(NULL) {} }; typedef vector DestDirList; - // Constructor/destructor - ADLSearchManager() : user(UserPtr(), Util::emptyString) { Load(); } - virtual ~ADLSearchManager() { Save(); } + ADLSearchManager(); + virtual ~ADLSearchManager(); // Search collection typedef vector SearchCollection; SearchCollection collection; // Load/save search collection to XML file - void Load(); - void Save(); + void load(); + void save(); // Settings GETSET(bool, breakOnFirst, BreakOnFirst) GETSET(HintedUser, user, User) - // @remarks Used to add ADLSearch directories to an existing DirectoryListing - void matchListing(DirectoryListing& /*aDirList*/) noexcept; + /// @remarks Used to add ADLSearch directories to an existing DirectoryListing + void matchListing(DirectoryListing& aDirList); private: - // @internal - void matchRecurse(DestDirList& /*aDestList*/, DirectoryListing::Directory* /*aDir*/, string& /*aPath*/); + // Recurse through the directories + void matchRecurse(DestDirList& aDestList, DirectoryListing::Directory* aDir, string& aPath); // Search for file match - void MatchesFile(DestDirList& destDirVector, DirectoryListing::File *currentFile, string& fullPath); + void matchesFile(DestDirList& destDirVector, DirectoryListing::File *currentFile, string& fullPath); // Search for directory match - void MatchesDirectory(DestDirList& destDirVector, DirectoryListing::Directory* currentDir, string& fullPath); + void matchesDirectory(DestDirList& destDirVector, DirectoryListing::Directory* currentDir, string& fullPath); // Step up directory - void StepUpDirectory(DestDirList& destDirVector); + void stepUpDirectory(DestDirList& destDirVector); // Prepare destination directory indexing - void PrepareDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root, StringMap& params); + void prepareDestinationDirectories(DestDirList& destDirs, DirectoryListing::Directory* root, StringMap& params); // Finalize destination directories - void FinalizeDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root); + void finalizeDestinationDirectories(DestDirList& destDirs, DirectoryListing::Directory* root); - string getConfigFile(); + static string getConfigFile(); }; } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Atomic.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Atomic.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Atomic.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Atomic.h 2019-04-11 19:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once @@ -21,7 +20,6 @@ #include "CriticalSection.h" #include #include -#include namespace dcpp { @@ -43,111 +41,94 @@ // uint32_t template <> -class Atomic { - typedef boost::uint32_t value_type; +class Atomic { + typedef std::uint32_t value_type; public: - Atomic(value_type val) { assign(val); } - Atomic(const Atomic& other) { assign(static_cast(other)); } + Atomic(value_type val) { assign(val); } + Atomic(const Atomic& other) { assign(static_cast(other)); } - // operator= - // return void to be safe - void operator=(value_type val) { assign(val); } - void operator=(const Atomic& other) { - return operator=(static_cast(other)); - } - -#if BOOST_VERSION >= 104800 - // type cast - operator value_type() const { - return boost::interprocess::ipcdetail::atomic_read32(&m_value); - } + // operator= + // return void to be safe + void operator=(value_type val) { assign(val); } + void operator=(const Atomic& other) { + return operator=(static_cast(other)); + } + + // type cast + operator value_type() const { + return boost::interprocess::ipcdetail::atomic_read32(&m_value); + } - // increment - void inc() { boost::interprocess::ipcdetail::atomic_inc32(&m_value); } + // increment + void inc() { boost::interprocess::ipcdetail::atomic_inc32(&m_value); } - // decrement - void dec() { boost::interprocess::ipcdetail::atomic_dec32(&m_value); } + // decrement + void dec() { boost::interprocess::ipcdetail::atomic_dec32(&m_value); } private: - mutable value_type m_value; - void assign(value_type val) { boost::interprocess::ipcdetail::atomic_write32(&m_value, val); } -#else - // type cast - operator value_type() const { - return boost::interprocess::detail::atomic_read32(&m_value); - } - - // increment - void inc() { boost::interprocess::detail::atomic_inc32(&m_value); } - - // decrement - void dec() { boost::interprocess::detail::atomic_dec32(&m_value); } - -private: - mutable value_type m_value; - void assign(value_type val) { boost::interprocess::detail::atomic_write32(&m_value, val); } -#endif //BOOST_VERSION + mutable value_type m_value; + void assign(value_type val) { boost::interprocess::ipcdetail::atomic_write32(&m_value, val); } }; // int32_t // just forward all operations to underlying Atomic variable template <> -class Atomic { - typedef boost::int32_t value_type; +class Atomic { + typedef std::int32_t value_type; public: - Atomic(value_type val) : m_value(val) {} - Atomic(const Atomic& other) : m_value(other) {} + Atomic(value_type val) : m_value(val) {} + Atomic(const Atomic& other) : m_value(other) {} - void operator=(value_type val) { m_value=val; } - void operator=(const Atomic& other) { m_value=other; } - operator value_type() const { return static_cast(m_value); } + void operator=(value_type val) { m_value=val; } + void operator=(const Atomic& other) { m_value=other; } + operator value_type() const { return static_cast(m_value); } - void inc() { m_value.inc(); } - void dec() { m_value.dec(); } + void inc() { m_value.inc(); } + void dec() { m_value.dec(); } private: - Atomic m_value; + Atomic m_value; }; // memory_ordering_strong template class Atomic { - typedef DataType value_type; + typedef DataType value_type; public: - Atomic(value_type new_value) : m_value(new_value) {} - Atomic(const Atomic& other) : m_value(static_cast(other)) {} + Atomic(value_type new_value) : m_value(new_value) {} + Atomic(const Atomic& other) : m_value(static_cast(other)) {} - void operator=(value_type new_value) { - FastLock Lock(cs); - m_value = new_value; - } - void operator=(const Atomic& other) { - FastLock Lock(cs); - m_value = other; - } - operator value_type() const { - FastLock Lock(cs); // shared (read-only) lock would be sufficient here - return m_value; - } - - void inc() { - FastLock Lock(cs); - ++m_value; - } - void dec() { - FastLock Lock(cs); - --m_value; - } - - // assign new value, return old value - value_type exchange(value_type new_val) { - FastLock Lock(cs); - value_type old_val = m_value; - m_value = new_val; - return old_val; - } + void operator=(value_type new_value) { + FastLock Lock(cs); + m_value = new_value; + } + void operator=(const Atomic& other) { + FastLock Lock(cs); + m_value = other; + } + operator value_type() const { + FastLock Lock(cs); // shared (read-only) lock would be sufficient here + return m_value; + } + + void inc() { + FastLock Lock(cs); + ++m_value; + } + void dec() { + FastLock Lock(cs); + --m_value; + } + + // assign new value, return old value + value_type exchange(value_type new_val) { + FastLock Lock(cs); + value_type old_val = m_value; + m_value = new_val; + return old_val; + } private: - value_type m_value; - mutable FastCriticalSection cs; + value_type m_value; + mutable FastCriticalSection cs; }; } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BloomFilter.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BloomFilter.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BloomFilter.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BloomFilter.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -30,8 +29,8 @@ void add(const string& s) {xadd(s, N); } bool match(const StringList& s) const { - for(auto i = s.begin(); i != s.end(); ++i) { - if(!match(*i)) + for(auto& i: s) { + if(!match(i)) return false; } return true; @@ -58,8 +57,8 @@ for (unsigned int i = 0; i < table.size(); ++i) if (table[i] == true) ++tot; std::cout << "table status: " << tot << " of " << table.size() - << " filled, for an occupancy percentage of " << (100.*tot)/table.size() - << "%" << std::endl; + << " filled, for an occupancy percentage of " << (100.*tot)/table.size() + << "%" << std::endl; } #endif private: diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocket.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocket.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocket.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocket.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,7 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,32 +14,35 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "BufferedSocket.h" -#include "TimerManager.h" -#include "SettingsManager.h" +#include -#include "Streams.h" -#include "SSLSocket.h" +#include "ConnectivityManager.h" #include "CryptoManager.h" -#include "ZUtils.h" - +#include "SettingsManager.h" +#include "SSLSocket.h" +#include "Streams.h" #include "ThrottleManager.h" +#include "TimerManager.h" +#include "ZUtils.h" namespace dcpp { +using std::min; +using std::max; + // Polling is used for tasks...should be fixed... #define POLL_TIMEOUT 250 BufferedSocket::BufferedSocket(char aSeparator) : -separator(aSeparator), mode(MODE_LINE), dataBytes(0), rollback(0), state(STARTING), -disconnecting(false) + separator(aSeparator), mode(MODE_LINE), dataBytes(0), rollback(0), state(STARTING), + disconnecting(false) { start(); @@ -57,14 +62,14 @@ } switch (aMode) { - case MODE_LINE: - rollback = aRollback; - break; - case MODE_ZPIPE: - filterIn = std::unique_ptr(new UnZFilter); - break; - case MODE_DATA: - break; + case MODE_LINE: + rollback = aRollback; + break; + case MODE_ZPIPE: + filterIn = std::unique_ptr(new UnZFilter); + break; + case MODE_DATA: + break; } mode = aMode; } @@ -95,13 +100,14 @@ addTask(ACCEPTED, 0); } -void BufferedSocket::connect(const string& aAddress, uint16_t aPort, bool secure, bool allowUntrusted, bool proxy) { - connect(aAddress, aPort, 0, NAT_NONE, secure, allowUntrusted, proxy); +void BufferedSocket::connect(const string& aAddress, const string& aPort, bool secure, bool allowUntrusted, bool proxy, Socket::Protocol proto, const string& expKP) { + connect(aAddress, aPort, Util::emptyString, NAT_NONE, secure, allowUntrusted, proxy, proto, expKP); } -void BufferedSocket::connect(const string& aAddress, uint16_t aPort, uint16_t localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy) { +void BufferedSocket::connect(const string& aAddress, const string& aPort, const string& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy, Socket::Protocol proto, const string& expKP) { + (void)expKP; dcdebug("BufferedSocket::connect() %p\n", (void*)this); - std::unique_ptr s(secure ? (natRole == NAT_SERVER ? CryptoManager::getInstance()->getServerSocket(allowUntrusted) : CryptoManager::getInstance()->getClientSocket(allowUntrusted)) : new Socket); + std::unique_ptr s(secure ? (natRole == NAT_SERVER ? CryptoManager::getInstance()->getServerSocket(allowUntrusted) : CryptoManager::getInstance()->getClientSocket(allowUntrusted, proto)) : new Socket); s->create(); setSocket(move(s)); @@ -113,10 +119,10 @@ #define LONG_TIMEOUT 30000 #define SHORT_TIMEOUT 1000 -void BufferedSocket::threadConnect(const string& aAddr, uint16_t aPort, uint16_t localPort, NatRoles natRole, bool proxy) { +void BufferedSocket::threadConnect(const string& aAddr, const string &aPort, const string &localPort, NatRoles natRole, bool proxy) { dcassert(state == STARTING); - dcdebug("threadConnect %s:%d/%d\n", aAddr.c_str(), (int)localPort, (int)aPort); + dcdebug("threadConnect %s:%s/%s\n", aAddr.c_str(), localPort.c_str(), aPort.c_str()); fire(BufferedSocketListener::Connecting()); const uint64_t endTime = GET_TICK() + LONG_TIMEOUT; @@ -190,84 +196,84 @@ while (left > 0) { switch (mode) { - case MODE_ZPIPE: { - const int BUF_SIZE = 1024; - // Special to autodetect nmdc connections... - string::size_type pos = 0; - boost::scoped_array buffer(new char[BUF_SIZE]); - l = line; - // decompress all input data and store in l. - while (left) { - size_t in = BUF_SIZE; - size_t used = left; - bool ret = (*filterIn) (&inbuf[0] + total - left, used, &buffer[0], in); - left -= used; - l.append (&buffer[0], in); - // if the stream ends before the data runs out, keep remainder of data in inbuf - if (!ret) { - bufpos = total-left; - setMode (MODE_LINE, rollback); - break; - } - } - // process all lines - while ((pos = l.find(separator)) != string::npos) { - if(pos > 0) // check empty (only pipe) command and don't waste cpu with it ;o) - fire(BufferedSocketListener::Line(), l.substr(0, pos)); - l.erase (0, pos + 1 /* separator char */); - } - // store remainder - line = l; - + case MODE_ZPIPE: { + const int BUF_SIZE = 1024; + // Special to autodetect nmdc connections... + string::size_type pos = 0; + std::unique_ptr buffer(new char[BUF_SIZE]); + l = line; + // decompress all input data and store in l. + while (left) { + size_t in = BUF_SIZE; + size_t used = left; + bool ret = (*filterIn) (&inbuf[0] + total - left, used, &buffer[0], in); + left -= used; + l.append (&buffer[0], in); + // if the stream ends before the data runs out, keep remainder of data in inbuf + if (!ret) { + bufpos = total-left; + setMode (MODE_LINE, rollback); break; } - case MODE_LINE: - // Special to autodetect nmdc connections... - if(separator == 0) { - if(inbuf[0] == '$') { - separator = '|'; - } else { - separator = '\n'; - } + } + // process all lines + while ((pos = l.find(separator)) != string::npos) { + if(pos > 0) // check empty (only pipe) command and don't waste cpu with it ;o) + fire(BufferedSocketListener::Line(), l.substr(0, pos)); + l.erase (0, pos + 1 /* separator char */); + } + // store remainder + line = l; + + break; + } + case MODE_LINE: + // Special to autodetect nmdc connections... + if(separator == 0) { + if(inbuf[0] == '$') { + separator = '|'; + } else { + separator = '\n'; } - l = line + string ((char*)&inbuf[bufpos], left); - while ((pos = l.find(separator)) != string::npos) { - if(pos > 0) // check empty (only pipe) command and don't waste cpu with it ;o) - fire(BufferedSocketListener::Line(), l.substr(0, pos)); - l.erase (0, pos + 1 /* separator char */); - if (l.length() < (size_t)left) left = l.length(); - if (mode != MODE_LINE) { - // we changed mode; remainder of l is invalid. - l.clear(); - bufpos = total - left; - break; - } + } + l = line + string ((char*)&inbuf[bufpos], left); + while ((pos = l.find(separator)) != string::npos) { + if(pos > 0) // check empty (only pipe) command and don't waste cpu with it ;o) + fire(BufferedSocketListener::Line(), l.substr(0, pos)); + l.erase (0, pos + 1 /* separator char */); + if (l.length() < (size_t)left) left = l.length(); + if (mode != MODE_LINE) { + // we changed mode; remainder of l is invalid. + l.clear(); + bufpos = total - left; + break; } - if (pos == string::npos) - left = 0; - line = l; - break; - case MODE_DATA: - while(left > 0) { - if(dataBytes == -1) { - fire(BufferedSocketListener::Data(), &inbuf[bufpos], left); - bufpos += (left - rollback); - left = rollback; - rollback = 0; - } else { - int high = (int)min(dataBytes, (int64_t)left); - fire(BufferedSocketListener::Data(), &inbuf[bufpos], high); - bufpos += high; - left -= high; - - dataBytes -= high; - if(dataBytes == 0) { - mode = MODE_LINE; - fire(BufferedSocketListener::ModeChange()); - } + } + if (pos == string::npos) + left = 0; + line = l; + break; + case MODE_DATA: + while(left > 0) { + if(dataBytes == -1) { + fire(BufferedSocketListener::Data(), &inbuf[bufpos], left); + bufpos += (left - rollback); + left = rollback; + rollback = 0; + } else { + int high = (int)min(dataBytes, (int64_t)left); + fire(BufferedSocketListener::Data(), &inbuf[bufpos], high); + bufpos += high; + left -= high; + + dataBytes -= high; + if(dataBytes == 0) { + mode = MODE_LINE; + fire(BufferedSocketListener::ModeChange()); } } - break; + } + break; } } @@ -481,7 +487,6 @@ */ int BufferedSocket::run() { dcdebug("BufferedSocket::run() start %p\n", (void*)this); - setThreadName("BufferedSocket"); while(true) { try { if(!checkEvents()) { @@ -517,8 +522,8 @@ } void BufferedSocket::addTask(Tasks task, TaskData* data) { - dcassert(task == DISCONNECT || task == SHUTDOWN || task == UPDATED || sock.get()); - tasks.push_back(make_pair(task, unique_ptr(data))); taskSem.signal(); + dcassert(task == DISCONNECT || task == SHUTDOWN || sock.get()); + tasks.emplace_back(task, unique_ptr(data)); taskSem.signal(); } } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocket.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocket.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocket.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocket.h 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,7 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,23 +14,30 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include +#include + #include "typedefs.h" #include "BufferedSocketListener.h" #include "Semaphore.h" #include "Thread.h" #include "Speaker.h" -#include "Util.h" #include "Socket.h" +#include "Util.h" #include "Atomic.h" namespace dcpp { +using std::deque; +using std::function; +using std::pair; +using std::unique_ptr; + class BufferedSocket : public Speaker, private Thread { public: enum Modes { @@ -65,8 +74,8 @@ } void accept(const Socket& srv, bool secure, bool allowUntrusted); - void connect(const string& aAddress, uint16_t aPort, bool secure, bool allowUntrusted, bool proxy); - void connect(const string& aAddress, uint16_t aPort, uint16_t localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy); + void connect(const string& aAddress, const string& aPort, bool secure, bool allowUntrusted, bool proxy, Socket::Protocol proto, const string& expKP = Util::emptyString); + void connect(const string& aAddress, const string& aPort, const string& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy, Socket::Protocol proto, const string& expKP = Util::emptyString); /** Sets data mode for aBytes bytes. Must be called within onLine. */ void setDataMode(int64_t aBytes = -1) { mode = MODE_DATA; dataBytes = aBytes; } @@ -83,7 +92,7 @@ bool isSecure() const { return sock->isSecure(); } bool isTrusted() const { return sock->isTrusted(); } - std::string getCipherName() const { return sock->getCipherName(); } + string getCipherName() const { return sock->getCipherName(); } vector getKeyprint() const { return sock->getKeyprint(); } void write(const string& aData) { write(aData.data(), aData.length()); } @@ -97,19 +106,19 @@ void disconnect(bool graceless = false) noexcept { Lock l(cs); if(graceless) disconnecting = true; addTask(DISCONNECT, 0); } string getLocalIp() const { return sock->getLocalIp(); } - uint16_t getLocalPort() const { return sock->getLocalPort(); } + string getLocalPort() const { return sock->getLocalPort(); } GETSET(char, separator, Separator) -private: - enum Tasks { - CONNECT, - DISCONNECT, - SEND_DATA, - SEND_FILE, - SHUTDOWN, - ACCEPTED, - UPDATED - }; + private: + enum Tasks { + CONNECT, + DISCONNECT, + SEND_DATA, + SEND_FILE, + SHUTDOWN, + ACCEPTED, + UPDATED +}; enum State { STARTING, // Waiting for CONNECT/ACCEPTED/SHUTDOWN @@ -121,10 +130,21 @@ virtual ~TaskData() { } }; struct ConnectInfo : public TaskData { - ConnectInfo(string addr_, uint16_t port_, uint16_t localPort_, NatRoles natRole_, bool proxy_) : addr(addr_), port(port_), localPort(localPort_), natRole(natRole_), proxy(proxy_) { } + ConnectInfo(const string& addr_, + const string& port_, + const string& localPort_, + const NatRoles natRole_, + const bool proxy_) : + addr(addr_), + port(port_), + localPort(localPort_), + natRole(natRole_), + proxy(proxy_) + { } + string addr; - uint16_t port; - uint16_t localPort; + string port; + string localPort; NatRoles natRole; bool proxy; }; @@ -143,7 +163,7 @@ deque > > tasks; Modes mode; - std::unique_ptr filterIn; + unique_ptr filterIn; int64_t dataBytes; size_t rollback; string line; @@ -151,13 +171,13 @@ ByteVector writeBuf; ByteVector sendBuf; - std::unique_ptr sock; + unique_ptr sock; State state; bool disconnecting; virtual int run(); - void threadConnect(const string& aAddr, uint16_t aPort, uint16_t localPort, NatRoles natRole, bool proxy); + void threadConnect(const string& aAddr, const string& aPort, const string& localPort, NatRoles natRole, bool proxy); void threadAccept(); void threadRead(); void threadSendFile(InputStream* is); @@ -169,7 +189,7 @@ bool checkEvents(); void checkSocket(); - void setSocket(std::unique_ptr s); + void setSocket(unique_ptr s); void shutdown(); void addTask(Tasks task, TaskData* data); }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocketListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocketListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BufferedSocketListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BufferedSocketListener.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,13 +13,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "noexcept.h" +#include #include namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BZUtils.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BZUtils.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BZUtils.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BZUtils.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,13 +12,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "BZUtils.h" + +#include + #include "Exception.h" #include "format.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BZUtils.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BZUtils.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/BZUtils.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/BZUtils.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include +#include + namespace dcpp { class BZFilter { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ChatMessage.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ChatMessage.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ChatMessage.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ChatMessage.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,15 +12,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "ChatMessage.h" +#include "Client.h" #include "format.h" -#include "User.h" +#include "OnlineUser.h" +#include "SettingsManager.h" +#include "SimpleXML.h" #include "Util.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ChatMessage.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ChatMessage.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ChatMessage.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ChatMessage.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CID.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CID.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CID.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CID.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CID.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CID.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CID.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CID.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,19 +12,21 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "Encoder.h" -#include "Util.h" -#include #include +#include +#include + +#include "Encoder.h" namespace dcpp { +using std::find_if; + class CID { public: enum { SIZE = 192 / 8 }; @@ -47,7 +49,7 @@ } const uint8_t* data() const { return cid; } - bool isZero() const { return std::find_if(cid, cid+SIZE, bind2nd(std::not_equal_to(), 0)) == (cid+SIZE); } + explicit operator bool() const { return find_if(cid, cid + SIZE, [](uint8_t c) { return c != 0; }) != cid + SIZE; } static CID generate(); @@ -60,11 +62,8 @@ namespace std { template<> struct hash { - size_t operator()(const dcpp::CID& rhs) const { - size_t hvHash; - memcpy(&hvHash, rhs.data(), sizeof(size_t)); - return hvHash; + size_t operator()(const dcpp::CID& cid) const { + return cid.toHash(); } }; - -} // namespace dcpp +} diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Client.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Client.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Client.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Client.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -21,21 +21,22 @@ #include "Client.h" #include "BufferedSocket.h" +#include "ClientManager.h" +#include "ConnectivityManager.h" #include "DebugManager.h" #include "FavoriteManager.h" #include "TimerManager.h" -#include "ClientManager.h" #include "version.h" namespace dcpp { Client::Counts Client::counts; -Client::Client(const string& hubURL, char separator_, bool secure_) : +Client::Client(const string& hubURL, char separator_, bool secure_, Socket::Protocol proto_) : myIdentity(ClientManager::getInstance()->getMe(), 0), reconnDelay(120), lastActivity(GET_TICK()), registered(false), autoReconnect(false), encoding(Text::hubDefaultCharset), state(STATE_DISCONNECTED), sock(0), - hubUrl(hubURL), port(0), separator(separator_), + hubUrl(hubURL), separator(separator_), proto(proto_), secure(secure_), countType(COUNT_UNCOUNTED) { string file, proto, query, fragment; @@ -73,10 +74,10 @@ string ClientId; if (::strncmp(getHubUrl().c_str(),"adc://", 6) == 0 || - ::strncmp(getHubUrl().c_str(),"adcs://", 7) == 0) + ::strncmp(getHubUrl().c_str(),"adcs://", 7) == 0) ClientId = fullADCVersionString; else - ClientId = fullVersionString; + ClientId = fullNMDCVersionString; if(hub) { if(updateNick) { @@ -133,7 +134,7 @@ try { sock = BufferedSocket::getSocket(separator); sock->addListener(this); - sock->connect(address, port, secure, BOOLSETTING(ALLOW_UNTRUSTED_HUBS), true); + sock->connect(address, port, secure, BOOLSETTING(ALLOW_UNTRUSTED_HUBS), true, proto); } catch(const Exception& e) { shutdown(); /// @todo at this point, this hub instance is completely useless @@ -200,6 +201,7 @@ vector Client::getKeyprint() const { return isReady() ? sock->getKeyprint() : vector(); } + void Client::updateCounts(bool aRemove) { // We always remove the count and then add the correct one if requested... if(countType == COUNT_NORMAL) { @@ -226,6 +228,14 @@ } } +void Client::updated(OnlineUser& user) { + fire(ClientListener::UserUpdated(), this, user); +} + +void Client::updated(OnlineUserList& users) { + fire(ClientListener::UsersUpdated(), this, users); +} + string Client::getLocalIp() const { if (!externalIP.empty()) return Socket::resolve(externalIP); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Client.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Client.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Client.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Client.h 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,29 +13,31 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "compiler.h" -#include "forward.h" -#include "User.h" -#include "Speaker.h" + +#include "Atomic.h" #include "BufferedSocketListener.h" -#include "TimerManager.h" #include "ClientListener.h" -#include "Atomic.h" +#include "forward.h" +#include "OnlineUser.h" #include "SearchQueue.h" +#include "Speaker.h" +#include "TimerManager.h" #ifdef LUA_SCRIPT #include "ScriptManager.h" #endif +#include "NonCopyable.h" + namespace dcpp { #ifdef LUA_SCRIPT - struct ClientScriptInstance : public ScriptInstance { +struct ClientScriptInstance : public ScriptInstance { bool onHubFrameEnter(Client* aClient, const string& aLine); string formatChatMessage(const string& aLine); }; @@ -57,9 +60,10 @@ }; /** Yes, this should probably be called a Hub */ class Client : public ClientBase, public Speaker, public BufferedSocketListener, protected TimerManagerListener -#ifdef LUA_SCRIPT -, public ClientScriptInstance -#endif + #ifdef LUA_SCRIPT + , public ClientScriptInstance + #endif + , private NonCopyable { public: typedef Client* Ptr; @@ -83,9 +87,10 @@ virtual size_t getUserCount() const = 0; virtual int64_t getAvailable() const = 0; static int getTotalCounts() { return counts.normal + counts.registered + counts.op; } - virtual void send(const AdcCommand& command) = 0; + static string escape(string const& str) { return str; } - virtual string escape(string const& str) const { return str; } + virtual void emulateCommand(const string& cmd) = 0; + virtual void send(const AdcCommand& command) = 0; bool isConnected() const { return state != STATE_DISCONNECTED; } bool isReady() const { return state != STATE_CONNECTING && state != STATE_DISCONNECTED; } @@ -96,26 +101,24 @@ bool isOp() const { return getMyIdentity().isOp(); } - uint16_t getPort() const { return port; } + const string& getPort() const { return port; } const string& getAddress() const { return address; } const string& getIp() const { return ip; } - string getIpPort() const { return getIp() + ':' + Util::toString(port); } + string getIpPort() const { return getIp() + ':' + port; } string getLocalIp() const; - void updated(const OnlineUser& aUser) { fire(ClientListener::UserUpdated(), this, aUser); } - static string getCounts() { char buf[128]; return string(buf, snprintf(buf, sizeof(buf), "%ld/%ld/%ld", - static_cast(counts.normal), - static_cast(counts.registered), - static_cast(counts.op))); + static_cast(counts.normal), + static_cast(counts.registered), + static_cast(counts.op))); } StringMap& escapeParams(StringMap& sm) { - for(StringMapIter i = sm.begin(); i != sm.end(); ++i) { - i->second = escape(i->second); + for(auto& i : sm) { + i.second = escape(i.second); } return sm; } @@ -160,17 +163,17 @@ void reloadSettings(bool updateNick); protected: friend class ClientManager; - Client(const string& hubURL, char separator, bool secure_); + Client(const string& hubURL, char separator, bool secure_, Socket::Protocol proto_); virtual ~Client(); struct Counts { - private: - typedef Atomic atomic_counter_t; - public: - typedef boost::int32_t value_type; - Counts(value_type n = 0, value_type r = 0, value_type o = 0) : normal(n), registered(r), op(o) { } - atomic_counter_t normal; - atomic_counter_t registered; - atomic_counter_t op; + private: + typedef Atomic atomic_counter_t; + public: + typedef std::int32_t value_type; + Counts(value_type n = 0, value_type r = 0, value_type o = 0) : normal(n), registered(r), op(o) { } + atomic_counter_t normal; + atomic_counter_t registered; + atomic_counter_t op; }; enum States { @@ -190,8 +193,11 @@ void updateCounts(bool aRemove); void updateActivity() { lastActivity = GET_TICK(); } - virtual string checkNick(const string& nick) = 0; + void updated(OnlineUser& user); + void updated(OnlineUserList& users); + virtual void search(int aSizeMode, int64_t aSize, int aFileType, const string& aString, const string& aToken, const StringList& aExtList) = 0; + virtual string checkNick(const string& nick) = 0; // TimerManagerListener virtual void on(Second, uint64_t aTick) noexcept; @@ -218,9 +224,10 @@ string ip; string localIp; string keyprint; - uint16_t port; + string port; string externalIP; char separator; + Socket::Protocol proto; bool secure; CountType countType; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientListener.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,40 +12,48 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "ClientManager.h" -#include "ShareManager.h" -#include "SearchManager.h" +#include "AdcHub.h" #include "ConnectionManager.h" +#include "ConnectivityManager.h" #include "CryptoManager.h" #include "FavoriteManager.h" +#include "FinishedManager.h" +#include "File.h" +#include "NmdcHub.h" +#include "QueueManager.h" +#include "SearchManager.h" +#include "SearchResult.h" +#include "ShareManager.h" #include "SimpleXML.h" #include "UserCommand.h" -#include "SearchResult.h" - -#include "AdcHub.h" -#include "NmdcHub.h" #ifdef WITH_DHT #include "dht/DHT.h" #endif -#include "FinishedManager.h"//sdc -#include "QueueManager.h" namespace dcpp { +ClientManager::ClientManager() { + TimerManager::getInstance()->addListener(this); +} + +ClientManager::~ClientManager() { + TimerManager::getInstance()->removeListener(this); +} + Client* ClientManager::getClient(const string& aHubURL) { Client* c; - if(strncmp("adc://", aHubURL.c_str(), 6) == 0) { + if(Util::strnicmp("adc://", aHubURL.c_str(), 6) == 0) { c = new AdcHub(aHubURL, false); - } else if(strncmp("adcs://", aHubURL.c_str(), 7) == 0) { + } else if(Util::strnicmp("adcs://", aHubURL.c_str(), 7) == 0) { c = new AdcHub(aHubURL, true); - } else if(strncmp("nmdcs://", aHubURL.c_str(), 8) == 0) { + } else if(Util::strnicmp("nmdcs://", aHubURL.c_str(), 8) == 0) { c = new NmdcHub(aHubURL, true); } else { c = new NmdcHub(aHubURL, false); @@ -181,8 +189,8 @@ int64_t ClientManager::getAvailable() const { Lock l(cs); int64_t bytes = 0; - for(auto i = onlineUsers.begin(); i != onlineUsers.end(); ++i) { - bytes += i->second->getIdentity().getBytesShared(); + for(auto& i: onlineUsers) { + bytes += i.second->getIdentity().getBytesShared(); } return bytes; @@ -200,8 +208,8 @@ bool ClientManager::isConnected(const string& aUrl) const { Lock l(cs); - for(auto i = clients.begin(); i != clients.end(); ++i) { - if((*i)->getHubUrl() == aUrl) { + for(auto i: clients) { + if(i->getHubUrl() == aUrl) { return true; } } @@ -212,12 +220,12 @@ Lock l(cs); string ip; - uint16_t port = 411; + string port = "411"; Util::parseIpPort(ipPort, ip, port); string url; - for(auto i = clients.begin(); i != clients.end(); ++i) { - const Client* c = *i; + for(auto i: clients) { + const Client* c = i; if(c->getIp() == ip) { // If exact match is found, return it if(c->getPort() == port) @@ -234,9 +242,9 @@ string ClientManager::findHubEncoding(const string& aUrl) const { Lock l(cs); - for(auto i = clients.begin(); i != clients.end(); ++i) { - if((*i)->getHubUrl() == aUrl) { - return (*i)->getEncoding(); + for(auto i: clients) { + if(i->getHubUrl() == aUrl) { + return i->getEncoding(); } } return Text::hubDefaultCharset; @@ -247,8 +255,8 @@ return UserPtr(); Lock l(cs); - for(auto i = onlineUsers.begin(); i != onlineUsers.end(); ++i) { - const OnlineUser* ou = i->second; + for(auto& i: onlineUsers) { + const OnlineUser* ou = i.second; if(ou->getUser()->isSet(User::NMDC) && Util::stricmp(ou->getIdentity().getNick(), aNick) == 0) return ou->getUser(); } @@ -267,7 +275,7 @@ UserPtr p(new User(cid)); p->setFlag(User::NMDC); - users.insert(make_pair(cid, p)); + users.emplace(cid, p); return p; } @@ -279,15 +287,19 @@ return ui->second; } + if(cid == getMe()->getCID()) { + return getMe(); + } + UserPtr p(new User(cid)); - users.insert(make_pair(cid, p)); + users.emplace(cid, p); return p; } UserPtr ClientManager::findUser(const CID& cid) const noexcept { Lock l(cs); auto ui = users.find(cid); - return ui == users.end() ? 0 : ui->second; + return ui == users.end() ? nullptr : ui->second; } bool ClientManager::isOp(const UserPtr& user, const string& aHubUrl) const { @@ -313,7 +325,7 @@ void ClientManager::putOnline(OnlineUser* ou) noexcept { { Lock l(cs); - onlineUsers.insert(make_pair(ou->getUser()->getCID(), ou)); + onlineUsers.emplace(ou->getUser()->getCID(), ou); } if(!ou->getUser()->isOnline()) { @@ -323,33 +335,35 @@ } void ClientManager::putOffline(OnlineUser* ou, bool disconnect) noexcept { - bool lastUser = false; + OnlineIter::difference_type diff = 0; { Lock l(cs); - OnlinePair op = onlineUsers.equal_range(ou->getUser()->getCID()); + auto op = onlineUsers.equal_range(ou->getUser()->getCID()); dcassert(op.first != op.second); - for(OnlineIter i = op.first; i != op.second; ++i) { - OnlineUser* ou2 = i->second; + for(auto i = op.first; i != op.second; ++i) { + auto ou2 = i->second; if(ou == ou2) { - lastUser = (distance(op.first, op.second) == 1); + diff = distance(op.first, op.second); onlineUsers.erase(i); break; } } } - if(lastUser) { + if(diff == 1) { //last user UserPtr& u = ou->getUser(); u->unsetFlag(User::ONLINE); if(disconnect) ConnectionManager::getInstance()->disconnect(u); fire(ClientManagerListener::UserDisconnected(), u); + } else if(diff > 1) { + fire(ClientManagerListener::UserUpdated(), *ou); } } OnlineUser* ClientManager::findOnlineUserHint(const CID& cid, const string& hintUrl, OnlinePairC& p) const { - p = onlineUsers.equal_range(cid); - if(p.first == p.second) // no user found with the given CID. + p = onlineUsers.equal_range(cid); + if(p.first == p.second) // no user found with the given CID. return 0; if(!hintUrl.empty()) { @@ -361,7 +375,7 @@ } } - return 0; + return 0; } OnlineUser* ClientManager::findOnlineUser(const HintedUser& user, bool priv) { @@ -416,10 +430,10 @@ * change this call to findOnlineUserHint. */ OnlineUser* ou = findOnlineUser(user.user->getCID(), user.hint.empty() ? uc.getHub() : user.hint, false); if(!ou -#ifdef WITH_DHT - || ou->getClientBase().type == ClientBase::DHT -#endif - ) + #ifdef WITH_DHT + || ou->getClientBase().type == ClientBase::DHT + #endif + ) return; ou->getIdentity().getParams(params, "user", compatibility); @@ -436,17 +450,17 @@ OnlineUser& u = *i->second; if(cmd.getType() == AdcCommand::TYPE_UDP && !u.getIdentity().isUdpActive()) { if(u.getUser()->isNMDC() -#ifdef WITH_DHT - || u.getClientBase().getType() == Client::DHT -#endif - ) + #ifdef WITH_DHT + || u.getClientBase().getType() == Client::DHT + #endif + ) return; cmd.setType(AdcCommand::TYPE_DIRECT); cmd.setTo(u.getIdentity().getSID()); u.getClient().send(cmd); } else { try { - udp.writeTo(u.getIdentity().getIp(), static_cast(Util::toInt(u.getIdentity().getUdpPort())), cmd.toString(getMe()->getCID())); + udp.writeTo(u.getIdentity().getIp(), u.getIdentity().getUdpPort(), cmd.toString(getMe()->getCID())); } catch(const SocketException&) { dcdebug("Socket exception sending ADC UDP command\n"); } @@ -456,15 +470,15 @@ void ClientManager::infoUpdated() { Lock l(cs); - for(auto i = clients.begin(); i != clients.end(); ++i) { - if((*i)->isConnected()) { - (*i)->info(false); + for(auto i: clients) { + if(i->isConnected()) { + i->info(false); } } } void ClientManager::on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, - int aFileType, const string& aString) noexcept + int aFileType, const string& aString) noexcept { Speaker::fire(ClientManagerListener::IncomingSearch(), aString); @@ -478,14 +492,13 @@ SearchResultList l; ShareManager::getInstance()->search(l, aString, aSearchType, aSize, aFileType, aClient, isPassive ? 5 : 10); -// dcdebug("Found %d items (%s)\n", l.size(), aString.c_str()); + // dcdebug("Found %d items (%s)\n", l.size(), aString.c_str()); if(!l.empty()) { if(isPassive) { string name = aSeeker.substr(4); // Good, we have a passive seeker, those are easier... string str; - for(auto i = l.begin(); i != l.end(); ++i) { - const SearchResultPtr& sr = *i; + for(const auto& sr: l) { str += sr->toSR(*aClient); str[str.length()-1] = 5; str += Text::fromUtf8(name, aClient->getEncoding()); @@ -498,12 +511,11 @@ } else { try { string ip; - uint16_t port = 0; + string port; Util::parseIpPort(aSeeker, ip, port); - if(port == 0) - port = 412; - for(auto i = l.begin(); i != l.end(); ++i) { - const SearchResultPtr& sr = *i; + if(port.empty()) + port = "412"; + for(const SearchResultPtr& sr : l) { udp.writeTo(ip, port, sr->toSR(*aClient)); } } catch(const SocketException& /* e */) { @@ -521,9 +533,9 @@ } string ip; - uint16_t port = 0; + string port; Util::parseIpPort(aSeeker, ip, port); - if (port == 0) { + if (port.empty()) { return; } @@ -553,24 +565,24 @@ Speaker::fire(ClientManagerListener::IncomingSearch(), [&adc]() -> string { - auto toCode = [](char a, char b) -> uint16_t { - return (uint16_t)a | ((uint16_t)b)<<8; - }; - - string result; - const StringList ¶ms = adc.getParameters(); - - for(const string ¶m: params) { - if(param.length() <= 2) - continue; - uint16_t cmd = toCode(param[0], param[1]); - if (toCode('T', 'R') == cmd) - result = "TTH:" + param.substr(2); - else if (toCode('A', 'N') == cmd) - result += param.substr(2) + ' '; - } - return result; - }()); + auto toCode = [](char a, char b) -> uint16_t { + return (uint16_t)a | ((uint16_t)b)<<8; + }; + + string result; + const StringList ¶ms = adc.getParameters(); + + for(const string ¶m: params) { + if(param.length() <= 2) + continue; + uint16_t cmd = toCode(param[0], param[1]); + if (toCode('T', 'R') == cmd) + result = "TTH:" + param.substr(2); + else if (toCode('A', 'N') == cmd) + result += param.substr(2) + ' '; + } + return result; + }()); } @@ -580,9 +592,9 @@ dht::DHT::getInstance()->findFile(aString); #endif Lock l(cs); - for(auto i = clients.begin(); i != clients.end(); ++i) { - if((*i)->isConnected()) { - (*i)->search(aSizeMode, aSize, aFileType, aString, aToken, StringList() /*ExtList*/, aOwner); + for(auto i: clients) { + if(i->isConnected()) { + i->search(aSizeMode, aSize, aFileType, aString, aToken, StringList() /*ExtList*/, aOwner); } } } @@ -594,10 +606,8 @@ #endif Lock l(cs); uint64_t estimateSearchSpan = 0; - for(auto it = who.begin(); it != who.end(); ++it) { - string& client = *it; - for(auto j = clients.begin(); j != clients.end(); ++j) { - Client* c = *j; + for(auto& client: who) { + for(auto c: clients) { if(c->isConnected() && c->getHubUrl() == client) { uint64_t ret = c->search(aSizeMode, aSize, aFileType, aString, aToken, aExtList, aOwner); estimateSearchSpan = max(estimateSearchSpan, ret); @@ -620,8 +630,8 @@ } } - for(auto j = clients.begin(); j != clients.end(); ++j) { - (*j)->info(false); + for(auto client: clients) { + client->info(false); } } @@ -630,14 +640,14 @@ Lock l(cs); if(!me) { me = new User(getMyCID()); - users.insert(make_pair(me->getCID(), me)); + users.emplace(me->getCID(), me); } } return me; } const CID& ClientManager::getMyPID() { - if(pid.isZero()) + if(!pid) pid = CID(SETTING(PRIVATE_ID)); return pid; } @@ -648,16 +658,18 @@ return CID(tiger.finalize()); } -void ClientManager::updateNick(const OnlineUser& user) noexcept { +void ClientManager::updateUser(const OnlineUser& user) noexcept { if(!user.getIdentity().getNick().empty()) { Lock l(cs); auto i = nicks.find(user.getUser()->getCID()); if(i == nicks.end()) { - nicks[user.getUser()->getCID()] = std::make_pair(user.getIdentity().getNick(), false); + nicks[user.getUser()->getCID()] = std::make_pair(user.getIdentity().getNick(), false); } else { - i->second.first = user.getIdentity().getNick(); + i->second.first = user.getIdentity().getNick(); } } + + fire(ClientManagerListener::UserUpdated(), user); } void ClientManager::loadUsers() { @@ -688,11 +700,11 @@ { Lock l(cs); - for(auto i = nicks.begin(), iend = nicks.end(); i != iend; ++i) { - if(i->second.second) { + for(auto& i: nicks) { + if(i.second.second) { xml.addTag("User"); - xml.addChildAttrib("CID", i->first.toBase32()); - xml.addChildAttrib("Nick", i->second.first); + xml.addChildAttrib("CID", i.first.toBase32()); + xml.addChildAttrib("Nick", i.second.first); } } } @@ -723,14 +735,12 @@ } void ClientManager::on(UserUpdated, Client*, const OnlineUser& user) noexcept { - updateNick(user); - fire(ClientManagerListener::UserUpdated(), user); + updateUser(user); } -void ClientManager::on(UsersUpdated, Client* c, const OnlineUserList& l) noexcept { - for(auto i = l.cbegin(), iend = l.cend(); i != iend; ++i) { - updateNick(*(*i)); - fire(ClientManagerListener::UserUpdated(), *(*i)); +void ClientManager::on(UsersUpdated, Client*, const OnlineUserList& l) noexcept { + for(auto& i: l) { + updateUser(*i); } } @@ -764,14 +774,14 @@ const FavoriteHubEntry* hub = FavoriteManager::getInstance()->getFavoriteHubEntry(aHubUrl); if(hub) { switch(hub->getMode()) { - case 1 : - mode = SettingsManager::INCOMING_DIRECT; - break; - case 2 : - mode = SettingsManager::INCOMING_FIREWALL_PASSIVE; - break; - default: - mode = SETTING(INCOMING_CONNECTIONS); + case 1 : + mode = SettingsManager::INCOMING_DIRECT; + break; + case 2 : + mode = SettingsManager::INCOMING_FIREWALL_PASSIVE; + break; + default: + mode = SETTING(INCOMING_CONNECTIONS); } } else { mode = SETTING(INCOMING_CONNECTIONS); @@ -782,8 +792,8 @@ void ClientManager::cancelSearch(void* aOwner) { Lock l(cs); - for(auto i = clients.begin(); i != clients.end(); ++i) { - (*i)->cancelSearch(aOwner); + for(auto i: clients) { + i->cancelSearch(aOwner); } } @@ -805,6 +815,7 @@ return NULL; } + #endif #ifdef LUA_SCRIPT diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManager.h 2019-05-06 22:23:37.000000000 +0000 @@ -12,27 +12,29 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "TimerManager.h" +#include "CID.h" #include "Client.h" -#include "Singleton.h" +#include "ClientListener.h" +#include "ClientManagerListener.h" +#include "HintedUser.h" +#include "OnlineUser.h" #include "SettingsManager.h" -#include "User.h" +#include "Singleton.h" #include "Socket.h" -#include "ClientManagerListener.h" +#include "TimerManager.h" namespace dcpp { class UserCommand; class ClientManager : public Speaker, - private ClientListener, public Singleton, - private TimerManagerListener + private ClientListener, public Singleton, + private TimerManagerListener { public: Client* getClient(const string& aHubURL); @@ -44,7 +46,6 @@ StringList getHubs(const CID& cid, const string& hintUrl); StringList getHubNames(const CID& cid, const string& hintUrl); StringList getNicks(const CID& cid, const string& hintUrl); - string getField(const CID& cid, const string& hintUrl, const char* field) const; StringList getHubs(const CID& cid, const string& hintUrl, bool priv); StringList getHubNames(const CID& cid, const string& hintUrl, bool priv); @@ -54,6 +55,7 @@ StringList getHubNames(const HintedUser& user) { return getHubNames(user.user->getCID(), user.hint); } StringList getHubs(const HintedUser& user) { return getHubs(user.user->getCID(), user.hint); } + string getField(const CID& cid, const string& hintUrl, const char* field) const; string getConnection(const CID& cid) const; uint8_t getSlots(const CID& cid) const; @@ -109,7 +111,7 @@ return l_share; } - void setIPUser(const UserPtr& user, const string& IP, uint16_t udpPort = 0) { + void setIPUser(const UserPtr& user, const string& IP, const string& udpPort = Util::emptyString) { if(IP.empty()) return; @@ -117,8 +119,8 @@ OnlineMap::const_iterator i = onlineUsers.find(user->getCID()); if ( i != onlineUsers.end() ) { i->second->getIdentity().setIp(IP); - if(udpPort > 0) - i->second->getIdentity().setUdpPort(Util::toString(udpPort)); + if(Util::toInt(udpPort) > 0) + i->second->getIdentity().setUdpPort(udpPort); } } @@ -140,12 +142,7 @@ bool isActive(const string& aHubUrl = Util::emptyString) const { return getMode(aHubUrl) != SettingsManager::INCOMING_FIREWALL_PASSIVE; } static bool ucExecuteLua(const string& cmd, StringMap& params) noexcept; -#ifdef DO_NOT_USE_MUTEX - void lock() noexcept { cs.lock(); } - void unlock() noexcept { cs.unlock(); } -#else // DO_NOT_USE_MUTEX Lock lock() { return Lock(cs); } -#endif // DO_NOT_USE_MUTEX Client::List& getClients() { return clients; } @@ -190,15 +187,10 @@ friend class Singleton; - ClientManager() { - TimerManager::getInstance()->addListener(this); - } - - virtual ~ClientManager() { - TimerManager::getInstance()->removeListener(this); - } + ClientManager(); + virtual ~ClientManager(); - void updateNick(const OnlineUser& user) noexcept; + void updateUser(const OnlineUser& user) noexcept; /// @return OnlineUser* found by CID and hint; discard any user that doesn't match the hint. OnlineUser* findOnlineUserHint(const CID& cid, const string& hintUrl) const { @@ -221,8 +213,8 @@ virtual void on(HubUpdated, Client* c) noexcept; virtual void on(HubUserCommand, Client*, int, int, const string&, const string&) noexcept; virtual void on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize, - int aFileType, const string& aString) noexcept; - virtual void on(AdcSearch, Client* c, const AdcCommand& adc, const CID& from) noexcept; + int aFileType, const string& aString) noexcept; + virtual void on(AdcSearch, Client*, const AdcCommand& adc, const CID& from) noexcept; // TimerManagerListener virtual void on(TimerManagerListener::Minute, uint64_t aTick) noexcept; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ClientManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ClientManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,18 +13,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "forward.h" -#include "noexcept.h" #include namespace dcpp { - + using std::string; class ClientManagerListener { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CMakeLists.txt eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CMakeLists.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CMakeLists.txt 2018-08-24 01:00:29.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CMakeLists.txt 2019-05-01 10:00:28.000000000 +0000 @@ -1,6 +1,7 @@ project (dcpp) -include_directories(${PROJECT_BINARY_DIR}) + cmake_minimum_required (VERSION 2.6) +include_directories(${PROJECT_BINARY_DIR}) aux_source_directory(${PROJECT_SOURCE_DIR} dcpp_srcs) file (GLOB dcpp_hdrs ${PROJECT_SOURCE_DIR}/*.h) @@ -27,21 +28,20 @@ set (LINK STATIC) set (WIN32_LIBS "ws2_32") else (WIN32) - if (NOT CMAKE_CROSSCOMPILING) - if (HAIKU) - set (PTHREADS "root") - set (HAIKU_LIB "network" "textencoding") - else (HAIKU) - set (PTHREADS "pthread") - if (APPLE) - set (LINK STATIC) - endif(APPLE) - endif(HAIKU) - endif (NOT CMAKE_CROSSCOMPILING) + if (HAIKU) + set (LINK STATIC) + set (PTHREADS "root") + set (HAIKU_LIB "network" "textencoding") + else (HAIKU) + set (PTHREADS "pthread") + if (APPLE) + set (LINK STATIC) + endif(APPLE) + endif(HAIKU) endif (WIN32) if (NOT LINK) - set (LINK SHARED) + set (LINK SHARED) endif (NOT LINK) if (APPLE) @@ -71,7 +71,8 @@ endif (XATTR_FOUND) if (USE_MINIUPNP) - set_property(SOURCE ${PROJECT_SOURCE_DIR}/DCPlusPlus.cpp ${PROJECT_SOURCE_DIR}/UPnPManager.cpp PROPERTY COMPILE_DEFINITIONS USE_MINIUPNP ) + set_property(SOURCE ${PROJECT_SOURCE_DIR}/DCPlusPlus.cpp ${PROJECT_SOURCE_DIR}/MappingManager.cpp + PROPERTY COMPILE_DEFINITIONS USE_MINIUPNP ) endif() if (ICONV_SECOND_ARGUMENT_IS_CONST) @@ -79,17 +80,17 @@ endif (ICONV_SECOND_ARGUMENT_IS_CONST) if (FORCE_XDG) - set_property(SOURCE ${PROJECT_SOURCE_DIR}/Util.cpp PROPERTY COMPILE_DEFINITIONS FORCE_XDG APPEND) + set_property(SOURCE ${PROJECT_SOURCE_DIR}/Util.cpp PROPERTY COMPILE_DEFINITIONS FORCE_XDG APPEND) endif (FORCE_XDG) if (HAVE_IFADDRS_H) - set_property(SOURCE ${PROJECT_SOURCE_DIR}/Util.cpp PROPERTY COMPILE_DEFINITIONS HAVE_IFADDRS_H APPEND) + set_property(SOURCE ${PROJECT_SOURCE_DIR}/Util.cpp PROPERTY COMPILE_DEFINITIONS HAVE_IFADDRS_H APPEND) endif (HAVE_IFADDRS_H) if (WIN32) - set_property(TARGET dcpp PROPERTY COMPILE_FLAGS) + set_property(TARGET dcpp PROPERTY COMPILE_FLAGS) else(WIN32) - set_property(TARGET dcpp PROPERTY COMPILE_FLAGS -fPIC) + set_property(TARGET dcpp PROPERTY COMPILE_FLAGS -fPIC) endif (WIN32) target_link_libraries (dcpp @@ -112,9 +113,9 @@ set_target_properties(dcpp PROPERTIES VERSION ${SOVERSION} OUTPUT_NAME "eiskaltdcpp") if (APPLE) - set (LIBDIR ${PROJECT_NAME_GLOBAL}.app/Contents/Frameworks) - set_target_properties(dcpp PROPERTIES BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Frameworks") + set (LIBDIR ${PROJECT_NAME_GLOBAL}.app/Contents/Frameworks) + set_target_properties(dcpp PROPERTIES BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@executable_path/../Frameworks") endif(APPLE) if (LINK STREQUAL SHARED) diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/compiler.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/compiler.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/compiler.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/compiler.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,25 +13,24 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #if defined(__GNUC__) && !defined(__clang__) -#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) -#error Build with GCC < 4.6 is not supported anymore! +#if (__GNUC__ < 5) || (__GNUC__ == 5 && __GNUC_MINOR__ < 2) +#error GCC 5.2 is required #endif #elif defined(__clang__) -#if (__clang_major__ < 3) || (__clang_major__ == 3 && __clang_minor__ < 1) -#error Build with Clang < 3.1 is not supported anymore! +#if (__clang_major__ < 3) || (__clang_major__ == 3 && __clang_minor__ < 5) +#error Clang 3.5 is required #endif #elif defined(_MSC_VER) -#if _MSC_VER < 1600 -//#error MSVC 10 (2010) is required +#if _MSC_VER < 1800 || _MSC_FULL_VER < 180021114 +#error Visual Studio 2013 with the Nov 2013 CTP is required #endif //disable the deprecated warnings for the CRT functions. @@ -38,27 +38,30 @@ #define _ATL_SECURE_NO_DEPRECATE 1 #define _CRT_NON_CONFORMING_SWPRINTFS 1 +#define strtoll _strtoi64 + #else -//#error No supported compiler found + +#error No supported compiler found #endif -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define _LL(x) x##ll #define _ULL(x) x##ull #define I64_FMT "%I64d" -#define U64_FMT "%I64d" +#define U64_FMT "%I64u" #elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8 #define _LL(x) x##l #define _ULL(x) x##ul #define I64_FMT "%ld" -#define U64_FMT "%ld" +#define U64_FMT "%lu" #else #define _LL(x) x##ll #define _ULL(x) x##ull #define I64_FMT "%lld" -#define U64_FMT "%lld" +#define U64_FMT "%llu" #endif #ifndef _REENTRANT diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,51 +12,70 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "ConnectionManager.h" -#include "DownloadManager.h" -#include "UploadManager.h" -#include "CryptoManager.h" +#include "Client.h" #include "ClientManager.h" -#include "QueueManager.h" +#include "ConnectivityManager.h" +#include "CryptoManager.h" +#include "DownloadManager.h" #include "LogManager.h" - +#include "QueueManager.h" +#include "UploadManager.h" #include "UserConnection.h" namespace dcpp { -ConnectionManager::ConnectionManager() : floodCounter(0), server(0), secureServer(0), shuttingDown(false) { +ConnectionManager::ConnectionManager() : + floodCounter(0), + server(0), + secureServer(0), + shuttingDown(false) +{ TimerManager::getInstance()->addListener(this); - features.push_back(UserConnection::FEATURE_MINISLOTS); - features.push_back(UserConnection::FEATURE_XML_BZLIST); - features.push_back(UserConnection::FEATURE_ADCGET); - features.push_back(UserConnection::FEATURE_TTHL); - features.push_back(UserConnection::FEATURE_TTHF); - - adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BAS0); - adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BASE); - adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_TIGR); - adcFeatures.push_back("AD" + UserConnection::FEATURE_ADC_BZIP); + features = { + UserConnection::FEATURE_MINISLOTS, + UserConnection::FEATURE_XML_BZLIST, + UserConnection::FEATURE_ADCGET, + UserConnection::FEATURE_TTHL, + UserConnection::FEATURE_TTHF + }; + + adcFeatures = { + "AD" + UserConnection::FEATURE_ADC_BAS0, + "AD" + UserConnection::FEATURE_ADC_BASE, + "AD" + UserConnection::FEATURE_ADC_TIGR, + "AD" + UserConnection::FEATURE_ADC_BZIP + }; } void ConnectionManager::listen() { disconnect(); - server = new Server(false, static_cast(SETTING(TCP_PORT)), SETTING(BIND_ADDRESS)); + server = new Server(false, Util::toString(SETTING(TCP_PORT)), SETTING(BIND_ADDRESS)); if(!CryptoManager::getInstance()->TLSOk()) { dcdebug("Skipping secure port: %d\n", SETTING(TLS_PORT)); return; } - secureServer = new Server(true, static_cast(SETTING(TLS_PORT)), SETTING(BIND_ADDRESS)); + secureServer = new Server(true, Util::toString(SETTING(TLS_PORT)), SETTING(BIND_ADDRESS)); +} + +ConnectionQueueItem::ConnectionQueueItem(const HintedUser &aUser, bool aDownload) : + token(Util::toString(Util::rand())), + lastAttempt(0), + errors(0), + state(WAITING), + download(aDownload), + user(aUser) +{ } /** @@ -69,7 +88,7 @@ dcassert((bool)aUser.user); { Lock l(cs); - ConnectionQueueItem::Iter i = find(downloads.begin(), downloads.end(), aUser.user); + auto i = find(downloads.begin(), downloads.end(), aUser.user); if(i == downloads.end()) { getCQI(aUser, true); } else { @@ -78,13 +97,13 @@ } } -ConnectionQueueItem* ConnectionManager::getCQI(const HintedUser& aUser, bool download) { - ConnectionQueueItem* cqi = new ConnectionQueueItem(aUser, download); +ConnectionQueueItem* ConnectionManager::getCQI(const HintedUser& user, bool download) { + ConnectionQueueItem* cqi = new ConnectionQueueItem(user, download); if(download) { - dcassert(find(downloads.begin(), downloads.end(), aUser.user) == downloads.end()); + dcassert(find(downloads.begin(), downloads.end(), user.user) == downloads.end()); downloads.push_back(cqi); } else { - dcassert(find(uploads.begin(), uploads.end(), aUser.user) == uploads.end()); + dcassert(find(uploads.begin(), uploads.end(), user.user) == uploads.end()); uploads.push_back(cqi); } @@ -133,8 +152,7 @@ bool attemptDone = false; - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - ConnectionQueueItem* cqi = *i; + for(auto& cqi: downloads) { if(cqi->getState() != ConnectionQueueItem::ACTIVE) { if(!cqi->getUser().user->isOnline()) { @@ -150,12 +168,12 @@ } if(cqi->getErrors() == -1 && cqi->getLastAttempt() != 0) { - // protocol error, don't reconnect except after a forced attempt - continue; + // protocol error, don't reconnect except after a forced attempt + continue; } if(cqi->getLastAttempt() == 0 || (!attemptDone && - cqi->getLastAttempt() + 60 * 1000 * max(1, cqi->getErrors()) < aTick)) + cqi->getLastAttempt() + 60 * 1000 * max(1, cqi->getErrors()) < aTick)) { cqi->setLastAttempt(aTick); @@ -189,31 +207,39 @@ } } - for(auto m = removed.begin(); m != removed.end(); ++m) { - putCQI(*m); + for(auto& m : removed) { + putCQI(m); } } - for(auto ui = passiveUsers.begin(); ui != passiveUsers.end(); ++ui) { - QueueManager::getInstance()->removeSource(*ui, QueueItem::Source::FLAG_PASSIVE); + for(auto& ui : passiveUsers) { + QueueManager::getInstance()->removeSource(ui, QueueItem::Source::FLAG_PASSIVE); } } void ConnectionManager::on(TimerManagerListener::Minute, uint64_t aTick) noexcept { Lock l(cs); - for(auto j = userConnections.begin(); j != userConnections.end(); ++j) { - if(((*j)->getLastActivity() + 180*1000) < aTick) { - (*j)->disconnect(true); + for(auto& j : userConnections) { + if((j->getLastActivity() + 180*1000) < aTick) { + j->disconnect(true); } } } +const string& ConnectionManager::getPort() const { + return server ? server->getPort() : Util::emptyString; +} + +const string& ConnectionManager::getSecurePort() const { + return secureServer ? secureServer->getPort() : Util::emptyString; +} + static const uint32_t FLOOD_TRIGGER = 20000; static const uint32_t FLOOD_ADD = 2000; -ConnectionManager::Server::Server(bool secure_, uint16_t aPort, const string& ip_ /* = "0.0.0.0" */) : port(0), secure(secure_), die(false) { +ConnectionManager::Server::Server(const bool secure_, const string& aPort, const string& ip_ /* = "0.0.0.0" */) : secure(secure_), die(false) { sock.create(); sock.setSocketOpt(SO_REUSEADDR, 1); ip = SETTING(BIND_IFACE)? sock.getIfaceI4(SETTING(BIND_IFACE_NAME)).c_str() : ip_; @@ -228,8 +254,7 @@ int ConnectionManager::Server::run() noexcept { { char threadName[17]; - snprintf(threadName, sizeof threadName, "Server_%u", port); - setThreadName(threadName); + snprintf(threadName, sizeof threadName, "Server_%s", port.c_str()); } while(!die) { try { @@ -263,7 +288,7 @@ } // Spin for 60 seconds - for(int i = 0; i < 60 && !die; ++i) { + for(auto i = 0; i < 60 && !die; ++i) { Thread::sleep(1000); } } @@ -307,26 +332,17 @@ } } -void ConnectionManager::addCTM2HUB(const string &server, const string &port) -{ - Lock l(cs); - const string key = server + ':' + port; - ddosctm2hub.insert(key); -} - -void ConnectionManager::nmdcConnect(const string& aServer, uint16_t aPort, const string& aNick, const string& hubUrl, const string& encoding, bool secure) { - nmdcConnect(aServer, aPort, 0, BufferedSocket::NAT_NONE, aNick, hubUrl, encoding, secure); +void ConnectionManager::nmdcConnect(const string& aServer, const string& aPort, const string& aNick, const string& hubUrl, const string& encoding, bool secure) { + nmdcConnect(aServer, aPort, Util::emptyString, BufferedSocket::NAT_NONE, aNick, hubUrl, encoding, secure); } -void ConnectionManager::nmdcConnect(const string& aServer, uint16_t aPort, uint16_t localPort, BufferedSocket::NatRoles natRole, const string& aNick, const string& hubUrl, const string& encoding, bool secure) { +void ConnectionManager::nmdcConnect(const string& aServer, const string& aPort, const string& localPort, BufferedSocket::NatRoles natRole, const string& aNick, const string& hubUrl, const string& encoding, bool secure) { if(shuttingDown) return; - { - Lock l(cs); - if (!ddosctm2hub.empty() && ddosctm2hub.find(aServer + ":" + Util::toString(aPort)) != ddosctm2hub.end()) { - return; - } - } + + if (checkHubCCBlock(aServer, aPort, hubUrl)) + return; + UserConnection* uc = getConnection(true, secure); uc->setToken(aNick); uc->setHubUrl(hubUrl); @@ -341,11 +357,11 @@ } } -void ConnectionManager::adcConnect(const OnlineUser& aUser, uint16_t aPort, const string& aToken, bool secure) { - adcConnect(aUser, aPort, 0, BufferedSocket::NAT_NONE, aToken, secure); +void ConnectionManager::adcConnect(const OnlineUser& aUser, const string &aPort, const string& aToken, bool secure) { + adcConnect(aUser, aPort, Util::emptyString, BufferedSocket::NAT_NONE, aToken, secure); } -void ConnectionManager::adcConnect(const OnlineUser& aUser, uint16_t aPort, uint16_t localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure) { +void ConnectionManager::adcConnect(const OnlineUser& aUser, const string &aPort, const string &localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure) { if(shuttingDown) return; @@ -372,8 +388,8 @@ void ConnectionManager::disconnect() noexcept { delete server; delete secureServer; - - server = secureServer = 0; + server = nullptr; + secureServer = nullptr; } void ConnectionManager::on(AdcCommand::SUP, UserConnection* aSource, const AdcCommand& cmd) noexcept { @@ -385,9 +401,9 @@ bool baseOk = false; - for(auto i = cmd.getParameters().begin(); i != cmd.getParameters().end(); ++i) { - if(i->compare(0, 2, "AD") == 0) { - string feat = i->substr(2); + for(auto& i: cmd.getParameters()) { + if(i.compare(0, 2, "AD") == 0) { + string feat = i.substr(2); if(feat == UserConnection::FEATURE_ADC_BASE || feat == UserConnection::FEATURE_ADC_BAS0) { baseOk = true; // ADC clients must support all these... @@ -424,7 +440,7 @@ aSource->setState(UserConnection::STATE_INF); } -void ConnectionManager::on(AdcCommand::STA, UserConnection*, const AdcCommand& cmd) noexcept { +void ConnectionManager::on(AdcCommand::STA, UserConnection*, const AdcCommand&) noexcept { } @@ -432,7 +448,7 @@ // incorrect check because aSource->getUser().get() == nullptr if(aSource->isSecure() && !aSource->isTrusted() && !BOOLSETTING(ALLOW_UNTRUSTED_CLIENTS)) { putConnection(aSource); -// QueueManager::getInstance()->removeSource(aSource->getUser(), QueueItem::Source::FLAG_UNTRUSTED); + // QueueManager::getInstance()->removeSource(aSource->getUser(), QueueItem::Source::FLAG_UNTRUSTED); return; } @@ -460,7 +476,6 @@ dcassert(!aNick.empty()); dcdebug("ConnectionManager::onMyNick %p, %s\n", (void*)aSource, aNick.c_str()); - dcassert(!aSource->getUser()); if(aSource->isSet(UserConnection::FLAG_INCOMING)) { // Try to guess where this came from... @@ -482,8 +497,7 @@ // First, we try looking in the pending downloads...hopefully it's one of them... { Lock l(cs); - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - ConnectionQueueItem* cqi = *i; + for(auto& cqi: downloads) { cqi->setErrors(0); if((cqi->getState() == ConnectionQueueItem::CONNECTING || cqi->getState() == ConnectionQueueItem::WAITING) && cqi->getUser().user->getCID() == cid) @@ -523,6 +537,8 @@ } void ConnectionManager::on(UserConnectionListener::CLock, UserConnection* aSource, const string& aLock, const string& aPk) noexcept { + (void)aPk; + if(aSource->getState() != UserConnection::STATE_LOCK) { dcdebug("CM::onLock %p received lock twice, ignoring\n", (void*)aSource); return; @@ -577,14 +593,13 @@ } void ConnectionManager::addDownloadConnection(UserConnection* uc) { - dcassert(uc->isSet(UserConnection::FLAG_DOWNLOAD)); bool addConn = false; { Lock l(cs); auto i = find(downloads.begin(), downloads.end(), uc->getUser()); if(i != downloads.end()) { - ConnectionQueueItem* cqi = *i; + auto& cqi = *i; if(cqi->getState() == ConnectionQueueItem::WAITING || cqi->getState() == ConnectionQueueItem::CONNECTING) { cqi->setState(ConnectionQueueItem::ACTIVE); uc->setFlag(UserConnection::FLAG_ASSOCIATED); @@ -638,8 +653,6 @@ return; } - dcassert(aSource->getUser()); - if(aSource->isSet(UserConnection::FLAG_DOWNLOAD)) { addDownloadConnection(aSource); } else { @@ -654,24 +667,35 @@ return; } + // Leaks CSUPs, other client's CINF, and ADC connection's presence. Allows removing + // user from queue by waiting long enough for aSource->getUser() to function. + if(SETTING(REQUIRE_TLS) && !aSource->isSet(UserConnection::FLAG_NMDC) && !aSource->isSecure()) { + putConnection(aSource); + QueueManager::getInstance()->removeSource(aSource->getUser(), QueueItem::Source::FLAG_UNENCRYPTED); + return; + } + string cid; if(!cmd.getParam("ID", 0, cid)) { - aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_INF_MISSING, "ID missing").addParam("FL", "ID")); + aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_INF_FIELD, "INF ID missing").addParam("FM", "ID")); dcdebug("CM::onINF missing ID\n"); aSource->disconnect(); return; } - aSource->setUser(ClientManager::getInstance()->findUser(CID(cid))); - if(!aSource->getUser()) { - dcdebug("CM::onINF: User not found"); - aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_GENERIC, "User not found")); - putConnection(aSource); - return; + aSource->setUser(ClientManager::getInstance()->findUser(CID(cid))); + + if(!aSource->getUser()) { + aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_INF_FIELD, "INF ID: user not found").addParam("FB", "ID")); + putConnection(aSource); + return; + } } + // without a valid KeyPrint this degrades into normal turst check if(!checkKeyprint(aSource)) { + QueueManager::getInstance()->removeSource(aSource->getUser(), QueueItem::Source::FLAG_UNTRUSTED); putConnection(aSource); return; } @@ -679,7 +703,7 @@ string token; if(aSource->isSet(UserConnection::FLAG_INCOMING)) { if(!cmd.getParam("TO", 0, token)) { - aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_GENERIC, "TO missing")); + aSource->send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_INF_FIELD, "INF TO missing").addParam("FM", "TO")); putConnection(aSource); return; } @@ -717,16 +741,12 @@ Lock l(cs); auto i = find(downloads.begin(), downloads.end(), aUser); - if(i == downloads.end()) { - return; + if(i != downloads.end()) { + (*i)->setLastAttempt(0); } - - (*i)->setLastAttempt(0); } bool ConnectionManager::checkKeyprint(UserConnection *aSource) { - dcassert(aSource->getUser()); - auto kp = aSource->getKeyprint(); if(kp.empty()) { return true; @@ -762,43 +782,74 @@ if(aSource->isSet(UserConnection::FLAG_DOWNLOAD)) { auto i = find(downloads.begin(), downloads.end(), aSource->getUser()); dcassert(i != downloads.end()); - ConnectionQueueItem* cqi = *i; + + auto& cqi = *i; cqi->setState(ConnectionQueueItem::WAITING); cqi->setLastAttempt(GET_TICK()); cqi->setErrors(protocolError ? -1 : (cqi->getErrors() + 1)); fire(ConnectionManagerListener::Failed(), cqi, aError); - } else if(aSource->isSet(UserConnection::FLAG_UPLOAD)) { - auto i = find(uploads.begin(), uploads.end(), aSource->getUser()); - dcassert(i != uploads.end()); - ConnectionQueueItem* cqi = *i; - putCQI(cqi); + } else { + if(aSource->isSet(UserConnection::FLAG_UPLOAD)) { + auto i = find(uploads.begin(), uploads.end(), aSource->getUser()); + dcassert(i != uploads.end()); + ConnectionQueueItem* cqi = *i; + putCQI(cqi); + } } } putConnection(aSource); } +bool ConnectionManager::checkHubCCBlock(const string& aServer, const string& aPort, const string& aHubUrl) +{ + const auto server_lower = Text::toLower(aServer); + dcassert(server_lower == aServer); + + bool cc_blocked = false; + + { + Lock l(cs); + cc_blocked = !hubsBlockingCC.empty() && hubsBlockingCC.find(server_lower) != hubsBlockingCC.end(); + } + + if(cc_blocked) + { + LogManager::getInstance()->message(str(F_("Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')") % aServer % aPort % aHubUrl)); + return true; + } + return false; +} + void ConnectionManager::on(UserConnectionListener::Failed, UserConnection* aSource, const string& aError) noexcept { failed(aSource, aError, false); } void ConnectionManager::on(UserConnectionListener::ProtocolError, UserConnection* aSource, const string& aError) noexcept { + if(aError.compare(0, 7, "CTM2HUB", 7) == 0) { + { + Lock l(cs); + hubsBlockingCC.insert(Text::toLower(aSource->getRemoteIp())); + } + + string aServerPort = aSource->getRemoteIp() + ":" + aSource->getPort(); + LogManager::getInstance()->message(str(F_("Blocking '%1%', potential DDoS detected (originating hub '%2%')") % aServerPort % aSource->getHubUrl() )); + } + failed(aSource, aError, true); } -void ConnectionManager::disconnect(const UserPtr& aUser) { +void ConnectionManager::disconnect(const UserPtr& user) { Lock l(cs); - for(auto i = userConnections.begin(); i != userConnections.end(); ++i) { - UserConnection* uc = *i; - if(uc->getUser() == aUser) + for(auto uc: userConnections) { + if(uc->getUser() == user) uc->disconnect(true); } } -void ConnectionManager::disconnect(const UserPtr& aUser, int isDownload) { +void ConnectionManager::disconnect(const UserPtr& user, int isDownload) { Lock l(cs); - for(auto i = userConnections.begin(); i != userConnections.end(); ++i) { - UserConnection* uc = *i; - if(uc->getUser() == aUser && uc->isSet(isDownload ? UserConnection::FLAG_DOWNLOAD : UserConnection::FLAG_UPLOAD)) { + for(auto uc: userConnections) { + if(uc->getUser() == user && uc->isSet(isDownload ? UserConnection::FLAG_DOWNLOAD : UserConnection::FLAG_UPLOAD)) { uc->disconnect(true); break; } @@ -811,8 +862,8 @@ disconnect(); { Lock l(cs); - for(auto j = userConnections.begin(); j != userConnections.end(); ++j) { - (*j)->disconnect(true); + for(auto j: userConnections) { + j->disconnect(true); } } // Wait until all connections have died out... @@ -829,18 +880,18 @@ // UserConnectionListener void ConnectionManager::on(UserConnectionListener::Supports, UserConnection* conn, const StringList& feat) noexcept { - for(auto i = feat.begin(); i != feat.end(); ++i) { - if(*i == UserConnection::FEATURE_MINISLOTS) { + for(auto& i: feat) { + if(i == UserConnection::FEATURE_MINISLOTS) { conn->setFlag(UserConnection::FLAG_SUPPORTS_MINISLOTS); - } else if(*i == UserConnection::FEATURE_XML_BZLIST) { + } else if(i == UserConnection::FEATURE_XML_BZLIST) { conn->setFlag(UserConnection::FLAG_SUPPORTS_XML_BZLIST); - } else if(*i == UserConnection::FEATURE_ADCGET) { + } else if(i == UserConnection::FEATURE_ADCGET) { conn->setFlag(UserConnection::FLAG_SUPPORTS_ADCGET); - } else if(*i == UserConnection::FEATURE_ZLIB_GET) { + } else if(i == UserConnection::FEATURE_ZLIB_GET) { conn->setFlag(UserConnection::FLAG_SUPPORTS_ZLIB_GET); - } else if(*i == UserConnection::FEATURE_TTHL) { + } else if(i == UserConnection::FEATURE_TTHL) { conn->setFlag(UserConnection::FLAG_SUPPORTS_TTHL); - } else if(*i == UserConnection::FEATURE_TTHF) { + } else if(i == UserConnection::FEATURE_TTHF) { conn->setFlag(UserConnection::FLAG_SUPPORTS_TTHF); } } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,25 +13,33 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "TimerManager.h" -#include "UserConnection.h" -#include "User.h" +#include +#include +#include + +#include "BufferedSocket.h" +#include "ConnectionManagerListener.h" #include "CriticalSection.h" +#include "HintedUser.h" +#include "NonCopyable.h" #include "Singleton.h" -#include "Util.h" -#include "ConnectionManagerListener.h" +#include "TimerManager.h" +#include "UserConnectionListener.h" namespace dcpp { +using std::unique_ptr; +using std::unordered_map; +using std::vector; + class SocketException; -class ConnectionQueueItem : boost::noncopyable { +class ConnectionQueueItem : private NonCopyable { public: typedef ConnectionQueueItem* Ptr; typedef vector List; @@ -43,8 +52,7 @@ ACTIVE // In one up/downmanager }; - ConnectionQueueItem(const HintedUser& aUser, bool aDownload) : token(Util::toString(Util::rand())), - lastAttempt(0), errors(0), state(WAITING), download(aDownload), user(aUser) { } + ConnectionQueueItem(const HintedUser& user, bool aDownload); GETSET(string, token, Token); GETSET(uint64_t, lastAttempt, LastAttempt); @@ -62,7 +70,7 @@ public: void add(const string& aNick, const string& aMyNick, const string& aHubUrl) { Lock l(cs); - expectedConnections.insert(make_pair(aNick, make_pair(aMyNick, aHubUrl))); + expectedConnections.emplace(aNick, make_pair(aMyNick, aHubUrl)); } StringPair remove(const string& aNick) { @@ -80,7 +88,7 @@ private: /** Nick -> myNick, hubUrl for expected NMDC incoming connections */ - typedef map ExpectMap; + typedef unordered_map ExpectMap; ExpectMap expectedConnections; CriticalSection cs; @@ -90,24 +98,24 @@ inline bool operator==(ConnectionQueueItem::Ptr ptr, const UserPtr& aUser) { return ptr->getUser() == aUser; } class ConnectionManager : public Speaker, - public UserConnectionListener, TimerManagerListener, - public Singleton + public UserConnectionListener, TimerManagerListener, + public Singleton { public: void nmdcExpect(const string& aNick, const string& aMyNick, const string& aHubUrl) { expectedConnections.add(aNick, aMyNick, aHubUrl); } - void nmdcConnect(const string& aServer, uint16_t aPort, const string& aMyNick, const string& hubUrl, const string& encoding, bool secure); - void nmdcConnect(const string& aServer, uint16_t aPort, uint16_t localPort, BufferedSocket::NatRoles natRole, const string& aNick, const string& hubUrl, const string& encoding, bool secure); - void adcConnect(const OnlineUser& aUser, uint16_t aPort, const string& aToken, bool secure); - void adcConnect(const OnlineUser& aUser, uint16_t aPort, uint16_t localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure); + void nmdcConnect(const string& aServer, const string& aPort, const string& aMyNick, const string& hubUrl, const string& encoding, bool secure); + void nmdcConnect(const string& aServer, const string& aPort, const string& localPort, BufferedSocket::NatRoles natRole, const string& aNick, const string& hubUrl, const string& encoding, bool secure); + void adcConnect(const OnlineUser& aUser, const string& aPort, const string& aToken, bool secure); + void adcConnect(const OnlineUser& aUser, const string& aPort, const string& localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure); void getDownloadConnection(const HintedUser& aUser); void force(const UserPtr& aUser); - void disconnect(const UserPtr& aUser); // disconnect downloads and uploads - void disconnect(const UserPtr& aUser, int isDownload); + void disconnect(const UserPtr& user); // disconnect all transfers for the user + void disconnect(const UserPtr& user, int isDownload); void shutdown(); @@ -115,25 +123,23 @@ void listen(); void disconnect() noexcept; - uint16_t getPort() { return server ? static_cast(server->getPort()) : 0; } - uint16_t getSecurePort() { return secureServer ? static_cast(secureServer->getPort()) : 0; } - - void addCTM2HUB(const string &server, const string &port); + const string& getPort() const; + const string& getSecurePort() const; private: - unordered_set ddosctm2hub; - class Server : public Thread { public: - Server(bool secure_, uint16_t port, const string& ip = "0.0.0.0"); - uint16_t getPort() { return port; } + Server(const bool secure_, const std::string& port, const string& ip = "0.0.0.0"); virtual ~Server() { die = true; join(); } + + const string& getPort() const { return port; } + private: virtual int run() noexcept; Socket sock; - uint16_t port; + string port; string ip; bool secure; bool die; @@ -141,7 +147,7 @@ friend class Server; - CriticalSection cs; + mutable CriticalSection cs; /** All ConnectionQueueItems */ ConnectionQueueItem::List downloads; @@ -156,6 +162,7 @@ ExpectedMap expectedConnections; uint32_t floodCounter; + unordered_set hubsBlockingCC; Server* server; Server* secureServer; @@ -170,10 +177,10 @@ UserConnection* getConnection(bool aNmdc, bool secure) noexcept; void putConnection(UserConnection* aConn); - void addUploadConnection(UserConnection* uc); void addDownloadConnection(UserConnection* uc); + void addUploadConnection(UserConnection* uc); - ConnectionQueueItem* getCQI(const HintedUser& aUser, bool download); + ConnectionQueueItem* getCQI(const HintedUser& user, bool download); void putCQI(ConnectionQueueItem* cqi); bool checkKeyprint(UserConnection *aSource); @@ -182,6 +189,8 @@ void failed(UserConnection* aSource, const string& aError, bool protocolError); + bool checkHubCCBlock(const string& aServer, const string& aPort, const string& aHubUrl); + // UserConnectionListener virtual void on(Connected, UserConnection*) noexcept; virtual void on(Failed, UserConnection*, const string&) noexcept; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectionManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectionManagerListener.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,15 +12,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -namespace dcpp { +#include "forward.h" +#include "typedefs.h" -class ConnectionQueueItem; +namespace dcpp { class ConnectionManagerListener { public: diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectivityManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectivityManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectivityManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectivityManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,19 +13,21 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "ConnectivityManager.h" -#include "SettingsManager.h" + #include "ClientManager.h" #include "ConnectionManager.h" -#include "SearchManager.h" +#include "debug.h" +#include "format.h" #include "LogManager.h" -#include "UPnPManager.h" +#include "MappingManager.h" +#include "SearchManager.h" +#include "SettingsManager.h" +#include "version.h" #ifdef WITH_DHT #include "dht/DHT.h" #endif @@ -32,23 +35,23 @@ namespace dcpp { ConnectivityManager::ConnectivityManager() : -autoDetected(false), -running(false) + autoDetected(false), + running(false) { updateLast(); } void ConnectivityManager::startSocket() { - autoDetected = false; + autoDetected = false; - disconnect(); + disconnect(); - if(ClientManager::getInstance()->isActive()) { - listen(); + if(ClientManager::getInstance()->isActive()) { + listen(); - // must be done after listen calls; otherwise ports won't be set - if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP) - UPnPManager::getInstance()->open(); + // must be done after listen calls; otherwise ports won't be set + if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP) + MappingManager::getInstance()->open(); } updateLast(); @@ -71,55 +74,55 @@ //SettingsManager::getInstance()->unset(SettingsManager::MAPPER); SettingsManager::getInstance()->unset(SettingsManager::BIND_ADDRESS); - if (UPnPManager::getInstance()->getOpened()) { - UPnPManager::getInstance()->close(); - } + if (MappingManager::getInstance()->getOpened()) { + MappingManager::getInstance()->close(); + } - disconnect(); + disconnect(); - log(_("Determining the best connectivity settings...")); - try { + log(_("Determining the best connectivity settings...")); + try { listen(); - } catch(const Exception& e) { + } catch(const Exception& e) { SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_FIREWALL_PASSIVE); log(str(F_("Unable to open %1% port(s); connectivity settings must be configured manually") % e.getError())); fire(ConnectivityManagerListener::Finished()); running = false; return; - } + } - autoDetected = true; + autoDetected = true; - if (!Util::isPrivateIp(Util::getLocalIp(AF_INET))) { - SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_DIRECT); - log(_("Public IP address detected, selecting active mode with direct connection")); - fire(ConnectivityManagerListener::Finished()); + if (!Util::isPrivateIp(Util::getLocalIp(AF_INET))) { + SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_DIRECT); + log(_("Public IP address detected, selecting active mode with direct connection")); + fire(ConnectivityManagerListener::Finished()); running = false; return; - } + } - SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_FIREWALL_UPNP); - log(_("Local network with possible NAT detected, trying to map the ports using UPnP...")); + SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_FIREWALL_UPNP); + log(_("Local network with possible NAT detected, trying to map the ports using UPnP...")); - if (!UPnPManager::getInstance()->open()) { + if (!MappingManager::getInstance()->open()) { running = false; } } void ConnectivityManager::setup(bool settingsChanged) { - if(BOOLSETTING(AUTO_DETECT_CONNECTION)) { - if (!autoDetected) detectConnection(); - } else { - if(autoDetected || (settingsChanged && (SearchManager::getInstance()->getPort() != SETTING(UDP_PORT) || ConnectionManager::getInstance()->getPort() != SETTING(TCP_PORT) || ConnectionManager::getInstance()->getSecurePort() != SETTING(TLS_PORT) || SETTING(BIND_ADDRESS) != lastBind))) { - if(settingsChanged || SETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_FIREWALL_UPNP) { - UPnPManager::getInstance()->close(); - } - startSocket(); - } else if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP && !UPnPManager::getInstance()->getOpened()) { - // previous UPnP mappings had failed; try again - UPnPManager::getInstance()->open(); - } - } + if(BOOLSETTING(AUTO_DETECT_CONNECTION)) { + if (!autoDetected) detectConnection(); + } else { + if(autoDetected || (settingsChanged && (SearchManager::getInstance()->getPort() != Util::toString(SETTING(UDP_PORT)) || ConnectionManager::getInstance()->getPort() != Util::toString(SETTING(TCP_PORT)) || ConnectionManager::getInstance()->getSecurePort() != Util::toString(SETTING(TLS_PORT)) || SETTING(BIND_ADDRESS) != lastBind))) { + if(settingsChanged || SETTING(INCOMING_CONNECTIONS) != SettingsManager::INCOMING_FIREWALL_UPNP) { + MappingManager::getInstance()->close(); + } + startSocket(); + } else if(SETTING(INCOMING_CONNECTIONS) == SettingsManager::INCOMING_FIREWALL_UPNP && !MappingManager::getInstance()->getOpened()) { + // previous UPnP mappings had failed; try again + MappingManager::getInstance()->open(); + } + } } void ConnectivityManager::mappingFinished(bool success) { @@ -165,21 +168,16 @@ } void ConnectivityManager::log(const string& message) { - if(BOOLSETTING(AUTO_DETECT_CONNECTION)) { - LogManager::getInstance()->message(_("Connectivity: ") + message); - fire(ConnectivityManagerListener::Message(), message); - } else { - LogManager::getInstance()->message(message); - } + if(BOOLSETTING(AUTO_DETECT_CONNECTION)) { + LogManager::getInstance()->message(_("Connectivity: ") + message); + fire(ConnectivityManagerListener::Message(), message); + } else { + LogManager::getInstance()->message(message); + } } void ConnectivityManager::updateLast() { - lastTcp = (unsigned short)SETTING(TCP_PORT); - lastUdp = (unsigned short)SETTING(UDP_PORT); - lastTls = (unsigned short)SETTING(TLS_PORT); - lastConn = SETTING(INCOMING_CONNECTIONS); lastBind = SETTING(BIND_ADDRESS); - //lastMapper = SETTING(MAPPER); } } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectivityManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectivityManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ConnectivityManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ConnectivityManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,18 +12,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "Util.h" -#include "Speaker.h" +#include "CriticalSection.h" +#include "SettingsManager.h" #include "Singleton.h" +#include "Speaker.h" +#include "Util.h" + +#include +#include namespace dcpp { +using std::string; +using std::unordered_map; + class ConnectivityManagerListener { public: virtual ~ConnectivityManagerListener() { } @@ -46,7 +53,7 @@ private: friend class Singleton; - friend class UPnPManager; + friend class MappingManager; ConnectivityManager(); virtual ~ConnectivityManager() { } @@ -61,10 +68,6 @@ bool autoDetected; bool running; - unsigned short lastTcp; - unsigned short lastUdp; - unsigned short lastTls; - int lastConn; string lastBind; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CriticalSection.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CriticalSection.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CriticalSection.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CriticalSection.h 2019-05-06 22:23:37.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,66 +13,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "debug.h" -#include "noexcept.h" +#if !defined(__APPLE__) && !defined(__MACH__) -#ifndef DO_NOT_USE_MUTEX - -#if defined (_WIN32) -#include - -#ifdef FIX_FOR_OLD_BOOST -template -class lock_guard -{ -private: - Mutex& m; - -public: - explicit lock_guard(Mutex& m_) : m(m_) - { - m.lock(); - } - lock_guard(Mutex& m_, boost::adopt_lock_t) : m(m_) - { - m.lock(); - } - ~lock_guard() - { - m.unlock(); - } -}; -#else // FIX_FOR_OLD_BOOST -#include -#endif // FIX_FOR_OLD_BOOST - -#else #include -#endif namespace dcpp { -#if defined (_WIN32) -typedef boost::recursive_mutex CriticalSection; -typedef boost::detail::spinlock FastCriticalSection; -typedef boost::unique_lock Lock; -typedef boost::lock_guard FastLock; -#else typedef std::recursive_mutex CriticalSection; typedef std::mutex FastCriticalSection; typedef std::unique_lock Lock; typedef std::lock_guard FastLock; -#endif } // namespace dcpp -#else // DO_NOT_USE_MUTEX +#else // !defined(__APPLE__) && !defined(__MACH__) #include @@ -79,28 +39,6 @@ class CriticalSection { -#ifdef _WIN32 -public: - void lock() noexcept { - EnterCriticalSection(&cs); - dcdrun(counter++); - } - void unlock() noexcept { - dcassert(--counter >= 0); - LeaveCriticalSection(&cs); - } - CriticalSection() noexcept { - dcdrun(counter = 0;); - InitializeCriticalSection(&cs); - } - ~CriticalSection() noexcept { - dcassert(counter==0); - DeleteCriticalSection(&cs); - } -private: - dcdrun(long counter); - CRITICAL_SECTION cs; -#else // _WIN32 public: CriticalSection() noexcept { pthread_mutexattr_init(&ma); @@ -115,11 +53,11 @@ void unlock() noexcept { pthread_mutex_unlock(&mtx); } pthread_mutex_t& getMutex() { return mtx; } private: - pthread_mutex_t mtx; - pthread_mutexattr_t ma; -#endif // _WIN32 CriticalSection(const CriticalSection&); CriticalSection& operator=(const CriticalSection&); + + pthread_mutex_t mtx; + pthread_mutexattr_t ma; }; // A fast, non-recursive and unfair implementation of the Critical Section. @@ -150,8 +88,7 @@ typedef LockBase Lock; typedef LockBase FastLock; - } -#endif // DO_NOT_USE_MUTEX +#endif // !defined(__APPLE__) && !defined(__MACH__) diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CryptoManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CryptoManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CryptoManager.cpp 2018-02-16 23:06:23.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CryptoManager.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -12,22 +12,21 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "CryptoManager.h" -#include - #include "File.h" #include "LogManager.h" #include "ClientManager.h" #include "version.h" #include +#include #include + #include namespace dcpp { @@ -43,10 +42,10 @@ "!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK"; CryptoManager::CryptoManager() -: - certsLoaded(false), - lock("EXTENDEDPROTOCOLABCABCABCABCABCABC"), - pk("DCPLUSPLUS" EISKALTDCPP_VERSION) + : + certsLoaded(false), + lock("EXTENDEDPROTOCOLABCABCABCABCABCABC"), + pk("DCPLUSPLUS" VERSIONSTRING) { SSL_library_init(); @@ -59,54 +58,54 @@ dh.reset(DH_new()); static unsigned char dh4096_p[]={ - 0xCA,0x35,0xA8,0xBB,0x65,0x33,0x28,0xC6,0x3F,0xD7,0x21,0x55, - 0x95,0xDF,0xC0,0xDC,0x11,0x10,0x23,0x2D,0x1E,0xD6,0x52,0x23, - 0xA1,0x52,0xB8,0xDD,0x4A,0x25,0xEE,0xF4,0x78,0xB6,0x89,0x9E, - 0xB6,0x33,0xEB,0x01,0xA6,0x46,0x31,0xD8,0x3D,0x12,0xB4,0x7B, - 0x1F,0x64,0x0C,0x84,0x10,0x80,0xFB,0x4F,0x74,0x21,0xA3,0x9B, - 0xF5,0x97,0xD1,0x05,0x97,0x9D,0x52,0x4F,0x91,0x3C,0xE1,0xA8, - 0x97,0xE0,0x33,0x9D,0xCB,0x9D,0x9D,0x2A,0xB5,0x3E,0xF5,0x8D, - 0x7F,0xEE,0x91,0xEE,0x4E,0xC5,0xA6,0xAB,0x54,0xD9,0xC2,0xA5, - 0x0D,0x2E,0xEA,0x1A,0x39,0xFD,0x30,0x4A,0x1C,0xB7,0x34,0x2B, - 0x7D,0x51,0xF6,0xB1,0xD1,0x8D,0xCE,0x28,0xDC,0xF9,0xDE,0x34, - 0xAF,0x1E,0xD1,0x7C,0xC2,0xD3,0x38,0x8E,0xBD,0x35,0x01,0x53, - 0xDD,0x2E,0xB5,0x83,0xC8,0xEF,0x08,0x15,0x59,0x6E,0xA3,0xC4, - 0x71,0x57,0x8C,0x4D,0xFD,0xA7,0x19,0x40,0x88,0x68,0x4E,0xD6, - 0x8F,0x5C,0xE5,0xEC,0xCF,0x5F,0xEB,0x9A,0xA4,0x66,0x40,0x8B, - 0x02,0x87,0xA7,0x3A,0x58,0x81,0xF1,0x6A,0x14,0x16,0x75,0x7D, - 0x33,0x01,0xEB,0x3F,0xA8,0x02,0xDC,0x09,0x32,0x12,0x00,0x20, - 0x47,0xFF,0x01,0x14,0xFE,0x9E,0x3A,0x44,0x4D,0xED,0x85,0xD5, - 0xDA,0x2F,0xE3,0x99,0xCE,0xDA,0x84,0x64,0xCB,0x0C,0x8C,0x00, - 0x90,0x19,0x70,0x1C,0x00,0x1D,0x63,0x3C,0x77,0x16,0x8D,0x3D, - 0x86,0x97,0x22,0x23,0x2F,0x7B,0xAB,0xB8,0xEB,0x94,0xA4,0x01, - 0xAA,0x34,0xBA,0xEA,0x7D,0x7A,0x37,0xB7,0x0C,0x75,0xEB,0x00, - 0x8D,0x52,0x7A,0xE2,0xDF,0x78,0x7C,0x4F,0x54,0x9E,0xA4,0xDD, - 0xC9,0xFC,0x08,0x7C,0x45,0x70,0x43,0x0F,0x39,0xE3,0x7E,0x48, - 0xB8,0xDC,0x9D,0xEC,0xB9,0x51,0x29,0x86,0x29,0x60,0xF6,0x4F, - 0xF7,0xCA,0xDD,0x3B,0x7F,0xAE,0xE2,0x54,0x4C,0x53,0x42,0x55, - 0xC0,0x39,0x24,0xE1,0x1A,0xAD,0x9E,0xCC,0x75,0x5E,0xF1,0xE2, - 0xD6,0xAE,0xCD,0x9A,0x91,0xC3,0x7B,0xE5,0x29,0xAD,0xCA,0xC2, - 0x00,0xC1,0xF9,0xF4,0x6D,0xD2,0x4B,0xD4,0x5A,0x56,0x39,0xCD, - 0xAC,0xCA,0xE7,0xD1,0x8C,0x15,0x4D,0x2B,0x59,0x67,0x29,0x72, - 0xE7,0x40,0x14,0x81,0x9E,0x26,0x48,0xF8,0x6C,0x51,0xF5,0xBE, - 0x64,0xD1,0xF4,0x4D,0x98,0xE7,0xFD,0x5E,0x23,0x1E,0xDF,0xBA, - 0xBD,0x2E,0xB1,0x81,0x26,0x98,0x9C,0x2F,0xE8,0xD5,0x32,0x6B, - 0x94,0x91,0x8C,0x2E,0xB8,0xD9,0xC9,0x2F,0x22,0x9D,0xA6,0x52, - 0x02,0xDF,0x99,0x63,0x64,0x7E,0xB8,0x68,0xAB,0x17,0x54,0x7E, - 0xED,0x9E,0xD1,0x45,0x64,0x36,0x65,0xE8,0x09,0x50,0xAB,0xB0, - 0xD4,0x8C,0x79,0x9F,0x4C,0xB8,0x26,0x45,0xBE,0x0F,0xDE,0x14, - 0x6F,0xEC,0x70,0x21,0x1A,0xA0,0x1D,0xD0,0x7D,0xA2,0x0F,0x85, - 0xA5,0x7C,0xC1,0x0A,0x74,0xB1,0x7B,0x5A,0xD2,0xC4,0x0F,0xD5, - 0x90,0x24,0x3E,0xEC,0x89,0x7E,0xB8,0xED,0x6E,0x19,0x85,0xB9, - 0x58,0x36,0xA1,0x33,0x7D,0x14,0xFE,0x4F,0x55,0xA9,0xB6,0x42, - 0x7E,0x97,0x2A,0x96,0x50,0x14,0x0D,0xEA,0x02,0xB1,0xD2,0x22, - 0xEB,0xE7,0xF4,0xAC,0xB6,0x37,0xCA,0xAB,0x4A,0x1E,0x4D,0x4E, - 0xCF,0xFE,0x5D,0xEF,0x23,0x78,0xC6,0xBB, - }; + 0xCA,0x35,0xA8,0xBB,0x65,0x33,0x28,0xC6,0x3F,0xD7,0x21,0x55, + 0x95,0xDF,0xC0,0xDC,0x11,0x10,0x23,0x2D,0x1E,0xD6,0x52,0x23, + 0xA1,0x52,0xB8,0xDD,0x4A,0x25,0xEE,0xF4,0x78,0xB6,0x89,0x9E, + 0xB6,0x33,0xEB,0x01,0xA6,0x46,0x31,0xD8,0x3D,0x12,0xB4,0x7B, + 0x1F,0x64,0x0C,0x84,0x10,0x80,0xFB,0x4F,0x74,0x21,0xA3,0x9B, + 0xF5,0x97,0xD1,0x05,0x97,0x9D,0x52,0x4F,0x91,0x3C,0xE1,0xA8, + 0x97,0xE0,0x33,0x9D,0xCB,0x9D,0x9D,0x2A,0xB5,0x3E,0xF5,0x8D, + 0x7F,0xEE,0x91,0xEE,0x4E,0xC5,0xA6,0xAB,0x54,0xD9,0xC2,0xA5, + 0x0D,0x2E,0xEA,0x1A,0x39,0xFD,0x30,0x4A,0x1C,0xB7,0x34,0x2B, + 0x7D,0x51,0xF6,0xB1,0xD1,0x8D,0xCE,0x28,0xDC,0xF9,0xDE,0x34, + 0xAF,0x1E,0xD1,0x7C,0xC2,0xD3,0x38,0x8E,0xBD,0x35,0x01,0x53, + 0xDD,0x2E,0xB5,0x83,0xC8,0xEF,0x08,0x15,0x59,0x6E,0xA3,0xC4, + 0x71,0x57,0x8C,0x4D,0xFD,0xA7,0x19,0x40,0x88,0x68,0x4E,0xD6, + 0x8F,0x5C,0xE5,0xEC,0xCF,0x5F,0xEB,0x9A,0xA4,0x66,0x40,0x8B, + 0x02,0x87,0xA7,0x3A,0x58,0x81,0xF1,0x6A,0x14,0x16,0x75,0x7D, + 0x33,0x01,0xEB,0x3F,0xA8,0x02,0xDC,0x09,0x32,0x12,0x00,0x20, + 0x47,0xFF,0x01,0x14,0xFE,0x9E,0x3A,0x44,0x4D,0xED,0x85,0xD5, + 0xDA,0x2F,0xE3,0x99,0xCE,0xDA,0x84,0x64,0xCB,0x0C,0x8C,0x00, + 0x90,0x19,0x70,0x1C,0x00,0x1D,0x63,0x3C,0x77,0x16,0x8D,0x3D, + 0x86,0x97,0x22,0x23,0x2F,0x7B,0xAB,0xB8,0xEB,0x94,0xA4,0x01, + 0xAA,0x34,0xBA,0xEA,0x7D,0x7A,0x37,0xB7,0x0C,0x75,0xEB,0x00, + 0x8D,0x52,0x7A,0xE2,0xDF,0x78,0x7C,0x4F,0x54,0x9E,0xA4,0xDD, + 0xC9,0xFC,0x08,0x7C,0x45,0x70,0x43,0x0F,0x39,0xE3,0x7E,0x48, + 0xB8,0xDC,0x9D,0xEC,0xB9,0x51,0x29,0x86,0x29,0x60,0xF6,0x4F, + 0xF7,0xCA,0xDD,0x3B,0x7F,0xAE,0xE2,0x54,0x4C,0x53,0x42,0x55, + 0xC0,0x39,0x24,0xE1,0x1A,0xAD,0x9E,0xCC,0x75,0x5E,0xF1,0xE2, + 0xD6,0xAE,0xCD,0x9A,0x91,0xC3,0x7B,0xE5,0x29,0xAD,0xCA,0xC2, + 0x00,0xC1,0xF9,0xF4,0x6D,0xD2,0x4B,0xD4,0x5A,0x56,0x39,0xCD, + 0xAC,0xCA,0xE7,0xD1,0x8C,0x15,0x4D,0x2B,0x59,0x67,0x29,0x72, + 0xE7,0x40,0x14,0x81,0x9E,0x26,0x48,0xF8,0x6C,0x51,0xF5,0xBE, + 0x64,0xD1,0xF4,0x4D,0x98,0xE7,0xFD,0x5E,0x23,0x1E,0xDF,0xBA, + 0xBD,0x2E,0xB1,0x81,0x26,0x98,0x9C,0x2F,0xE8,0xD5,0x32,0x6B, + 0x94,0x91,0x8C,0x2E,0xB8,0xD9,0xC9,0x2F,0x22,0x9D,0xA6,0x52, + 0x02,0xDF,0x99,0x63,0x64,0x7E,0xB8,0x68,0xAB,0x17,0x54,0x7E, + 0xED,0x9E,0xD1,0x45,0x64,0x36,0x65,0xE8,0x09,0x50,0xAB,0xB0, + 0xD4,0x8C,0x79,0x9F,0x4C,0xB8,0x26,0x45,0xBE,0x0F,0xDE,0x14, + 0x6F,0xEC,0x70,0x21,0x1A,0xA0,0x1D,0xD0,0x7D,0xA2,0x0F,0x85, + 0xA5,0x7C,0xC1,0x0A,0x74,0xB1,0x7B,0x5A,0xD2,0xC4,0x0F,0xD5, + 0x90,0x24,0x3E,0xEC,0x89,0x7E,0xB8,0xED,0x6E,0x19,0x85,0xB9, + 0x58,0x36,0xA1,0x33,0x7D,0x14,0xFE,0x4F,0x55,0xA9,0xB6,0x42, + 0x7E,0x97,0x2A,0x96,0x50,0x14,0x0D,0xEA,0x02,0xB1,0xD2,0x22, + 0xEB,0xE7,0xF4,0xAC,0xB6,0x37,0xCA,0xAB,0x4A,0x1E,0x4D,0x4E, + 0xCF,0xFE,0x5D,0xEF,0x23,0x78,0xC6,0xBB, + }; static unsigned char dh4096_g[]={ - 0x02, - }; + 0x02, + }; if(dh) { BIGNUM *p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0); @@ -189,27 +188,27 @@ // Generate key pair CHECK((BN_set_word(bn, RSA_F4))) - CHECK((RSA_generate_key_ex(rsa, keylength, bn, NULL))) - CHECK((EVP_PKEY_set1_RSA(pkey, rsa))) + CHECK((RSA_generate_key_ex(rsa, keylength, bn, NULL))) + CHECK((EVP_PKEY_set1_RSA(pkey, rsa))) - // Set CID - CHECK((X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC, - (const unsigned char*)ClientManager::getInstance()->getMyCID().toBase32().c_str(), -1, -1, 0))) + // Set CID + CHECK((X509_NAME_add_entry_by_txt(nm, "CN", MBSTRING_ASC, + (const unsigned char*)ClientManager::getInstance()->getMyCID().toBase32().c_str(), -1, -1, 0))) - // Prepare self-signed cert - ASN1_INTEGER_set(serial, (long)Util::rand()); + // Prepare self-signed cert + ASN1_INTEGER_set(serial, (long)Util::rand()); CHECK((X509_set_serialNumber(x509ss, serial))) - CHECK((X509_set_issuer_name(x509ss, nm))) - CHECK((X509_set_subject_name(x509ss, nm))) - CHECK((X509_gmtime_adj(X509_get_notBefore(x509ss), 0))) - CHECK((X509_gmtime_adj(X509_get_notAfter(x509ss), (long)60*60*24*days))) - CHECK((X509_set_pubkey(x509ss, pkey))) + CHECK((X509_set_issuer_name(x509ss, nm))) + CHECK((X509_set_subject_name(x509ss, nm))) + CHECK((X509_gmtime_adj(X509_get_notBefore(x509ss), 0))) + CHECK((X509_gmtime_adj(X509_get_notAfter(x509ss), (long)60*60*24*days))) + CHECK((X509_set_pubkey(x509ss, pkey))) - // Sign using own private key - CHECK((X509_sign(x509ss, pkey, digest))) + // Sign using own private key + CHECK((X509_sign(x509ss, pkey, digest))) -#undef CHECK - // Write the key and cert + #undef CHECK + // Write the key and cert { File::ensureDirectory(SETTING(TLS_PRIVATE_KEY_FILE)); FILE* f = fopen(SETTING(TLS_PRIVATE_KEY_FILE).c_str(), "w"); @@ -296,14 +295,14 @@ StringList certs2 = File::findFiles(SETTING(TLS_TRUSTED_CERTIFICATES_PATH), "*.crt"); certs.insert(certs.end(), certs2.begin(), certs2.end()); - for(auto i = certs.begin(); i != certs.end(); ++i) { + for(auto& i: certs) { if( - SSL_CTX_load_verify_locations(clientContext, i->c_str(), NULL) != SSL_SUCCESS || - SSL_CTX_load_verify_locations(clientVerContext, i->c_str(), NULL) != SSL_SUCCESS || - SSL_CTX_load_verify_locations(serverContext, i->c_str(), NULL) != SSL_SUCCESS || - SSL_CTX_load_verify_locations(serverVerContext, i->c_str(), NULL) != SSL_SUCCESS - ) { - LogManager::getInstance()->message("Failed to load trusted certificate from " + *i); + SSL_CTX_load_verify_locations(clientContext, i.c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(clientVerContext, i.c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverContext, i.c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverVerContext, i.c_str(), NULL) != SSL_SUCCESS + ) { + LogManager::getInstance()->message("Failed to load trusted certificate from " + i); } } @@ -367,34 +366,36 @@ return true; } -const vector& CryptoManager::getKeyprint() const noexcept { - return keyprint; +const ByteVector &CryptoManager::getKeyprint() const noexcept { + return keyprint; } void CryptoManager::loadKeyprint(const string& file) noexcept { - FILE* f = fopen(SETTING(TLS_CERTIFICATE_FILE).c_str(), "r"); - if(!f) { - return; - } + (void)file; - X509* tmpx509 = NULL; - PEM_read_X509(f, &tmpx509, NULL, NULL); - fclose(f); + FILE* f = fopen(SETTING(TLS_CERTIFICATE_FILE).c_str(), "r"); + if(!f) { + return; + } - if(!tmpx509) { - return; - } + X509* tmpx509 = NULL; + PEM_read_X509(f, &tmpx509, NULL, NULL); + fclose(f); - ssl::X509 x509(tmpx509); + if(!tmpx509) { + return; + } + + ssl::X509 x509(tmpx509); - keyprint = ssl::X509_digest(x509, EVP_sha256()); + keyprint = ssl::X509_digest(x509, EVP_sha256()); } -SSLSocket* CryptoManager::getClientSocket(bool allowUntrusted) { - return new SSLSocket(allowUntrusted ? clientContext : clientVerContext); +SSLSocket* CryptoManager::getClientSocket(bool allowUntrusted, Socket::Protocol proto) { + return new SSLSocket(allowUntrusted ? clientContext : clientVerContext, proto); } SSLSocket* CryptoManager::getServerSocket(bool allowUntrusted) { - return new SSLSocket(allowUntrusted ? serverContext : serverVerContext); + return new SSLSocket(allowUntrusted ? serverContext : serverVerContext, Socket::PROTO_DEFAULT); } @@ -407,7 +408,7 @@ // We assume that the files aren't compressed more than 2:1...if they are it'll work anyway, // but we'll have to do multiple passes... size_t bufsize = 2*sz; - boost::scoped_array buf(new char[bufsize]); + std::unique_ptr buf(new char[bufsize]); bs.avail_in = sz; bs.avail_out = bufsize; @@ -440,7 +441,7 @@ } string CryptoManager::keySubst(const uint8_t* aKey, size_t len, size_t n) { - boost::scoped_array temp(new uint8_t[len + n * 10]); + std::unique_ptr temp(new uint8_t[len + n * 10]); size_t j=0; @@ -468,7 +469,7 @@ if(aLock.size() < 3) return Util::emptyString; - boost::scoped_array temp(new uint8_t[aLock.length()]); + std::unique_ptr temp(new uint8_t[aLock.length()]); uint8_t v1; size_t extra=0; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CryptoManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CryptoManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/CryptoManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/CryptoManager.h 2019-05-05 22:00:25.000000000 +0000 @@ -12,23 +12,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#ifdef _WIN32 -#include -#endif +#include "typedefs.h" #include "SettingsManager.h" #include "Exception.h" #include "Singleton.h" + #include "SSLSocket.h" +#include "SSL.h" namespace dcpp { +using std::pair; +using std::string; + STANDARD_EXCEPTION(CryptoException); class CryptoManager : public Singleton @@ -41,13 +43,13 @@ void decodeBZ2(const uint8_t* is, size_t sz, string& os); - SSLSocket* getClientSocket(bool allowUntrusted); + SSLSocket* getClientSocket(bool allowUntrusted, Socket::Protocol proto); SSLSocket* getServerSocket(bool allowUntrusted); void loadCertificates() noexcept; void generateCertificate(); bool checkCertificate() noexcept; - const vector& getKeyprint() const noexcept; + const ByteVector& getKeyprint() const noexcept; bool TLSOk() const noexcept; private: @@ -66,7 +68,7 @@ bool certsLoaded; - vector keyprint; + ByteVector keyprint; const string lock; const string pk; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DCPlusPlus.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DCPlusPlus.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DCPlusPlus.cpp 2018-08-24 00:00:48.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DCPlusPlus.cpp 2019-05-06 22:23:37.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,49 +13,41 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "DCPlusPlus.h" -#include "format.h" +#include "ADLSearch.h" +#include "ClientManager.h" #include "ConnectionManager.h" -#include "DownloadManager.h" -#include "UploadManager.h" +#include "ConnectivityManager.h" #include "CryptoManager.h" -#include "ShareManager.h" -#include "SearchManager.h" -#include "QueueManager.h" -#include "ClientManager.h" -#include "HashManager.h" -#include "LogManager.h" +#include "DebugManager.h" +#include "DownloadManager.h" #include "FavoriteManager.h" -#include "SettingsManager.h" #include "FinishedManager.h" +#include "HashManager.h" +#include "LogManager.h" +#include "MappingManager.h" +#include "QueueManager.h" #include "ResourceManager.h" -#include "ThrottleManager.h" -#include "ADLSearch.h" -//#include "WindowManager.h" -#include "StringTokenizer.h" +#include "SearchManager.h" +#include "SettingsManager.h" #ifdef LUA_SCRIPT #include "ScriptManager.h" #endif -#include "UPnPManager.h" -#include "ConnectivityManager.h" +#include "ShareManager.h" +#include "StringTokenizer.h" +#include "ThrottleManager.h" +#include "UploadManager.h" + #include "extra/ipfilter.h" #include "extra/dyndns.h" #ifdef WITH_DHT #include "dht/DHT.h" #endif -#include "DebugManager.h" - -#ifdef _STLP_DEBUG -void __stl_debug_terminate() { - int* x = 0; -} -#endif namespace dcpp { @@ -71,7 +64,7 @@ Util::initialize(); - bindtextdomain(PACKAGE, LOCALE_DIR); + bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); ResourceManager::newInstance(); @@ -93,30 +86,31 @@ FinishedManager::newInstance(); ADLSearchManager::newInstance(); ConnectivityManager::newInstance(); - UPnPManager::newInstance(); - //WindowManager::newInstance(); + MappingManager::newInstance(); + DynDNS::newInstance(); + DebugManager::newInstance(); + IPFilter::newInstance(); #ifdef LUA_SCRIPT ScriptManager::newInstance(); #endif - DebugManager::newInstance(); SettingsManager::getInstance()->load(); + + Util::setLang(SETTING(LANGUAGE)); #ifdef USE_MINIUPNP - UPnPManager::getInstance()->runMiniUPnP(); + MappingManager::getInstance()->runMiniUPnP(); #endif + DynDNS::getInstance()->load(); if (BOOLSETTING(IPFILTER)){ - ipfilter::newInstance(); - ipfilter::getInstance()->load(); + IPFilter::getInstance()->load(); } - DynDNS::newInstance(); - - Util::setLang(SETTING(LANGUAGE)); FavoriteManager::getInstance()->load(); CryptoManager::getInstance()->loadCertificates(); #ifdef WITH_DHT dht::DHT::newInstance(); #endif + if(f != NULL) (*f)(p, _("Hash database")); HashManager::getInstance()->startup(); @@ -151,18 +145,17 @@ HashManager::getInstance()->shutdown(); ConnectionManager::getInstance()->shutdown(); - UPnPManager::getInstance()->close(); + MappingManager::getInstance()->close(); BufferedSocket::waitShutdown(); - //WindowManager::getInstance()->prepareSave(); QueueManager::getInstance()->saveQueue(true); ClientManager::getInstance()->saveUsers(); - if (ipfilter::getInstance()) - ipfilter::getInstance()->shutdown(); + if (IPFilter::getInstance()) { + IPFilter::getInstance()->shutdown(); + } SettingsManager::getInstance()->save(); - //WindowManager::deleteInstance(); - UPnPManager::deleteInstance(); + MappingManager::deleteInstance(); ConnectivityManager::deleteInstance(); ADLSearchManager::deleteInstance(); FinishedManager::deleteInstance(); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DCPlusPlus.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DCPlusPlus.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DCPlusPlus.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DCPlusPlus.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,13 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "compiler.h" +#include #include namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/debug.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/debug.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/debug.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/debug.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -30,10 +29,10 @@ #include #define dcassert(exp) \ -do { if (!(exp)) { \ + do { if (!(exp)) { \ dcdebug("Assertion hit in %s(%d): " #exp "\n", __FILE__, __LINE__); \ if(1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #exp)) \ -_CrtDbgBreak(); } } while(false) + _CrtDbgBreak(); } } while(false) #else #define dcassert(exp) assert(exp) #endif diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DebugManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DebugManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DebugManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DebugManager.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,4 +1,6 @@ /* + * Copyright (C) 2009-2019 EiskaltDC++ developers + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -10,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DebugManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DebugManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DebugManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DebugManager.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,4 +1,6 @@ /* + * Copyright (C) 2009-2019 EiskaltDC++ developers + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -10,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -25,7 +26,7 @@ class DebugManagerListener { public: -template struct X { enum { TYPE = I }; }; + template struct X { enum { TYPE = I }; }; typedef X<0> DebugCommand; typedef X<1> DebugDetection; @@ -52,7 +53,7 @@ enum { HUB_IN, HUB_OUT, CLIENT_IN, CLIENT_OUT #ifdef WITH_DHT -, DHT_IN, DHT_OUT + , DHT_IN, DHT_OUT #endif }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DirectoryListing.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DirectoryListing.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DirectoryListing.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DirectoryListing.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,35 +13,29 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "DirectoryListing.h" -#include "QueueManager.h" -#include "ClientManager.h" - -#include "StringTokenizer.h" -#include "SimpleXML.h" -#include "FilteredFile.h" #include "BZUtils.h" +#include "ClientManager.h" #include "CryptoManager.h" +#include "File.h" +#include "FilteredFile.h" +#include "QueueManager.h" #include "ShareManager.h" +#include "SimpleXML.h" #include "SimpleXMLReader.h" -#include "File.h" - -#ifdef ff -#undef ff -#endif +#include "StringTokenizer.h" +#include "version.h" namespace dcpp { DirectoryListing::DirectoryListing(const HintedUser& aUser) : -user(aUser), -root(new Directory(NULL, Util::emptyString, false, false)) + user(aUser), + root(new Directory(NULL, Util::emptyString, false, false)) { } @@ -74,44 +69,54 @@ return UserPtr(); CID cid(name.substr(i + 1)); - if(cid.isZero()) + if(!cid) return UserPtr(); return ClientManager::getInstance()->getUser(cid); } -void DirectoryListing::loadFile(const string& name) { - string txt; +void DirectoryListing::loadFile(const string& path) { + string actualPath; + if(dcpp::File::getSize(path + ".bz2") != -1) { + actualPath = path + ".bz2"; + } // For now, we detect type by ending... - string ext = Util::getFileExt(name); + auto ext = Util::getFileExt(actualPath.empty() ? path : actualPath); - dcpp::File ff(name, dcpp::File::READ, dcpp::File::OPEN); - if(Util::stricmp(ext, ".bz2") == 0) { - FilteredInputStream f(&ff); - loadXML(f, false); - } else if(Util::stricmp(ext, ".xml") == 0) { - loadXML(ff, false); + { + dcpp::File file(actualPath.empty() ? path : actualPath, dcpp::File::READ, dcpp::File::OPEN); + if(Util::stricmp(ext, ".bz2") == 0) { + FilteredInputStream f(&file); + loadXML(f, false); + } else if(Util::stricmp(ext, ".xml") == 0) { + loadXML(file, false); + } else { + throw Exception(_("Invalid file list extension (must be .xml or .bz2)")); + } } } -class ListLoader : public dcpp::SimpleXMLReader::CallBack { +class ListLoader : public SimpleXMLReader::CallBack { public: - ListLoader(DirectoryListing::Directory* root, bool aUpdating) : cur(root), - base("/"), - inListing(false), - updating(aUpdating), - m_is_mediainfo_list(false), - m_is_first_check_mediainfo_list(false) + ListLoader(DirectoryListing::Directory* root, bool aUpdating) : + cur(root), + base("/"), + inListing(false), + updating(aUpdating), + m_is_mediainfo_list(false), + m_is_first_check_mediainfo_list(false) { } - virtual ~ListLoader() { } + virtual ~ListLoader() { + } - virtual void startTag(const string& name, StringPairList& attribs, bool simple); - virtual void endTag(const string& name, const string& data); + void startTag(const string& name, StringPairList& attribs, bool simple); + void endTag(const string& name); const string& getBase() const { return base; } + private: DirectoryListing::Directory* cur; @@ -131,7 +136,7 @@ string DirectoryListing::loadXML(InputStream& is, bool updating) { ListLoader ll(getRoot(), updating); - dcpp::SimpleXMLReader(&ll).parse(is, SETTING(MAX_FILELIST_SIZE) ? (size_t)SETTING(MAX_FILELIST_SIZE)*1024*1024 : 0); + SimpleXMLReader(&ll).parse(is, SETTING(MAX_FILELIST_SIZE) ? (size_t)SETTING(MAX_FILELIST_SIZE)*1024*1024 : 0); return ll.getBase(); } @@ -164,12 +169,12 @@ const string& h = getAttrib(attribs, sTTH, 2); if(h.empty()) return; - TTHValue tth(h); /// @todo verify validity? + TTHValue tth(h); /// @todo verify validity? if(updating) { // just update the current file if it is already there. - for(auto i = cur->files.cbegin(), iend = cur->files.cend(); i != iend; ++i) { - auto& file = **i; + for(auto& i : cur->files) { + auto& file = *i; /// @todo comparisons should be case-insensitive but it takes too long - add a cache if(file.getTTH() == tth || file.getName() == n) { file.setName(n); @@ -202,7 +207,7 @@ f->mediaInfo.bitrate = atoi(getAttrib(attribs, sBR, 4).c_str()); } - cur->files.push_back(f); + cur->files.insert(f); } else if(name == sDirectory) { const string& n = getAttrib(attribs, sName, 0); if(n.empty()) { @@ -211,10 +216,10 @@ bool incomp = getAttrib(attribs, sIncomplete, 1) == "1"; DirectoryListing::Directory* d = NULL; if(updating) { - for(auto i = cur->directories.begin(); i != cur->directories.end(); ++i) { + for(auto& i : cur->directories) { /// @todo comparisons should be case-insensitive but it takes too long - add a cache - if((*i)->getName() == n) { - d = *i; + if(i->getName() == n) { + d = i; if(!d->getComplete()) d->setComplete(!incomp); break; @@ -223,13 +228,13 @@ } if(d == NULL) { d = new DirectoryListing::Directory(cur, n, false, !incomp); - cur->directories.push_back(d); + cur->directories.insert(d); } cur = d; if(simple) { // To handle - endTag(name, Util::emptyString); + endTag(name); } } } else if(name == sFileListing) { @@ -238,17 +243,17 @@ base = b; } StringList sl = StringTokenizer(base.substr(1), '/').getTokens(); - for(auto i = sl.begin(); i != sl.end(); ++i) { - DirectoryListing::Directory* d = NULL; - for(auto j = cur->directories.begin(); j != cur->directories.end(); ++j) { - if((*j)->getName() == *i) { - d = *j; + for(auto& i: sl) { + DirectoryListing::Directory* d = nullptr; + for(auto j: cur->directories) { + if(j->getName() == i) { + d = j; break; } } - if(d == NULL) { - d = new DirectoryListing::Directory(cur, *i, false, false); - cur->directories.push_back(d); + if(!d) { + d = new DirectoryListing::Directory(cur, i, false, false); + cur->directories.insert(d); } cur = d; } @@ -257,12 +262,12 @@ if(simple) { // To handle - endTag(name, Util::emptyString); + endTag(name); } } } -void ListLoader::endTag(const string& name, const string&) { +void ListLoader::endTag(const string& name) { if(inListing) { if(name == sDirectory) { cur = cur->getParent(); @@ -307,19 +312,13 @@ } void DirectoryListing::download(Directory* aDir, const string& aTarget, bool highPrio) { - string tmp; string target = (aDir == getRoot()) ? aTarget : aTarget + aDir->getName() + PATH_SEPARATOR; // First, recurse over the directories - Directory::List& lst = aDir->directories; - sort(lst.begin(), lst.end(), Directory::DirSort()); - for(auto j = lst.begin(); j != lst.end(); ++j) { - download(*j, target, highPrio); + for(auto& j: aDir->directories) { + download(j, target, highPrio); } // Then add the files - File::List& l = aDir->files; - sort(l.begin(), l.end(), File::FileSort()); - for(auto i = aDir->files.begin(); i != aDir->files.end(); ++i) { - File* file = *i; + for(auto file: aDir->files) { try { download(file, target + file->getName(), false, highPrio); } catch(const QueueException&) { @@ -347,38 +346,25 @@ QueueManager::getInstance()->setPriority(aTarget, QueueItem::HIGHEST); } -DirectoryListing::Directory* DirectoryListing::find(const string& aName, Directory* current) { +DirectoryListing::Directory* DirectoryListing::find(const string& aName, Directory* current) const { auto end = aName.find('\\'); dcassert(end != string::npos); auto name = aName.substr(0, end); - auto i = std::find(current->directories.begin(), current->directories.end(), name); - if(i != current->directories.end()) { + auto i = std::find(current->directories.cbegin(), current->directories.cend(), name); + if(i != current->directories.cend()) { if(end == (aName.size() - 1)) return *i; else return find(aName.substr(end + 1), *i); } - return NULL; + return nullptr; } -struct HashContained { - HashContained(const DirectoryListing::Directory::TTHSet& l) : tl(l) { } - const DirectoryListing::Directory::TTHSet& tl; - bool operator()(const DirectoryListing::File::Ptr i) const { - return tl.count((i->getTTH())) && (DeleteFunction()(i), true); - } -private: - HashContained& operator=(HashContained&); -}; - -struct DirectoryEmpty { - bool operator()(const DirectoryListing::Directory::Ptr i) const { - bool r = i->getFileCount() == 0 && i->directories.empty(); - if (r) DeleteFunction()(i); - return r; - } -}; +DirectoryListing::Directory::~Directory() { + std::for_each(directories.begin(), directories.end(), DeleteFunction()); + std::for_each(files.begin(), files.end(), DeleteFunction()); +} void DirectoryListing::Directory::filterList(DirectoryListing& dirList) { DirectoryListing::Directory* d = dirList.getRoot(); @@ -389,30 +375,49 @@ } void DirectoryListing::Directory::filterList(DirectoryListing::Directory::TTHSet& l) { - for(auto i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l); - directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end()); - files.erase(std::remove_if(files.begin(),files.end(),HashContained(l)),files.end()); + for(auto i = directories.begin(); i != directories.end();) { + auto d = *i; + + d->filterList(l); + + if(d->directories.empty() && d->files.empty()) { + i = directories.erase(i); + delete d; + } else { + ++i; + } + } + + for(auto i = files.begin(); i != files.end();) { + auto f = *i; + if(l.find(f->getTTH()) != l.end()) { + i = files.erase(i); + delete f; + } else { + ++i; + } + } } void DirectoryListing::Directory::getHashList(DirectoryListing::Directory::TTHSet& l) { - for(auto i = directories.begin(); i != directories.end(); ++i) (*i)->getHashList(l); - for(auto i = files.begin(); i != files.end(); ++i) l.insert((*i)->getTTH()); + for(auto i: directories) i->getHashList(l); + for(auto i: files) l.insert(i->getTTH()); } int64_t DirectoryListing::Directory::getTotalSize(bool adl) { int64_t x = getSize(); - for(auto i = directories.begin(); i != directories.end(); ++i) { - if(!(adl && (*i)->getAdls())) - x += (*i)->getTotalSize(adls); + for(auto i: directories) { + if(!(adl && i->getAdls())) + x += i->getTotalSize(adls); } return x; } size_t DirectoryListing::Directory::getTotalFileCount(bool adl) { size_t x = getFileCount(); - for(auto i = directories.begin(); i != directories.end(); ++i) { - if(!(adl && (*i)->getAdls())) - x += (*i)->getTotalFileCount(adls); + for(auto i: directories) { + if(!(adl && i->getAdls())) + x += i->getTotalFileCount(adls); } return x; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DirectoryListing.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DirectoryListing.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DirectoryListing.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DirectoryListing.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,55 +13,54 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "noexcept.h" -#include "User.h" +#include + +#include "NonCopyable.h" + +#include "forward.h" + +#include "HintedUser.h" #include "FastAlloc.h" #include "MerkleTree.h" -#include "Streams.h" #include "MediaInfo.h" +#include "GetSet.h" +#include "User.h" +#include "Util.h" namespace dcpp { +using std::set; + class ListLoader; -class DirectoryListing : boost::noncopyable +class DirectoryListing : private NonCopyable { public: class Directory; - class File : public FastAlloc { + class File : public FastAlloc, private NonCopyable { public: typedef File* Ptr; - struct FileSort { - bool operator()(const Ptr& a, const Ptr& b) const { - return Util::stricmp(a->getName().c_str(), b->getName().c_str()) < 0; - } - }; - typedef vector List; - typedef List::iterator Iter; File(Directory* aDir, const string& aName, int64_t aSize, const TTHValue& aTTH) noexcept : - name(aName), size(aSize), parent(aDir), tthRoot(aTTH), adls(false) + NonCopyable(), + name(aName), size(aSize), parent(aDir), tthRoot(aTTH), adls(false), + ts(0), hit(0) { } - File(const File& rhs, bool _adls = false) : name(rhs.name), size(rhs.size), parent(rhs.parent), tthRoot(rhs.tthRoot), adls(_adls) + File(const File& rhs, bool _adls = false) : + NonCopyable(), + name(rhs.name), size(rhs.size), parent(rhs.parent), tthRoot(rhs.tthRoot), adls(_adls), + ts(rhs.ts), hit(rhs.hit) { } - File& operator=(const File& rhs) { - name = rhs.name; size = rhs.size; parent = rhs.parent; tthRoot = rhs.tthRoot; - return *this; - } - - ~File() { } - GETSET(string, name, Name); GETSET(int64_t, size, Size); GETSET(Directory*, parent, Parent); @@ -71,29 +71,24 @@ MediaInfo mediaInfo; }; - class Directory : public FastAlloc, boost::noncopyable { + class Directory : public FastAlloc, private NonCopyable { public: typedef Directory* Ptr; - struct DirSort { - bool operator()(const Ptr& a, const Ptr& b) const { - return Util::stricmp(a->getName().c_str(), b->getName().c_str()) < 0; - } - }; - typedef vector List; - typedef List::iterator Iter; typedef unordered_set TTHSet; - List directories; - File::List files; + template struct Less { + bool operator()(typename T::Ptr a, typename T::Ptr b) const { return compare(a->getName(), b->getName()) < 0; } + }; + + set> directories; + set> files; - Directory(Directory* aParent, const string& aName, bool _adls, bool aComplete) - : name(aName), parent(aParent), adls(_adls), complete(aComplete) { } + Directory(Directory* aParent, const string& aName, bool _adls, bool aComplete): + NonCopyable(), + name(aName), parent(aParent), adls(_adls), complete(aComplete) { } - virtual ~Directory() { - for_each(directories.begin(), directories.end(), DeleteFunction()); - for_each(files.begin(), files.end(), DeleteFunction()); - } + virtual ~Directory(); size_t getTotalFileCount(bool adls = false); int64_t getTotalSize(bool adls = false); @@ -101,12 +96,12 @@ void filterList(TTHSet& l); void getHashList(TTHSet& l); - size_t getFileCount() { return files.size(); } + size_t getFileCount() const { return files.size(); } - int64_t getSize() { + int64_t getSize() const { int64_t x = 0; - for(auto i = files.begin(); i != files.end(); ++i) { - x+=(*i)->getSize(); + for(auto& i: files) { + x+=i->getSize(); } return x; } @@ -128,7 +123,7 @@ DirectoryListing(const HintedUser& aUser); ~DirectoryListing(); - void loadFile(const string& name); + void loadFile(const string& path); string updateXML(const std::string&); string loadXML(InputStream& xml, bool updating); @@ -155,7 +150,7 @@ GETSET(HintedUser, user, User); - Directory* find(const string& aName, Directory* current); + Directory* find(const string& aName, Directory* current) const; private: friend class ListLoader; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Download.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Download.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Download.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Download.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -23,6 +22,11 @@ #include "UserConnection.h" #include "QueueItem.h" #include "HashManager.h" +#include "SettingsManager.h" +#include "MerkleCheckOutputStream.h" +#include "File.h" +#include "FilteredFile.h" +#include "ZUtils.h" namespace dcpp { @@ -100,12 +104,17 @@ return cmd; } +const string &Download::getDownloadTarget() const +{ + return (getTempTarget().empty() ? getPath() : getTempTarget()); +} + void Download::getParams(const UserConnection& aSource, StringMap& params) { Transfer::getParams(aSource, params); params["target"] = getPath(); } -string Download::getTargetFileName() { +string Download::getTargetFileName() const { return Util::getFileName(getPath()); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Download.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Download.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Download.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Download.h 2019-04-11 19:00:27.000000000 +0000 @@ -12,29 +12,31 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once #include +#include + #include "forward.h" -#include "noexcept.h" #include "Transfer.h" #include "MerkleTree.h" #include "Flags.h" -#include "Streams.h" +#include "GetSet.h" namespace dcpp { using std::string; +using std::unique_ptr; /** * Comes as an argument in the DownloadManagerListener functions. * Use it to retrieve information about the ongoing transfer. */ -class Download : public Transfer, public Flags { +class Download : public Transfer, public Flags +{ public: enum { FLAG_ZDOWNLOAD = 1 << 1, @@ -51,12 +53,10 @@ virtual ~Download(); /** @return Target filename without path. */ - string getTargetFileName(); + string getTargetFileName() const; /** @internal */ - const string& getDownloadTarget() { - return (getTempTarget().empty() ? getPath() : getTempTarget()); - } + const string& getDownloadTarget() const; /** @internal */ TigerTree& getTigerTree() { return tt; } @@ -67,9 +67,8 @@ GETSET(string, tempTarget, TempTarget); GETSET(OutputStream*, file, File); GETSET(bool, treeValid, TreeValid); + private: - Download(const Download&); - Download& operator=(const Download&); TigerTree tt; string pfs; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManager.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -67,10 +66,10 @@ DownloadList tickList; // Tick each ongoing download - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - if((*i)->getPos() > 0) { - tickList.push_back(*i); - (*i)->tick(); + for(auto i: downloads) { + if(i->getPos() > 0) { + tickList.push_back(i); + i->tick(); } } @@ -80,40 +79,38 @@ // Automatically remove or disconnect slow sources if((uint32_t)(aTick / 1000) % SETTING(AUTODROP_INTERVAL) == 0) { - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - Download* d = *i; + for(auto d: downloads) { uint64_t timeElapsed = aTick - d->getStart(); uint64_t timeInactive = aTick - d->getUserConnection().getLastActivity(); uint64_t bytesDownloaded = d->getPos(); bool timeElapsedOk = timeElapsed >= (uint32_t)SETTING(AUTODROP_ELAPSED) * 1000; bool timeInactiveOk = timeInactive <= (uint32_t)SETTING(AUTODROP_INACTIVITY) * 1000; bool speedTooLow = timeElapsedOk && timeInactiveOk && bytesDownloaded > 0 ? - bytesDownloaded / timeElapsed * 1000 < (uint32_t)SETTING(AUTODROP_SPEED) : false; + bytesDownloaded / timeElapsed * 1000 < (uint32_t)SETTING(AUTODROP_SPEED) : false; bool isUserList = d->getType() == Transfer::TYPE_FULL_LIST; bool onlineSourcesOk = isUserList ? - true : QueueManager::getInstance()->countOnlineSources(d->getPath()) >= SETTING(AUTODROP_MINSOURCES); + true : QueueManager::getInstance()->countOnlineSources(d->getPath()) >= SETTING(AUTODROP_MINSOURCES); bool filesizeOk = !isUserList && d->getSize() >= ((int64_t)SETTING(AUTODROP_FILESIZE)) * 1024; bool dropIt = (isUserList && BOOLSETTING(AUTODROP_FILELISTS)) || - (filesizeOk && BOOLSETTING(AUTODROP_ALL)); + (filesizeOk && BOOLSETTING(AUTODROP_ALL)); if(speedTooLow && onlineSourcesOk && dropIt) { if(BOOLSETTING(AUTODROP_DISCONNECT) && isUserList) { d->getUserConnection().disconnect(); } else { - dropTargets.push_back(make_pair(d->getPath(), d->getUser())); + dropTargets.emplace_back(d->getPath(), d->getUser()); } } } } } - for(auto i = dropTargets.begin(); i != dropTargets.end(); ++i) { - QueueManager::getInstance()->removeSource(i->first, i->second, QueueItem::Source::FLAG_SLOW_SOURCE); + for(auto& i: dropTargets) { + QueueManager::getInstance()->removeSource(i.first, i.second, QueueItem::Source::FLAG_SLOW_SOURCE); } } void DownloadManager::checkIdle(const UserPtr& user) { Lock l(cs); - for(auto i = idlers.begin(); i != idlers.end(); ++i) { - UserConnection* uc = *i; + for(auto uc: idlers) { if(uc->getUser() == user) { uc->updated(); return; @@ -130,7 +127,8 @@ conn->disconnect(); return; } - if (BOOLSETTING(IPFILTER) && !ipfilter::getInstance()->OK(conn->getRemoteIp(),eDIRECTION_IN)) { + + if (BOOLSETTING(IPFILTER) && !IPFilter::getInstance()->OK(conn->getRemoteIp(),eDIRECTION_IN)) { conn->error("Your IP is Blocked!"); LogManager::getInstance()->message(_("IPFilter: Blocked outgoing connection to ") + conn->getRemoteIp()); QueueManager::getInstance()->removeSource(conn->getUser(), QueueItem::Source::FLAG_REMOVED); @@ -170,8 +168,6 @@ } void DownloadManager::checkDownloads(UserConnection* aConn) { - dcassert(aConn->getDownload() == NULL); - QueueItem::Priority prio = QueueManager::getInstance()->hasDownload(aConn->getUser()); if(!startDownload(prio)) { removeConnection(aConn); @@ -339,8 +335,8 @@ // First, finish writing the file (flushing the buffers and closing the file...) try { d->getFile()->flush(); - } catch(const Exception& e) { - d->resetPos(); + } catch(const Exception& e) { + d->resetPos(); failDownload(aSource, e.getError()); return; } @@ -366,8 +362,7 @@ int64_t DownloadManager::getRunningAverage() { Lock l(cs); int64_t avg = 0; - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - Download* d = *i; + for(auto d: downloads) { avg += d->getAverageSpeed(); } return avg; @@ -501,7 +496,7 @@ dcdebug("File Not Available: %s\n", d->getPath().c_str()); removeDownload(d); - fire(DownloadManagerListener::Failed(), d, str(F_("%1%: File not available") % d->getTargetFileName())); + fire(DownloadManagerListener::Failed(), d, str(F_("%1%: File not available") % Util::addBrackets(d->getTargetFileName()))); QueueManager::getInstance()->removeSource(d->getPath(), aSource->getUser(), d->getType() == Transfer::TYPE_TREE ? QueueItem::Source::FLAG_NO_TREE : QueueItem::Source::FLAG_FILE_NOT_AVAILABLE, false); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManager.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -34,8 +33,8 @@ * in the user interface. */ class DownloadManager : public Speaker, - private UserConnectionListener, private TimerManagerListener, - public Singleton + private UserConnectionListener, private TimerManagerListener, + public Singleton { public: diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/DownloadManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/DownloadManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "typedefs.h" -#include "noexcept.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Encoder.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Encoder.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Encoder.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Encoder.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -109,6 +108,10 @@ } } +bool Encoder::isBase32(const string& str) { + return str.find_first_not_of(base32Alphabet) == string::npos; +} + uint8_t decode16(char c) { if (c >= '0' && c <= '9') return c - '0'; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Encoder.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Encoder.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Encoder.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Encoder.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,12 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include #include namespace dcpp { @@ -33,6 +33,7 @@ return toBase32(src, len, tmp); } static void fromBase32(const char* src, uint8_t* dst, size_t len); + static bool isBase32(const string& str); static void fromBase16(const char* src, uint8_t *dst, size_t len); private: diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Exception.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Exception.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Exception.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Exception.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, j_s@telia.com + * Copyright (C) 2001-2019 Jacek Sieka, j_s@telia.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Exception.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Exception.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Exception.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Exception.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -48,6 +47,13 @@ virtual ~name() throw() { } \ } +#define EXTEND_EXCEPTION(name, parent) class name : public parent { \ + public:\ + name() : parent(#name) { } \ + name(const string& aError) : parent(#name ": " + aError) { } \ + virtual ~name() throw() { } \ +} + #else // _DEBUG #define STANDARD_EXCEPTION(name) class name : public Exception { \ @@ -56,6 +62,14 @@ name(const string& aError) : Exception(aError) { } \ virtual ~name() throw() { } \ } + +#define EXTEND_EXCEPTION(name, parent) class name : public parent { \ + public:\ + name() : parent() { } \ + name(const string& aError) : parent(aError) { } \ + virtual ~name() throw() { } \ +} + #endif } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FastAlloc.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FastAlloc.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FastAlloc.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FastAlloc.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavHubGroup.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavHubGroup.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavHubGroup.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavHubGroup.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManager.cpp 2019-04-09 21:21:43.000000000 +0000 @@ -12,30 +12,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "FavoriteManager.h" +#include "BZUtils.h" #include "ClientManager.h" #include "CryptoManager.h" -//#include "WindowManager.h" - +#include "File.h" +#include "FilteredFile.h" #include "HttpConnection.h" -#include "StringTokenizer.h" #include "SimpleXML.h" +#include "StringTokenizer.h" #include "UserCommand.h" -//#include "WindowInfo.h" -#include "File.h" -#include "BZUtils.h" -#include "FilteredFile.h" namespace dcpp { -FavoriteManager::FavoriteManager() : lastId(0), useHttp(false), running(false), c(NULL), lastServer(0), listType(TYPE_NORMAL), dontSave(false) { +FavoriteManager::FavoriteManager() : lastId(0), useHttp(false), running(false), c(nullptr), lastServer(0), listType(TYPE_NORMAL), dontSave(false) { SettingsManager::getInstance()->addListener(this); ClientManager::getInstance()->addListener(this); @@ -66,9 +61,9 @@ bool FavoriteManager::getUserCommand(int cid, UserCommand& uc) { Lock l(cs); - for(auto i = userCommands.begin(); i != userCommands.end(); ++i) { - if(i->getId() == cid) { - uc = *i; + for(auto& i: userCommands) { + if(i.getId() == cid) { + uc = i; return true; } } @@ -90,9 +85,9 @@ void FavoriteManager::updateUserCommand(const UserCommand& uc) { bool nosave = true; Lock l(cs); - for(auto i = userCommands.begin(); i != userCommands.end(); ++i) { - if(i->getId() == uc.getId()) { - *i = uc; + for(auto& i: userCommands) { + if(i.getId() == uc.getId()) { + i = uc; nosave = uc.isSet(UserCommand::FLAG_NOSAVE); break; } @@ -103,9 +98,9 @@ int FavoriteManager::findUserCommand(const string& aName, const string& aUrl) { Lock l(cs); - for(auto i = userCommands.begin(); i != userCommands.end(); ++i) { - if(i->getName() == aName && i->getHub() == aUrl) { - return i->getId(); + for(auto& i: userCommands) { + if(i.getName() == aName && i.getHub() == aUrl) { + return i.getId(); } } return -1; @@ -126,24 +121,16 @@ } void FavoriteManager::removeUserCommand(const string& srv) { Lock l(cs); - for(auto i = userCommands.begin(); i != userCommands.end(); ) { - if((i->getHub() == srv) && i->isSet(UserCommand::FLAG_NOSAVE)) { - i = userCommands.erase(i); - } else { - ++i; - } - } + userCommands.erase(std::remove_if(userCommands.begin(), userCommands.end(), [&](const UserCommand& uc) { + return uc.getHub() == srv && uc.isSet(UserCommand::FLAG_NOSAVE); + }), userCommands.end()); } void FavoriteManager::removeHubUserCommands(int ctx, const string& hub) { Lock l(cs); - for(auto i = userCommands.begin(); i != userCommands.end(); ) { - if(i->getHub() == hub && i->isSet(UserCommand::FLAG_NOSAVE) && i->getCtx() & ctx) { - i = userCommands.erase(i); - } else { - ++i; - } - } + userCommands.erase(std::remove_if(userCommands.begin(), userCommands.end(), [&](const UserCommand& uc) { + return uc.getHub() == hub && uc.isSet(UserCommand::FLAG_NOSAVE) && uc.getCtx() & ctx; + }), userCommands.end()); } void FavoriteManager::addFavoriteUser(const UserPtr& aUser) { @@ -158,7 +145,7 @@ if(nicks.empty()) nicks.push_back(Util::emptyString); - auto i = users.insert(make_pair(aUser->getCID(), FavoriteUser(aUser, nicks[0], urls[0]))).first; + auto i = users.emplace(aUser->getCID(), FavoriteUser(aUser, nicks[0], urls[0])).first; fire(FavoriteManagerListener::UserAdded(), i->second); save(); } @@ -185,20 +172,17 @@ } void FavoriteManager::addFavorite(const FavoriteHubEntry& aEntry) { - FavoriteHubEntry* f; - - FavoriteHubEntryList::iterator i = getFavoriteHub(aEntry.getServer()); - if(i != favoriteHubs.end()) { + if(getFavoriteHub(aEntry.getServer()) != favoriteHubs.end()) { return; } - f = new FavoriteHubEntry(aEntry); + auto f = new FavoriteHubEntry(aEntry); favoriteHubs.push_back(f); fire(FavoriteManagerListener::FavoriteAdded(), f); save(); } void FavoriteManager::removeFavorite(FavoriteHubEntry* entry) { - FavoriteHubEntryList::iterator i = find(favoriteHubs.begin(), favoriteHubs.end(), entry); + auto i = find(favoriteHubs.begin(), favoriteHubs.end(), entry); if(i == favoriteHubs.end()) { return; } @@ -210,8 +194,7 @@ } bool FavoriteManager::isFavoriteHub(const std::string& url) { - FavoriteHubEntryList::iterator i = getFavoriteHub(url); - if(i != favoriteHubs.end()) { + if(getFavoriteHub(url) != favoriteHubs.end()) { return true; } return false; @@ -223,15 +206,15 @@ if( path[ path.length() -1 ] != PATH_SEPARATOR ) path += PATH_SEPARATOR; - for(auto i = favoriteDirs.begin(); i != favoriteDirs.end(); ++i) { - if((Util::strnicmp(path, i->first, i->first.length()) == 0) && (Util::strnicmp(path, i->first, path.length()) == 0)) { + for(auto& i: favoriteDirs) { + if((Util::strnicmp(path, i.first, i.first.size()) == 0) && (Util::strnicmp(path, i.first, path.size()) == 0)) { return false; } - if(Util::stricmp(aName, i->second) == 0) { + if(Util::stricmp(aName, i.second) == 0) { return false; } } - favoriteDirs.push_back(make_pair(aDirectory, aName)); + favoriteDirs.emplace_back(aDirectory, aName); save(); return true; } @@ -254,9 +237,9 @@ bool FavoriteManager::renameFavoriteDir(const string& aName, const string& anotherName) { - for(auto j = favoriteDirs.begin(); j != favoriteDirs.end(); ++j) { - if(Util::stricmp(j->second.c_str(), aName.c_str()) == 0) { - j->second = anotherName; + for(auto& j: favoriteDirs) { + if(Util::stricmp(j.second.c_str(), aName.c_str()) == 0) { + j.second = anotherName; save(); return true; } @@ -267,8 +250,7 @@ class XmlListLoader : public SimpleXMLReader::CallBack { public: XmlListLoader(HubEntryList& lst) : publicHubs(lst) { } - virtual ~XmlListLoader() { } - virtual void startTag(const string& name, StringPairList& attribs, bool) { + void startTag(const string& name, StringPairList& attribs, bool) { if(name == "Hub") { const string& name = getAttrib(attribs, "Name", 0); const string& server = getAttrib(attribs, "Address", 1); @@ -282,12 +264,10 @@ const string& maxUsers = getAttrib(attribs, "Maxusers", 5); const string& reliability = getAttrib(attribs, "Reliability", 5); const string& rating = getAttrib(attribs, "Rating", 5); - publicHubs.push_back(HubEntry(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating)); + publicHubs.emplace_back(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating); } } - virtual void endTag(const string&, const string&) { - } private: HubEntryList& publicHubs; }; @@ -352,7 +332,7 @@ xml.addTag("Hub"); xml.addChildAttrib("Name", (*i)->getName()); xml.addChildAttrib("Connect", (*i)->getConnect()); - xml.addChildAttrib("Description", (*i)->getDescription()); + xml.addChildAttrib("Description", (*i)->getHubDescription()); xml.addChildAttrib("Nick", (*i)->getNick(false)); xml.addChildAttrib("Password", (*i)->getPassword()); xml.addChildAttrib("Server", (*i)->getServer()); @@ -424,13 +404,13 @@ // Add NMDC standard op commands static const char kickstr[] = - "$To: %[userNI] From: %[myNI] $<%[myNI]> You are being kicked because: %[line:Reason]|<%[myNI]> is kicking %[userNI] because: %[line:Reason]|$Kick %[userNI]|"; + "$To: %[userNI] From: %[myNI] $<%[myNI]> You are being kicked because: %[line:Reason]|<%[myNI]> is kicking %[userNI] because: %[line:Reason]|$Kick %[userNI]|"; addUserCommand(UserCommand::TYPE_RAW_ONCE, UserCommand::CONTEXT_USER | UserCommand::CONTEXT_SEARCH, UserCommand::FLAG_NOSAVE, - _("Kick user(s)"), kickstr, "", "op"); + _("Kick user(s)"), kickstr, "", "op"); static const char redirstr[] = - "$OpForceMove $Who:%[userNI]$Where:%[line:Target Server]$Msg:%[line:Message]|"; + "$OpForceMove $Who:%[userNI]$Where:%[line:Target Server]$Msg:%[line:Message]|"; addUserCommand(UserCommand::TYPE_RAW_ONCE, UserCommand::CONTEXT_USER | UserCommand::CONTEXT_SEARCH, UserCommand::FLAG_NOSAVE, - _("Redirect user(s)"), redirstr, "", "op"); + _("Redirect user(s)"), redirstr, "", "op"); try { SimpleXML xml; @@ -455,20 +435,20 @@ if(aXml.findChild("Hubs")) { aXml.stepIn(); - while(aXml.findChild("Group")) { - string name = aXml.getChildAttrib("Name"); - if(name.empty()) - continue; - FavHubGroupProperties props = { aXml.getBoolChildAttrib("Private"), aXml.getBoolChildAttrib("Connect") }; - favHubGroups[name] = props; - } + while(aXml.findChild("Group")) { + string name = aXml.getChildAttrib("Name"); + if(name.empty()) + continue; + FavHubGroupProperties props = { aXml.getBoolChildAttrib("Private"), aXml.getBoolChildAttrib("Connect") }; + favHubGroups[name] = props; + } - aXml.resetCurrentChild(); + aXml.resetCurrentChild(); while(aXml.findChild("Hub")) { FavoriteHubEntry* e = new FavoriteHubEntry(); e->setName(aXml.getChildAttrib("Name")); e->setConnect(aXml.getBoolChildAttrib("Connect")); - e->setDescription(aXml.getChildAttrib("Description")); + e->setHubDescription(aXml.getChildAttrib("Description")); e->setNick(aXml.getChildAttrib("Nick")); e->setPassword(aXml.getChildAttrib("Password")); e->setServer(aXml.getChildAttrib("Server")); @@ -485,28 +465,31 @@ favoriteHubs.push_back(e); if(aXml.getBoolChildAttrib("Connect")) { - // this entry dates from before the window manager & fav hub groups; convert it. - const string name = _("Auto-connect group (converted)"); - if(favHubGroups.find(name) == favHubGroups.end()) { - FavHubGroupProperties props = { false, true }; - favHubGroups[name] = props; - } - e->setGroup(name); - needSave = true; + // this entry dates from before the window manager & fav hub groups; convert it. + const string name = _("Auto-connect group (converted)"); + if(favHubGroups.find(name) == favHubGroups.end()) { + FavHubGroupProperties props = { false, true }; + favHubGroups[name] = props; + } + e->setGroup(name); + needSave = true; } } - aXml.stepOut(); + try { + aXml.stepOut(); + } + catch(const Exception&) { } } // parse groups that have the "Connect" param and send their hubs to WindowManager //for(auto i = favHubGroups.begin(), iend = favHubGroups.end(); i != iend; ++i) { - //if(i->second.connect) { - //FavoriteHubEntryList hubs = getFavoriteHubs(i->first); - //for(auto hub = hubs.begin(), hub_end = hubs.end(); hub != hub_end; ++hub) { - //StringMap map; - //map[WindowInfo::address] = (*hub)->getServer(); - //WindowManager::getInstance()->add(WindowManager::hub(), map); - //} - //} + //if(i->second.connect) { + //FavoriteHubEntryList hubs = getFavoriteHubs(i->first); + //for(auto hub = hubs.begin(), hub_end = hubs.end(); hub != hub_end; ++hub) { + //StringMap map; + //map[WindowInfo::address] = (*hub)->getServer(); + //WindowManager::getInstance()->add(WindowManager::hub(), map); + //} + //} //} aXml.resetCurrentChild(); @@ -525,7 +508,7 @@ } else { u = ClientManager::getInstance()->getUser(CID(cid)); } - auto i = users.insert(make_pair(u->getCID(), FavoriteUser(u, nick, hubUrl))).first; + auto i = users.emplace(u->getCID(), FavoriteUser(u, nick, hubUrl)).first; if(aXml.getBoolChildAttrib("GrantSlot")) i->second.setFlag(FavoriteUser::FLAG_GRANTSLOT); @@ -534,16 +517,22 @@ i->second.setDescription(aXml.getChildAttrib("UserDescription")); } - aXml.stepOut(); + try { + aXml.stepOut(); + } + catch(const Exception&) { } } aXml.resetCurrentChild(); if(aXml.findChild("UserCommands")) { aXml.stepIn(); while(aXml.findChild("UserCommand")) { addUserCommand(aXml.getIntChildAttrib("Type"), aXml.getIntChildAttrib("Context"), 0, aXml.getChildAttrib("Name"), - aXml.getChildAttrib("Command"), aXml.getChildAttrib("To"), aXml.getChildAttrib("Hub")); + aXml.getChildAttrib("Command"), aXml.getChildAttrib("To"), aXml.getChildAttrib("Hub")); } - aXml.stepOut(); + try { + aXml.stepOut(); + } + catch(const Exception&) { } } //Favorite download to dirs aXml.resetCurrentChild(); @@ -554,7 +543,10 @@ string d(aXml.getChildData()); FavoriteManager::getInstance()->addFavoriteDir(d, virt); } - aXml.stepOut(); + try { + aXml.stepOut(); + } + catch(const Exception&) { } } dontSave = false; @@ -664,16 +656,20 @@ void FavoriteManager::refresh(bool forceDownload /* = false */) { StringList sl = getHubLists(); - if(sl.empty()) + if(sl.empty()) { + fire(FavoriteManagerListener::DownloadFailed(), Util::emptyString); return; + } + publicListServer = sl[(lastServer) % sl.size()]; - if(Util::strnicmp(publicListServer.c_str(), "http://", 7) != 0) { + if(Util::findSubString(publicListServer, "http://") != 0 && Util::findSubString(publicListServer, "https://") != 0) { lastServer++; + fire(FavoriteManagerListener::DownloadFailed(), str(F_("Invalid URL: %1%") % Util::addBrackets(publicListServer))); return; } if(!forceDownload) { - string path = Util::getHubListsPath() + Util::validateFileName(publicListServer, "/"); + string path = Util::getHubListsPath() + Util::validateFileName(publicListServer); if(File::getSize(path) > 0) { useHttp = false; string fileDate; @@ -685,10 +681,10 @@ try { File cached(path, File::READ, File::OPEN); downloadBuf = cached.read(); - char buf[20]; + char dateBuf[20]; time_t fd = cached.getLastModified(); - if (strftime(buf, 20, "%x", localtime(&fd))) { - fileDate = string(buf); + if (strftime(dateBuf, 20, "%x", localtime(&fd))) { + fileDate = string(dateBuf); } } catch(const FileException&) { downloadBuf = Util::emptyString; @@ -741,8 +737,8 @@ bool commandAdc = uc.getHub().compare(0, 6, "adc://") == 0 || uc.getHub().compare(0, 7, "adcs://") == 0; if(hubAdc && commandAdc) { if((uc.getHub() == "adc://" || uc.getHub() == "adcs://") || - ((uc.getHub() == "adc://op" || uc.getHub() == "adcs://op") && isOp[j]) || - (uc.getHub() == hub) ) + ((uc.getHub() == "adc://op" || uc.getHub() == "adcs://op") && isOp[j]) || + (uc.getHub() == hub) ) { //printf("Found ADC command for ADC hub.\n"); lst.push_back(*i); @@ -750,8 +746,8 @@ } } else if((!hubAdc && !commandAdc) || uc.isChat()) { if((uc.getHub().length() == 0) || - (uc.getHub() == "op" && isOp[j]) || - (uc.getHub() == hub) ) + (uc.getHub() == "op" && isOp[j]) || + (uc.getHub() == hub) ) { //printf("Found non-ADC command for non-ADC hub.\n"); lst.push_back(*i); @@ -778,7 +774,7 @@ fire(FavoriteManagerListener::DownloadFailed(), aLine); } } -void FavoriteManager::on(Complete, HttpConnection*, const string& aLine, bool fromCoral) noexcept { +void FavoriteManager::on(Complete, HttpConnection*, const string& aLine) noexcept { bool parseSuccess = false; c->removeListener(this); @@ -787,7 +783,7 @@ } running = false; if(parseSuccess) { - fire(FavoriteManagerListener::DownloadFinished(), aLine, fromCoral); + fire(FavoriteManagerListener::DownloadFinished(), aLine); } } @@ -800,10 +796,12 @@ if(useHttp) fire(FavoriteManagerListener::DownloadStarting(), aLine); } + void FavoriteManager::on(TypeNormal, HttpConnection*) noexcept { if(useHttp) listType = TYPE_NORMAL; } + void FavoriteManager::on(TypeBZ2, HttpConnection*) noexcept { if(useHttp) listType = TYPE_BZIP2; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -21,7 +20,6 @@ #include "SettingsManager.h" #include "CriticalSection.h" #include "HttpConnection.h" -#include "User.h" #include "UserCommand.h" #include "FavoriteUser.h" #include "Singleton.h" @@ -29,6 +27,7 @@ #include "FavoriteManagerListener.h" #include "HubEntry.h" #include "FavHubGroup.h" +#include "User.h" namespace dcpp { @@ -38,10 +37,10 @@ * Public hub list, favorites (hub&user). Assumed to be called only by UI thread. */ class FavoriteManager : public Speaker, private HttpConnectionListener, public Singleton, - private SettingsManagerListener, private ClientManagerListener + private SettingsManagerListener, private ClientManagerListener { public: -// Public Hubs + // Public Hubs enum HubTypes { TYPE_NORMAL, TYPE_BZIP2 @@ -58,7 +57,7 @@ bool isDownloading() { return (useHttp && running); } const string& getCurrentHubList() const { return publicListServer; } -// Favorite Users + // Favorite Users typedef unordered_map FavoriteMap; FavoriteMap getFavoriteUsers() { Lock l(cs); return users; } @@ -73,7 +72,7 @@ time_t getLastSeen(const UserPtr& aUser) const; std::string getUserURL(const UserPtr& aUser) const; -// Favorite Hubs + // Favorite Hubs const FavoriteHubEntryList& getFavoriteHubs() const { return favoriteHubs; } FavoriteHubEntryList& getFavoriteHubs() { return favoriteHubs; } @@ -82,20 +81,20 @@ bool isFavoriteHub(const std::string& aUrl); FavoriteHubEntryPtr getFavoriteHubEntry(const string& aServer) const; -// Favorite hub groups + // Favorite hub groups const FavHubGroups& getFavHubGroups() const { return favHubGroups; } void setFavHubGroups(const FavHubGroups& favHubGroups_) { favHubGroups = favHubGroups_; } FavoriteHubEntryList getFavoriteHubs(const string& group) const; bool isPrivate(const string& url) const; -// Favorite Directories + // Favorite Directories bool addFavoriteDir(const string& aDirectory, const string& aName); bool removeFavoriteDir(const string& aName); bool renameFavoriteDir(const string& aName, const string& anotherName); StringPairList getFavoriteDirs() { return favoriteDirs; } -// User Commands + // User Commands UserCommand addUserCommand(int type, int ctx, int flags, const string& name, const string& command, const string& to, const string& hub); bool getUserCommand(int cid, UserCommand& uc); int findUserCommand(const string& aName, const string& aUrl); @@ -150,7 +149,7 @@ // HttpConnectionListener virtual void on(Data, HttpConnection*, const uint8_t*, size_t) noexcept; virtual void on(Failed, HttpConnection*, const string&) noexcept; - virtual void on(Complete, HttpConnection*, const string&, bool) noexcept; + virtual void on(Complete, HttpConnection*, const string&) noexcept; virtual void on(Redirected, HttpConnection*, const string&) noexcept; virtual void on(TypeNormal, HttpConnection*) noexcept; virtual void on(TypeBZ2, HttpConnection*) noexcept; @@ -159,7 +158,7 @@ bool onHttpFinished(bool fromHttp) noexcept; // SettingsManagerListener - virtual void on(SettingsManagerListener::Load, SimpleXML& xml) noexcept { + void on(SettingsManagerListener::Load, SimpleXML& xml) noexcept { load(xml); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteManagerListener.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,17 +13,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include + #include "forward.h" -#include "noexcept.h" namespace dcpp { +using std::string; + class FavoriteManagerListener { public: virtual ~FavoriteManagerListener() { } @@ -41,12 +44,12 @@ virtual void on(DownloadStarting, const string&) noexcept { } virtual void on(DownloadFailed, const string&) noexcept { } - virtual void on(DownloadFinished, const string&, bool) noexcept { } + virtual void on(DownloadFinished, const string&) noexcept { } virtual void on(FavoriteAdded, const FavoriteHubEntryPtr) noexcept { } virtual void on(FavoriteRemoved, const FavoriteHubEntryPtr) noexcept { } virtual void on(UserAdded, const FavoriteUser&) noexcept { } virtual void on(UserRemoved, const FavoriteUser&) noexcept { } - virtual void on(StatusChanged, const FavoriteUser&) noexcept { }//NOTE: freedcpp + virtual void on(StatusChanged, const FavoriteUser&) noexcept { } // NOTE: freedcpp virtual void on(LoadedFromCache, const string&, const string&) noexcept { } virtual void on(Corrupted, const string&) noexcept { } }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteUser.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteUser.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FavoriteUser.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FavoriteUser.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,15 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "FastAlloc.h" -#include "User.h" -#include "CID.h" +#include "Flags.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/File.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/File.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/File.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/File.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,19 +12,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "File.h" namespace dcpp { #ifdef _WIN32 File::File(const string& aFileName, int access, int mode) { - dcassert(access == WRITE || access == READ || access == (READ | WRITE)); + dcassert(access == static_cast(WRITE) || access == static_cast(READ) || access == static_cast((READ | WRITE))); int m = 0; if(mode & OPEN) { @@ -42,7 +40,8 @@ } DWORD shared = FILE_SHARE_READ | (mode & SHARED ? FILE_SHARE_WRITE : 0); - h = ::CreateFileW(Text::utf8ToWide(aFileName).c_str(), access, shared, NULL, m, FILE_FLAG_SEQUENTIAL_SCAN, NULL); + h = ::CreateFileW(Text::utf8ToWide(aFileName).c_str(), access, shared, nullptr, m, + FILE_FLAG_SEQUENTIAL_SCAN, nullptr); if(h == INVALID_HANDLE_VALUE) { throw FileException(Util::translateError(GetLastError())); @@ -167,9 +166,7 @@ int64_t File::getSize(const string& aFileName) noexcept { WIN32_FIND_DATAW fd; - HANDLE hFind; - - hFind = FindFirstFileW(Text::utf8ToWide(aFileName).c_str(), &fd); + auto hFind = FindFirstFileW(Text::utf8ToWide(aFileName).c_str(), &fd); if (hFind == INVALID_HANDLE_VALUE) { return -1; @@ -307,8 +304,8 @@ char zero; if( (lseek(h, (off_t)len, SEEK_SET) != -1) && (::write(h, &zero,1) != -1) ) { - if (ftruncate(h,(off_t)len) != 0) - dcdebug("ftruncate() error in File::extendFile()"); + if (ftruncate(h,(off_t)len) != 0) + dcdebug("ftruncate() error in File::extendFile()"); return 1; } return -1; @@ -362,7 +359,7 @@ // This doesn't assume all bytes are written in one write call, it is a bit safer void File::copyFile(const string& source, const string& target) { const size_t BUF_SIZE = 64 * 1024; - boost::scoped_array buffer(new char[BUF_SIZE]); + std::unique_ptr buffer(new char[BUF_SIZE]); size_t count = BUF_SIZE; File src(source, File::READ, 0); File dst(target, File::WRITE, File::CREATE | File::TRUNCATE); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/File.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/File.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/File.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/File.h 2019-05-06 22:23:37.000000000 +0000 @@ -12,29 +12,35 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "Text.h" #include "Streams.h" #ifdef _WIN32 #include "w.h" + +#ifndef PATH_MAX +#define PATH_MAX MAX_PATH +#endif + #else #include #include #include #include #include +#include // PATH_MAX #endif namespace dcpp { class File : public IOStream { public: + using OutputStream::write; + enum { OPEN = 0x01, CREATE = 0x02, @@ -106,53 +112,50 @@ #else int h; #endif -private: - File(const File&); - File& operator=(const File&); }; class FileFindIter { public: - /** End iterator constructor */ - FileFindIter(); - /** Begin iterator constructor, path in utf-8 */ - FileFindIter(const string& path); + /** End iterator constructor */ + FileFindIter(); + /** Begin iterator constructor, path in utf-8 */ + FileFindIter(const string& path); - ~FileFindIter(); + ~FileFindIter(); - FileFindIter& operator++(); - bool operator!=(const FileFindIter& rhs) const; + FileFindIter& operator++(); + bool operator!=(const FileFindIter& rhs) const; - struct DirData -#ifdef _WIN32 + struct DirData + #ifdef _WIN32 : public WIN32_FIND_DATAW -#endif - { - DirData(); - - string getFileName(); - bool isDirectory(); - bool isHidden(); - bool isLink(); - int64_t getSize(); - uint32_t getLastWriteTime(); + #endif + { + DirData(); + + string getFileName(); + bool isDirectory(); + bool isHidden(); + bool isLink(); + int64_t getSize(); + uint32_t getLastWriteTime(); #ifndef _WIN32 - dirent* ent; - string base; + dirent* ent; + string base; #endif - }; + }; - DirData& operator*() { return data; } - DirData* operator->() { return &data; } + DirData& operator*() { return data; } + DirData* operator->() { return &data; } private: #ifdef _WIN32 - HANDLE handle; + HANDLE handle; #else - DIR* dir; + DIR* dir; #endif - DirData data; + DirData data; }; } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FilteredFile.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FilteredFile.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FilteredFile.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FilteredFile.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,13 +12,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include #include "Streams.h" #include "Exception.h" @@ -31,12 +29,12 @@ CountOutputStream(OutputStream* aStream) : s(aStream), count(0) { } virtual ~CountOutputStream() { if(managed) delete s; } - size_t flush() { + size_t flush() { size_t n = s->flush(); count += n; return n; } - size_t write(const void* buf, size_t len) { + size_t write(const void* buf, size_t len) { size_t n = s->write(buf, len); count += n; return n; @@ -56,11 +54,11 @@ CalcOutputStream(OutputStream* aStream) : s(aStream) { } virtual ~CalcOutputStream() { if(managed) delete s; } - size_t flush() { + size_t flush() { return s->flush(); } - size_t write(const void* buf, size_t len) { + size_t write(const void* buf, size_t len) { filter(buf, len); return s->write(buf, len); } @@ -78,7 +76,7 @@ CalcInputStream(InputStream* aStream) : s(aStream) { } virtual ~CalcInputStream() { if(managed) delete s; } - size_t read(void* buf, size_t& len) { + size_t read(void* buf, size_t& len) { size_t x = s->read(buf, len); filter(buf, x); return x; @@ -98,7 +96,7 @@ FilteredOutputStream(OutputStream* aFile) : f(aFile), buf(new uint8_t[BUF_SIZE]), flushed(false), more(true) { } virtual ~FilteredOutputStream() { if(manage) delete f; } - size_t flush() { + size_t flush() { if(flushed) return 0; @@ -118,7 +116,7 @@ return written + f->flush(); } - size_t write(const void* wbuf, size_t len) { + size_t write(const void* wbuf, size_t len) { if(flushed) throw Exception("No filtered writes after flush"); @@ -152,7 +150,7 @@ OutputStream* f; Filter filter; - boost::scoped_array buf; + std::unique_ptr buf; bool flushed; bool more; }; @@ -161,7 +159,7 @@ class FilteredInputStream : public InputStream { public: FilteredInputStream(InputStream* aFile) : f(aFile), buf(new uint8_t[BUF_SIZE]), pos(0), valid(0), more(true) { } - virtual ~FilteredInputStream() { if(managed) delete f; } + virtual ~FilteredInputStream() { if(managed) delete f; } /** * Read data through filter, keep calling until len returns 0. @@ -202,7 +200,7 @@ InputStream* f; Filter filter; - boost::scoped_array buf; + std::unique_ptr buf; size_t pos; size_t valid; bool more; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedItem.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedItem.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedItem.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedItem.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,34 +12,33 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "FinishedItem.h" +#include "HintedUser.h" #include "User.h" namespace dcpp { FinishedItemBase::FinishedItemBase( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_ - ) : -transferred(transferred_), -milliSeconds(milliSeconds_), -time(time_) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_ + ) : + transferred(transferred_), + milliSeconds(milliSeconds_), + time(time_) { } void FinishedItemBase::update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_ - ) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_ + ) { transferred += transferred_; milliSeconds += milliSeconds_; @@ -51,30 +50,30 @@ } FinishedFileItem::FinishedFileItem( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - int64_t fileSize_, - int64_t actual_, - bool crc32Checked_, - const HintedUser& user - ) : -FinishedItemBase(transferred_, milliSeconds_, time_), -fileSize(fileSize_), -actual(actual_), -crc32Checked(crc32Checked_) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + int64_t fileSize_, + int64_t actual_, + bool crc32Checked_, + const HintedUser& user + ) : + FinishedItemBase(transferred_, milliSeconds_, time_), + fileSize(fileSize_), + actual(actual_), + crc32Checked(crc32Checked_) { users.push_back(user); } void FinishedFileItem::update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - int64_t actual_, - bool crc32Checked_, - const HintedUser& user - ) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + int64_t actual_, + bool crc32Checked_, + const HintedUser& user + ) { FinishedItemBase::update(transferred_, milliSeconds_, time_); @@ -83,11 +82,11 @@ if(crc32Checked_) crc32Checked = true; - HintedUserList::iterator i = find(users.begin(), users.end(), user); - if(i == users.end()) - users.push_back(user); - else - *i = user; // update, the hint might have changed + auto i = find(users.begin(), users.end(), user); + if(i == users.end()) + users.push_back(user); + else + *i = user; // update, the hint might have changed } double FinishedFileItem::getTransferredPercentage() const { @@ -99,22 +98,22 @@ } FinishedUserItem::FinishedUserItem( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - const string& file - ) : -FinishedItemBase(transferred_, milliSeconds_, time_) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + const string& file + ) : + FinishedItemBase(transferred_, milliSeconds_, time_) { files.push_back(file); } void FinishedUserItem::update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - const string& file - ) + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + const string& file + ) { FinishedItemBase::update(transferred_, milliSeconds_, time_); if(find(files.begin(), files.end(), file) == files.end()) diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedItem.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedItem.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedItem.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedItem.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,32 +12,34 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include +#include "NonCopyable.h" + #include "forward.h" +#include "typedefs.h" + #include "Pointer.h" -#include "Util.h" +#include "GetSet.h" namespace dcpp { -class FinishedItemBase : boost::noncopyable { +class FinishedItemBase : private NonCopyable { public: explicit FinishedItemBase( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_ - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_ + ); void update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_ - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_ + ); int64_t getAverageSpeed() const; @@ -49,23 +51,23 @@ class FinishedFileItem : public FinishedItemBase, public intrusive_ptr_base { public: explicit FinishedFileItem( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - int64_t fileSize_, - int64_t actual_, - bool crc32Checked_, - const HintedUser& user - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + int64_t fileSize_, + int64_t actual_, + bool crc32Checked_, + const HintedUser& user + ); void update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - int64_t actual_, - bool crc32Checked_, - const HintedUser& user - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + int64_t actual_, + bool crc32Checked_, + const HintedUser& user + ); double getTransferredPercentage() const; bool isFull() const; @@ -79,18 +81,18 @@ class FinishedUserItem : public FinishedItemBase, public intrusive_ptr_base { public: explicit FinishedUserItem( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - const string& file - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + const string& file + ); void update( - int64_t transferred_, - int64_t milliSeconds_, - time_t time_, - const string& file - ); + int64_t transferred_, + int64_t milliSeconds_, + time_t time_, + const string& file + ); GETSET(StringList, files, Files); }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManager.cpp 2019-05-06 22:23:37.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -27,6 +27,7 @@ #include "DownloadManager.h" #include "QueueManager.h" #include "UploadManager.h" +#include "ClientManager.h" namespace dcpp { @@ -45,19 +46,9 @@ clearULs(); } -#ifdef DO_NOT_USE_MUTEX -void FinishedManager::lockLists() { - cs.lock(); -} - -void FinishedManager::unlockLists() { - cs.unlock(); -} -#else // DO_NOT_USE_MUTEX Lock FinishedManager::lockLists() { return Lock(cs); } -#endif // DO_NOT_USE_MUTEX const FinishedManager::MapByFile& FinishedManager::getMapByFile(bool upload) const { return upload ? ULByFile : DLByFile; @@ -71,7 +62,7 @@ { Lock l(cs); MapByFile& map = upload ? ULByFile : DLByFile; - MapByFile::iterator it = map.find(file); + auto it = map.find(file); if(it != map.end()) map.erase(it); else @@ -84,7 +75,7 @@ { Lock l(cs); MapByUser& map = upload ? ULByUser : DLByUser; - MapByUser::iterator it = map.find(user); + auto it = map.find(user); if(it != map.end()) map.erase(it); else @@ -121,7 +112,7 @@ uint64_t milliSeconds = GET_TICK() - t->getStart(); time_t time = GET_TIME(); - int64_t size = 0; + int64_t size = 0, pos = 0; // get downloads' file size here to avoid deadlocks if(!upload) { if(t->getType() == Transfer::TYPE_FULL_LIST) { @@ -135,36 +126,41 @@ } } size = t->getSize(); - } else - size = QueueManager::getInstance()->getSize(file); + } else { + QueueManager::getInstance()->getSizeInfo(size, pos, file); + if (size == -1) { + // not in the queue anymore? + return; + } + } } Lock l(cs); { MapByFile& map = upload ? ULByFile : DLByFile; - MapByFile::iterator it = map.find(file); + auto it = map.find(file); if(it == map.end()) { FinishedFileItemPtr p = new FinishedFileItem( - t->getPos(), - milliSeconds, - time, - upload ? File::getSize(file) : size, - t->getActual(), - crc32Checked, - user - ); + pos + t->getPos(), + milliSeconds, + time, + upload ? File::getSize(file) : size, + t->getActual(), + crc32Checked, + user + ); map[file] = p; fire(FinishedManagerListener::AddedFile(), upload, file, p); } else { it->second->update( - crc32Checked ? 0 : t->getPos(), // in case of a successful crc check at the end we want to update the status only - milliSeconds, - time, - t->getActual(), - crc32Checked, - user - ); + crc32Checked ? 0 : t->getPos(), // in case of a successful crc check at the end we want to update the status only + milliSeconds, + time, + t->getActual(), + crc32Checked, + user + ); // we still dispatch a FinishedFileItem pointer in case previous ones were ignored fire(FinishedManagerListener::UpdatedFile(), upload, file, it->second); } @@ -172,23 +168,23 @@ { MapByUser& map = upload ? ULByUser : DLByUser; - MapByUser::iterator it = map.find(user); + auto it = map.find(user); if(it == map.end()) { FinishedUserItemPtr p = new FinishedUserItem( - t->getPos(), - milliSeconds, - time, - file - ); + t->getPos(), + milliSeconds, + time, + file + ); map[user] = p; fire(FinishedManagerListener::AddedUser(), upload, user, p); } else { it->second->update( - t->getPos(), - milliSeconds, - time, - file - ); + t->getPos(), + milliSeconds, + time, + file + ); fire(FinishedManagerListener::UpdatedUser(), upload, user); } } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManager.h 2019-05-06 22:23:37.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -29,6 +29,7 @@ #include "User.h" #include "MerkleTree.h" #include "ClientManager.h" +#include "HintedUser.h" namespace dcpp { @@ -38,10 +39,10 @@ typedef vector FinishedItemList; FinishedItem(string const& aTarget, const UserPtr& aUser, string const& aHub, - int64_t aSize, int64_t aSpeed, time_t aTime, - const string& aTTH = Util::emptyString) : - target(aTarget), hub(aHub), tth(aTTH), size(aSize), avgSpeed(aSpeed), - time(aTime), user(aUser) + int64_t aSize, int64_t aSpeed, time_t aTime, + const string& aTTH = Util::emptyString) : + target(aTarget), hub(aHub), tth(aTTH), size(aSize), avgSpeed(aSpeed), + time(aTime), user(aUser) { } @@ -62,18 +63,13 @@ }; /**/ class FinishedManager : public Singleton, - public Speaker, private DownloadManagerListener, private UploadManagerListener, private QueueManagerListener + public Speaker, private DownloadManagerListener, private UploadManagerListener, private QueueManagerListener { public: typedef unordered_map MapByFile; typedef unordered_map MapByUser; -#ifdef DO_NOT_USE_MUTEX - void lockLists(); - void unlockLists(); -#else // DO_NOT_USE_MUTEX Lock lockLists(); -#endif // DO_NOT_USE_MUTEX const MapByFile& getMapByFile(bool upload) const; const MapByUser& getMapByUser(bool upload) const; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/FinishedManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/FinishedManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "forward.h" -#include "noexcept.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Flags.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Flags.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Flags.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Flags.h 2019-04-19 17:00:29.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once @@ -25,16 +24,13 @@ typedef int MaskType; Flags() : flags(0) { } - Flags(const Flags& rhs) : flags(rhs.flags) { } Flags(MaskType f) : flags(f) { } bool isSet(MaskType aFlag) const { return (flags & aFlag) == aFlag; } bool isAnySet(MaskType aFlag) const { return (flags & aFlag) != 0; } void setFlag(MaskType aFlag) { flags |= aFlag; } void unsetFlag(MaskType aFlag) { flags &= ~aFlag; } MaskType getFlags() const { return flags; } - Flags& operator=(const Flags& rhs) { flags = rhs.flags; return *this; } -protected: - ~Flags() { } + private: MaskType flags; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/format.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/format.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/format.h 2018-08-24 00:00:48.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/format.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -21,16 +20,17 @@ #include #include -#if defined(BUILDING_DCPP) +#ifdef BUILDING_DCPP #define PACKAGE "libeiskaltdcpp" +#define LOCALEDIR dcpp::Util::getPath(Util::PATH_LOCALE).c_str() #define _(String) dgettext(PACKAGE, String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) #define F_(String) dcpp::dcpp_fmt(dgettext(PACKAGE, String)) #define FN_(String1,String2, N) dcpp::dcpp_fmt(dngettext(PACKAGE, String1, String2, N)) -#endif // defined(BUILDING_DCPP) +#endif namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/forward.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/forward.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/forward.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/forward.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -28,8 +27,13 @@ class AdcCommand; +class ADLSearch; + class BufferedSocket; +class Bundle; +typedef boost::intrusive_ptr BundlePtr; + struct ChatMessage; class CID; @@ -42,6 +46,8 @@ class CRC32Filter; +struct DcextInfo; + class Download; typedef Download* DownloadPtr; @@ -60,8 +66,13 @@ class FinishedManager; +template +struct HashValue; + struct HintedUser; +class HttpConnection; + class HubEntry; class Identity; @@ -73,7 +84,10 @@ class OnlineUser; typedef OnlineUser* OnlineUserPtr; +class OutputStream; + class QueueItem; +typedef QueueItem* QueueItemPtr; class SearchResult; typedef boost::intrusive_ptr SearchResultPtr; @@ -81,10 +95,19 @@ class Socket; class SocketException; +class StringOutputStream; +class StringRefOutputStream; + class StringSearch; +class Tagger; + +class TigerHash; + class Transfer; +typedef HashValue TTHValue; + class UnZFilter; class Upload; @@ -98,5 +121,9 @@ class UserConnection; typedef UserConnection* UserConnectionPtr; +struct UserMatch; + class WindowInfo; + } // namespace dcpp + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/GetSet.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/GetSet.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/GetSet.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/GetSet.h 2019-04-11 19:00:27.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 Boris Pek + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +template struct ReferenceSelector { + typedef T ResultType; +}; +template struct ReferenceSelector { + typedef const T& ResultType; +}; + +template class IsOfClassType { +public: + template static char check(int U::*); + template static float check(...); +public: + enum { Result = sizeof(check(0)) }; +}; + +template struct TypeTraits { + typedef IsOfClassType ClassType; + typedef ReferenceSelector sizeof(char*)) ) > Selector; + typedef typename Selector::ResultType ParameterType; +}; + +#define GETSET(type, name, name2) \ + private: type name; \ + public: TypeTraits::ParameterType get##name2() const { return name; } \ + void set##name2(TypeTraits::ParameterType a##name2) { name = a##name2; } + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashBloom.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashBloom.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashBloom.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashBloom.cpp 2019-04-19 17:00:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com +* Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #include "stdinc.h" @@ -22,6 +21,8 @@ #include +#include "MerkleTree.h" + namespace dcpp { size_t HashBloom::get_k(size_t n, size_t h) { @@ -37,7 +38,7 @@ uint64_t HashBloom::get_m(size_t n, size_t k) { uint64_t m = (static_cast(ceil(static_cast(n) * k / log(2.)))); // 64-bit boundary as per spec - return ((m + 63 )/ 64) * 64; + return ((m + 63ULL )/ 64ULL) * 64ULL; } void HashBloom::add(const TTHValue& tth) { @@ -82,7 +83,7 @@ size_t pos = bit % 8; if(tth.data[byte] & (1 << pos)) { - x |= (1 << i); + x |= (1LL << i); } } return x % bloom.size(); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashBloom.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashBloom.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashBloom.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashBloom.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com +* Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,17 +12,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once -#include "MerkleTree.h" +#include "typedefs.h" namespace dcpp { /** - * According to http://www.eecs.harvard.edu/~michaelm/NEWWORK/postscripts/BloomFilterSurvey.pdf + * According to https://www.eecs.harvard.edu/~michaelm/NEWWORK/postscripts/BloomFilterSurvey.pdf * the optimal number of hashes k is (m/n)*ln(2), m = number of bits in the filter and n = number * of items added. The largest k that we can get from a single TTH value depends on the number of * bits we need to address the bloom structure, which in turn depends on m, so the optimal size diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManager.cpp 2019-02-15 21:07:09.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManager.cpp 2019-04-19 17:00:29.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,19 +13,22 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" #include "HashManager.h" + +#include + +#include "File.h" +#include "LogManager.h" +#include "ScopedFunctor.h" #include "ShareManager.h" #include "SimpleXML.h" -#include "LogManager.h" -#include "File.h" -#include "ZUtils.h" #include "SFVReader.h" +#include "ZUtils.h" #ifndef _WIN32 #include // mmap, munmap, madvise @@ -32,13 +36,11 @@ #include #endif -#include - #ifdef USE_XATTR #include #include #include -#include "attr/attributes.h" +#include #endif namespace dcpp { @@ -94,13 +96,12 @@ const int64_t fileSize = (p_aFileSize == -1) ? File::getSize(p_filePath) : p_aFileSize; const size_t hdrSz = sizeof(TTHStreamHeader); const size_t totalSz = ATTR_MAX_VALUELEN; - int blockSize = totalSz; - TTHStreamHeader h; + const size_t blockSize = totalSz; - std::unique_ptr buf(new uint8_t[totalSz]); + std::unique_ptr buf(new uint8_t[blockSize]); - if (attr_get(p_filePath.c_str(), g_streamName.c_str(), (char*)(void*)buf.get(), &blockSize, 0) == 0){ - memcpy(&h, buf.get(), hdrSz); + if (getxattr(p_filePath.c_str(), g_streamName.c_str(), (char*)(void*)buf.get(), blockSize) == 0) { + const TTHStreamHeader& h = reinterpret_cast(*buf.get()); printf("%s: timestamps header=0x%llx, current=0x%llx, difference(should be zero)=%llx\n", p_filePath.c_str(), @@ -108,7 +109,7 @@ (long long unsigned int)getTimeStamp(p_filePath), (long long unsigned int)(h.timeStamp - getTimeStamp(p_filePath))); - if (!(h.timeStamp == getTimeStamp(p_filePath) && validateCheckSum(h))){ // File was modified and we should reset attr. + if (!(h.timeStamp == getTimeStamp(p_filePath) && validateCheckSum(h))) { // File was modified and we should reset attr. deleteStream(p_filePath); return false; @@ -129,6 +130,10 @@ else return false; } +#else + (void)p_filePath; + (void)tree; + (void)p_aFileSize; #endif //USE_XATTR return false; } @@ -151,9 +156,12 @@ memcpy(buf.get(), &h, sizeof(TTHStreamHeader)); memcpy(buf.get() + sizeof(TTHStreamHeader), p_Tree.getLeaves()[0].data, p_Tree.getLeaves().size() * TTHValue::BYTES); - return (attr_set(p_filePath.c_str(), g_streamName.c_str(), (char*)(void*)buf.get(), sz, 0) == 0); + return (setxattr(p_filePath.c_str(), g_streamName.c_str(), (char*)(void*)buf.get(), sz, 0) == 0); } -#endif //USE_XATTR +#else // USE_XATTR + (void)p_filePath; + (void)p_Tree; +#endif // USE_XATTR return false; } @@ -161,11 +169,12 @@ { #ifdef USE_XATTR printf("Resetting Xattr for %s\n", p_filePath.c_str()); - attr_remove(p_filePath.c_str(), g_streamName.c_str(), 0); + removexattr(p_filePath.c_str(), g_streamName.c_str()); +#else + (void)p_filePath; #endif //USE_XATTR } - bool HashManager::checkTTH(const string& aFileName, int64_t aSize, uint32_t aTimeStamp) { Lock l(cs); @@ -207,7 +216,7 @@ return store.getTree(root, tt); } -size_t HashManager::getBlockSize(const TTHValue& root) { +int64_t HashManager::getBlockSize(const TTHValue& root) { Lock l(cs); return store.getBlockSize(root); } @@ -226,10 +235,10 @@ if (speed > 0) { LogManager::getInstance()->message(str(F_("Finished hashing: %1% (%2% at %3%/s)") % Util::addBrackets(aFileName) % - Util::formatBytes(size) % Util::formatBytes(speed))); + Util::formatBytes(size) % Util::formatBytes(speed))); } else if(size >= 0) { LogManager::getInstance()->message(str(F_("Finished hashing: %1% (%2%)") % Util::addBrackets(aFileName) % - Util::formatBytes(size))); + Util::formatBytes(size))); } else { LogManager::getInstance()->message(str(F_("Finished hashing: %1%") % Util::addBrackets(aFileName))); } @@ -238,17 +247,16 @@ void HashManager::HashStore::addFile(const string& aFileName, uint32_t aTimeStamp, const TigerTree& tth, bool aUsed) { addTree(tth); - string fname = Util::getFileName(aFileName); - string fpath = Util::getFilePath(aFileName); + auto fname = Util::getFileName(aFileName), fpath = Util::getFilePath(aFileName); - FileInfoList& fileList = fileIndex[fpath]; + auto& fileList = fileIndex[fpath]; - FileInfoIter j = find(fileList.begin(), fileList.end(), fname); + auto j = find(fileList.begin(), fileList.end(), fname); if (j != fileList.end()) { fileList.erase(j); } - fileList.push_back(FileInfo(fname, tth.getRoot(), aTimeStamp, aUsed)); + fileList.emplace_back(fname, tth.getRoot(), aTimeStamp, aUsed); dirty = true; } @@ -257,7 +265,7 @@ try { File f(getDataFile(), File::READ | File::WRITE, File::OPEN); int64_t index = saveTree(f, tt); - treeIndex.insert(make_pair(tt.getRoot(), TreeInfo(tt.getFileSize(), index, tt.getBlockSize()))); + treeIndex.emplace(tt.getRoot(), TreeInfo(tt.getFileSize(), index, tt.getBlockSize())); dirty = true; } catch (const FileException& e) { LogManager::getInstance()->message(str(F_("Error saving hash data: %1%") % e.getError())); @@ -298,8 +306,8 @@ f.setPos(ti.getIndex()); size_t datalen = TigerTree::calcBlocks(ti.getSize(), ti.getBlockSize()) * TTHValue::BYTES; std::unique_ptr buf(new uint8_t[datalen]); - f.read((void*)buf.get(), datalen); - tt = TigerTree(ti.getSize(), ti.getBlockSize(), buf.get()); + f.read(&buf[0], datalen); + tt = TigerTree(ti.getSize(), ti.getBlockSize(), &buf[0]); if (!(tt.getRoot() == root)) return false; } catch (const Exception&) { @@ -310,7 +318,7 @@ } bool HashManager::HashStore::getTree(const TTHValue& root, TigerTree& tt) { - TreeIter i = treeIndex.find(root); + auto i = treeIndex.find(root); if (i == treeIndex.end()) return false; try { @@ -321,20 +329,19 @@ } } -size_t HashManager::HashStore::getBlockSize(const TTHValue& root) const { - TreeMap::const_iterator i = treeIndex.find(root); +int64_t HashManager::HashStore::getBlockSize(const TTHValue& root) const { + auto i = treeIndex.find(root); return i == treeIndex.end() ? 0 : i->second.getBlockSize(); } bool HashManager::HashStore::checkTTH(const string& aFileName, int64_t aSize, uint32_t aTimeStamp) { - string fname = Util::getFileName(aFileName); - string fpath = Util::getFilePath(aFileName); - DirIter i = fileIndex.find(fpath); + auto fname = Util::getFileName(aFileName), fpath = Util::getFilePath(aFileName); + auto i = fileIndex.find(fpath); if (i != fileIndex.end()) { - FileInfoIter j = find(i->second.begin(), i->second.end(), fname); + auto j = find(i->second.begin(), i->second.end(), fname); if (j != i->second.end()) { FileInfo& fi = *j; - TreeIter ti = treeIndex.find(fi.getRoot()); + auto ti = treeIndex.find(fi.getRoot()); if (ti == treeIndex.end() || ti->second.getSize() != aSize || fi.getTimeStamp() != aTimeStamp) { i->second.erase(j); dirty = true; @@ -350,9 +357,9 @@ string fname = Util::getFileName(aFileName); string fpath = Util::getFilePath(aFileName); - DirIter i = fileIndex.find(fpath); + auto i = fileIndex.find(fpath); if (i != fileIndex.end()) { - FileInfoIter j = find(i->second.begin(), i->second.end(), fname); + auto j = find(i->second.begin(), i->second.end(), fname); if (j != i->second.end()) { j->setUsed(true); return &(j->getRoot()); @@ -363,23 +370,23 @@ void HashManager::HashStore::rebuild() { try { - DirMap newFileIndex; - TreeMap newTreeIndex; + decltype(fileIndex) newFileIndex; + decltype(treeIndex) newTreeIndex; - for (DirIter i = fileIndex.begin(); i != fileIndex.end(); ++i) { - for (FileInfoIter j = i->second.begin(); j != i->second.end(); ++j) { - if (!j->getUsed()) + for (auto& i: fileIndex) { + for (auto& j : i.second) { + if (!j.getUsed()) continue; - TreeIter k = treeIndex.find(j->getRoot()); + auto k = treeIndex.find(j.getRoot()); if (k != treeIndex.end()) { - newTreeIndex[j->getRoot()] = k->second; + newTreeIndex[j.getRoot()] = k->second; } } } - string tmpName = getDataFile() + ".tmp"; - string origName = getDataFile(); + auto tmpName = getDataFile() + ".tmp"; + auto origName = getDataFile(); createDataFile(tmpName); @@ -387,7 +394,7 @@ File in(origName, File::READ, File::OPEN); File out(tmpName, File::READ | File::WRITE, File::OPEN); - for (TreeIter i = newTreeIndex.begin(); i != newTreeIndex.end();) { + for (auto i = newTreeIndex.begin(); i != newTreeIndex.end();) { TigerTree tree; if (loadTree(in, i->second, i->first, tree)) { i->second.setIndex(saveTree(out, tree)); @@ -398,12 +405,12 @@ } } - for (DirIter i = fileIndex.begin(); i != fileIndex.end(); ++i) { - DirIter fi = newFileIndex.insert(make_pair(i->first, FileInfoList())).first; + for (auto& i: fileIndex) { + auto fi = newFileIndex.emplace(i.first, vector()).first; - for (FileInfoIter j = i->second.begin(); j != i->second.end(); ++j) { - if (newTreeIndex.find(j->getRoot()) != newTreeIndex.end()) { - fi->second.push_back(*j); + for (auto& j: i.second) { + if (newTreeIndex.find(j.getRoot()) != newTreeIndex.end()) { + fi->second.push_back(j); } } @@ -436,8 +443,8 @@ f.write(LIT("\t\r\n")); - for (TreeIter i = treeIndex.begin(); i != treeIndex.end(); ++i) { - const TreeInfo& ti = i->second; + for (auto& i: treeIndex) { + const TreeInfo& ti = i.second; f.write(LIT("\t\tfirst.toBase32(b32tmp)); + f.write(i.first.toBase32(b32tmp)); f.write(LIT("\"/>\r\n")); } f.write(LIT("\t\r\n\t\r\n")); - for (DirIter i = fileIndex.begin(); i != fileIndex.end(); ++i) { - const string& dir = i->first; - for (FileInfoIter j = i->second.begin(); j != i->second.end(); ++j) { - const FileInfo& fi = *j; + for (auto& i: fileIndex) { + const string& dir = i.first; + for (auto& fi: i.second) { f.write(LIT("\t\t 0) paused = 1 ; else @@ -620,30 +627,30 @@ } } -bool HashManager::Hasher::pause() { +bool HashManager::Hasher::pause() noexcept { Lock l(cs); paused = 1; -// printf("pause::paused: %d\n", paused);fflush(stdout); + // printf("pause::paused: %d\n", paused);fflush(stdout); return true; } -void HashManager::Hasher::resume() { +void HashManager::Hasher::resume() noexcept { Lock l(cs); while(paused > 0) { paused = 0; -// printf("resume::paused: %d\n", paused);fflush(stdout); + // printf("resume::paused: %d\n", paused);fflush(stdout); s.signal(); } } -bool HashManager::Hasher::isPaused() const { +bool HashManager::Hasher::isPaused() const noexcept { Lock l(cs); return paused > 0; } void HashManager::Hasher::stopHashing(const string& baseDir) { Lock l(cs); - for (WorkIter i = w.begin(); i != w.end();) { + for (auto i = w.begin(); i != w.end();) { if (Util::strnicmp(baseDir, i->first, baseDir.length()) == 0) { w.erase(i++); } else { @@ -652,15 +659,15 @@ } } -void HashManager::Hasher::getStats(string& curFile, int64_t& bytesLeft, size_t& filesLeft) { +void HashManager::Hasher::getStats(string& curFile, uint64_t& bytesLeft, size_t& filesLeft) const { Lock l(cs); curFile = currentFile; filesLeft = w.size(); if (running) filesLeft++; bytesLeft = 0; - for (WorkMap::const_iterator i = w.begin(); i != w.end(); ++i) { - bytesLeft += i->second; + for (auto& i: w) { + bytesLeft += i.second; } bytesLeft += currentSize; } @@ -673,10 +680,8 @@ wait = true; } } - if(wait) { -// printf("wait2: %d\n", wait); fflush(stdout); + if(wait) s.wait(); - } } #ifdef _WIN32 @@ -692,7 +697,7 @@ return false; } else { h = ::CreateFileW(Text::utf8ToWide(fname).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL); + FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL); if (h == INVALID_HANDLE_VALUE) return false; } @@ -770,7 +775,7 @@ goto cleanup; } break; - default: + default: dcdebug("Error 0x%x: %s\n", GetLastError(), Util::translateError(GetLastError()).c_str()); goto cleanup; } @@ -785,7 +790,7 @@ swap(rn, hn); } - cleanup: +cleanup: ::CloseHandle(over.hEvent); ::CloseHandle(h); return ok; @@ -795,15 +800,17 @@ static sigjmp_buf sb_env; -static void sigbus_handler(int signum #ifndef __HAIKU__ -, siginfo_t* info, void* context +static void sigbus_handler(int signum, siginfo_t* info, void* context) +#else // __HAIKU__ +static void sigbus_handler(int signum) #endif -) { +{ // Jump back to the fastHash which will return error. Apparently truncating // a file in Solaris sets si_code to BUS_OBJERR #ifndef __HAIKU__ - if (signum == SIGBUS && (info->si_code == BUS_ADRERR || info->si_code == BUS_OBJERR)) + (void)context; + if (signum == SIGBUS && (info->si_code == BUS_ADRERR || info->si_code == BUS_OBJERR)) siglongjmp(sb_env, 1); #endif } @@ -870,8 +877,8 @@ size_read = std::min(size - pos, BUF_SIZE); buf = mmap(0, size_read, PROT_READ, mmap_flags, fd, pos); if(buf == MAP_FAILED) { - dcdebug("Error calling mmap for file %s: %s\n", filename.c_str(), Util::translateError(errno).c_str()); - break; + dcdebug("Error calling mmap for file %s: %s\n", filename.c_str(), Util::translateError(errno).c_str()); + break; } if (sigsetjmp(sb_env, 1)) { @@ -941,7 +948,6 @@ #endif // !_WIN32 int HashManager::Hasher::run() { setThreadPriority(Thread::IDLE); - setThreadName("Hasher"); uint8_t* buf = NULL; bool virtualBuf = true; string fname; @@ -1004,7 +1010,7 @@ SFVReader sfv(fname); CRC32Filter* xcrc32 = 0; if(sfv.hasCRC()) - xcrc32 = &crc32; + xcrc32 = &crc32; TigerTree fastTTH(bs); tth = &fastTTH; @@ -1040,7 +1046,7 @@ currentSize = max(static_cast(currentSize - n), static_cast(0)); } - instantPause(); + instantPause(); } while (n> 0 && !stop); } @@ -1056,29 +1062,29 @@ } else { HashManager::getInstance()->hashDone(fname, timestamp, *tth, speed, size); } - } catch(const FileException& e) { - LogManager::getInstance()->message(str(F_("Error hashing %1%: %2%") % Util::addBrackets(fname) % e.getError())); - } + } catch(const FileException& e) { + LogManager::getInstance()->message(str(F_("Error hashing %1%: %2%") % Util::addBrackets(fname) % e.getError())); } - { - Lock l(cs); - currentFile.clear(); - currentSize = 0; - } - running = false; - if(buf != NULL && (last || stop)) { - if(virtualBuf) { + } + { + Lock l(cs); + currentFile.clear(); + currentSize = 0; + } + running = false; + if(buf != NULL && (last || stop)) { + if(virtualBuf) { #ifdef _WIN32 - VirtualFree(buf, 0, MEM_RELEASE); + VirtualFree(buf, 0, MEM_RELEASE); #endif - } else { - delete [] buf; - } - buf = NULL; + } else { + delete [] buf; } + buf = NULL; } - return 0; } + return 0; +} HashManager::HashPauser::HashPauser() { resume = !HashManager::getInstance()->isHashingPaused(); @@ -1089,22 +1095,23 @@ HashManager::getInstance()->resumeHashing(); } -bool HashManager::pauseHashing() { +bool HashManager::pauseHashing() noexcept { Lock l(cs); return hasher.pause(); } -void HashManager::resumeHashing() { +void HashManager::resumeHashing() noexcept { Lock l(cs); hasher.resume(); } -bool HashManager::isHashingPaused() const { +bool HashManager::isHashingPaused() const noexcept { Lock l(cs); return hasher.isPaused(); } void HashManager::on(TimerManagerListener::Second, uint64_t tick) noexcept { + (void)tick; //fprintf(stdout,"%lld\n", tick); fflush(stdout); static bool firstcycle = true; if (firstcycle){ @@ -1117,7 +1124,7 @@ if (!ShareManager::getInstance()->isRefreshing()){ string curFile; - int64_t bytesLeft; + uint64_t bytesLeft; size_t filesLeft = -1; getStats(curFile, bytesLeft, filesLeft); //fprintf(stdout,"filesLeft %d\n", filesLeft); fflush(stdout); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,23 +13,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include +#include + #include "Singleton.h" #include "MerkleTree.h" #include "Thread.h" #include "CriticalSection.h" #include "Semaphore.h" #include "TimerManager.h" -#include "Util.h" #include "FastAlloc.h" #include "Text.h" #include "Streams.h" #include "HashManagerListener.h" +#include "GetSet.h" #ifdef USE_XATTR #include "attr/attributes.h" @@ -38,6 +41,9 @@ namespace dcpp { +using std::function; +using std::map; + STANDARD_EXCEPTION(HashException); class File; @@ -45,7 +51,7 @@ class FileException; class HashManager : public Singleton, public Speaker, - private TimerManagerListener + private TimerManagerListener { public: @@ -55,7 +61,7 @@ HashManager() { TimerManager::getInstance()->addListener(this); } - virtual ~HashManager() noexcept { + virtual ~HashManager() { TimerManager::getInstance()->removeListener(this); hasher.join(); } @@ -77,14 +83,14 @@ bool getTree(const TTHValue& root, TigerTree& tt); /** Return block size of the tree associated with root, or 0 if no such tree is in the store */ - size_t getBlockSize(const TTHValue& root); + int64_t getBlockSize(const TTHValue& root); void addTree(const string& aFileName, uint32_t aTimeStamp, const TigerTree& tt) { hashDone(aFileName, aTimeStamp, tt, -1, -1); } void addTree(const TigerTree& tree) { Lock l(cs); store.addTree(tree); } - void getStats(string& curFile, int64_t& bytesLeft, size_t& filesLeft) { + void getStats(string& curFile, uint64_t& bytesLeft, size_t& filesLeft) const { hasher.getStats(curFile, bytesLeft, filesLeft); } @@ -111,36 +117,33 @@ }; /// @return whether hashing was already paused - bool pauseHashing(); - void resumeHashing(); - bool isHashingPaused() const; + bool pauseHashing() noexcept; + void resumeHashing() noexcept; + bool isHashingPaused() const noexcept; private: class Hasher : public Thread { public: Hasher() : stop(false), running(false), paused(0), rebuild(false), currentSize(0) { } - void hashFile(const string& fileName, int64_t size); + void hashFile(const string& fileName, int64_t size) noexcept; /// @return whether hashing was already paused - bool pause(); - void resume(); - bool isPaused() const; + bool pause() noexcept; + void resume() noexcept; + bool isPaused() const noexcept; void stopHashing(const string& baseDir); virtual int run(); bool fastHash(const string& fname, uint8_t* buf, TigerTree& tth, int64_t size, CRC32Filter* xcrc32); - void getStats(string& curFile, int64_t& bytesLeft, size_t& filesLeft); + void getStats(string& curFile, uint64_t &bytesLeft, size_t& filesLeft) const; void shutdown() { stop = true; if(paused){ s.signal(); resume();} s.signal(); } void scheduleRebuild() { rebuild = true; if(paused) s.signal(); s.signal(); } private: // Case-sensitive (faster), it is rather unlikely that case changes, and if it does it's harmless. // map because it's sorted (to avoid random hash order that would create quite strange shares while hashing) - typedef map WorkMap; - typedef WorkMap::iterator WorkIter; - - WorkMap w; + map w; mutable CriticalSection cs; Semaphore s; @@ -167,11 +170,11 @@ void rebuild(); bool checkTTH(const string& aFileName, int64_t aSize, uint32_t aTimeStamp); + const TTHValue* getTTH(const string& aFileName); void addTree(const TigerTree& tt) noexcept; - const TTHValue* getTTH(const string& aFileName); bool getTree(const TTHValue& root, TigerTree& tth); - size_t getBlockSize(const TTHValue& root) const; + int64_t getBlockSize(const TTHValue& root) const; bool isDirty() { return dirty; } private: /** Root -> tree mapping info, we assume there's only one tree for each root (a collision would mean we've broken tiger...) */ @@ -200,19 +203,10 @@ GETSET(bool, used, Used); }; - typedef vector FileInfoList; - typedef FileInfoList::iterator FileInfoIter; - - typedef unordered_map DirMap; - typedef DirMap::iterator DirIter; - - typedef unordered_map TreeMap; - typedef TreeMap::iterator TreeIter; - friend class HashLoader; - DirMap fileIndex; - TreeMap treeIndex; + unordered_map> fileIndex; + unordered_map treeIndex; bool dirty; @@ -221,8 +215,8 @@ bool loadTree(File& dataFile, const TreeInfo& ti, const TTHValue& root, TigerTree& tt); int64_t saveTree(File& dataFile, const TigerTree& tt); - string getIndexFile() { return Util::getPath(Util::PATH_USER_CONFIG) + "HashIndex.xml"; } - string getDataFile() { return Util::getPath(Util::PATH_USER_CONFIG) + "HashData.dat"; } + static string getIndexFile(); + static string getDataFile(); }; friend class HashLoader; @@ -235,11 +229,11 @@ public: struct TTHStreamHeader { - uint32_t magic; - uint32_t checksum; - uint64_t fileSize; - uint64_t timeStamp; - uint64_t blockSize; + uint32_t magic = 0; + uint32_t checksum = 0; + uint64_t fileSize = 0; + uint64_t timeStamp = 0; + uint64_t blockSize = 0; TTHValue root; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com +* Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once -#include "MerkleTree.h" -#include "noexcept.h" +#include "forward.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashValue.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashValue.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HashValue.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HashValue.h 2019-04-19 17:00:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,12 +12,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include + #include "FastAlloc.h" #include "Encoder.h" @@ -28,11 +29,10 @@ static const size_t BITS = Hasher::BITS; static const size_t BYTES = Hasher::BYTES; - HashValue() { } + HashValue() { memset(data, 0, BYTES); } explicit HashValue(const uint8_t* aData) { memcpy(data, aData, BYTES); } explicit HashValue(const std::string& base32) { Encoder::fromBase32(base32.c_str(), data, BYTES); } - HashValue(const HashValue& rhs) { memcpy(data, rhs.data, BYTES); } - HashValue& operator=(const HashValue& rhs) { memcpy(data, rhs.data, BYTES); return *this; } + bool operator!=(const HashValue& rhs) const { return !(*this == rhs); } bool operator==(const HashValue& rhs) const { return memcmp(data, rhs.data, BYTES) == 0; } bool operator<(const HashValue& rhs) const { return memcmp(data, rhs.data, BYTES) < 0; } @@ -40,6 +40,8 @@ std::string toBase32() const { return Encoder::toBase32(data, BYTES); } std::string& toBase32(std::string& tmp) const { return Encoder::toBase32(data, BYTES, tmp); } + explicit operator bool() const { return find_if(data, data + BYTES, [](uint8_t c) { return c != 0; }) != data + BYTES; } + uint8_t data[BYTES]; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HintedUser.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HintedUser.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HintedUser.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HintedUser.h 2019-04-18 19:00:31.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include + +#include "forward.h" +#include "Client.h" +#include "OnlineUser.h" +#include "User.h" + +namespace dcpp { + +using std::string; + +/** User pointer associated to a hub url */ +struct HintedUser { + UserPtr user; + string hint; + + HintedUser() : user(nullptr) { } + HintedUser(const UserPtr& user, const string& hint) : user(user), hint(hint) { } + HintedUser(const OnlineUser& ou) : HintedUser(ou.getUser(), ou.getClient().getHubUrl()) { } + + bool operator==(const UserPtr& rhs) const { + return user == rhs; + } + bool operator==(const HintedUser& rhs) const { + return user == rhs.user; + // ignore the hint, we don't want lists with multiple instances of the same user... + } + + operator UserPtr() const { return user; } + operator const CID&() const { return user->getCID(); } + + explicit operator bool() const { return user.get(); } +}; + +} + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnection.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnection.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnection.cpp 2018-02-16 23:06:23.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnection.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,7 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2013 EiskaltDC++ developers + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,21 +14,37 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "HttpConnection.h" +#include "BufferedSocket.h" #include "format.h" #include "SettingsManager.h" +#include "TimerManager.h" #include "version.h" namespace dcpp { -static const std::string CORAL_SUFFIX = ".nyud.net"; +HttpConnection::HttpConnection(const string& aUserAgent) : + userAgent(aUserAgent), + port("80"), + size(-1), + done(0), + speed(0), + lastPos(0), + lastTick(0), + connState(CONN_UNKNOWN), + connType(TYPE_POST), + socket(0) +{ +} + +HttpConnection::~HttpConnection() { + abort(); +} /** * Downloads a file and returns it as a string @@ -35,68 +53,126 @@ * @param aUrl Full URL of file * @return A string with the content, or empty if download failed */ -void HttpConnection::downloadFile(const string& aUrl) { - dcassert(Util::findSubString(aUrl, "http://") == 0); - currentUrl = aUrl; - // Trim spaces - while(currentUrl[0] == ' ') - currentUrl.erase(0, 1); - while(currentUrl[currentUrl.length() - 1] == ' ') { - currentUrl.erase(currentUrl.length()-1); - } - // reset all settings (as in constructor), moved here from onLine(302) because ok was not reset properly - moved302 = false; - ok = false; +void HttpConnection::downloadFile(const string& aFile) { + url = aFile; + prepareRequest(TYPE_GET); +} + +/** + * Initiates a basic urlencoded form submission + * @param aFile Fully qualified file URL + * @param aData StringMap with the args and values + */ +void HttpConnection::download(const string& aUrl, const StringMap& postData) { + url = aUrl; + requestBody.clear(); + + for(auto& i : postData) + requestBody += "&" + Util::encodeURI(i.first) + "=" + Util::encodeURI(i.second); + + if (!requestBody.empty()) requestBody = requestBody.substr(1); + prepareRequest(TYPE_POST); +} + +void HttpConnection::abort() { + if(socket) { + abortRequest(true); + } +} + +void HttpConnection::prepareRequest(RequestType type) { + dcassert(Util::findSubString(url, "http://") == 0 || Util::findSubString(url, "https://") == 0); + Util::sanitizeUrl(url); + + // Reset the connection states + if(connState == CONN_OK || connState == CONN_FAILED) + userAgent.clear(); + size = -1; + done = 0; + speed = 0; + lastPos = 0; + lastTick = GET_TICK(); + + connState = CONN_UNKNOWN; + connType = type; + + // method selection + method = (connType == TYPE_POST) ? "POST" : "GET"; + // set download type - if(Util::stricmp(currentUrl.substr(currentUrl.size() - 4), ".bz2") == 0) { + if(Util::stricmp(url.substr(url.size() - 4), ".bz2") == 0) { + mimeType = "application/x-bzip2"; fire(HttpConnectionListener::TypeBZ2(), this); } else { + mimeType.clear(); fire(HttpConnectionListener::TypeNormal(), this); } - string proto, query, fragment; + string proto, query, fragment; if(SETTING(HTTP_PROXY).empty()) { - Util::decodeUrl(currentUrl, proto, server, port, file, query, fragment); + Util::decodeUrl(url, proto, server, port, file, query, fragment); if(file.empty()) file = "/"; } else { - Util::decodeUrl(SETTING(HTTP_PROXY), proto, server, port, file, query, fragment); - file = currentUrl; + Util::decodeUrl(SETTING(HTTP_PROXY), proto, server, port, file, query, fragment); + file = url; } - if(BOOLSETTING(CORAL) && coralizeState != CST_NOCORALIZE) { - if(server.length() > CORAL_SUFFIX.length() && server.compare(server.length() - CORAL_SUFFIX.length(), CORAL_SUFFIX.length(), CORAL_SUFFIX) !=0) { - server += CORAL_SUFFIX; - } else { - coralizeState = CST_NOCORALIZE; - } + if(!query.empty()) + file += '?' + query; - } + if(port.empty()) + port = "80"; - if(port == 0) - port = 80; + if(userAgent.empty()) + userAgent = dcpp::fullHTTPVersionString; - if(!socket) { + if(!socket) socket = BufferedSocket::getSocket(0x0a); - } + + socket->addListener(this); try { - socket->connect(server, port, false, false, false); + socket->connect(server, port, (proto == "https"), true, false, Socket::PROTO_DEFAULT); } catch(const Exception& e) { - fire(HttpConnectionListener::Failed(), this, e.getError() + " (" + currentUrl + ")"); + connState = CONN_FAILED; + fire(HttpConnectionListener::Failed(), this, str(dcpp::dcpp_fmt("%1% (%2%)") % e.getError() % url)); + } +} + +void HttpConnection::abortRequest(bool disconnect) { + dcassert(socket); + + socket->removeListener(this); + if(disconnect) socket->disconnect(); + + BufferedSocket::putSocket(socket); + socket = NULL; +} + +void HttpConnection::updateSpeed() { + if(done > lastPos) { + auto tick = GET_TICK(); + + auto tickDelta = static_cast(tick - lastTick); + if(tickDelta > 0) { + speed = static_cast(done - lastPos) / tickDelta * 1000.0; + } + + lastPos = done; + lastTick = tick; } } void HttpConnection::on(BufferedSocketListener::Connected) noexcept { dcassert(socket); - socket->write("GET " + file + " HTTP/1.1\r\n"); + socket->write(method + " " + file + " HTTP/1.1\r\n"); string sRemoteServer = server; if(!SETTING(HTTP_PROXY).empty()) { - string tfile, proto, query, fragment; - uint16_t tport; + string tfile, tport, proto, query, fragment; Util::decodeUrl(file, proto, sRemoteServer, tport, tfile, query, fragment); } @@ -104,107 +180,130 @@ if (sRemoteServer == "strongdc.sourceforge.net") socket->write("User-Agent: StrongDC++ v2.42\r\n"); else - socket->write("User-Agent: " EISKALTDCPP_APPNAME " v" EISKALTDCPP_VERSION "\r\n"); + socket->write("User-Agent: " + userAgent + "\r\n"); #else - socket->write("User-Agent: " EISKALTDCPP_APPNAME " v" EISKALTDCPP_VERSION "\r\n"); + socket->write("User-Agent: " + userAgent + "\r\n"); #endif socket->write("Host: " + sRemoteServer + "\r\n"); - socket->write("Connection: close\r\n"); // we'll only be doing one request - socket->write("Cache-Control: no-cache\r\n\r\n"); - if (coralizeState == CST_DEFAULT) coralizeState = CST_CONNECTED; + socket->write("Cache-Control: no-cache\r\n"); + if(connType == TYPE_POST) + { + socket->write("Content-Type: application/x-www-form-urlencoded\r\n"); + socket->write("Content-Length: " + Util::toString(requestBody.size()) + "\r\n"); + } + socket->write("Connection: close\r\n\r\n"); // we'll only be doing one request + + if (connType == TYPE_POST) + socket->write(requestBody); } void HttpConnection::on(BufferedSocketListener::Line, const string& aLine) noexcept { - if(!ok) { - dcdebug("%s\n",aLine.c_str()); - if(aLine.find("200") == string::npos) { - if(aLine.find("301") != string::npos || aLine.find("302") != string::npos){ - moved302 = true; + if(connState == CONN_CHUNKED && aLine.size() > 1) { + string::size_type i; + string chunkSizeStr; + if((i = aLine.find(";")) == string::npos) { + chunkSizeStr = aLine.substr(0, aLine.length() - 1); + } else chunkSizeStr = aLine.substr(0, i); + + unsigned long chunkSize = strtoul(chunkSizeStr.c_str(), NULL, 16); + if(chunkSize == 0 || chunkSize == ULONG_MAX) { + abortRequest(true); + + if(chunkSize == 0) { + connState = CONN_OK; + fire(HttpConnectionListener::Complete(), this, url); } else { - socket->disconnect(); - socket->removeListener(this); - BufferedSocket::putSocket(socket); - socket = NULL; - if(SETTING(CORAL) && coralizeState != CST_NOCORALIZE) { - fire(HttpConnectionListener::Retried(), this, coralizeState == CST_CONNECTED); - coralizeState = CST_NOCORALIZE; - dcdebug("HTTP error with Coral, retrying : %s\n",currentUrl.c_str()); - downloadFile(currentUrl); - return; - } - fire(HttpConnectionListener::Failed(), this, aLine + " (" + currentUrl + ")"); - coralizeState = CST_DEFAULT; - return; + connState = CONN_FAILED; + fire(HttpConnectionListener::Failed(), this, str(F_("Transfer-encoding error (%1%)") % url)); } + + } else socket->setDataMode(chunkSize); + } else if(connState == CONN_UNKNOWN) { + statusLine = Util::trimCopy(aLine); + if(aLine.find("200") != string::npos) { + connState = CONN_OK; + } else if(aLine.find("301") != string::npos || aLine.find("302") != string::npos) { + connState = CONN_MOVED; + } else { + abortRequest(true); + connState = CONN_FAILED; + fire(HttpConnectionListener::Failed(), this, str(dcpp::dcpp_fmt("%1% (%2%)") % statusLine % url)); } - ok = true; - } else if(moved302 && Util::findSubString(aLine, "Location") != string::npos){ - dcassert(socket); - socket->removeListener(this); - socket->disconnect(); - BufferedSocket::putSocket(socket); - socket = NULL; + } else if(connState == CONN_MOVED && Util::findSubString(aLine, "Location") != string::npos) { + abortRequest(true); + + string location = aLine.substr(10, aLine.length() - 10); + Util::sanitizeUrl(location); - string location302 = aLine.substr(10, aLine.length() - 11); // make sure we can also handle redirects with relative paths - if(Util::strnicmp(location302.c_str(), "http://", 7) != 0) { - if(location302[0] == '/') { + if(location.find("://") == string::npos) { + if(location[0] == '/') { string proto, query, fragment; - Util::decodeUrl(currentUrl, proto, server, port, file, query, fragment); - string tmp = "http://" + server; - if(port != 80) - tmp += ':' + Util::toString(port); - location302 = tmp + location302; + Util::decodeUrl(url, proto, server, port, file, query, fragment); + string tmp = proto + "://" + server; + if(port != "80" || port != "443") + tmp += ':' + port; + location = tmp + location; } else { - string::size_type i = currentUrl.rfind('/'); + auto i = url.rfind('/'); dcassert(i != string::npos); - location302 = currentUrl.substr(0, i + 1) + location302; + location = url.substr(0, i + 1) + location; } } - if(location302 == currentUrl) { - fire(HttpConnectionListener::Failed(), this, str(F_("Endless redirection loop (%1%)") % currentUrl)); + + if(location == url) { + connState = CONN_FAILED; + fire(HttpConnectionListener::Failed(), this, str(F_("Endless redirection loop (%1%)") % url)); return; } - fire(HttpConnectionListener::Redirected(), this, location302); - - coralizeState = CST_DEFAULT; - downloadFile(location302); - } else if(aLine == "\x0d") { - socket->setDataMode(size); + fire(HttpConnectionListener::Redirected(), this, location); + downloadFile(location); + } else if(aLine[0] == 0x0d) { + if(size != -1) { + socket->setDataMode(size); + } else connState = CONN_CHUNKED; } else if(Util::findSubString(aLine, "Content-Length") != string::npos) { size = Util::toInt(aLine.substr(16, aLine.length() - 17)); } else if(Util::findSubString(aLine, "Content-Encoding") != string::npos) { if(aLine.substr(18, aLine.length() - 19) == "x-bzip2") fire(HttpConnectionListener::TypeBZ2(), this); + } else if(mimeType.empty()) { + if(Util::findSubString(aLine, "Content-Encoding") != string::npos) { + if(aLine.substr(18, aLine.length() - 19) == "x-bzip2") + mimeType = "application/x-bzip2"; + } else if(Util::findSubString(aLine, "Content-Type") != string::npos) { + mimeType = aLine.substr(14, aLine.length() - 15); + } } } void HttpConnection::on(BufferedSocketListener::Failed, const string& aLine) noexcept { - socket->removeListener(this); - BufferedSocket::putSocket(socket); - socket = NULL; - if(SETTING(CORAL) && coralizeState != CST_NOCORALIZE) { - fire(HttpConnectionListener::Retried(), this, coralizeState == CST_CONNECTED); - coralizeState = CST_NOCORALIZE; - dcdebug("Coralized address failed, retrying : %s\n",currentUrl.c_str()); - downloadFile(currentUrl); - return; - } - coralizeState = CST_DEFAULT; - fire(HttpConnectionListener::Failed(), this, aLine + " (" + currentUrl + ")"); + abortRequest(false); + connState = CONN_FAILED; + statusLine = Util::trimCopy(aLine); + fire(HttpConnectionListener::Failed(), this, str(dcpp::dcpp_fmt("%1% (%2%)") % statusLine % url)); } void HttpConnection::on(BufferedSocketListener::ModeChange) noexcept { - socket->removeListener(this); - socket->disconnect(); - BufferedSocket::putSocket(socket); - socket = NULL; - fire(HttpConnectionListener::Complete(), this, currentUrl, BOOLSETTING(CORAL) && coralizeState != CST_NOCORALIZE); - coralizeState = CST_DEFAULT; + if(connState != CONN_CHUNKED) { + abortRequest(true); + + fire(HttpConnectionListener::Complete(), this, url); + } } void HttpConnection::on(BufferedSocketListener::Data, uint8_t* aBuf, size_t aLen) noexcept { + if(size != -1 && static_cast(size - done) < aLen) { + abortRequest(true); + + connState = CONN_FAILED; + fire(HttpConnectionListener::Failed(), this, str(F_("Too much data in response body (%1%)") % url)); + return; + } + + done += aLen; + updateSpeed(); fire(HttpConnectionListener::Data(), this, aBuf, aLen); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnection.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnection.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnection.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnection.h 2019-04-19 17:00:29.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,83 +13,83 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "BufferedSocket.h" -#include "noexcept.h" +#include -namespace dcpp { - -class HttpConnection; +#include "BufferedSocketListener.h" +#include "HttpConnectionListener.h" +#include "NonCopyable.h" +#include "GetSet.h" +#include "Speaker.h" +#include "Util.h" -class HttpConnectionListener { -public: - virtual ~HttpConnectionListener() { } - template struct X { enum { TYPE = I }; }; +namespace dcpp { - typedef X<0> Data; - typedef X<1> Failed; - typedef X<2> Complete; - typedef X<3> Redirected; - typedef X<4> TypeNormal; - typedef X<5> TypeBZ2; - typedef X<6> Retried; - - virtual void on(Data, HttpConnection*, const uint8_t*, size_t) noexcept =0; - virtual void on(Failed, HttpConnection*, const string&) noexcept { } - virtual void on(Complete, HttpConnection*, const string&, bool) noexcept { } - virtual void on(Redirected, HttpConnection*, const string&) noexcept { } - virtual void on(TypeNormal, HttpConnection*) noexcept { } - virtual void on(TypeBZ2, HttpConnection*) noexcept { } - virtual void on(Retried, HttpConnection*, const bool) noexcept { } -}; +using std::string; -class HttpConnection : BufferedSocketListener, public Speaker +class HttpConnection : BufferedSocketListener, public Speaker, private NonCopyable { public: + HttpConnection(const string& aUserAgent = Util::emptyString); + virtual ~HttpConnection(); + void downloadFile(const string& aUrl); - HttpConnection() : ok(false), port(80), size(-1), moved302(false), coralizeState(CST_DEFAULT), socket(NULL) { } - virtual ~HttpConnection() noexcept { - if(socket) { - socket->removeListener(this); - BufferedSocket::putSocket(socket); - } - } + void download(const string& aUrl, const StringMap& postData); - enum CoralizeStates {CST_DEFAULT, CST_CONNECTED, CST_NOCORALIZE}; - void setCoralizeState(CoralizeStates _cor) { coralizeState = _cor; } + void abort(); -private: + const string& getMimeType() const { return mimeType; } + const string& getStatus() const { return statusLine; } + + int64_t getSize() const { return size; } + int64_t getDone() const { return done; } + double getSpeed() const { return speed; } - HttpConnection(const HttpConnection&); - HttpConnection& operator=(const HttpConnection&); + GETSET(string, url, Url); - string currentUrl; +private: + enum RequestType { TYPE_GET, TYPE_POST }; + enum ConnectionStates { CONN_UNKNOWN, CONN_OK, CONN_FAILED, CONN_MOVED, CONN_CHUNKED }; + + string userAgent; + string method; string file; string server; - bool ok; - uint16_t port; + string port; + + string requestBody; + + string mimeType; + string statusLine; int64_t size; - bool moved302; + int64_t done; + double speed; - CoralizeStates coralizeState; + // counters to compute a best-effort speed + int64_t lastPos; + uint64_t lastTick; + + ConnectionStates connState; + RequestType connType; BufferedSocket* socket; - // BufferedSocketListener - virtual void on(Connected) noexcept; - virtual void on(Line, const string&) noexcept; - virtual void on(Data, uint8_t*, size_t) noexcept; - virtual void on(ModeChange) noexcept; - virtual void on(Failed, const string&) noexcept; + void prepareRequest(RequestType type); + void abortRequest(bool disconnect); - void onConnected(); - void onLine(const string& aLine); + void updateSpeed(); + // BufferedSocketListener + void on(Connected) noexcept; + void on(Line, const string&) noexcept; + void on(Data, uint8_t*, size_t) noexcept; + void on(ModeChange) noexcept; + void on(Failed, const string&) noexcept; }; } // namespace dcpp + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnectionListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnectionListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HttpConnectionListener.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HttpConnectionListener.h 2019-04-19 17:00:29.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include + +#include "forward.h" + +namespace dcpp { + +using std::string; + +class HttpConnectionListener { +public: + virtual ~HttpConnectionListener() { } + template struct X { enum { TYPE = I }; }; + + typedef X<0> Data; + typedef X<1> Failed; + typedef X<2> Complete; + typedef X<3> Redirected; + typedef X<4> TypeNormal; + typedef X<5> TypeBZ2; + typedef X<6> Retried; + + virtual void on(Data, HttpConnection*, const uint8_t*, size_t) noexcept = 0; + virtual void on(Failed, HttpConnection*, const string&) noexcept { } + virtual void on(Complete, HttpConnection*, const string&) noexcept { } + virtual void on(Redirected, HttpConnection*, const string&) noexcept { } + virtual void on(TypeNormal, HttpConnection*) noexcept { } + virtual void on(TypeBZ2, HttpConnection*) noexcept { } + virtual void on(Retried, HttpConnection*, const bool) noexcept { } +}; + +} // namespace dcpp + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HubEntry.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HubEntry.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/HubEntry.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/HubEntry.h 2019-04-11 19:00:27.000000000 +0000 @@ -12,35 +12,33 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include + +#include "GetSet.h" + namespace dcpp { class HubEntry { public: - HubEntry(const string& aName, const string& aServer, const string& aDescription, const string& aUsers) noexcept : - name(aName), server(aServer), description(aDescription), country(Util::emptyString), - rating(Util::emptyString), reliability(0.0), shared(0), minShare(0), users(Util::toInt(aUsers)), minSlots(0), maxHubs(0), maxUsers(0) { } + HubEntry(const string& aName, const string& aServer, const string& aDescription, const string& aUsers) : + name(aName), server(aServer), description(aDescription), country(Util::emptyString), + rating(Util::emptyString), reliability(0.0), shared(0), minShare(0), users(Util::toInt(aUsers)), minSlots(0), maxHubs(0), maxUsers(0) { } HubEntry(const string& aName, const string& aServer, const string& aDescription, const string& aUsers, const string& aCountry, - const string& aShared, const string& aMinShare, const string& aMinSlots, const string& aMaxHubs, const string& aMaxUsers, - const string& aReliability, const string& aRating) : name(aName), server(aServer), description(aDescription), country(aCountry), + const string& aShared, const string& aMinShare, const string& aMinSlots, const string& aMaxHubs, const string& aMaxUsers, + const string& aReliability, const string& aRating) : name(aName), server(aServer), description(aDescription), country(aCountry), rating(aRating), reliability((float)(Util::toFloat(aReliability) / 100.0)), shared(Util::toInt64(aShared)), minShare(Util::toInt64(aMinShare)), users(Util::toInt(aUsers)), minSlots(Util::toInt(aMinSlots)), maxHubs(Util::toInt(aMaxHubs)), maxUsers(Util::toInt(aMaxUsers)) { } - HubEntry() noexcept { } - HubEntry(const HubEntry& rhs) noexcept : name(rhs.name), server(rhs.server), description(rhs.description), country(rhs.country), - rating(rhs.rating), reliability(rhs.reliability), shared(rhs.shared), minShare(rhs.minShare), users(rhs.users), minSlots(rhs.minSlots), - maxHubs(rhs.maxHubs), maxUsers(rhs.maxUsers) { } - - ~HubEntry() noexcept { } + HubEntry() = default; GETSET(string, name, Name); GETSET(string, server, Server); @@ -59,23 +57,29 @@ class FavoriteHubEntry { public: - FavoriteHubEntry() noexcept : connect(false), encoding(Text::systemCharset), - mode(0), overrideId(0), clientId(DEF_FAKE_ID), searchInterval(SETTING(MINIMUM_SEARCH_INTERVAL)) { } - FavoriteHubEntry(const HubEntry& rhs) noexcept : name(rhs.getName()), - server(rhs.getServer()), - description(rhs.getDescription()), connect(false), - encoding(Text::systemCharset), mode(0), overrideId(0), - clientId(DEF_FAKE_ID), searchInterval(SETTING(MINIMUM_SEARCH_INTERVAL)) { } - FavoriteHubEntry(const FavoriteHubEntry& rhs) noexcept : - userdescription(rhs.userdescription), name(rhs.getName()), - server(rhs.getServer()), description(rhs.getDescription()), - password(rhs.getPassword()), connect(rhs.getConnect()), - encoding(rhs.getEncoding()), mode(rhs.mode), - overrideId(rhs.overrideId), clientId(rhs.clientId), - externalIP(""), useInternetIp(false), disableChat(false), - searchInterval(rhs.searchInterval), nick(rhs.nick) + FavoriteHubEntry() : encoding(Text::systemCharset), connect(false), + mode(0), overrideId(0), clientId(DEF_FAKE_ID), + useInternetIp(false), disableChat(false), + searchInterval(SETTING(MINIMUM_SEARCH_INTERVAL)) + { } + + FavoriteHubEntry(const HubEntry& rhs) : name(rhs.getName()), + server(rhs.getServer()), + hubDescription(rhs.getDescription()), encoding(Text::systemCharset), + connect(false), mode(0), overrideId(0), + clientId(DEF_FAKE_ID), useInternetIp(false), disableChat(false), + searchInterval(SETTING(MINIMUM_SEARCH_INTERVAL)) + { } + + FavoriteHubEntry(const FavoriteHubEntry& rhs) : + userDescription(rhs.userDescription), name(rhs.getName()), + server(rhs.getServer()), hubDescription(rhs.getHubDescription()), + password(rhs.getPassword()), encoding(rhs.getEncoding()), + connect(rhs.getConnect()), mode(rhs.mode), + overrideId(rhs.overrideId), clientId(rhs.clientId), + externalIP(""), useInternetIp(false), disableChat(false), + searchInterval(rhs.searchInterval), nick(rhs.nick) { } - ~FavoriteHubEntry() noexcept { } const string& getNick(bool useDefault = true) const { return (!nick.empty() || !useDefault) ? nick : SETTING(NICK); @@ -83,13 +87,13 @@ void setNick(const string& aNick) { nick = aNick; } - GETSET(string, userdescription, UserDescription); + GETSET(string, userDescription, UserDescription); GETSET(string, name, Name); GETSET(string, server, Server); - GETSET(string, description, Description); + GETSET(string, hubDescription, HubDescription); GETSET(string, password, Password); - GETSET(bool, connect, Connect); GETSET(string, encoding, Encoding); + GETSET(bool, connect, Connect); GETSET(int, mode, Mode); // 0 = default, 1 = active, 2 = passive GETSET(bool, overrideId, OverrideId); GETSET(string, clientId, ClientId); @@ -98,6 +102,7 @@ GETSET(bool, disableChat, DisableChat); GETSET(string, group, Group); GETSET(uint32_t, searchInterval, SearchInterval); + private: string nick; }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManager.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -41,7 +41,7 @@ // Keep the last 100 messages (completely arbitrary number...) while(lastLogs.size() > 100) lastLogs.pop_front(); - lastLogs.push_back(make_pair(t, msg)); + lastLogs.emplace_back(t, msg); } fire(LogManagerListener::Message(), t, msg); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManager.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/LogManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/LogManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,16 +12,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "noexcept.h" +#include namespace dcpp { +using std::string; + class LogManagerListener { public: virtual ~LogManagerListener() { } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MappingManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MappingManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MappingManager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MappingManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "stdinc.h" + +#include "MappingManager.h" + +#include "ConnectionManager.h" +#include "SearchManager.h" +#include "LogManager.h" +#include "version.h" +#include "ConnectivityManager.h" +#ifdef USE_MINIUPNP +#include "extra/upnpc.h" +#endif +#ifdef WITH_DHT +#include "dht/DHT.h" +#endif +namespace dcpp { + +void MappingManager::addImplementation(UPnP* impl) { + impls.push_back(std::unique_ptr(impl)); +} + +bool MappingManager::open() { + if(opened) + return false; + + if(impls.empty()) { + log(_("No UPnP implementation available")); + return false; + } + + if(portMapping.exchange(true) == true) { + log(_("Another UPnP port mapping attempt is in progress...")); + return false; + } + + start(); + + return true; +} + +void MappingManager::close() { + for(auto &i : impls) { + close(*i); + } + opened = false; +} + +int MappingManager::run() { + // cache these + const string + conn_port = ConnectionManager::getInstance()->getPort(), + secure_port = ConnectionManager::getInstance()->getSecurePort(), + search_port = SearchManager::getInstance()->getPort(); +#ifdef WITH_DHT + const string dht_port = dht::DHT::getInstance()->getPort(); +#endif + + for(auto &i : impls) { + UPnP& impl = *i; + + close(impl); + + if(!impl.init()){ + log(str(F_("Failed to initialize the %1% interface") % impl.getName())); + continue; + } + + if(!conn_port.empty() && !impl.open(conn_port, UPnP::PROTOCOL_TCP, str(F_(APPNAME " Transfer Port (%1% TCP)") % conn_port))){ + log(str(F_("The %1% interface has failed to map the %2% %3% port") % impl.getName() % "TCP" % conn_port)); + continue; + } + + if(!secure_port.empty() && !impl.open(secure_port, UPnP::PROTOCOL_TCP, str(F_(APPNAME " Encrypted Transfer Port (%1% TCP)") % secure_port))){ + log(str(F_("The %1% interface has failed to map the %2% %3% port") % impl.getName() % "TLS" % secure_port)); + continue; + } + + if(!search_port.empty() && !impl.open(search_port, UPnP::PROTOCOL_UDP, str(F_(APPNAME " Search Port (%1% UDP)") % search_port))){ + log(str(F_("The %1% interface has failed to map the %2% %3% port") % impl.getName() % "UDP" % search_port)); + continue; + } +#ifdef WITH_DHT + if(!dht_port.empty() && !impl.open(dht_port, UPnP::PROTOCOL_UDP, str(F_(APPNAME " DHT Port (%1% UDP)") % dht_port))){ + log(str(F_("The %1% interface has failed to map the %2% %3% port") % impl.getName() % "UDP" % dht_port)); + continue; + } +#endif + + opened = true; + +#ifdef WITH_DHT + if(!dht_port.empty()) + log(str(F_("Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), mapped using the %5% interface") % conn_port % search_port % secure_port % dht_port % impl.getName())); + else + log(str(F_("Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped using the %4% interface") % conn_port % search_port % secure_port % impl.getName())); +#else + log(str(F_("Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped using the %4% interface") % conn_port % search_port % secure_port % impl.getName())); +#endif + + if(!BOOLSETTING(NO_IP_OVERRIDE)) { + // now lets configure the external IP (connect to me) address + string ExternalIP = impl.getExternalIP(); + if(!ExternalIP.empty()) { + // woohoo, we got the external IP from the UPnP framework + SettingsManager::getInstance()->set(SettingsManager::EXTERNAL_IP, ExternalIP); + } else { + //:-( Looks like we have to rely on the user setting the external IP manually + // no need to do cleanup here because the mappings work + log(_("Failed to get external IP")); + } + } + + ConnectivityManager::getInstance()->mappingFinished(true); + + break; + } + + if(!opened) { + log(_("Failed to create port mappings")); + ConnectivityManager::getInstance()->mappingFinished(false); + } + portMapping = false; + return 0; +} + +void MappingManager::close(UPnP& impl) { + if(impl.hasRules()) { + log(impl.close() ? str(F_("Successfully removed port mappings with the %1% interface") % impl.getName()) : + str(F_("Failed to remove port mappings with the %1% interface") % impl.getName())); + } +} + +void MappingManager::log(const string& message) { + ConnectivityManager::getInstance()->log(str(F_("UPnP: %1%") % message)); +} + +#ifdef USE_MINIUPNP +void MappingManager::runMiniUPnP() { + addImplementation(new UPnPc()); +} +#endif +} // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MappingManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MappingManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MappingManager.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MappingManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include + +#include "Atomic.h" +#include "forward.h" +#include "Singleton.h" +#include "Thread.h" +#include "UPnP.h" + +namespace dcpp { + +using std::atomic; +using std::function; +using std::unique_ptr; +using std::vector; + +class MappingManager : + public Singleton, + private Thread +{ +public: + /** + * add an implementation, derived from the base UPnP class. + * must be allocated on the heap; its deletion will be managed by MappingManager. + * first added impl will be tried first. + */ + + void runMiniUPnP(); + void addImplementation(UPnP* impl); + bool open(); + void close(); + + bool getOpened() const { return opened; } + +private: + friend class Singleton; + + typedef std::vector> Impls; + Impls impls; + + bool opened; + Atomic portMapping; + + MappingManager() : opened(false), portMapping(false) { } + virtual ~MappingManager() noexcept { join(); } + + int run(); + + void close(UPnP& impl); + void log(const string& message); +}; + +} // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MediaInfo.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MediaInfo.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MediaInfo.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MediaInfo.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,4 +1,6 @@ /* + * Copyright (C) 2009-2019 EiskaltDC++ developers + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -10,17 +12,22 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include -struct MediaInfo{ - std::string video_info; - std::string audio_info; - std::string resolution; - uint16_t bitrate; +namespace dcpp { + +using std::string; + +struct MediaInfo { + string video_info; + string audio_info; + string resolution; + uint16_t bitrate = 0; }; + +} // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MerkleCheckOutputStream.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MerkleCheckOutputStream.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MerkleCheckOutputStream.h 2019-02-15 16:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MerkleCheckOutputStream.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -27,8 +26,7 @@ class MerkleCheckOutputStream : public OutputStream { public: MerkleCheckOutputStream(const TreeType& aTree, OutputStream* aStream, int64_t start) : s(aStream), real(aTree), cur(aTree.getBlockSize()), verified(0), bufPos(0) { - // Only start at block boundaries - dcassert(start % aTree.getBlockSize() == 0); + memset(&buf, 0, sizeof(buf)); cur.setFileSize(start); size_t nBlocks = static_cast(start / aTree.getBlockSize()); @@ -39,7 +37,7 @@ cur.getLeaves().insert(cur.getLeaves().begin(), aTree.getLeaves().begin(), aTree.getLeaves().begin() + nBlocks); } - virtual ~MerkleCheckOutputStream() noexcept { if(managed) delete s; } + virtual ~MerkleCheckOutputStream() { if(managed) delete s; } virtual size_t flush() { if (bufPos != 0) @@ -107,7 +105,7 @@ void checkTrees() { while(cur.getLeaves().size() > verified) { if(cur.getLeaves().size() > real.getLeaves().size() || - !(cur.getLeaves()[verified] == real.getLeaves()[verified])) + !(cur.getLeaves()[verified] == real.getLeaves()[verified])) { throw FileException(_("TTH inconsistency")); } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MerkleTree.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MerkleTree.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/MerkleTree.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/MerkleTree.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,12 +12,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include + #include "debug.h" #include "typedefs.h" #include "TigerHash.h" @@ -59,7 +60,7 @@ { size_t n = calcBlocks(aFileSize, aBlockSize); for(size_t i = 0; i < n; i++) - leaves.push_back(MerkleValue(aData + i * Hasher::BYTES)); + leaves.emplace_back(aData + i * Hasher::BYTES); calcRoot(); } @@ -69,7 +70,8 @@ leaves.push_back(root); } - ~MerkleTree() { } + ~MerkleTree() { + } static int64_t calcBlockSize(int64_t aFileSize, int maxLevels) { int64_t tmp = baseBlockSize; @@ -103,10 +105,10 @@ h.update(&zero, 1); h.update(buf + i, n); if((int64_t)baseBlockSize < blockSize) { - blocks.push_back(make_pair(MerkleValue(h.finalize()), baseBlockSize)); + blocks.emplace_back(MerkleValue(h.finalize()), baseBlockSize); reduceBlocks(); } else { - leaves.push_back(MerkleValue(h.finalize())); + leaves.emplace_back(h.finalize()); } i += n; } while(i < len); @@ -175,7 +177,6 @@ int64_t blockSize; MerkleValue getHash(int64_t start, int64_t length) { - dcassert((start % blockSize) == 0); if(length <= blockSize) { dcassert((start / blockSize) < (int64_t)leaves.size()); return leaves[(uint32_t)(start / blockSize)]; @@ -218,7 +219,6 @@ }; typedef MerkleTree TigerTree; -typedef TigerTree::MerkleValue TTHValue; template struct TTFilter { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NmdcHub.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NmdcHub.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NmdcHub.cpp 2019-02-15 21:07:09.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NmdcHub.cpp 2019-05-05 22:00:25.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -22,23 +22,25 @@ #include "ChatMessage.h" #include "ClientManager.h" +#include "ConnectionManager.h" +#include "ConnectivityManager.h" +#include "CryptoManager.h" +#include "format.h" #include "SearchManager.h" #include "ShareManager.h" -#include "CryptoManager.h" -#include "ConnectionManager.h" +#include "Socket.h" +#include "StringTokenizer.h" #include "ThrottleManager.h" -#include "version.h" #include "UploadManager.h" -#include "Socket.h" #include "UserCommand.h" -#include "StringTokenizer.h" +#include "version.h" namespace dcpp { NmdcHub::NmdcHub(const string& aHubURL, bool secure) : -Client(aHubURL, '|', secure), -supportFlags(0), -lastUpdate(0) + Client(aHubURL, '|', secure, Socket::PROTO_NMDC), + supportFlags(0), + lastUpdate(0) { } @@ -62,8 +64,8 @@ int64_t NmdcHub::getAvailable() const { Lock l(cs); int64_t x = 0; - for(auto i = users.begin(); i != users.end(); ++i) { - x+=i->second->getIdentity().getBytesShared(); + for(auto& i: users) { + x+=i.second->getIdentity().getBytesShared(); } return x; } @@ -73,7 +75,7 @@ { Lock l(cs); - NickIter i = users.find(aNick); + auto i = users.find(aNick); if(i != users.end()) return *i->second; } @@ -87,7 +89,7 @@ { Lock l(cs); - u = users.insert(make_pair(aNick, new OnlineUser(p, *this, 0))).first->second; + u = users.emplace(aNick, new OnlineUser(p, *this, 0)).first->second; u->getIdentity().setNick(aNick); if(u->getUser() == getMyIdentity().getUser()) { setMyIdentity(u->getIdentity()); @@ -99,13 +101,16 @@ } void NmdcHub::supports(const StringList& feat) { - const string x = Util::toString(" ",feat); + string x; + for(auto& i: feat) { + x += i + ' '; + } send("$Supports " + x + '|'); } OnlineUser* NmdcHub::findUser(const string& aNick) { Lock l(cs); - NickIter i = users.find(aNick); + auto i = users.find(aNick); return i == users.end() ? NULL : i->second; } @@ -113,7 +118,7 @@ OnlineUser* ou = NULL; { Lock l(cs); - NickIter i = users.find(aNick); + auto i = users.find(aNick); if(i == users.end()) return; ou = i->second; @@ -124,16 +129,16 @@ } void NmdcHub::clearUsers() { - NickMap u2; + decltype(users) u2; { Lock l(cs); u2.swap(users); } - for(auto i = u2.begin(); i != u2.end(); ++i) { - ClientManager::getInstance()->putOffline(i->second); - delete i->second; + for(auto& i: u2) { + ClientManager::getInstance()->putOffline(i.second); + delete i.second; } } @@ -141,32 +146,33 @@ StringTokenizer tok(tag, ','); string::size_type j; id.set("US", Util::emptyString); - for(auto i = tok.getTokens().begin(); i != tok.getTokens().end(); ++i) { - if(i->length() < 2) + for(auto& i: tok.getTokens()) { + if(i.size() < 2) continue; - if(i->compare(0, 2, "H:") == 0) { - StringTokenizer t(i->substr(2), '/'); + if(i.compare(0, 2, "H:") == 0) { + StringTokenizer t(i.substr(2), '/'); if(t.getTokens().size() != 3) continue; id.set("HN", t.getTokens()[0]); id.set("HR", t.getTokens()[1]); id.set("HO", t.getTokens()[2]); - } else if(i->compare(0, 2, "S:") == 0) { - id.set("SL", i->substr(2)); - } else if((j = i->find("V:")) != string::npos) { - i->erase(i->begin(), i->begin() + j + 2); - id.set("VE", *i); - } else if(i->compare(0, 2, "M:") == 0) { - if(i->size() == 3) { - if((*i)[2] == 'A') + } else if(i.compare(0, 2, "S:") == 0) { + id.set("SL", i.substr(2)); + } else if(i.find("V:") != string::npos) { + string::size_type j = i.find("V:"); + i.erase(i.begin() + j, i.begin() + j + 2); + id.set("VE", i); + } else if(i.compare(0, 2, "M:") == 0) { + if(i.size() == 3) { + if(i[2] == 'A') id.getUser()->unsetFlag(User::PASSIVE); else id.getUser()->setFlag(User::PASSIVE); } - } else if((j = i->find("L:")) != string::npos) { - i->erase(i->begin() + j, i->begin() + j + 2); - id.set("US", Util::toString(Util::toInt(*i) * 1024)); + } else if((j = i.find("L:")) != string::npos) { + i.erase(i.begin() + j, i.begin() + j + 2); + id.set("US", Util::toString(Util::toInt(i) * 1024)); } } /// @todo Think about this @@ -211,15 +217,14 @@ return; } - ChatMessage chatMessage = { unescape(message), findUser(nick) }; + ChatMessage chatMessage = { unescape(message), findUser(nick), nullptr, nullptr, false, 0 }; if(!chatMessage.from) { OnlineUser& o = getUser(nick); // Assume that messages from unknown users come from the hub o.getIdentity().setHub(true); o.getIdentity().setHidden(true); - fire(ClientListener::UserUpdated(), this, o); - + updated(o); chatMessage.from = &o; } @@ -257,13 +262,13 @@ //printf("$Search->%s\n", seeker.c_str()); fflush(stdout); // Filter own searches if(isActive()) { - if(seeker == (getLocalIp() + ":" + Util::toString(SearchManager::getInstance()->getPort()))) { + if(seeker == (getLocalIp() + ":" + SearchManager::getInstance()->getPort())) { return; } } else { // Hub:seeker if(seeker.size() > 4 && - Util::stricmp(seeker.c_str() + 4, getMyNick().c_str()) == 0) { + Util::stricmp(seeker.c_str() + 4, getMyNick().c_str()) == 0) { return; } } @@ -273,18 +278,18 @@ uint64_t tick = GET_TICK(); clearFlooders(tick); - seekers.push_back(make_pair(seeker, tick)); + seekers.emplace_back(seeker, tick); // First, check if it's a flooder - for(auto fi = flooders.begin(); fi != flooders.end(); ++fi) { - if(fi->first == seeker) { + for(auto& fi: flooders) { + if(fi.first == seeker) { return; } } int count = 0; - for(auto fi = seekers.begin(); fi != seekers.end(); ++fi) { - if(fi->first == seeker) + for(auto& fi: seekers) { + if(fi.first == seeker) count++; if(count > 7) { @@ -293,7 +298,7 @@ else fire(ClientListener::SearchFlood(), this, str(F_("%1% (Nick unknown)") % seeker)); - flooders.push_back(make_pair(seeker, tick)); + flooders.emplace_back(seeker, tick); return; } } @@ -319,6 +324,7 @@ i = j + 1; string terms = unescape(param.substr(i)); + // without terms, this is an invalid search. if(!terms.empty()) { if(seeker.compare(0, 4, "Hub:") == 0) { OnlineUser* u = findUser(seeker.substr(4)); @@ -362,7 +368,7 @@ string tmpDesc = unescape(param.substr(i, j-i)); // Look for a tag... - if(tmpDesc.size() > 0 && tmpDesc[tmpDesc.size()-1] == '>') { + if(!tmpDesc.empty() && tmpDesc[tmpDesc.size()-1] == '>') { x = tmpDesc.rfind('<'); if(x != string::npos) { // Hm, we have something...disassemble it... @@ -421,7 +427,7 @@ setMyIdentity(u.getIdentity()); } - fire(ClientListener::UserUpdated(), this, u); + updated(u); } else if(cmd == "$Quit") { if(!param.empty()) { const string& nick = param; @@ -478,18 +484,18 @@ port.erase(port.size() - 1); // Trigger connection attempt sequence locally ... - ConnectionManager::getInstance()->nmdcConnect(server, static_cast(Util::toInt(port)), sock->getLocalPort(), - BufferedSocket::NAT_CLIENT, getMyNick(), getHubUrl(), getEncoding(), secure); + ConnectionManager::getInstance()->nmdcConnect(server, port, sock->getLocalPort(), + BufferedSocket::NAT_CLIENT, getMyNick(), getHubUrl(), getEncoding(), secure); // ... and signal other client to do likewise. - send("$ConnectToMe " + senderNick + " " + getLocalIp() + ":" + Util::toString(sock->getLocalPort()) + (secure ? "RS" : "R") + "|"); + send("$ConnectToMe " + senderNick + " " + getLocalIp() + ":" + sock->getLocalPort() + (secure ? "RS" : "R") + "|"); return; } else if(port[port.size() - 1] == 'R') { port.erase(port.size() - 1); // Trigger connection attempt sequence locally - ConnectionManager::getInstance()->nmdcConnect(server, static_cast(Util::toInt(port)), sock->getLocalPort(), - BufferedSocket::NAT_SERVER, getMyNick(), getHubUrl(), getEncoding(), secure); + ConnectionManager::getInstance()->nmdcConnect(server, port, sock->getLocalPort(), + BufferedSocket::NAT_SERVER, getMyNick(), getHubUrl(), getEncoding(), secure); return; } } @@ -497,7 +503,7 @@ if(port.empty()) return; // For simplicity, we make the assumption that users on a hub have the same character encoding - ConnectionManager::getInstance()->nmdcConnect(server, static_cast(Util::toInt(port)), getMyNick(), getHubUrl(), getEncoding(), secure); + ConnectionManager::getInstance()->nmdcConnect(server, port, getMyNick(), getHubUrl(), getEncoding(), secure); } else if(cmd == "$RevConnectToMe") { if(state != STATE_NORMAL) { return; @@ -518,7 +524,9 @@ bool secure = CryptoManager::getInstance()->TLSOk() && u->getUser()->isSet(User::TLS); // NMDC v2.205 supports "$ConnectToMe sender_nick remote_nick ip:port", but many NMDC hubsofts block it // sender_nick at the end should work at least in most used hubsofts - send("$ConnectToMe " + fromUtf8(u->getIdentity().getNick()) + " " + getLocalIp() + ":" + Util::toString(sock->getLocalPort()) + (secure ? "NS " : "N ") + fromUtf8(getMyNick()) + "|"); + send("$ConnectToMe " + fromUtf8(u->getIdentity().getNick()) + " " + + getLocalIp() + ":" + sock->getLocalPort() + + (secure ? "NS " : "N ") + fromUtf8(getMyNick()) + "|"); } else { if(!u->getUser()->isSet(User::PASSIVE)) { u->getUser()->setFlag(User::PASSIVE); @@ -553,12 +561,12 @@ } else if(cmd == "$Supports") { StringTokenizer st(param, ' '); StringList& sl = st.getTokens(); - for(auto i = sl.begin(); i != sl.end(); ++i) { - if(*i == "UserCommand") { + for(auto& i: sl) { + if(i == "UserCommand") { supportFlags |= SUPPORTS_USERCOMMAND; - } else if(*i == "NoGetINFO") { + } else if(i == "NoGetINFO") { supportFlags |= SUPPORTS_NOGETINFO; - } else if(*i == "UserIP2") { + } else if(i == "UserIP2") { supportFlags |= SUPPORTS_USERIP2; } } @@ -615,20 +623,21 @@ } if(CryptoManager::getInstance()->isExtended(lock)) { - StringList feat; - feat.push_back("UserCommand"); - feat.push_back("NoGetINFO"); - feat.push_back("NoHello"); - feat.push_back("UserIP2"); - feat.push_back("TTHSearch"); - feat.push_back("ZPipe0"); + StringList feat = { + "UserCommand", + "NoGetINFO", + "NoHello", + "UserIP2", + "TTHSearch", + "ZPipe0" + }; - if(CryptoManager::getInstance()->TLSOk()) - feat.push_back("TLS"); + if(CryptoManager::getInstance()->TLSOk()) + feat.push_back("TLS"); #ifdef WITH_DHT - if(BOOLSETTING(USE_DHT)) - feat.push_back("DHT0"); + if(BOOLSETTING(USE_DHT)) + feat.push_back("DHT0"); #endif supports(feat); @@ -658,14 +667,14 @@ myInfo(true); } - fire(ClientListener::UserUpdated(), this, u); + updated(u); } } else if(cmd == "$ForceMove") { disconnect(false); fire(ClientListener::Redirect(), this, param); } else if(cmd == "$HubIsFull") { fire(ClientListener::HubFull(), this); - }else if(cmd == "$HubTopic") { + } else if(cmd == "$HubTopic") { //dcdebug("Nmdc topic:%s",aLine.c_str()); string line; string str2= _("Hub topic:"); @@ -680,26 +689,26 @@ OnlineUserList v; StringTokenizer t(param, "$$"); StringList& l = t.getTokens(); - for(auto it = l.begin(); it != l.end(); ++it) { + for(auto& it: l) { string::size_type j = 0; - if((j = it->find(' ')) == string::npos) + if((j = it.find(' ')) == string::npos) continue; - if((j+1) == it->length()) + if((j+1) == it.length()) continue; - OnlineUser* u = findUser(it->substr(0, j)); + OnlineUser* u = findUser(it.substr(0, j)); if(!u) continue; - u->getIdentity().setIp(it->substr(j+1)); + u->getIdentity().setIp(it.substr(j+1)); if(u->getUser() == getMyIdentity().getUser()) { setMyIdentity(u->getIdentity()); } v.push_back(u); } - fire(ClientListener::UsersUpdated(), this, v); + updated(v); } } else if(cmd == "$NickList") { if(!param.empty()) { @@ -707,11 +716,11 @@ StringTokenizer t(param, "$$"); StringList& sl = t.getTokens(); - for(auto it = sl.begin(); it != sl.end(); ++it) { - if(it->empty()) + for(auto& it: sl) { + if(it.empty()) continue; - v.push_back(&getUser(*it)); + v.push_back(&getUser(it)); } if(!(supportFlags & SUPPORTS_NOGETINFO)) { @@ -719,9 +728,9 @@ // Let's assume 10 characters per nick... tmp.reserve(v.size() * (11 + 10 + getMyNick().length())); string n = ' ' + fromUtf8(getMyNick()) + '|'; - for(auto i = v.begin(); i != v.end(); ++i) { + for(auto& i: v) { tmp += "$GetINFO "; - tmp += fromUtf8((*i)->getIdentity().getNick()); + tmp += fromUtf8(i->getIdentity().getNick()); tmp += n; } if(!tmp.empty()) { @@ -729,17 +738,17 @@ } } - fire(ClientListener::UsersUpdated(), this, v); + updated(v); } } else if(cmd == "$OpList") { if(!param.empty()) { OnlineUserList v; StringTokenizer t(param, "$$"); StringList& sl = t.getTokens(); - for(auto it = sl.begin(); it != sl.end(); ++it) { - if(it->empty()) + for(auto& it: sl) { + if(it.empty()) continue; - OnlineUser& ou = getUser(*it); + OnlineUser& ou = getUser(it); ou.getIdentity().setOp(true); if(ou.getUser() == getMyIdentity().getUser()) { setMyIdentity(ou.getIdentity()); @@ -747,7 +756,7 @@ v.push_back(&ou); } - fire(ClientListener::UsersUpdated(), this, v); + updated(v); updateCounts(false); // Special...to avoid op's complaining that their count is not correctly @@ -777,25 +786,29 @@ return; string fromNick = param.substr(i+1, j-i-1); - if(fromNick.empty() || param.size() < j + 2) + if(fromNick.empty()) return; - ChatMessage message = { unescape(param.substr(j + 2)), findUser(fromNick), &getUser(getMyNick()), findUser(rtNick) }; + if(param.size() < j + 2) { + return; + } + + ChatMessage message = { unescape(param.substr(j + 2)), findUser(fromNick), &getUser(getMyNick()), findUser(rtNick), false, 0 }; if(!message.replyTo || !message.from) { if(!message.replyTo) { // Assume it's from the hub - OnlineUser& replyTo = getUser(rtNick); - replyTo.getIdentity().setHub(true); - replyTo.getIdentity().setHidden(true); - fire(ClientListener::UserUpdated(), this, replyTo); + OnlineUser& ou = getUser(rtNick); + ou.getIdentity().setHub(true); + ou.getIdentity().setHidden(true); + updated(ou); } if(!message.from) { // Assume it's from the hub - OnlineUser& from = getUser(fromNick); - from.getIdentity().setHub(true); - from.getIdentity().setHidden(true); - fire(ClientListener::UserUpdated(), this, from); + OnlineUser& ou = getUser(fromNick); + ou.getIdentity().setHub(true); + ou.getIdentity().setHidden(true); + updated(ou); } // Update pointers just in case they've been invalidated @@ -839,8 +852,8 @@ string nick = fromUtf8(aUser.getIdentity().getNick()); ConnectionManager::getInstance()->nmdcExpect(nick, getMyNick(), getHubUrl()); bool secure = CryptoManager::getInstance()->TLSOk() && aUser.getUser()->isSet(User::TLS); - uint16_t port = secure ? ConnectionManager::getInstance()->getSecurePort() : ConnectionManager::getInstance()->getPort(); - send("$ConnectToMe " + nick + " " + getLocalIp() + ":" + Util::toString(port) + (secure ? "S" : "") + "|"); + string port = secure ? ConnectionManager::getInstance()->getSecurePort() : ConnectionManager::getInstance()->getPort(); + send("$ConnectToMe " + nick + " " + getLocalIp() + ":" + port + (secure ? "S" : "") + "|"); } void NmdcHub::revConnectToMe(const OnlineUser& aUser) { @@ -879,27 +892,27 @@ StatusMode |= Identity::AWAY; } if(BOOLSETTING(ALLOW_NATT) && !isActive()) { - StatusMode |= Identity::NAT; + StatusMode |= Identity::NAT; } if (CryptoManager::getInstance()->TLSOk()) { - StatusMode |= Identity::TLS; + StatusMode |= Identity::TLS; } bool gslotf = BOOLSETTING(SHOW_FREE_SLOTS_DESC); string gslot = "["+Util::toString(UploadManager::getInstance()->getFreeSlots())+"]"; string uMin = (SETTING(MIN_UPLOAD_SPEED) == 0) ? Util::emptyString : ",O:" + Util::toString(SETTING(MIN_UPLOAD_SPEED)); string myInfoA = - "$MyINFO $ALL " + fromUtf8(getMyNick()) + " " + - fromUtf8(escape((gslotf ? gslot :"")+getCurrentDescription())) + " <"+ getClientId().c_str() + ",M:" + modeChar + ",H:" + getCounts(); + "$MyINFO $ALL " + fromUtf8(getMyNick()) + " " + + fromUtf8(escape((gslotf ? gslot :"")+getCurrentDescription())) + " <"+ getClientId().c_str() + ",M:" + modeChar + ",H:" + getCounts(); string myInfoB = ",S:" + Util::toString(SETTING(SLOTS)); string myInfoC = uMin + - ">$ $" + uploadSpeed + StatusMode + "$" + fromUtf8(escape(SETTING(EMAIL))) + '$'; + ">$ $" + uploadSpeed + StatusMode + "$" + fromUtf8(escape(SETTING(EMAIL))) + '$'; string myInfoD = ShareManager::getInstance()->getShareSizeString() + "$|"; // we always send A and C; however, B (slots) and D (share size) can frequently change so we delay them if needed if(alwaysSend || - ((lastMyInfoA != myInfoA || lastMyInfoC != myInfoC) && lastUpdate + 2*60*1000 < GET_TICK()) - || - ((lastMyInfoB != myInfoB || lastMyInfoD != myInfoD) && lastUpdate + 15*60*1000 < GET_TICK())) { + ((lastMyInfoA != myInfoA || lastMyInfoC != myInfoC) && lastUpdate + 2*60*1000 < GET_TICK()) + || + ((lastMyInfoB != myInfoB || lastMyInfoD != myInfoD) && lastUpdate + 15*60*1000 < GET_TICK())) { dcdebug("MyInfo %s...\n", getMyNick().c_str()); send(myInfoA + myInfoB + myInfoC + myInfoD); lastMyInfoA = myInfoA; @@ -921,7 +934,7 @@ } string tmp2; if(isActive() && !BOOLSETTING(SEARCH_PASSIVE)) { - tmp2 = getLocalIp() + ':' + Util::toString(SearchManager::getInstance()->getPort()); + tmp2 = getLocalIp() + ':' + SearchManager::getInstance()->getPort(); } else { tmp2 = "Hub:" + fromUtf8(getMyNick()); } @@ -986,9 +999,9 @@ privateMessage(aUser.getIdentity().getNick(), aMessage); // Emulate a returning message... Lock l(cs); - OnlineUser* ou = findUser(getMyNick()); + auto ou = findUser(getMyNick()); if(ou) { - ChatMessage message = { aMessage, ou, &aUser, ou }; + ChatMessage message = { aMessage, ou, &aUser, ou, false, 0 }; fire(ClientListener::Message(), this, message); } } @@ -1019,6 +1032,7 @@ void NmdcHub::on(Connected) noexcept { Client::on(Connected()); + if(state != STATE_PROTOCOL) { return; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NmdcHub.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NmdcHub.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NmdcHub.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NmdcHub.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,26 +13,28 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include + #include "TimerManager.h" #include "SettingsManager.h" #include "forward.h" #include "CriticalSection.h" #include "Text.h" #include "Client.h" -#include "BufferedSocket.h" -#include "ClientManager.h" #ifdef LUA_SCRIPT #include "ScriptManager.h" #endif + namespace dcpp { +using std::list; + #ifdef LUA_SCRIPT struct NmdcHubScriptInstance : public ScriptInstance { friend class ClientManager; @@ -41,9 +44,10 @@ class ClientManager; -class NmdcHub : public Client, private Flags #ifdef LUA_SCRIPT -,public NmdcHubScriptInstance +class NmdcHub : public Client, private Flags ,public NmdcHubScriptInstance +#else +class NmdcHub : public Client, private Flags #endif { public: @@ -63,15 +67,16 @@ virtual size_t getUserCount() const { Lock l(cs); return users.size(); } virtual int64_t getAvailable() const; - virtual string escape(string const& str) const { return validateMessage(str, false); } + static string escape(const string& str) { return validateMessage(str, false); } static string unescape(const string& str) { return validateMessage(str, true); } + void emulateCommand(const string& cmd) { onLine(cmd); } virtual void send(const AdcCommand&) { dcassert(0); } static string validateMessage(string tmp, bool reverse); private: -friend class ClientManager; + friend class ClientManager; enum SupportFlags { SUPPORTS_USERCOMMAND = 0x01, SUPPORTS_NOGETINFO = 0x02, @@ -80,10 +85,7 @@ mutable CriticalSection cs; - typedef unordered_map NickMap; - typedef NickMap::iterator NickIter; - - NickMap users; + unordered_map users; int supportFlags; @@ -101,10 +103,6 @@ NmdcHub(const string& aHubURL, bool secure); virtual ~NmdcHub(); - // Dummy - NmdcHub(const NmdcHub&); - NmdcHub& operator=(const NmdcHub&); - void clearUsers(); OnlineUser& getUser(const string& aNick); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/noexcept.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/noexcept.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/noexcept.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/noexcept.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#pragma once - -// for compilers that don't support noexcept, use an exception specifier - -#if defined(__clang__) - -#if __clang_major__ < 3 - -#ifndef noexcept -#define noexcept throw() -#endif - -#endif - -#elif defined(__GNUC__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) // GCC 4.6 is the first GCC to implement noexcept. - -#ifndef noexcept -#define noexcept throw() -#endif - -#endif -#elif defined(_MSC_VER) - -#ifndef noexcept -#define noexcept throw() -#endif - -#endif diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NonCopyable.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NonCopyable.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/NonCopyable.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/NonCopyable.h 2019-03-23 22:00:27.000000000 +0000 @@ -0,0 +1,28 @@ +/* +* Copyright (C) 2019 Boris Pek +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +#pragma once + +class NonCopyable_ { +public: + NonCopyable_() = default; + ~NonCopyable_() = default; + NonCopyable_(const NonCopyable_&) = delete; + const NonCopyable_& operator=(const NonCopyable_&) = delete; +}; + +typedef NonCopyable_ NonCopyable; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/nullptr.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/nullptr.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/nullptr.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/nullptr.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// for compilers that don't support nullptr, use the workaround in section 1.1 of the proposal. -#pragma once - -#ifdef __GNUC__ -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) // GCC 4.6 is the first GCC to implement nullptr. - -const // this is a const object... -class { -public: - template // convertible to any type - operator T*() const // of null non-member - { return 0; } // pointer... - template // or any type of null - operator T C::*() const // member pointer... - { return 0; } -private: - void operator&() const; // whose address can't be taken -} nullptr = {}; // and whose name is nullptr - -#endif -#endif diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/OnlineUser.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/OnlineUser.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/OnlineUser.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/OnlineUser.h 2019-04-15 19:00:34.000000000 +0000 @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include + +#include "NonCopyable.h" + +#include "Flags.h" +#include "FastAlloc.h" +#include "GetSet.h" +#include "Pointer.h" +#include "Util.h" +#include "User.h" + +namespace dcpp { + +/** One of possibly many identities of a user, mainly for UI purposes */ +class Identity : public Flags { +public: + enum IdentityFlagBits { + GOT_INF_BIT, + NMDC_PASSIVE_BIT + }; + enum IdentityFlags { + GOT_INF = 1 << GOT_INF_BIT, + NMDC_PASSIVE = 1 << NMDC_PASSIVE_BIT + }; + enum ClientType { + CT_BOT = 1, + CT_REGGED = 2, + CT_OP = 4, + CT_SU = 8, + CT_OWNER = 16, + CT_HUB = 32, + CT_HIDDEN = 64 + }; + enum StatusFlags { + NORMAL = 0x01, + AWAY = 0x02, + TLS = 0x10, + NAT = 0x20 + }; + + Identity() { } + Identity(const UserPtr& ptr, uint32_t aSID) : user(ptr) { setSID(aSID); } + Identity(const Identity& rhs) { *this = rhs; } // Use operator= since we have to lock before reading... + Identity& operator=(const Identity& rhs) { + FastLock l(cs); + user = rhs.user; + info = rhs.info; + return *this; + } + +#define GETSET_FIELD(n, x) string get##n() const { return get(x); } void set##n(const string& v) { set(x, v); } + GETSET_FIELD(Nick, "NI") + GETSET_FIELD(Description, "DE") + GETSET_FIELD(Ip, "I4") + GETSET_FIELD(UdpPort, "U4") + GETSET_FIELD(Email, "EM") + GETSET_FIELD(Connection, "CO") +#undef GETSET_FIELD + + void setBytesShared(const string& bs) { set("SS", bs); } + int64_t getBytesShared() const { return Util::toInt64(get("SS")); } + + void setStatus(const string& st) { set("ST", st); } + StatusFlags getStatus() const { return static_cast(Util::toInt(get("ST"))); } + + void setOp(bool op) { set("OP", op ? "1" : Util::emptyString); } + void setHub(bool hub) { set("HU", hub ? "1" : Util::emptyString); } + void setBot(bool bot) { set("BO", bot ? "1" : Util::emptyString); } + void setHidden(bool hidden) { set("HI", hidden ? "1" : Util::emptyString); } + string getTag() const; + string getApplication() const; + bool supports(const string& name) const; + bool isHub() const { return isClientType(CT_HUB) || isSet("HU"); } + bool isOp() const { return isClientType(CT_OP) || isClientType(CT_SU) || isClientType(CT_OWNER) || isSet("OP"); } + bool isRegistered() const { return isClientType(CT_REGGED) || isSet("RG"); } + bool isHidden() const { return isClientType(CT_HIDDEN) || isSet("HI"); } + bool isBot() const { return isClientType(CT_BOT) || isSet("BO"); } + bool isAway() const { return isSet("AW"); } + bool isTcpActive(const Client* = NULL) const; + bool isUdpActive() const; + std::map getInfo() const; + string get(const char* name) const; + void set(const char* name, const string& val); + bool isSet(const char* name) const; + string getSIDString() const { return string((const char*)&sid, 4); } + + bool isClientType(ClientType ct) const; + + void getParams(StringMap& map, const string& prefix, bool compatibility, bool dht = false) const; + UserPtr& getUser() { return user; } + GETSET(UserPtr, user, User); + GETSET(uint32_t, sid, SID); + +private: + typedef std::unordered_map InfMap; + typedef InfMap::iterator InfIter; + typedef InfMap::const_iterator InfIterC; + InfMap info; + + static FastCriticalSection cs; +}; + +class NmdcHub; + +class OnlineUser : public FastAlloc, private NonCopyable, public intrusive_ptr_base { +public: + typedef vector List; + typedef List::iterator Iter; + + OnlineUser(const UserPtr& ptr, ClientBase& client_, uint32_t sid_); + virtual ~OnlineUser() noexcept { } + operator UserPtr&() { return getUser(); } + operator const UserPtr&() const { return getUser(); } + + UserPtr& getUser() { return getIdentity().getUser(); } + const UserPtr& getUser() const { return getIdentity().getUser(); } + Identity& getIdentity() { return identity; } + Client& getClient() { return (Client&)client; } + const Client& getClient() const { return (const Client&)client; } + ClientBase& getClientBase() { return client; } + const ClientBase& getClientBase() const { return client; } + bool isInList; + GETSET(Identity, identity, Identity); + +private: + friend class NmdcHub; + ClientBase& client; +}; + +} // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/PerFolderLimit.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/PerFolderLimit.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/PerFolderLimit.cpp 2018-09-03 01:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/PerFolderLimit.cpp 2019-03-23 22:00:27.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #include "stdinc.h" @@ -29,153 +28,153 @@ CPerfolderLimit::CPerfolderLimit(string const *config_name): m_limits() { - RenewList(config_name); + RenewList(config_name); } CPerfolderLimit::~CPerfolderLimit() { - while (!m_limits.empty()) - { - delete m_limits.back(); - m_limits.pop_back(); - } + while (!m_limits.empty()) + { + delete m_limits.back(); + m_limits.pop_back(); + } } bool CPerfolderLimit::IsUserAllowed(string const& request, const UserPtr user, string *message) { - bool found=false; - FavoriteManager *FM = FavoriteManager::getInstance(); - Identity id=ClientManager::getInstance()->getOnlineUserIdentity(user); - int64_t user_share=id.getBytesShared(); - - if ( NULL != message ) - { - *message=""; - //*message=string("Limits check: user '")+id.getNick()+"' "+id.getIp()+" req: "+request+" : "; - } + bool found=false; + FavoriteManager *FM = FavoriteManager::getInstance(); + Identity id=ClientManager::getInstance()->getOnlineUserIdentity(user); + int64_t user_share=id.getBytesShared(); - if ( m_limits.empty() || id.isOp() || FM->isFavoriteUser(user) || FM->hasSlot(user)) - { - return true; - } + if ( NULL != message ) + { + *message=""; + //*message=string("Limits check: user '")+id.getNick()+"' "+id.getIp()+" req: "+request+" : "; + } - TFolderSetting *pos = *m_limits.begin(); - unsigned int max_path_len = 0; - for (TFolderSetting::Iter i=m_limits.begin(); i!=m_limits.end(); ++i) - { - TFolderSetting *s = *i; - if ( pos->m_minshare<=s->m_minshare && 0==request.find(s->m_folder) ) - { - if (s->m_folder.length() > max_path_len){ - max_path_len = s->m_folder.length(); - pos=s; - found=true; - } - } - } - if (found) - { - if ( user_share>= (static_cast(pos->m_minshare))*1024*1024*1024 ) + if ( m_limits.empty() || id.isOp() || FM->isFavoriteUser(user) || FM->hasSlot(user)) { - return true; + return true; } - if ( NULL != message ) + TFolderSetting *pos = *m_limits.begin(); + unsigned int max_path_len = 0; + for (TFolderSetting::Iter i=m_limits.begin(); i!=m_limits.end(); ++i) { - char buf_need[100], buf_user[100]; - sprintf(buf_need, "%i", pos->m_minshare); - sprintf(buf_user, "%i", (int)(user_share/(1024*1024*1024))); - *message=_("Too small share to download from ") + pos->m_folder + ": " + buf_user + "/" + buf_need + " " + _("GiB"); + TFolderSetting *s = *i; + if ( pos->m_minshare<=s->m_minshare && 0==request.find(s->m_folder) ) + { + if (s->m_folder.length() > max_path_len){ + max_path_len = s->m_folder.length(); + pos=s; + found=true; + } + } + } + if (found) + { + if ( user_share>= (static_cast(pos->m_minshare))*1024*1024*1024 ) + { + return true; + } - LogManager::getInstance()->message(_("Denied to send file") + string(" '") + request + string("' ") + - _(" to ") + id.getNick() + string(" (") + id.getIp() + string("): ") + - *message); + if ( NULL != message ) + { + char buf_need[100], buf_user[100]; + sprintf(buf_need, "%i", pos->m_minshare); + sprintf(buf_user, "%i", (int)(user_share/(1024*1024*1024))); + *message=_("Too small share to download from ") + pos->m_folder + ": " + buf_user + "/" + buf_need + " " + _("GiB"); + + LogManager::getInstance()->message(_("Denied to send file") + string(" '") + request + string("' ") + + _(" to ") + id.getNick() + string(" (") + id.getIp() + string("): ") + + *message); - return false; + return false; + } } - } - return true; + return true; } void CPerfolderLimit::RenewList(string const *config_name) { - string config_n; - if ( NULL==config_name ) - { - config_n=Util::getPath(Util::PATH_USER_CONFIG) + "PerFolderLimit.conf"; - config_name=&config_n; - } - - while (!m_limits.empty()) - { - delete m_limits.back(); - m_limits.pop_back(); - } - - string config; - try - { - config = File(*config_name, File::READ, File::OPEN).read(); - } - catch (...) - { - return; - } - - config.push_back(0); - config.push_back(0); - - for ( int i=0; 0!=config[i]; i++ ) - { - string n; - string f; - - while ( ' '==config[i] || 0x09==config[i] || 0x0D==config[i] || 0x0A==config[i] ) + string config_n; + if ( NULL==config_name ) { - i++; + config_n=Util::getPath(Util::PATH_USER_CONFIG) + "PerFolderLimit.conf"; + config_name=&config_n; } - if ( '#' == config[i] ) + while (!m_limits.empty()) { - while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i]) - { - i++; - } - continue; + delete m_limits.back(); + m_limits.pop_back(); } - while ( config[i]>='0' && config[i]<='9' ) + string config; + try { - n.push_back(config[i]); - i++; + config = File(*config_name, File::READ, File::OPEN).read(); } - if ( ' '!=config[i] && 0x09!=config[i] ) + catch (...) { - while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i]) - { - i++; - } - continue; + return; } - while ( ' '==config[i] || 0x09==config[i] ) - { - i++; - } + config.push_back(0); + config.push_back(0); - while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i] ) - { - f.push_back(config[i]); - i++; - } - if (f.length()>0) + for ( int i=0; 0!=config[i]; i++ ) { - TFolderSetting::Ptr t=new TFolderSetting; - t->m_folder=f; - t->m_minshare=atoi(n.c_str()); - m_limits.push_back(t); + string n; + string f; + + while ( ' '==config[i] || 0x09==config[i] || 0x0D==config[i] || 0x0A==config[i] ) + { + i++; + } + + if ( '#' == config[i] ) + { + while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i]) + { + i++; + } + continue; + } + + while ( config[i]>='0' && config[i]<='9' ) + { + n.push_back(config[i]); + i++; + } + if ( ' '!=config[i] && 0x09!=config[i] ) + { + while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i]) + { + i++; + } + continue; + } + + while ( ' '==config[i] || 0x09==config[i] ) + { + i++; + } + + while ( 0!=config[i] && 0x0D!=config[i] && 0x0A!=config[i] ) + { + f.push_back(config[i]); + i++; + } + if (f.length()>0) + { + TFolderSetting::Ptr t=new TFolderSetting; + t->m_folder=f; + t->m_minshare=atoi(n.c_str()); + m_limits.push_back(t); + } } - } } } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/PerFolderLimit.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/PerFolderLimit.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/PerFolderLimit.h 2018-09-03 01:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/PerFolderLimit.h 2019-03-23 22:00:27.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once @@ -29,22 +28,22 @@ struct TFolderSetting { - typedef TFolderSetting* Ptr; - typedef std::list List; - typedef List::iterator Iter; + typedef TFolderSetting* Ptr; + typedef std::list List; + typedef List::iterator Iter; - string m_folder; - int m_minshare; + string m_folder; + int m_minshare; }; class CPerfolderLimit { - TFolderSetting::List m_limits; + TFolderSetting::List m_limits; public: - CPerfolderLimit(string const *config_name=NULL); - ~CPerfolderLimit(); - bool IsUserAllowed(string const& request, const UserPtr user, string *message=NULL); - void RenewList(string const *config_name=NULL); + CPerfolderLimit(string const *config_name=NULL); + ~CPerfolderLimit(); + bool IsUserAllowed(string const& request, const UserPtr user, string *message=NULL); + void RenewList(string const *config_name=NULL); }; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/be.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/be.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/be.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/be.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Zmicer , 2018\n" "Language-Team: Belarusian (https://www.transifex.com/tehnick/teams/11818/" @@ -25,23 +25,23 @@ msgid "" msgstr "<Упішыце радок>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Адкінуць" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "Прапускаем: %1% (%2%) мае такі самы CID {%3%}, як і %4% (%5%)" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/с" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Не ўдалося дамовіцца пра галоўны пратакол" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -49,83 +49,91 @@ "Магчыма, асяродак выкарыстоўвае старую вэрсію ADC. Паспрыяйце, каб " "уладальнік абнавіў яе" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%2% даў высьпятка карыстальніку %1%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "Карыстальніку %1% далі высьпятка: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Ня чую злучэньняў — запусьціце %1% нанова" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Не ўдалося сьціснуць" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Не ўдалося распакаваць" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Выйшаў час злучэньня" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Злучэньне зачынілі" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Загад задаўгі" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Адлучаны" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Даслалі " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Ня ў сетцы" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Усе шчыліны сьцягваньня занятыя" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Злучэньне аднавілі" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Памылка злучэньня: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Вызначаюцца найлепшыя налады злучэньня…" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "Не ўдаецца адчыніць порт(ы) %1%; настаўце злучэньне самастойна" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "Выявілі публічны адрас IP; абіраем дзейны спосаб простага злучэньня" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -133,7 +141,7 @@ "Выявілі мясцовую сетку і, магчыма, NAT; спрабуем адлюстраваць порты з " "дапамогаю UPnP…" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,227 +149,310 @@ "Не ўдалося самарушна наладзіць злучэньне дзейным спосабам. Мажліва, вы " "захочаце наладзіць злучэньне самастойна для лепшае сувязі" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Перадаваньне (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Пошук (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Злучэньне: " -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Не абралі файл асабістага ключа" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Не абралі пасьведчаньня" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Не ўдалося стварыць пасьведчаньне" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS не задзейнічаны, файл пасьведчаньня ня вызначаны" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Стварылі новае пасьведчаньне TLS" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "Не ўдалося стварыць пасьведчаньне — TLS не задзейнічалі: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Не ўдалося прачытаць файл пасьведчаньня" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Не ўдалося прачытаць асабісты ключ" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "База зьвестак скаротаў" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Абагуленыя файлы" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Чарга сьцягванага" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Карыстальнікі" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Каталёґ ня мае назвы" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "Сіта IP: забаранілі выходнае злучэньне з " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Хібны памер" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Адказ не адпавядае запыту" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Не ўдаецца адчыніць прызначаны файл: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Скарот (TTH) сьцягнутага не адпавядае скароту крыніцы" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Няма даступных шчылінаў" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: файл недаступны" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Даць высьпятка" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Накіраваць карыстальніка(аў)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Самарушна злучацца суполцы (пераробленае)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Не ўдалося стварыць скароты: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Скароты стварылі: %1% (%2% на %3%/с)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Скароты стварылі: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Скончылі ствараць скароты: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Не ўдалося захаваць зьвесткі скаротаў: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Не ўдалося прачытаць файл зьвестак скаротаў" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Не ўдалося стварыць файл зьвестак скаротаў: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Адбудавалі базу зьвестак" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% не абагулілі: падлічаная сума CRC32 не адпавядае знойдзенай у файле SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Не ўдалося стварыць скарот да %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Порт перадаваньня (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Бясконцая пятля перанакіроўваньня (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Няма даступнага выкананьня UPnP" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Спрабуем стварыць іншае люстра портаў UPnP…" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Не ўдалося задзейнічаць інтэрфэйс %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Порт перадаваньня (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Інтэрфэйсу %1% не ўдалося адлюстраваць порт %2% на %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Шыфраваны порт перадаваньня (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Порт пошуку (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " Порт DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Адлюстравалі порты (TCP: %1%, UDP: %2%, TLS: %3%) з дапамогаю інтэрфэйсу %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Не ўдалося атрымаць вонкавы адрас IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Не ўдалося адлюстраваць порты" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Зьнішчылі люстры портаў на інтэрфэйсе %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Не ўдалося зьнішчыць люстры портаў на інтэрфэйсе %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (невядомая мянушка)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Тэма асяродку:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "ҐіБ" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " да " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Няма неабходнае часткі" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Шукаюцца па скаротах (TTH) дадатковыя крыніцы для: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Файл з такім самым скаротам ужо існуе ў абагуленым" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Гэта файл ужо стаіць у чарзе" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Файл зь іншым памерам ужо стаіць у чарзе" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Файл зь іншым скаротам (TTH) ужо стаіць у чарзе" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Вы спрабуеце сьцягнуць у самога сябе" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Файл зь іншым скаротам (TTH) ужо стаіць у чарзе" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Гэта файл ужо сьцягнулі" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Прызначылі задаўгую назву файла" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -369,162 +460,162 @@ "Хібнае прызначэньне (адсутнічае каталёґ; спраўдзіце перадвызначаныя налады " "каталёґа сьцягваць)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Файл ужо існуе ў прызначаным месцы" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Падвоеная крыніца: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Мэта зьнікла" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Файл мэты адсутнічае ці мае неадпаведны памер" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Не ўдаецца перасунуць %1% у %2% (%3%); далі новую назву: %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Не ўдаецца ані перасунуць %1% у %2% (%3%), ані даць новую назву: %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Не ўдаецца адчыніць сьпіс файлаў: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: супаў файл %2%" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "Да прызначанага шляху няма доступу: %1%; пункт чаргі прыпынілі." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Неадпаведнасьць CRC32 (спраўджаньне SFV)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% — супала файлаў: %2%" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Памылка SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Па ўсіх" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Гук" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Сьціснуты" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Дакумэнт" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Выканальны файл" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Малюнак" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Відэа" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Каталёґ" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "Скарот (TTH)" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Адбітак CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Зноўку можна шукаць" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Пошук не працуе: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "сьцягнулі з" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Хібная назва віду пошуку" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Гэты від пошуку ўжо існуе" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Такі від пошуку не існуе" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Памылка: не знайшлі налады!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Наладкі ядра" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Зьмяніць наладу асновы " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Ня вызначылі каталёґ" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Схаваны каталёґ" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Нельга абагуляць часовы каталёґ" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Выявілі хібную назву файла, калі стваралі скароты ў каталёґу %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Не абагуляецца файл: %1% (памер: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Не абагуляецца часовы файл: %1% (памер: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "Файл %1% (памер: %2% Б) — блізьнюк файла %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -532,46 +623,46 @@ "Сьпіс файлаў абнаўляецца. Пачакайце, пакуль ён абновіцца, каб паспрабаваць " "абнавіць ізноў." -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Не ўдалося абнавіць сьпіс файлаў: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Распачалі абнаўляць сьпіс файлаў" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Сьпіс файлаў абнавілі" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Стварылі сьпіс файлаў %1%" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Невядомая памылка: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Паслужніку Socks не ўдалося наладзіць злучэньне" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Паслужнік SOCKS патрабуе апазнацца" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Паслужнік SOCKS не падтрымвае апазнаваньня «ўліковае ймя — пароль»" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Не ўдалося апазнацца на паслужніку SOCKS (кепскі пароль ці ўліковае ймя?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -579,169 +670,115 @@ "Не ўдалося наладзіць паслужнік SOCKS перасылаць UDP (спраўдзіце адрас і порт " "SOCKS)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Не ўдаецца стварыць ніць" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Няма даступнага выкананьня UPnP" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Спрабуем стварыць іншае люстра портаў UPnP…" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Не ўдалося задзейнічаць інтэрфэйс %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Порт перадаваньня (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Інтэрфэйсу %1% не ўдалося адлюстраваць порт %2% на %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Шыфраваны порт перадаваньня (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Порт пошуку (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " Порт DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Адлюстравалі порты (TCP: %1%, UDP: %2%, TLS: %3%) з дапамогаю інтэрфэйсу %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Не ўдалося атрымаць вонкавы адрас IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Не ўдалося адлюстраваць порты" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Зьнішчылі люстры портаў на інтэрфэйсе %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Не ўдалося зьнішчыць люстры портаў на інтэрфэйсе %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Злучэньне ўжо існуе." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Не ўдаецца даслаць файл %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "Сіта IP: забаранілі ўваходнае злучэньне з " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Карыстальнік адлучыўся і выходзіць з асяродку: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Хібныя зьвесткі" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Зьвесткі злучэньня ADC не ў кадоўцы UTF-8" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d Б" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f КіБ" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f КБ" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f МіБ" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f МБ" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f ҐіБ" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f ГБ" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f ТіБ" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f ТБ" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f ПіБ" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f ПБ" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s Б" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld Б" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Разыходжаньне TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Запісалі байтаў болей за тое, колькі было трэба" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/bg.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/bg.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/bg.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/bg.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: psytrip , 2018\n" "Language-Team: Bulgarian (https://www.transifex.com/tehnick/teams/11818/" @@ -23,23 +23,23 @@ msgid "" msgstr "<Въведете низ>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Отхвърляне" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) има същия CID {%3%} като %4% (%5%), игнорира се" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Грешка при преговаряне за базов протокол" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,86 +47,94 @@ "Хъба вероятно използва стара версия на ADC, помолете собственика му да го " "надгради" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% бе изгонен от %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% бе изгонен: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Не се следи за връзки - моля, рестартирайте %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Грешка при компресиране" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Грешка при декомпресиране" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Времето за свързване изтече" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Връзката е затворена" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Максималната дължина на командата е превишена" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Връзката е прекъсната" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Изпратен" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Извън линия" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Всички слотове за сваляне са заети" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Връзката е възстановена" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Връзката е възстановена" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Определяне на най-добрите настройки за свързване..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Не може да отвори %1% порт(а); трябва да конфигурирате ръчно настройките за " "свързване" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Засечен е външен IP адрес, избиране на Активен режим с директно свързване" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "Засечена е локална мрежа с възможност за NAT, опит за пренасочване на " "портове чрез UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -142,228 +150,312 @@ "Автоматичното настройване на активния режим се провали. Може да искате да " "настроите връзката ръчно за по-добра свързаност" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Прехвърляне (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Търсене (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Свързването е възстановено" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Няма избран файл с личен ключ" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Няма избран файл със сертификат" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Грешка при генериране на сертификат" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS е изключен, няма дефиниран файл със сертификат" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Генерира се нов TLS сертификат" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS е изключен, неуспех при генериране на сертификат: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Неуспешно зареждане на файла със сертификат" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Неуспешно зареждане на личния ключ" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "База-данни с хешове" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Споделени файлове" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Опашка за сваляне" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Потребители" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Липсва атрибут за име на директорията" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IP-филтър: Блокиране на изходящи връзки към" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Невалиден размер" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Отговора не съвпада с искането" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Грешка при отваряне на избрания файл: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Списъка не съответства на TTH-хеша" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Няма налични слотове" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "Файла не е достъпен" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Изгони потребител(и)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Пренасочване на потребител(и)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Групирано авто-свързване (конвертирано)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Търсенето е отново позволено" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Завършено хеширане: %1% (%2% с %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Завършено хеширане: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Завършено хеширане: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Грешка при четене на хеш файла" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Грешка при четене на хеш файла" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Грешка при четене на хеш файла" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Базата-данни с хешове е построена наново" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% не е споделен; изчислената CRC32 сума не съвпада с намерената в SFV " "файла." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Грешка при хеширане %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Порт за прехвърляне (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Безкрайно циклично пренасочване (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Файла не е наличен" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "В действие е друг опит за UPnP пренасочване..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Започва опресняване на списъка с файлове" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Порт за прехвърляне (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "%1% интерфейса се провали провали при пренасочване на %2% %3% порта" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Шифриран порт за прехвърляне (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Порт за търсене (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "DHT порт (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Успешно пренасочване на портове (TCP: %1%, UDP: %2%, TLS: %3%), пренасочени " +"чрез %4% интерфейс" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Грешка при взимане на външен IP адрес" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Не може да създаде нишка" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Започва опресняване на списъка с файлове" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Започва опресняване на списъка с файлове" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (неизвестен прякор)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Тема на хъба:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "до" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Ненужна част" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Търсене на TTH алтернативи за: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Файл със същия хеш вече съществува в споделеното от вас" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Този файл вече е на опашката" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Файл с различна големина вече съществува в опашката" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Файл с различен TTH root вече съществува в опашката" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Опитвате се да сваляте файлове от себе си!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Файл с различен TTH root вече съществува в опашката" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Този файл вече е на опашката" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Прекалено дълго име на файла-цел" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -371,156 +463,156 @@ "Невалиден целеви файл (липсваща папка - проверете папката за сваляне по " "подразбиране)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Файла вече същестува в целевото място" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Повтарящ се източник: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Целта е премахната" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Избрания файл липсва или е с грешен размер" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Не може да се премести %1% в %2% (%3%); преименува се в %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Не може да се премести %1% в %2% (%3%), нито да се преименува в %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Грешка при отваряне на списъка с файлове: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Съвпадащи %2% файла" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 несъвпадение (SFV-проверка)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL грешка: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Всичко" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Аудио" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Архив" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Документ" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Изпълним" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Изображение" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Видео" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Директория" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD изображение" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Търсенето е включено отново" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Търсенето е включено отново" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "сваляне от" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Неправилно име за тип търсене" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Този тип търсене вече съществува" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Няма такъв тип търсене" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Грешка: настройката не е намерена!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Промяна настройките на ядрото" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Не е определена папка" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Директорията е вече споделена" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Временната директория не може да бъде споделяна" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Намерено е неправилно име на файл, докато се хешира папка %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -528,7 +620,7 @@ "Повтарящия се файл няма да бъде споделен: %1% (размер: %2% B) Дупликата " "съвпада със: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -536,45 +628,45 @@ "В момента тече опресняване на списъка с файловете, моля изчакайте преди да " "опитате да обновите отново" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Опресняването на списъка с файлове завърши" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Започва опресняване на списъка с файлове" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Опресняването на списъка с файлове завърши" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Започва опресняване на списъка с файлове" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Неизвестна грешка: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socks сървъра не можа да установи връзка" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socks сървъра изисква идентификация (име и парола)" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socks сървъра не поддържа идентификация с име / парола" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Грешка при свързването със Socks сървъра (грешно име / парола?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -582,170 +674,115 @@ "Грешка при настройването на Socks сървъра за UDP (проверете адреса и порта " "на сървъра)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Грешка при създаване на нишка" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Файла не е наличен" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "В действие е друг опит за UPnP пренасочване..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Започва опресняване на списъка с файлове" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Порт за прехвърляне (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "%1% интерфейса се провали провали при пренасочване на %2% %3% порта" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Шифриран порт за прехвърляне (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Порт за търсене (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "DHT порт (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Успешно пренасочване на портове (TCP: %1%, UDP: %2%, TLS: %3%), пренасочени " -"чрез %4% интерфейс" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Грешка при взимане на външен IP адрес" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Не може да създаде нишка" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Започва опресняване на списъка с файлове" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Започва опресняване на списъка с файлове" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Връзката е затворена" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Не може да изпрати файл %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IP-филтър: Блокиране на входящи връзки към" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Прекъснат потребител напуска хъба: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Невалидни данни" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Не-UTF-8 данни в ADC връзка" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "ТТH несъвпадение" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Записани са повече байтове от заявения брой" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/cs.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/cs.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/cs.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/cs.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Boris Pek , 2017\n" "Language-Team: Czech (https://www.transifex.com/tehnick/teams/11818/cs/)\n" @@ -23,23 +23,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Zahodit" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) má stejné CID {%3%} jako %4% (%5%), ignoruji" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Nemohu nastavit základní protokol" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,83 +47,91 @@ "Hub pravděpodobně používá starou verzi ADC, prosím doporučte majiteli " "upgrade." -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% byl vykopnut uživatelem %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% byl vykopnut: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Nenaslouchá připojením - prosím restartujte %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Chyba pocesu komprese" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Chyba během dekomprese" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Čas pro připojení vypršel" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Spojení ukončeno" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Překročena maximální délka příkazu" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Odpojený" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Odesláno " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Nepřipojen" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Všechny download sloty jsou obsazené" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Spojení obnoveno" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Ustavuji nejlepší nastavení spojení..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "Nemohu otevřít %1% port(y); Nastavení spojení musí být nastaveno ručně" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "Detekována veřejná IP adresa, vybírám aktivní mód s přímým spojením" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -131,7 +139,7 @@ "Zjištěna místní síť s možností použití NAT, pokouším se namapovat porty " "pomocí UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -139,228 +147,310 @@ "Automatické nastavení aktivního módu selhalo. Možná budete chtít nastavit " "vaše připojení ručně pro lepší funkčnost" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Přenosy (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Hledání (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Spojení obnoveno" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS zakázáno, chybí certifikát" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Vygenerovaný nový TLS certifikát" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS zakázáno, nelze vygenerovat certifikát: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Nemohu nahrát soubor s certifikátem" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Nemohu nahrát privátní klíč" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Hash databáze" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Sdilene soubory" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Fronta souborů ke stáhnutí" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Uživatelé" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Neplatná velikost" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Odezva neodpovídá požadavku" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Nemohu otevřít cílový soubor: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Stáhnutý strom neodpovídá porovnanému TTH základu (TTH root)" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Nejsou volné žádné sloty" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Soubor není dostupný" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Vykopnout uživatele" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Přesměrovat uživatele" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Hashování selhalo: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Dokončeno hashování: %1% (%2% v %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Hashování dokončeno: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Dokončeno hashování: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Chyba při ukládání hashe: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Nelze číst hash souborů" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Chyba vytváření souboru hashe: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Hash databáze obnovena" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% není sdíleno; vypočtený součet CRC32 nesouhlasí se součtem ze souboru " "SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Chyba hashování %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Transfer Port (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Soubor nedostupný" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Spuštěno obnovení filelistu" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Transfer Port (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Šifrovaný Transfer Port (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Search Port (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " DHT Port (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Selhalo získání externí IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Spuštěno obnovení filelistu" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Spuštěno obnovení filelistu" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick neznámý)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Topic Hubu:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " na " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Soubor se stejným hashem již sdílíte" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Tento soubor je již ve frontě" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Stejný soubor s jinou velikostí již je ve frontě" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Snažíte se stahovat od sebe!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Cílové jméno souboru je příliš dlouhé" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -368,205 +458,205 @@ "Chybný cílový soubor (chybějící adresář, zkontrolujte nastavení adresáře pro " "stáhnuté soubory)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Duplicitní zdroj: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Cíl odebrán" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Nemohu otevřít seznam souborů: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 nesuhlasí (SFV kontrola)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Všechny" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Komprimovaný" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokument" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Spustitelný" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Obrázek" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Adresář" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD Image" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Hashování selhalo: %1%" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "staženo z" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Nevhodný název typu hledání" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Tento typ hledání již existuje" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Takový typ hledávání není" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Chyba: nastaveni nenalezeno!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Změna nastavení jádra " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nebyl zvolen adresář" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Adresář je již ve sdílení" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Není možné sdílet pracovní adresář neztažených souborů" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "Probíhá obnovení seznamu souborů, prosím počkejte" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Nemohu obnovit seznam souborů: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Zahájení obnovení seznamu souborů" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Obnovení seznamu souborů dokončeno" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Spuštěno obnovení filelistu" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Neznámá chyba: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socket Server nedokázal navázat spojení" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socket Server vyžaduje autorizaci" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socket Server nepodporuje autorizaci" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Socket Server přihlášení odmítl (neplatné jméno / heslo)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -574,168 +664,115 @@ "Nesprávné nastavení Socket Serveru pro UDP přenos (zkontrolujte adresu " "Socket Serveru a port)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Nepodařilo se vytvořit připojení" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Soubor nedostupný" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Spuštěno obnovení filelistu" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Transfer Port (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Šifrovaný Transfer Port (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Search Port (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " DHT Port (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Selhalo získání externí IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Spuštěno obnovení filelistu" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Spuštěno obnovení filelistu" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Nelze odeslat soubor %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Blokováno příchozí spojení k " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Odpojený uživatel opouštějící hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Velikost nesouhlasí" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH nesouhlasí" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/de.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/de.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/de.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/de.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Jackl , 2018\n" "Language-Team: German (https://www.transifex.com/tehnick/teams/11818/de/)\n" @@ -22,23 +22,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "verwerfen" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) hat die gleiche CID {%3%} wie %4% (%5%), wird ignoriert" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Das Aushandeln des Basisprotokolls ist fehlgeschlagen." -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -46,87 +46,95 @@ "Der Hub verwendet möglicherweise eine alte Version des ADC. Bitte raten Sie " "dem Besitzer zu einem Upgrade." -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% wurde von %2% hinausgeworfen: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% wurde hinausgeworfen: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Es wird nicht auf Verbindungen gewartet – bitte starten Sie %1% neu." -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Fehler beim Komprimieren" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Fehler beim Dekomprimieren " -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Zeitüberschreitung der Verbindung" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Verbindung geschlossen" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "maximale Befehlslänge überschritten" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "getrennt" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "gesandt " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "offline" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "alle Download-Slots in Anspruch genommen" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Verbindungsfähigkeit wiederhergestellt" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Verbindungsfähigkeitsfehler: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Beste Verbindungseinstellungen werden festgelegt …" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "%1% Port(s) können nicht geöffnet werden; Verbindungseinstellungen müssen " "manuell konfiguriert werden" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Öffentliche IP-Adresse entdeckt, es wird der aktive Modus mit direkter " "Verbindung gewählt." -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "lokales Netzwerk mit möglichem NAT entdeckt, es wird versucht, die Ports mit " "UPnP zu öffnen…" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -143,236 +151,323 @@ "Vielleicht möchten Sie für eine bessere Verbindungsfähigkeit Ihre Verbindung " "manuell einrichten." -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr " Übertragung (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr " Suche (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr " DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Verbindungsfähigkeit:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "kein privater Schlüssel ausgewählt" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "keine Zertifikatsdatei ausgewählt" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Fehler beim Erstellen des Zertifikats" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS deaktiviert, keine Zertifikatsdatei gesetzt" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "neues TLS-Zertifikat erstellt" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS desaktiviert, Erstellen des Zertifikats fehlgeschlagen: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Laden der Zertifikatsdatei fehlgeschlagen" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Laden des privaten Schlüssels fehlgeschlagen" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Hash-Datenbank" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "gemeinsam genutzte Dateien" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Download-Warteschlange" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Anwender" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Dem Verzeichnis fehlt das Namensattribut." -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: blockierte ausgehende Verbindung zu " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "ungültige Größe" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Antwort passt nicht zur Anfrage" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Zieldatei konnte nicht geöffnet werden: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "vollständiger Baum passt nicht zu TTH-Wurzel" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "keine Slots verfügbar" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Datei nicht verfügbar" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Benutzer hinauswerfen" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Benutzer umleiten" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Gruppe automatisch verbinden (umgewandelt)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Hashing fehlgeschlagen: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Hashing beendet: %1% (%2% at %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Hashing beendet: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Hashing beendet: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Fehler beim Speichern der Hash-Daten: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Hash-Datei kann nicht gelesen werden." -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Fehler beim Erstellen der Hash-Datei: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Hash-Datenbank neu erstellt" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nicht gemeinsam benutzt; berechnete CRC32 passt nicht zur gefundenen SFV-" "Datei" -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Fehler beim Hashing %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Übertragungsport (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Endlose Weiterleitungsschleife (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "keine UPnP-Implementierung verfügbar" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Ein anderer Versuch UPnP-Ports zuzuordnen ist im Gange …" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Initialisierung der Schnittstelle %1% ist fehlgeschlagen" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Übertragungsport (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Die Netzwerkschnittstelle %1% konnte den Port %2% %3% nicht zuordnen." + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " verschlüsselte Übertragung an Port (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Suchport (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " DHT-Port (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Erfolgreich erstellte Portzuordnungen (TCP: %1%, UDP: %2%, TLS: %3%, DHT: " +"%4%), zugeordnet unter Benutzung der Schnittstelle %5%" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"erfolgreich erstellte Portzuordnungen (TCP: %1%, UDP: %2%, TLS: %3%), " +"zugeordnet unter Benutzung der Schnittstelle %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Externe IP konnte nicht erlangt werden." + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Portzuordnungen konnten nicht erstellt werden." + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Portzuordnungen mit der Schnittstelle %1% wurden erfolgreich entfernt." + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" +"Portzuordnungen mit der Schnittstelle %1% konnten nicht entfernt werden." + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick unbekannt)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Thema des Hubs:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " auf " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "kein benötigter Teil" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "TTH-Alternativen werden gesucht für: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "" "In Ihrem gemeinsamen Verzeichnis exisitert bereits eine Datei mit dem " "gleichen Hash-Wert." -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Diese Datei wurde bereits in die Warteschlange eingereiht." -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" "In der Warteschlange exisitert bereits eine Datei mit einer " "unterschiedlichen Größe." -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" "In der Warteschlange exisitert bereits eine Datei mit einer " "unterschiedlichen TTH-Wurzel." -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Sie versuchen eine Datei von sich selbst herunterzuladen!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" "In der Warteschlange existiert bereits eine Datei mit einer " "unterschiedlichen TTH-Wurzel." -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Der Download dieser Datei ist bereits abgeschlossen." -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Zieldateiname zu lang" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -380,163 +475,163 @@ "ungültige Zieldatei (fehlendes Verzeichnis, prüfen Sie die Einstellung des " "Standard-Download-Verzeichnisses)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Datei exisitiert bereits am Zielspeicherort." -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "doppelte Quelle: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Ziel entfernt" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Zieldatei fehlt oder hat die falsche Größe" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" "Ziel konnte nicht von %1% nach %2% verschoben werden (%3%); wurde in %4% " "umbenannt" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Ziel konnte weder von %1% nach %2% verschoben (%3%) noch in %4% umbenannt " "(%5%) werden" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Dateiliste konnte nicht geöffnet werden: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Passt zu Datei %2%" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Zielverzeichnis für dieses Element ist nicht verfügbar: %1%; pausiert dieses " "Warteschlangenelement." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32-Unstimmigkeit (SFV-Prüfung)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1%: Passt zu Datei %2%" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL-Fehler: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "jede" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Komprimiert" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokument" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "ausführbare Datei" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Bild" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Verzeichnis" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD-Image" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Suche wieder aktiviert" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Suche deaktiviert: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "heruntergeladen von" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "ungültiger Suchtypname" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Dieser Suchtyp existiert bereits." -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "kein derartiger Suchtyp" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Fehler: Einstellung nicht gefunden!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Kern Einstellungen" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Ändern der Kerneinstellung " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "kein Verzeichnis angegeben" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Verzeichnis ist versteckt" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "" "Das temporäre Download-Verzeichnis kann nicht gemeinsam genutzt werden." -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" "Beim Hashing des Verzeichnisses %1% wurde ein ungültiger Dateiname gefunden." -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Überspringe Share-File: %1% (Größe: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Überspringe temporäres Share-File: %1% (Größe: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -544,7 +639,7 @@ "Doppelte Datei wird nicht gemeinsam benutzt: %1% (Größe: %2% B) Duplikat " "passt zu: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -552,49 +647,49 @@ "Die Dateiliste wird gerade erneuert. Bitte warten Sie, bis dies " "abgeschlossen ist, bevor Sie die Liste erneut erneuern." -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Erneuern der Dateiliste fehlgeschlagen: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Erneuern der Dateiliste eingeleitet" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Erneuern der Dateiliste abgeschlossen" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Dateiliste %1% erzeugt" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "unbekannter Fehler: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Der Aufbau der Verbindung durch den SOCKS-Server ist gescheitert." -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Der SOCKS-Server verlangt Authentifizierung." -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "Der SOCKS-Server unterstützt keine Authentifizierung mittels Anmeldename und " "Passwort" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Die Authentifizierung des SOCKS-Servers ist fehlgeschlagen. (Anmeldename/" "Passwort falsch?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -602,173 +697,115 @@ "Einrichtung des SOCKS-Servers für UDP-Relay ist fehlgeschlagen (prüfen Sie " "SOCKS-Adresse und Port)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Thread kann nicht erstellt werden" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "keine UPnP-Implementierung verfügbar" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Ein anderer Versuch UPnP-Ports zuzuordnen ist im Gange …" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Initialisierung der Schnittstelle %1% ist fehlgeschlagen" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Übertragungsport (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Die Netzwerkschnittstelle %1% konnte den Port %2% %3% nicht zuordnen." - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " verschlüsselte Übertragung an Port (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Suchport (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " DHT-Port (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Erfolgreich erstellte Portzuordnungen (TCP: %1%, UDP: %2%, TLS: %3%, DHT: " -"%4%), zugeordnet unter Benutzung der Schnittstelle %5%" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"erfolgreich erstellte Portzuordnungen (TCP: %1%, UDP: %2%, TLS: %3%), " -"zugeordnet unter Benutzung der Schnittstelle %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Externe IP konnte nicht erlangt werden." - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Portzuordnungen konnten nicht erstellt werden." - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Portzuordnungen mit der Schnittstelle %1% wurden erfolgreich entfernt." - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" -"Portzuordnungen mit der Schnittstelle %1% konnten nicht entfernt werden." - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Verbindung geschlossen" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Datei %1% kann nicht gesandt werden: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Eingehende Verbindung wurde blockiert zu " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Der Benutzer, dessen Verbindung getrennt wurde, verließ den Hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "ungültige Daten" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Nicht-UTF-8-Daten in einer ADC-Verbindung" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH-Unstimmigkeit" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "mehr Byte geschrieben als angefragt" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/el.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/el.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/el.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/el.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Konstantinos Georgokitsos , 2018\n" "Language-Team: Greek (https://www.transifex.com/tehnick/teams/11818/el/)\n" @@ -22,23 +22,23 @@ msgid "" msgstr "<Εισάγετε συμβολοσειρά>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Απόρριψη" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) έχει ίδιο CID {%3%} όπως %4% (%5%), παράβλεψη" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Αποτυχία διαπραγματεύσεων βασικού πρωτοκόλλου " -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -46,87 +46,95 @@ "Πιθανών ο κόμβος να χρησιμοποιεί παλιά έκδοση ADC, παρακαλώ να ενθαρρύνετε " "τον ιδιοκτήτη να αναβαθμίσει" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% αποβλήθηκε από %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% αποβλήθηκε: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Δεν παρακολουθούνται συνδέσεις - παρακαλώ επανακινήστε %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Σφάλμα κατά την διάρκεια συμπίεσης" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Σφάλμα κατά την διάρκεια αποσυμπίεσης" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Λήξη χρόνου σύνδεσης" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Τερματίστηκε η σύνδεση" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Υπέρβαση μεγίστου μήκος εντολής" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Αποσυνδέθηκε" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Σταλμένα " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Χωρίς σύνδεση" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Όλες οι θέσεις μεταφόρτωσης είναι κατειλημμένες" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Αποκατάσταση συνδεσιμότητας" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Αποκατάσταση συνδεσιμότητας" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Καθορισμός της καλύτερης ρύθμισης συνδέσεων... " -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Αδυναμία να ανοιχτεί η(οι) θύρα(-ες) %1%. ρυθμίσεις συνδέσεων πρέπει να " "δοθούν χειροκίνητα" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Ανιχνεύτηκε δημόσια διεύθυνση IP, επιλέχτηκε ενεργή λειτουργία με απευθείας " "σύνδεση" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "Ανιχνεύτηκε τοπικό δίκτυο, πιθανών με NAT, προσπάθεια αντιστοίχισης θυρών με " "UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -142,228 +150,312 @@ "Αυτόματη ρύθμιση της ενεργής λειτουργίας απέτυχε. Παρακαλώ ρυθμίστε την " "σύνδεση χειροκίνητα για καλύτερη διασύνδεση" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Μεταφορά (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Αναζήτηση (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Επαναφορά σύνδεσης" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Δεν έχει επιλεχθεί αρχείο ιδιωτικού κλειδιού " -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Δεν έχει επιλεχθεί αρχείο πιστοποιητικού" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Σφάλμα παραγωγής πιστοποιητικού" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "Απενεργοποιήθηκε TLS, δεν ορίστηκε αρχείο πιστοποιητικού" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Δημιουργήθηκε νέο πιστοποιητικό TLS " -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "Απενεργοποιήθηκε TLS, δεν ορίστηκε αρχείο πιστοποιητικού" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Αποτυχία φόρτωσης αρχείου πιστοποιητικού" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Αποτυχία φόρτωσης αρχείου ιδιωτικού κλειδιού" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Βάση δεδομένων αποτυπώματος" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Κοινόχρηστα Αρχεία" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Ουρά Μεταφόρτωσης" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Χρήστες" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Κατάλογος δεν έχει γνώρισμα ονόματος" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Αποτροπή εξερχόμενης σύνδεσης σε " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Μη έγκυρο μέγεθος" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Απάντηση δεν αντιστοιχεί στην αίτηση" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Αδύνατο το άνοιγμα του αρχείου προορισμού: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Πλήρες δέντρο δεν αντιστοιχεί στη ρίζα TTH" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Δεν υπάρχουν διαθέσιμες θέσεις" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "Το αρχείο δεν είναι διαθέσιμο" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Αποβολή χρήστη(-ών)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Προώθησε χρήστη(-ες)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Αυτόματη σύνδεση ομάδας (μετατράπηκε)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Αναζήτηση επανενεργοποιήθηκε" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Αποτύπωση ολοκληρώθηκε: %1% (%2% σε %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Αποτύπωση ολοκληρώθηκε: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Αποτύπωση ολοκληρώθηκε: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Δεν ήταν δυνατή η ανάγνωση του αρχείου δεδομένων αποτύπωσης " -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Δεν ήταν δυνατή η ανάγνωση του αρχείου δεδομένων αποτύπωσης" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Δεν ήταν δυνατή η ανάγνωση του αρχείου δεδομένων αποτύπωσης" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Ανακατασκευάστηκε η βάση δεδομένων αποτύπωσης" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% δεν μοιράστηκε; το υπολογισμένο CRC32 δεν ταιριάζε με αυτό που βρίσκεται " "στο αρχείο SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Σφάλμα αποτύπωσης %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Θύρα Μεταφοράς (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Ατελείωτος βρόγχος προώθησης (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Το αρχείο δεν είναι διαθέσιμο" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Μια άλλη προσπάθεια αντιστοίχηση θυρών είναι σε εξέλιξη " + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Εκκίνηση ανανέωσης λίστας αρχείων" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Θύρα Μεταφοράς (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Η διεπαφή %1% απέτυχε να αντιστοιχήσει τη θύρα %2% %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Κρυπτογραφημένη Θύρα Μεταφοράς (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Θύρα Αναζήτησης (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " Θύρα DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Επιτυχή δημιουργία αντιστοίχησης θυρών (TCP: %1%, UDP: %2%, TLS: %3%), " +"αντιστοίχηση χρησιμοποιώντας την διεπαφή %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Αποτυχία ανάκτησης εξωτερικού IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Αδυναμία δημιουργίας νήματος" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Έναρξη ανανέωσης λίστας αρχείων" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Έναρξη ανανέωσης λίστας αρχείων" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Άγνωστο ψευδώνυμο)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Θέμα κόμβου:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " σε " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Μέρος δεν χρειάζεται " -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Αναζητούνται εναλλακτικά ΤΤΗ για: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Υπάρχει ήδη αρχείο με ίδιο αποτύπωμα στο κοινόχρηστό σας" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Το αρχείο είναι ήδη στην ουρά" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Υπάρχει ήδη αρχείο με διαφορετικό μέγεθος στην ουρά" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Υπάρχει ήδη αρχείο με διαφορετική ρίζα ΤΤΗ στην ουρά" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Προσπαθείτε να μεταφορτώσετε από τον εαυτό σας!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Υπάρχει ήδη αρχείο με διαφορετική ρίζα ΤΤΗ στην ουρά" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Αυτό το αρχείο είναι ήδη σε αναμονή" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Πολύ μακρύ όνομα αρχείου προορισμού" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -371,159 +463,159 @@ "Μη έγκυρο αρχείο προορισμού (λείπει φάκελος, ελέγξτε την ρύθμιση του " "προεπιλεγμένου κατάλογο λήψης)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" "Ένα αρχείο με ίδιο ή μεγαλύτερο μέγεθος υπάρχει ήδη στην τοποθεσία προορισμού" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Διπλότυπη πηγή: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Αφαιρέθηκε ο προορισμός" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Το αρχείο προορισμού λείπει ή έχει λάθος μέγεθος" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Αδυναμία μετακίνησης %1% σε %2% (%3%). μετονομάστηκε σε %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Αδυναμία μετακίνησης %1% σε %2% (%3%) ούτε να μετονομαστεί σε %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Αδυναμία να ανοιχτεί λίστα αρχείων: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Ταίριασε αρχείο %2%" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Ασυνέπεια CRC32 (Έλεγχος SFV)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Σφάλμα SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Οποιοδήποτε" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Ήχος" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Συμπιεσμένο" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Έγγραφο" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Εκτελέσιμο" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Εικόνα" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Βίντεο" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Φάκελος" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Εικόνα CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Ενεργοποιήθηκε πάλι η αναζήτηση" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Ενεργοποιήθηκε πάλι η αναζήτηση" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "έχει ληφθεί από" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Μη έγκυρο όνομα τύπου αναζήτησης" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Αυτός ο τύπος αναζήτησης υπάρχει ήδη" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Δεν υπάρχει τέτοιος τύπος αναζήτησης" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Σφάλμα: η ρύθμιση δεν βρέθηκε! " -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Αλλαγή ρύθμισής πυρήνα " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Δεν ορίστηκε κατάλογος" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Ο κατάλογος μοιράζεται ήδη" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Ο προσωρινώς κατάλογος λήψεων δεν μπορεί να μοιραστεί" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" "Βρέθηκε μη έγκυρο όνομα αρχείου καάτα την διάρκεια αποτύπωσης του κατάλογου " "%1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -531,7 +623,7 @@ "Το διπλότυπο αρχείο δεν θα μοιραστεί: %1% (Μέγεθος: %2% B) Ταίριασμα " "διπλότυπου με: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -539,47 +631,47 @@ "Ανανέωση λίστας αρχείων σε εξέλιξη, παρακαλώ περιμένετε να ολοκληρωθεί πριν " "ανανεώσετε ξανά" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Ολοκληρώθηκε η ανανέωση της λίστας αρχείων" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Εκκίνηση ανανέωσης της λίστας αρχείων" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Ολοκληρώθηκε η ανανέωση της λίστας αρχείων" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Εκκίνηση ανανέωσης της λίστας αρχείων" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Άγνωστο λάθος: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Απέτυχε η σύνδεση του εξυπηρετητή socks" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Ο εξυπηρετητής socks απαιτεί πιστοποίηση" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "Ο εξυπηρετητής socks δεν υποστηρίζει πιστοποίηση με όνομα χρήστη / κωδικό" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "πιστοποίηση του εξυπηρετητή socks απέτυχε (λάθος όνομα χρήστη / κωδικός)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -587,170 +679,115 @@ "Αδυναμία ρύθμισης του εξυπηρετητή socks για αναμετάδοση UDP (ελέγξτε " "διεύθυνση και θύρα socks)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Αδυναμία δημιουργίας νήματος" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Το αρχείο δεν είναι διαθέσιμο" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Μια άλλη προσπάθεια αντιστοίχηση θυρών είναι σε εξέλιξη " - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Εκκίνηση ανανέωσης λίστας αρχείων" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Θύρα Μεταφοράς (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Η διεπαφή %1% απέτυχε να αντιστοιχήσει τη θύρα %2% %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Κρυπτογραφημένη Θύρα Μεταφοράς (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Θύρα Αναζήτησης (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " Θύρα DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Επιτυχή δημιουργία αντιστοίχησης θυρών (TCP: %1%, UDP: %2%, TLS: %3%), " -"αντιστοίχηση χρησιμοποιώντας την διεπαφή %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Αποτυχία ανάκτησης εξωτερικού IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Αδυναμία δημιουργίας νήματος" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Έναρξη ανανέωσης λίστας αρχείων" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Έναρξη ανανέωσης λίστας αρχείων" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Η σύνδεση έκλεισε" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Αδύνατο να σταλθεί το αρχείο %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Φραγή εισερχόμενης σύνδεσης σε " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Αποσυνδεδεμένος χρήστης αποχωρεί από τον κόμβο: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Μη έγκυρο μέγεθος" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Δεδομένα μη-UTF-8 σε σύνδεση ADC" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Ασυνέπεια TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Γράφηκαν περισσότερα bytes απ' ότι αιτήθηκαν" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/en.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/en.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/en.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/en.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,707 +21,743 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" msgstr "" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" msgstr "" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/es.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/es.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/es.po 2018-10-20 10:00:26.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/es.po 2019-05-06 22:23:37.000000000 +0000 @@ -2,130 +2,143 @@ # Copyright (C) YEAR EiskaltDC++ team # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# +# Translators: +# Boris Pek , 2017 +# Klondike klondikeño , 2018 +# Gustavo Alvarez Lopez , 2019 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Klondike klondikeño , 2018\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" +"PO-Revision-Date: 2017-06-18 13:35+0000\n" +"Last-Translator: Gustavo Alvarez Lopez , 2019\n" "Language-Team: Spanish (https://www.transifex.com/tehnick/teams/11818/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../ADLSearch.cpp:40 msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Descartar" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) tiene el mismo CID {%3%} que %4% (%5%), ignorando" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "No se ha podido negociar el protocolo base" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" msgstr "" -"El hub probablemente utiliza una versión antigua de ADC, por favor, Inste al" -" administrador a actualizarlo" +"El hub probablemente utiliza una versión antigua de ADC, por favor, Inste al " +"administrador a actualizarlo" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% ha sido expulsado por %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% ha sido expulsado: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "No se están esperando por nuevas conexiones - por favor reinicie %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Error durante la compresión" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Error durante la descompresión" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Conexión fuera de tiempo" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Conexión cerrada" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Tamaño máximo del comando excedido" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Desconectado" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Enviado " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Desconectado" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Todos los slots de descarga están ocupados" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Conectividad restaurada" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Error de conectividad: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "Bloqueado una C-C conexión al hub ('%1%:%2%';solicitado desde '%3%')" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" +"Bloqueando '%1%', posible DDoS detectado (originado desde el hub '%2%')" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Determinando la mejor configuración de conexión..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" -"Unable to open %1% port(s); connectivity settings must be configured " -"manually" +"Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "No se puedo abrir el/los puerto(s) %1%. Tendrá que configurar su conexión " "manualmente" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "IP publica detectada, deleccionando modo activo con conexión directa" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -133,7 +146,7 @@ "Detectada posible red local con NAT, tratando de redirigir los puertos " "usando UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,228 +154,314 @@ "La configuración automática del modo activo ha fallado. Necesita configurar " "su conexión manualmente para una mejor conectividad" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Transferencia (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Búsqueda (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Conectividad: " -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "No se ha elegido archivo de claves privadas" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "No se ha elegido archivo de certificado" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Error al generar certificado" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS desactivado, no ha definido un certificado" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Nuevo certificado TLS generado" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS desactivado, no se pudo generar el certificado: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Carga del certificado fallida" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Fallo al cargar la llave privada" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Base de datos de índices" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Archivos compartidos" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Cola de Descargas" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Usuarios" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "Extensión de archivo inválida (debe ser .xml o .bz2)" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Al directorio le falta el atributo: nombre." -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Bloqueada conexión saliente a " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Tamaño no válido" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "La respuesta no encaja con la petición" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "No se puede abrir el archivo de destino: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "El árbol TTH no encaja con la raíz" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "No hay slots disponibles" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Archivo no disponible" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Expulsar usuario(s)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Redireccionar usuario(s)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Grupo de conexión automática (convertido)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "URL Invalida: %1%" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Indexado fallido: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Indexado finalizado: %1% (%2% a %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Indexado finalizado: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Indexado finalizado: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Error al guardar información de indexado: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "No se pudo leer el archivo índices" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Error al crear el archivo índice: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Base de datos de índices reconstruida" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% no compartido; el CRC32 calculado no concuerda con el encontrado en el " "archivo SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Error en el indexado %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Puerto de Transferencia (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Bucle de redirección infinito (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "No hay disponible una implementación de UPnP" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Hay otra redirección de puertos UPnP en curso ahora mismo..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Fallo al inicializar la interfaz %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Puerto de Transferencia (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "La interfaz %1% no ha podido redirigir el puerto %2% %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Puerto de Transferencias Cifradas (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Puerto de búsquedas (1%% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " Puerto DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Mapa de puertos creado satisfactoriamente (TCP: %1%, UDP: %2%, TLS: %3%, DHT " +"%4%), usando la interfaz %5%" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Redirección de puertos realizada con éxito (TCP: %1%, UDP: %2%, TLS: %3%), " +"la redirección ha usando la interfaz %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Fallo al recibir la IP externa" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Fallo al crear la redirección de puertos" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Eliminadas con éxito las redirecciones de puertos con la interfaz %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "No se pudo eliminar las redirecciones de puertos con la interfaz %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick desconocido)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Tema del hub:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "Demasiado pequeño para compartir" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "Denegado para enviar archivo" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " a " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "No se necesitan partes" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Buscando alternativas TTH para: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Un archivo con el mismo TTH ya está compartido" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Este archivo ya está en la cola" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Un archivo de distinto tamaño ya existe en su cola" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Un archivo de distinto TTH ya existe en su cola" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "¡Intentas descargar de ti mismo!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Un archivo con raíz TTH distinta ya existe en su cola" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Este archivo ya ha acabado de descargarse" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Nombre del archivo destino demasiado largo" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -370,217 +469,214 @@ "Archivo de destino inválido (carpeta no encontrada, revise la opción de " "carpeta de descargas por defecto)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Y a existe un archivo en la ubicación destino" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Fuente duplicada: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Archivo destino eliminado" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "El archivo destino no existe o tiene un tamaño incorrecto" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "No se puede mover %1% a %2% (%3%); renombrando a %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "No se puede mover %1% to %2% (%3%) tampoco renombrar a %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Imposible abrir lista de archivos: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: encajó con el archivo %2%" -#: ../QueueManager.cpp:1805 -msgid "" -"Target path for this item is not available: %1%; pause this queue item." +#: ../QueueManager.cpp:1794 +msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "La ruta de destino para este elemento no está disponible: %1% pausando este " "elemento en la cola." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Inconsistencia de CRC32 (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : Emparejados %2% archivos" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL Error: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Cualquiera" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Comprimidos" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Documento" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Ejecutable" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Imagen" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Vídeo" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Directorio" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Imagen de CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Búsqueda habilitada de nuevo" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Búsqueda desactivada: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "descargado de" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Nombre del tipo a buscar invalido" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Este tipo de búsquedas ya existe" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Tipo de búsqueda no encontrada" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Error: ¡configuración no encontrada!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Configuración del núcleo" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Cambiada la configuración del núcleo " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "No se ha especificado un directorio" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "El directorio está escondido" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "La carpeta temporal de descargas no puede compartirse" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -"Encontrado nombre de archivo inválido mientras que se indexaba la carpeta " -"%1%" +"Encontrado nombre de archivo inválido mientras que se indexaba la carpeta %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Saltar archivo compartido: %1% (Tamaño: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Saltar archivo temporal compartido %1% (Tamaño: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -"El archivo duplicado %1% no será compartido (Tamaño: %2% B) Duplicado de: " -"%3%" +"El archivo duplicado %1% no será compartido (Tamaño: %2% B) Duplicado de: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" -"File list refresh in progress, please wait for it to finish before trying to" -" refresh again" +"File list refresh in progress, please wait for it to finish before trying to " +"refresh again" msgstr "" "Refresco de la lista en curso, por favor espere a que termine este proceso " "antes de refrescar de nuevo" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Refresco de la lista Fallido: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Iniciando refresco de la lista de archivos" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Refresco de la lista de archivos terminada" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Lista de archivos %1% generada" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Error desconocido: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "El servidor socks falló al establecer la conexión" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "El servidor socks requiere autentificación" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "El servidor socks no soporta autentificación mediante usuario y contraseña" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "No se ha establecido conexión con el servidor socks (¿usuario o contraseña " "erróneos?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -588,172 +684,118 @@ "Fallada la conexión con el servidor socks por retraso UDP (revise la " "dirección del servidor socks y el puerto)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Fue imposible crear el hilo" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "No hay disponible una implementación de UPnP" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Hay otra redirección de puertos UPnP en curso ahora mismo..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Fallo al inicializar la interfaz %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Puerto de Transferencia (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "La interfaz %1% no ha podido redirigir el puerto %2% %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Puerto de Transferencias Cifradas (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Puerto de búsquedas (1%% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " Puerto DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%)," -" mapped using the %5% interface" -msgstr "" -"Mapa de puertos creado satisfactoriamente (TCP: %1%, UDP: %2%, TLS: %3%, DHT" -" %4%), usando la interfaz %5%" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Redirección de puertos realizada con éxito (TCP: %1%, UDP: %2%, TLS: %3%), " -"la redirección ha usando la interfaz %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Fallo al recibir la IP externa" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Fallo al crear la redirección de puertos" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Eliminadas con éxito las redirecciones de puertos con la interfaz %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "No se pudo eliminar las redirecciones de puertos con la interfaz %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "La conexión ya está establecida." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Imposible enviar archivo %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Bloqueada conexión de entrada a " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Se ha desconectado al usuario que ha dejado el hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Datos inválidos" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Datos no-UTF8 en la conexión ADC" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Incnsistencia TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Más bytes escritos de los requeridos" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" + +#~ msgid "%1% (%2%)" +#~ msgstr "%1%(%2%)" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/eu.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/eu.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/eu.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/eu.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Egoitz Rodriguez Obieta , 2017\n" "Language-Team: Basque (https://www.transifex.com/tehnick/teams/11818/eu/)\n" @@ -22,105 +22,113 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Baztertu" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" msgstr "" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Hutsa konprimatu bitartean" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Konexio denbora muga" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Konexioa itxita" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Deskonektaturik" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Bidalitakoa" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Lerroz kanpo" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Konektagarritasuna eraberritua" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Konektagarritasun hutsa: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Konektibitate konfigurazio onena zehazten..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "IP publikoa detektatuta, zuzeneko konexio modu aktiboa aukeratuz" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -128,603 +136,631 @@ "Posible tokiko sarea NAT-ekin detektatua, portuak UPnP erabiliz mapea tzen " "saiatzen..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Transferitu (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Bilatu (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Konektagarritasuna:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Hutsa ziurtagiri fitxategia kargatzean" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Hutsa gako pribatua kargatzean" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Partekatutako fitxategiak" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Deskarga Ilara" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Erabiltzaileak" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Tamaina baliogabea" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Ez dago slot-ik eskuragarri" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Kanporatutako erabiltzailea(k)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Hash datu base berreraikia" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Kanpoko IP lortzeak huts egin du" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Hub gaia:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "-ra" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Behar ez den zatia" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Fitxategi hau dagoeneko ilaran dago" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Xede fitxategi izena luzeegia" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" msgstr "" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Fitxategia lehendik existitzen da xede tokian" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Xedea kendu" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Helburuko fitxategia falta da edo okerreko tamaina" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 koherentzia eza (SFV-Egiaztatu)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Edozein" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Soinu" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Komprimitutakoak" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokumentuak" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Exekutagarriak" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Irudiak" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Bideoak" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Direktorioak" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD irudia" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Bilatu gaituta berriro" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Muinaren ezarpena" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Aldatu muinaren ezarpena" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Eskutatutako direktorioa" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Kanpoko IP lortzeak huts egin du" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Konexioa badago lehendik." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Datu baliogabeak" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH koherentzia eza" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/fr.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/fr.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/fr.po 2018-10-12 23:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/fr.po 2019-05-06 22:23:37.000000000 +0000 @@ -3,14 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Boris Pek , 2017 +# Alexandre Wallimann , 2019 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-10-13 01:23+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Alexandre Wallimann , 2018\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" +"PO-Revision-Date: 2017-06-18 13:35+0000\n" +"Last-Translator: Alexandre Wallimann , 2019\n" "Language-Team: French (https://www.transifex.com/tehnick/teams/11818/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -22,23 +26,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Abandonner" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) a le même CID {%3%} que %4% (%5%), ignoré" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Impossible de négocier le protocole de base" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -46,85 +50,93 @@ "Le serveur utilise probablement une ancienne version d'ADC, veuillez " "encourager l'hébergeur à mettre à jour son programme." -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% a été expulsé par %2% : %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% a été expulsé: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Échec de l'écoute des connexions - veuillez redémarrer %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Erreur lors de la compression" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Erreur lors de la décompression" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Temps d'attente dépassé" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Connexion fermée" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Dépassement de la longueur maximale de la commande" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Déconnecté" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Envoyé" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Déconnecté" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Tous les slots de téléchargement sont pris" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Connectivité restaurée" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Erreur de connectivité : %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "Connexion C-C à un serveur bloquée ('%1%:%2%'; requête depuis '%3%')" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "Blocage de '%1%', éventuelle DDoS détectée (serveur source '%2%')" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Recherche des meilleurs paramètres de connexion..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Impossible d'ouvrir le(s) port(s) %1% ; les paramètres doivent être " "configurés manuellement" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "IP publique détectée, sélection du mode actif avec connexion directe" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -132,7 +144,7 @@ "Réseau local avec un possible NAT détecté, tentative de redirection des " "ports avec UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -140,231 +152,317 @@ "La configuration automatique du mode actif a échoué. Vous devriez la " "configurer manuellement pour de meilleurs transferts" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Transfert (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Recherche (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Connexion:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Aucun fichier de clé privée choisi" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Aucun fichier de certificat choisi" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Erreur lors de la génération du certificat" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS désactivé, aucun fichier de certificat défini" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Nouveau certificat TLS généré" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS désactivé, impossible de générer le certificat : %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Impossible de charger le certificat" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Impossible de charger la clé privée" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Base de données des hashs" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Fichiers Partagés" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Liste de Téléchargement" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Utilisateurs" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "Extension de liste de fichiers invalide (doit être .xml ou .bz2)" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Dossier sans nom" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Connexion sortante bloquée vers" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Taille invalide" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Le résultat ne correspond pas à la demande" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Impossible d'ouvrir le fichier cible : %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "La concaténation des clés ne correspond pas à la racine TTH" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Pas de slot disponible" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1% : Fichier indisponible" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Expulser l'/les utilisateur(s)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Rediriger l'/les utilisateur(s)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Groupe de connexion automatique" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "URL invalide: %1%" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Scan échoué : %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Scan terminé: %1% (%2% à %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Scan terminé: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Scan terminé : %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Erreur lors de la sauvegarde de la base de données : %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Erreur lors de la lecture de la base de données" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Erreur lors de la création de la base de données : %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Base de données re-créée" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% non partagé ; le CRC32 calculé ne correspond pas avec celui trouvé dans " "le fichier SFV ." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Erreur lors du scan de %1% : %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr "Port de transfert (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Redirection loop sans fin (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Pas d'implémentation UPnP disponible." + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Nouvelle tentative de redirection de port UPnP en cours..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Echec d'initialisation de l'interface %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "Port de transfert (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "L'interface %1% a échoué lors de la redirection des ports %2% %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Port de transfert crypté (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Port de recherche (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " Port DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Redirection de ports réussie (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"redirigés en utilisant l'interface %5%" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Redirection de ports réussie (TCP: %1%, UDP: %2%, TLS: %3%), redirigés en " +"utilisant l'interface %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Échec de la détection de l'IP externe" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Echec de création de redirection des ports" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Suppression des redirections de ports réussie avec l'interface %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Echec de suppression des redirections avec l'interface %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Pseudo inconnu)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Sujet du serveur:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "Partage trop petit pour être téléchargé" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "Go" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "Refus d'envoi de fichier" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "vers" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Aucun morceau nécessaire" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Recherche de TTH alternatifs pour: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Un fichier avec le même TTH existe déjà dans votre partage" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Ce fichier est déjà dans la liste de téléchargement" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" "Un fichier d'une taille différente existe dans la liste de téléchargement" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" "Un fichier avec une clé TTH différente existe déjà dans la liste de " "téléchargement" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Vous essayez de télécharger depuis vous-même !" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Un fichier avec un TTH différent existe déjà dans la file d'attente" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Le téléchargement de ce fichier est déjà terminé" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Nom du fichier cible trop long" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -372,163 +470,163 @@ "Fichier cible invalide (dossier manquant ; vérifier l'option du dossier des " "téléchargements par défaut)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Le fichier existe déjà à cette destination" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Source en double: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Cible enlevée" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Le fichier cible est introuvable ou n'a pas la bonne taille" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Impossible de déplacer %1% vers %2% (%3); renommé en %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Impossible de déplacer %1% vers %2% (%3) ou même de le renommer en %4% (%5)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Impossible d'ouvrir la liste de fichiers : %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: %2% fichier(s) correspond(ent)" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "Le chemin de cet élément n'est pas disponible: %1%; pause." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Incompatibilité CRC32 (Contrôle SFV)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : Correspond %2% fichiers" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Erreur SSL : %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Tout" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Compressé" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Document" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Éxécutable" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Image" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Vidéo" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Répertoire" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Image CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Recherche à nouveau activée" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Recherche désactivée : %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "téléchargé depuis" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Type de nom de recherche invalide" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Cette recherche existe déjà" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Pas de type de recherche de la sorte" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Erreur: paramètre absent !" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Paramètre Principal" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Changer les paramètres principaux" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Pas de dossier spécifié" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Répertoire déjà partagé" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Le dossier de téléchargement temporaire ne peut pas être partagé" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Nom de fichier invalide trouvé lors du scan du dossier %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Fichier partagé ignoré: %1% (Taille: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Fichier temporaire ignoré: %1% (Taille: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" "Ficher en double non partagé : %1% (Taille : %2% o) Est identique à : %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -536,49 +634,49 @@ "Mise à jour de la liste de fichiers en cours, veuillez attendre qu'elle se " "termine avant de ré-essayer" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Mise à jour de la liste de fichiers échouée : %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Mise à jour de la liste de fichiers commencée" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Mise à jour de la liste de fichiers terminée" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Liste de fichier %1% créée" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Erreur inconnue : 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Le serveur socks n'a pas pu établir de connexion" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Le serveur socks requiert une authentification" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "Le serveur socks ne supporte pas l'autentification par identifiant / mot de " "passe" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Échec lors de l'authentification au serveur socks (mauvais identifiant / mot " "de passe ?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -586,172 +684,118 @@ "Impossible de configurer le serveur socks en tant que relais UDP (vérifier " "l'adresse et le port du serveur socks)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Création du fil impossible" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Pas d'implémentation UPnP disponible." - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Nouvelle tentative de redirection de port UPnP en cours..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Echec d'initialisation de l'interface %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "Port de transfert (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "L'interface %1% a échoué lors de la redirection des ports %2% %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Port de transfert crypté (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Port de recherche (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " Port DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Redirection de ports réussie (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"redirigés en utilisant l'interface %5%" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Redirection de ports réussie (TCP: %1%, UDP: %2%, TLS: %3%), redirigés en " -"utilisant l'interface %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Échec de la détection de l'IP externe" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Echec de création de redirection des ports" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Suppression des redirections de ports réussie avec l'interface %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Echec de suppression des redirections avec l'interface %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Connexion déjà existante." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Impossible d'envoyer le fichier %1% : %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Connexion entrante bloquée vers " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Déconnexion de l'utilisateur quittant le serveur: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Donnée invalide" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Donnée non UTF-8 dans une connexion ADC" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d o" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f Kio" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f Kbits" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f Mio" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f Mbits" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f Gio" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f Gbits" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f Tio" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f Tbits" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f Pio" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f Pbits" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s o" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld o" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Incohérence de TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Plus d'octets écris que prévus" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" + +#~ msgid "%1% (%2%)" +#~ msgstr "%1% (%2%)" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/hu.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/hu.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/hu.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/hu.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Márk Lutring , 2018\n" "Language-Team: Hungarian (https://www.transifex.com/tehnick/teams/11818/" @@ -23,23 +23,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Eldob" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) CID-je {%3%} ugyanaz, mint %4% (%5%)-é, kihagyva" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Az alap protokoll egyeztetése sikertelen" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,86 +47,94 @@ "A hub vélhetően régi verziójú ADC protokollt használ, kérlek szólj a " "tulajnak, hogy frissítsen" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1%-t kirúgta %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% kirúgva: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Nem figyel kapcsolatokra - kérlek, indítsd újra a %1%-t" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Hiba a tömörítéskor" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Hiba a kicsomagoláskor" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Időtúllépés" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Kapcsolat lezárva" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "A maximális parancs hossz túllépve" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Szétkapcsolva" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Elküldve" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Kilépett" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Összes letöltési szál foglalt" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Kapcsolódás lehetősége visszaállítva" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Kapcsolódási hiba: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Legjobb kapcsolat beállítások felderítése..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "%1% port(ok) megnyitása sikertelen. A kapcsolatot kézzel kell beállítani" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Publikus IP cím sikeresen lekérdezve, aktív mód kiválasztása közvetlen " "kapcsolattal" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "Helyi hálózat és lehetséges NAT észlelve, kísérlet a portok feltérképezésére " "UPnP használatával ..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -142,227 +150,313 @@ "Az aktív mód automatikus beállítása nem sikerült. Érdemes lehet az aktív mód " "beállításait kézzel elvégezni, a jobb kapcsolatok érdekében." -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Átvitel (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Keresés (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Kapcsolatok: " -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Nincs kiválasztva privát kulcs fájl" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Nincs kiválasztva tanúsítvány fájl" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Hiba a tanúsítvány készítésekor" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS letiltva, nincs tanúsítvány fájl beállítva" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Új TLS tanúsítvány generálva" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS letiltva, a tanúsítvány fájl generálása sikertelen: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Nem sikerült betölteni a tanúsítvány fájlt" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Nem sikerült betölteni a pirvát kulcsot" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Hash adatbázis" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Megosztott fájlok" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Letöltési Sor" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Felhasználó(k)" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Hiányzik a könyvtár név attribútuma" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Blokkolt kimenő kapcsolat: " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Érvénytelen méret" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "A válasz nem felel meg a kérésnek" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Nem sikerült megnyitni a célfájlt a következő miatt: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "A teljes fa nem megfelelő a TTH gyökérhez" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Nincs szabad slot" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: A fájl nem elérhető" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Felhasználó(k) kirúgása" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Felhasználó(k) átirányítása" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Automatikusan csatlakozó hubok csoportja (konvertált)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Sikertelen indexelés: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Indexelés befejezve: %1% (%2%, %3%/s sebességgel)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Indexelés befejezve: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Indexelés befejezve: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Hiba a hash adatok mentésekor: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "A hash adatfájl beolvasása nem lehetséges" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Hiba a hash adatfájl létrehozásakor: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "A hash adatbázis újraépítve" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nincs megosztva. A kiszámított CRC32 nem egyezik az SFV fájlban lévővel." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Hiba a következő hashelésekor: %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Átviteli port (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Végtelen átirányítási kör (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "UPnP implementáció nem elérhető" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Egy másik UPnP port feltérképezés folyamatban van ..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "%1% interfész inicializálása nem sikerült" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Átviteli port (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "A(z) %1% interfésznek nem sikerült a(z) %2% %3% portok felderítése" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Titkosított átviteli port (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Keresési port (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " DHT port (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"A port-hozzárendelés sikeresen létrehozva (TCP: %1%, UDP: %2%, TLS: %3%), a " +"használt interfész: %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Külső IP lekérdezése sikertelen" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Nem sikerült létrehozni a port-hozzárendeléseket." + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "A port-hozzárendelés sikeresen törölve a következő interfésszel: %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" +"Nem sikerült megszüntetni a port-hozzárendeléseket a következő interfészen: " +"%1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick ismeretlen)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Hub topic:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "erre:" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Nem szükséges részlet" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "TTH alternatíva keresése: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "A megosztásodban már van egy fájl ugyanezzel a hash-hel" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "A fájl már a sorban van" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Egy különböző mérettel rendelkező fájl már van a sorban" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Egy különböző TTH gyökerű fájl már van a sorban" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Saját magadtól próbálsz meg letölteni!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Egy különböző TTH gyökerű fájl már van a sorban" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Ennek a fájlnak a letöltése már befejeződött" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "A cél fájlneve túl hosszú" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -370,163 +464,163 @@ "Érvénytelen célfájl (hiányzó könyvtár, ellenőrizd az alapértelmezett " "letöltési könyvtár beállításait)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "A fájl már létezik a megadott helyen" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Dupla forrás: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Cél eltávolítva" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "A cél fájl hiányzik vagy nem megfelelő méretű" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Sikertelen áthelyezés [%1% ide: %2% (%3%)]; átnevezve erre: %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Sikertelen áthelyezés [%1% ide: %2% (%3%)], vagy átnevezés [erre: %4% (%5)]" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Nem sikerült megnyitni a fájl-listát: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Találat: %2% fájl" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Cél útvonal ehhez az elemhez nem elérhető: %1%; szüneteltesse ezt a " "várakozási sor elemet" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 inkonzisztencia (SFV-Ellenőrzéskor)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1%: Találat: %2% fájl" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL Hiba: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Minden" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audió" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Tömörített" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokumentum" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Futtatható" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Kép" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Videó" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Könyvtár" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD képfájl" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Keresés ismét engedélyezve" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Keresés tiltva:%1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "letöltve" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Érvénytelen keresési feltétel" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "A megadott keresési feltétel már létezik" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Keresési feltétel nem található" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Hiba: Beállítás nem található!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Alapbeállítás" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Alapbeállítás megváltoztatása: " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nincs könyvtár megadva" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Rejtett könyvtár" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Az ideiglenes letöltési könyvtár nem megosztható" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" "Érvénytelen fájlnév található a következő könyvtárban indexelésekor: %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" "A felhasználó azt választotta, hogy a következő fájlt nem osztja meg: %1% " "(Méret: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" "A felhasználó azt választotta, hogy a következő ideiglenes fájlt nem osztja " "meg: %1% (Méret: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -534,7 +628,7 @@ "Többször meglévő fájl nem lesz megosztva: %1% (Méret: %2% B) Megegyezik " "ezzel: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -542,48 +636,48 @@ "A fájl-lista frissítése már folyamatban van. Várd meg, amíg befejeződik, " "mielőtt újra frissíteni próbálnál!" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Hiba a fájl-lista frissítésekor: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "A fájl-lista frissítése elkezdődött" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "A fájl-lista frissítése befejeződött" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Fájl-lista %1% létrehozva" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Ismeretlen hiba: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Nem sikerült a socks kiszolgálóhoz kapcsolódni" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "A socks kiszolgáló hitelesítést igényel" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "A socks kiszolgáló nem támogatja a bejelentkezési név / jelszó hitelesítést" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "A hitelesítés a socks kiszolgálónál nem sikerült (rossz felhasználói név/" "jelszó?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -591,172 +685,115 @@ "A socks kiszolgáló beállítása az UDP port továbbításra nem sikerült " "(ellenőrizd a kiszolgáló címét és a portot)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "A szál léterhozása sikertelen" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "UPnP implementáció nem elérhető" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Egy másik UPnP port feltérképezés folyamatban van ..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "%1% interfész inicializálása nem sikerült" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Átviteli port (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "A(z) %1% interfésznek nem sikerült a(z) %2% %3% portok felderítése" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Titkosított átviteli port (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Keresési port (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " DHT port (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"A port-hozzárendelés sikeresen létrehozva (TCP: %1%, UDP: %2%, TLS: %3%), a " -"használt interfész: %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Külső IP lekérdezése sikertelen" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Nem sikerült létrehozni a port-hozzárendeléseket." - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "A port-hozzárendelés sikeresen törölve a következő interfésszel: %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" -"Nem sikerült megszüntetni a port-hozzárendeléseket a következő interfészen: " -"%1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Kapcsolat lezárva" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "A fájl küldése sikertelen: %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Blokkolt bejövő kapcsolat innen: " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "A hubról kilépő felhasználó szétkapcsolva: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Érvénytelen adat" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Nem-UTF-8 adat az ADC kapcsolatban" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH inkonzisztencia" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "A kértnél több byte írása történt" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/it.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/it.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/it.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/it.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Stefano , 2018\n" "Language-Team: Italian (https://www.transifex.com/tehnick/teams/11818/it/)\n" @@ -22,23 +22,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Annulla" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) ha lo stesso CID {%3%} di %4% (%5%), ignorato." -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Errore durante la negoziazione del protocollo di base" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -46,87 +46,95 @@ "L'hub sta utilizzando una versione vecchia del protocollo ADC, incoraggia il " "proprietario dell'hub ad aggiornarlo" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% è stato espulso da %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% è stato espulso: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Non in attesa di connessioni - si prega di riavviare %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Errore durante la compressione" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Errore durante la decompressione" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Connessione in timeout" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Connessione chiusa" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "La lunghezza massima del commando è stata superata" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Disconnesso" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Inviato" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Non in linea" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Tutti gli slot per il download occupati" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Connettività ripristinata" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Connettività ripristinata" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Determinazione in corso delle impostazioni migliori di connessione..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Impossibile aprire la porta(e) %1%; le impostazioni sulla connettività " "devono essere configurate manualmente" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Indirizzo IP pubblico individuato, seleziona la modalità attiva con " "connessione diretta" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "Rivelato possible NAT nella rete locale, tentativo di mappatura delle porte " "usando UPnP in corso..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -142,228 +150,312 @@ "Impostazione automatica della modalità attiva fallita. Imposta la tua " "connessione manualmente per una migliore connettività" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Trasferimenti (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Ricerca (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Connettività ripristinata" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Nessun file per la chiave privata selezionato" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Nessun file di certificato selezionato" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Errore nel generare il certificato" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS disabilitato, nessun file di certificato impostato" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Generato il nuovo certificato TLS" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS disabilitato, nessun file di certificato impostato" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Impossibile caricare il file di certificato" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Impossibile caricare la chiave privata" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Indicizzazione database" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "File condivisi" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Coda download" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Utenti" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "La cartella non ha il come come attributo" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Bloccata connessione in uscita verso" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Dimensione non valida" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "La risposta non corrisponde alla richiesta" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Impossibile aprire il file di destinazione: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "L'albero completo non corrisponde alla TTH della radice" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Nessun slot disponibile" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "File non disponibile" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Espelli utente(i)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Rediretta utente(i)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Auto-connect group (converted)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Hashing fallito: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Indicizzazione terminata: %1% (%2% a %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Indicizzazione terminata: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Indicizzazione terminata: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Impossibile leggere il file dei dati di indicizzazione" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Impossibile leggere il file dei dati di indicizzazione" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Impossibile leggere il file dei dati di indicizzazione" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Database indicizzazione ricostruito" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% non condiviso; la CRC32 calcolata non corrisponde a quella trovata nel " "file SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Errore indicizzazione %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr "Porta trasferimenti (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Loop senza fine nella redirezione (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "File non disponibile" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Un altro tentativo di mappare la porta con UPnP è già in corso..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Inizio aggiornamento lista file" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "Porta trasferimenti (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "L'interfaccia %1% non è riuscita a mappare la porta %2% %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Porta trasferimenti criptati (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Porta ricerche (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "Porta DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Mappatura delle porte creata con successo (TCP: %1%, UDP: %2%, TLS:%3%), " +"mappatura effettuata usando l'interfaccia di rete %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Impossibile ottenere l'IP esterno" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Impossibile creare il thread" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Inizio aggiornamento lista file" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Inizio aggiornamento lista file" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick sconosciuto)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Argomento hub:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " a " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Nessuna parte necessaria" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Ricerca di alternative TTH per %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Un file con lo stesso hash è già presente nella tua condivisione" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Questo file è già nella coda" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Un file con un diversa dimensione è già presente nella coda" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Un file con un diverso TTH è già presente nella coda" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Stai cercando di scaricare da te stesso!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Un file con un TTH diverso è già presente nella coda" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Questo file è già nella coda" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Nome del file troppo lungo" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -371,157 +463,157 @@ "File di destinazione invalido ( cartella non esistente, controllare la " "directory di destinazione predefinata nelle impostazioni)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "File già esistente nella posizione di destinazione" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Fonte duplicata: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Obbiettivo rimosso" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "File di destinazione non presente o di taglia incorretta" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Impossibile spostare %1% in %2% (%3%); rinominato in %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "Impossibile spostare %1% in %2% (%3%) neppure rinominarlo in %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Impossibile aprire la lista file: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: %2% files corrispondono" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Percorso di destinazione per questo elemento non disponibile: %1%; " "sospendere questo elemento nella coda." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 non corretto (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1%: %2% files corrispondono." -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Errore SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Qualsiasi" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Compresso" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Documento" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Eseguibile" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Immagine" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Cartella" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTh" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Immagine CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Ricerca riabilitata" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Ricerca disabilitata: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "scaricato da" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Nome del tipo di ricerca non valido" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Il tipo di ricerca esiste già" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Tipo di ricerca non esistente" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Errore: impostazioni non trovate!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Cabmia le impostazioni del core" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nessuna cartella specificata" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Cartella già condivisa" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "La cartella degli scaricamenti temporanei non può essere condivisa" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Nome del file non valido nell'indicizzare la cartella %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -529,7 +621,7 @@ "I file duplicati non saranno condivisi: %1% (Dimensione: %2%) Corrispondenza " "rispetto: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -537,45 +629,45 @@ "Aggiornamento lista file in corso, attendi il termine prima di riprovare ad " "aggiornarla nuovamente" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Aggiornamento lista file terminato" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Inizio aggiornamento lista file" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Aggiornamento lista file terminato" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Inizio aggiornamento lista file" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Errore sconosciuto: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Il server sock ha fallito nel stabilire la connessione" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Il server sock richiede l'autentificazione" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Il server sock non supporta l'autentificazione con login / password" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Autentificazione al server sock fallita (login / password errati?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -583,170 +675,115 @@ "Fallito tentativo di connettersi al server SOCKS per il relay UDP " "(controllare indirizzo e porta SOCKS)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Impossibile creare il thread" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "File non disponibile" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Un altro tentativo di mappare la porta con UPnP è già in corso..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Inizio aggiornamento lista file" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "Porta trasferimenti (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "L'interfaccia %1% non è riuscita a mappare la porta %2% %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Porta trasferimenti criptati (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Porta ricerche (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "Porta DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Mappatura delle porte creata con successo (TCP: %1%, UDP: %2%, TLS:%3%), " -"mappatura effettuata usando l'interfaccia di rete %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Impossibile ottenere l'IP esterno" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Impossibile creare il thread" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Inizio aggiornamento lista file" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Inizio aggiornamento lista file" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Connessione chiusa" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Impossibile inviare il file %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Bloccata connessione entrante verso" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Disconnetti l'utente che lascia l'hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Dimensione non valida" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Dati non in UTF-8 in una connessione ADC" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Inconsistenza TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Sono stati scritti più byte di quelli richiesti" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/pl.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/pl.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/pl.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/pl.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Arahael , 2017\n" "Language-Team: Polish (https://www.transifex.com/tehnick/teams/11818/pl/)\n" @@ -24,23 +24,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Porzuć" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) ma ten sam CID {%3%} jak %4% (%5%), ignoruję" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Nie udało się wynegocjować pierwotnego protokołu" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -48,316 +48,405 @@ "Hub najprawdopodobniej używa starszej wersji ADC, poproś właściciela o " "aktualizację" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% został wykopany przez %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% został wykopany: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Nie nasłuchuje połączeń - uruchom ponownie %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Błąd podczas kompresji" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Błąd podczas dekompresowania" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Przekroczenie czasu połączenia" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Połączenie zakończone" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Przekroczono długość wykonanej komendy" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Rozłączony" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Niedostępny" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Wszystkie sloty pobierań są zajęte" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Połączenie przywrócone" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Błąd łączenia: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Nie wybrano pliku z kluczem prywatnym" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Nie wybrano pliku certyfikatu" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Błąd podczas generowania certyfikatu" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS wyłączony, brak ustalonego pliku certyfikatu" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Wygenerowano nowy ceryfikat TLS" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS wyłączony, generowanie certyfikatu zakończone niepowodzeniem: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Nie udało się wczytać pliku certyfikatu" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Nie udało się wczytać klucza prywatnego" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Baza danych hashów" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Udostępnione pliki" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Kolejka pobierania" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Użytkownicy" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Bąd nazwy przypisanego katalogu" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Nieprawidłowy rozmiar" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Odpowiedź nie paduje do zapytania" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Nie można otworzyć pliku docelowego: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Pełne drzewo nie pasuje do głównego TTH" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Brak wolnych slotów" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Plik niedostępny" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Wykop użytkownika(ów)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Przekieruj użytkownika(ów)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Automatyczne łączenie grupy" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Hashowanie zakończone niepowodzeniem: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Zakończono hashowanie: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Błąd zapisu danych hash: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Nie można odczytać pliku danych hash" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Błąd tworzenia pliku danych hash: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Odbudowano bazę danych hashów" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nie udostępniono; suma kontrolna CRC32 nie odpowiada tej znalezionej w " "pliku SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Błąd hashowania %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nazwa użytkownika nieznana)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Plik z tym samym hashem jest już w twoich udostępnieniach" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Ten plik jest już w kolejce" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Plik o innym rozmiarze znajduje się już w kolejce" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Plik o innym głównym TTH znajduje się już w kolejce" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Próbujesz pobrać sam od siebie!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Nazwa pliku docelowego jest zbyt długa" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -365,161 +454,161 @@ "Nieprawidłowy plik docelowy (brak katalogu, sprawdź ustawienia domyślne " "katalogu pobierania)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Zdublowane żródło: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Cel usunięty" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Brak pliku docelowego lub zły rozmiar" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Nie można otworzyć listy plików: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Niezgodne CRC32 (sprawdź SFV)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Błąd SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Katalog" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Wyszukiwanie znów aktywne" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Wyszukiwanie nieaktywne: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Brak zdefiniowanego katalogu" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Katalog plików tymczasowych nie może być udostępniony" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -527,47 +616,47 @@ "Odświeżanie listy plików w toku, proszę poczekać do zakończenia przed " "ponownym odświeżeniem" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Odświeżanie listy plików zakończone niepowodzeniem: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Zainicjowano odświeżenie listy plików" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Odświeżanie listy plików zakończone" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Nieznany błąd: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Serwer socks zakończył niepowodzeniem ustanawianie połączenia" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Serwer SOCKS wymaga uwierzytelnienia" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Serwer SOCKS nie obsługuje autoryzacji za pomocą loginu/hasła" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Uwierzytelnienie serwera socks zakończone niepowodzeniem (nieprawidłowy " "login/hasło?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -575,168 +664,115 @@ "Nie udało się ustawić serwera socks dla przekierowań UDP (sprawdź adres i " "port socks)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Nie można utworzyć wątku" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Niemożna wysłać pliku %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Rozłączony użytkownik opuścił hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "nieprawidłowy rozmiar" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f Gb" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Niezgodność TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Zapisano więcej bajtów, niż żądano" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/pt_BR.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/pt_BR.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/pt_BR.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/pt_BR.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Helder , 2018\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/tehnick/" @@ -23,23 +23,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Cancelar" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) tem os mesmo CID {%3%} que %4% (%5%), ignorando" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Falha ao negociar um protocolo base" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,85 +47,93 @@ "O hub usa uma versão antiga do ADC, por favor peça ao administrador para " "atualizar" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% foi kickado por %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% foi kickado: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Não está escutando conexões - por favor reinicie %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Erro durante a compressão" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Erro durante a descompressão" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Connection timeout" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Conexão fechada" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Tamanho do comando excedido" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Desconectado" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Enviou" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Offline" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Todos os slots ocupados" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Conectividade restaurada" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Erro de conexão: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Determinar a melhor configuração..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Não foi possível abrir %1% porta(s); as configurações de conexão devem ser " "definidas manualmente" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "IP público detectado, selecionado modo ativo com conexão direta" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -133,7 +141,7 @@ "Rede local com possivel NAT detectado, tentando mapear as portas utilizando " "UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,228 +149,312 @@ "A configuração automática do modo ativo falhou. Talvez seja melhor " "configurar manualmente" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Transferência (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Busca (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Conectividade:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Sem chave privada" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Sem certificado" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Erro ao gerar certificado" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS desabilitado, o certificado não foi criado" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Gerar novo certificado TLS" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS desabilitado, falha ao gerar certificado: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Falha ao carregar certificado" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Falha ao carregar chave privada" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Hash database" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Arquivos Compartilhados" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Fila de Download" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Usuários" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Falta o nome da pasta" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Bloqueou conexão vinda de" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Tamanho inválido" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "A resposta não combina com a requisição" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Não foi possível abrir o arquivo: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "A árvore não corresponde ao TTH da raiz " -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Não há slots disponíveis" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Arquivo não disponível" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Kickar usuário(s)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Redirecionar usuário(s)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Auto-conectar grupo (convertido)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Falha do hash: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Hash terminado: %1% (%2% a %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Hash terminado: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Hash terminado: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Erro ao salvar dados do hash: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Impossível ler dados do hash" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Erro ao criar hash do arquivo: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Banco de hash refeito" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nao compartilhado; o CRC32 calculado não combina com nenhum do aquivo " "SFV." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Erro do hash: %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Transferência na Porta (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Loop de redirecionamento terminado (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Não há implementação UPnP disponível" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Outra tentativa de mapeamento de portas UPnP está em execução..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Falha ao iniciar a interface %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Transferência na Porta (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "A %1% interface falhou ao mapear a porta %2% %3%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Transferência codificada na porta (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Porta para buscas (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " Porta DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Mapeamento feito com sucesso (TCP: %1%, UDP: %2%, TLS: %3%), mapeado " +"utilizando a interface %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Falha ao buscar IP externo" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Falha ao mapear portas" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Mapeamento removido com sucesso da interface %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Falha ao remover o mapeamento da interface %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nick desconhecido)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Tópico do hub:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "para" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Sem parte necessária" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Procurar por alternativas: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Você já possui um arquivo com o mesmo hash" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "O arquivo já está na fila" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Um arquivo com o tamanho diferente já está na fila" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Um arquivo com uma raiz tth diferente já está na fila" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Você está tentando baixar de você mesmo!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Um arquivo com TTH diferente já está na lista" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Este arquivo já foi baixado" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Arquivo de nome muito longo" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -370,206 +462,206 @@ "Nome de arquivo inválido (a localização não existe, tente a pasta padrão de " "download)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "O arquivo já existe" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Fonte duplicada: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Local removido" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Arquivo inexistente ou o tamanho está errado" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Não foi possível mover %1% para %2% (%3%); arquivo renomeado para %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "Não foi possível mover %1% para %2% (%3%) ou renomear para %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Não foi possível abrir a lista: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1% : possui %2% arquivo" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "O local de destino não está disponível: %1%; item pausado." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "Inconsistência de CRC32 (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : possui %2% arquivos" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Erro de SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Todos" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Compactado" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Documento" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Executável" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Imagem" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Vídeo" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Pasta" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Imagem de CD" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Busca habilitada" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Busca desabilitada: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "baixado de" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Busca inválida" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "O tipo de busca já existe" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Busca não encontrada" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Error: configuração não encontrada" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Configuração" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Alterar configuração" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nenhuma pasta especificada" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "A pasta está oculta" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "A pasta temporária de download não pode ser compartilhada" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Encontrado nome de arquivo inválido %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Ignorando arquivo: %1% (Tamanho: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Ignorando arquivo temporário: %1% (Tamanho: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" "Arquivo duplicado não será compartilhado: %1% (Tamanho: %2% B) Duplicata: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "Atualizando a lista, espere até terminar para atualizar novamente" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Falha ao atualizar a lista: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Atualização da lista de arquivos iniciada" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Atualização da lista de arquivos finalizada" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Lista gerada %1%" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Erro desconhecido: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "O servidor falhou ao estabelecer uma conexão" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "O servidor requer autenticação" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "O servidor não suporta atenticação" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Falha na autenticação (login/senha errados?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -577,170 +669,115 @@ "Falha ao configurar socket por causa de atraso UDP (verifique o endereço do " "socket e porta)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Não foi possível criar thread" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Não há implementação UPnP disponível" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Outra tentativa de mapeamento de portas UPnP está em execução..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Falha ao iniciar a interface %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Transferência na Porta (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "A %1% interface falhou ao mapear a porta %2% %3%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Transferência codificada na porta (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Porta para buscas (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " Porta DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Mapeamento feito com sucesso (TCP: %1%, UDP: %2%, TLS: %3%), mapeado " -"utilizando a interface %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Falha ao buscar IP externo" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Falha ao mapear portas" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Mapeamento removido com sucesso da interface %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Falha ao remover o mapeamento da interface %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "A conexão já existe." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Não é possível enviar o arquivo %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Bloqueou conexão vinda de" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Desconectando do usuário: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Dado inválido" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Nenhum dado UTF-8 em uma conexão ADC" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Inconsistência de TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Foram escritos mais bytes do que o requisitado" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/ru.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/ru.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/ru.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/ru.po 2019-05-06 22:23:37.000000000 +0000 @@ -3,14 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Andrei Stepanov , 2018 +# Boris Pek , 2019 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Andrei Stepanov, 2018\n" +"POT-Creation-Date: 2019-05-07 01:20+0300\n" +"PO-Revision-Date: 2017-06-18 13:35+0000\n" +"Last-Translator: Boris Pek , 2019\n" "Language-Team: Russian (https://www.transifex.com/tehnick/teams/11818/ru/)\n" "Language: ru\n" "MIME-Version: 1.0\n" @@ -24,23 +28,23 @@ msgid "" msgstr "<Введите строку>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Отклонить" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) имеет такой же CID {%3%} как %4% (%5%), игнорирован" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/c" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Не удалось определить базовый протокол" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -48,86 +52,94 @@ "Скорее всего хаб использует старую версию протокола ADC, пожалуйста " "попросите владельца обновиться" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% кикнут %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% кикнут %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Соединения не обрабатываются - пожалуйста перезапустите %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Ошибка сжатия" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Ошибка распаковки" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Таймаут соединения" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Соединение закрыто" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Превышена максимальная длина команды" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Отключен" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Отправлено " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Не в сети" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Все слоты закачек заняты" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Соединение восстановлено" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Ошибка соединения: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "Заблокировано C-C подключение к хабу ('%1%:%2%'; запрос от '%3%')" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "Блокировка '%1%', потенциальная DDoS атака (из хаба '%2%') " + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Определение наилучших настроек соединения..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Невозможно открыть порт(ы) %1%. Настройки подключения должны быть " "установлены вручную" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Публичный IP-адрес обнаружен, выбирается активный режим с прямым подключением" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -135,7 +147,7 @@ "Обнаружена локальная сеть с возможным использованием NAT, делаю попытку " "пробросить порты, используя UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -143,226 +155,311 @@ "Автоматическая установка активного режима провалилась. Вы можете попробовать " "установить свое подключение вручную для лучшей связи" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Порт передач (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Порт поиска (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Подключение: " -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Не выбран файл личного ключа" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Не выбран файл сертификата" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Ошибка генерирования сертификата" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS отключен, не установлен файл сертификата" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Создан новый сертификат TLS" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS отключен, не удалось создать сертификат: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Не удалось загрузить файл сертификата" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Не удалось загрузить личный ключ" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Хеш базы данных" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Расшаренные файлы" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Очередь загрузок" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Пользователи" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "Неправильный формат файла (должен быть .xml или .bz2)" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Отсутствует имя папки" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: заблокировано исходящее соединение к " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Неверный размер" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Ответ не соответствует запросо" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Невозможно открыть файл %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Полное дерево не соответствует TTH корня" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Нет доступных слотов" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Файл недоступен" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Кикнуть пользователя(ей)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Перенаправление пользователя(ей)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Авто-подключение группы (сконвертированный)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "Неправильный URL: %1%" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Не удалось хэширование: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Завершено хэширование: %1% (%2% на %3%/с)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Завершено хэширование: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Завершено хэширование: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Ошибка сохранения хэш данных: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Невозможно считать хэш файла" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Ошибка создания файла данных хэша: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Хеш базы данных обновлен" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "%1% не расшарен из-за несоответсвия хеш-суммы (CRC32)." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Ошибка хэширования %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "Ошибка кодировки передачи (%1%)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Бесконечный цикл перенаправления (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "Слишком много данных в теле ответа (%1%)" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Нет доступной реализации UPnP" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Другая попытка проброса портов через UPnP еще не завершена..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Не удалось инициализировать интерфейс %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Порт передачи (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Попытка пробросить порт %2% на %3% провалилась для интерфейса %1%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Порт шифрованной передачи (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Порт для поиска (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr " DHT порт (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Успешно выполнен проброс портов (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"используется интерфейс %5%" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Успешно выполнен проброс портов (TCP: %1%, UDP: %2%, TLS: %3%), используется " +"интерфейс %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Не удалось получить внешний IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Невозможно создать перенаправление портов" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Успешно удален проброс портов с интерфейса %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Не удалось удалить проброс портов с интерфейса %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Ник неизвестен)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Тема хаба:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "Слишком маленькая шара для загрузки из " -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "ГиБ" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "Невозможно передать файл" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " в " -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Необязательная часть" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Поиск TTH альтернатив для: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Этот файл уже расшарен" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Этот файл уже есть в очереди" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Файл другого размера уже есть в очереди" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "В очереди уже есть файл с другим tth" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Вы пытаетесь качать с себя!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Файл с другим корневым TTH уже присутствует в загрузке" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Загрузка этого файла уже завершилась" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Указанное имя слишком длинное" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -370,165 +467,165 @@ "Неверный целевой файл (отсутствующая папка, проверьте настройки папки " "закачек по умолчанию)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Файл уже существует в пункте назначения" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Источник дубликата: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Удалено" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Целевой файл отсутствует или имеет неправильный размер" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Не смог переместить %1% в %2% (%3%); переименовал в %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Не смог переместить %1% в %2% (%3%) и не смог переименовать в %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Невозможно открыть список файлов: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Согласован файл %2%" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Каталог назначения для этого элемента недоступен: %1%; загрузка " "приостановлена." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 несоответствие (SFV-проверка)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1%: Согласовано %2% файла" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Ошибка SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Любой" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Аудио" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Сжатый" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Документ" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Исполняемый" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Картинка" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Видео" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Директория" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD образ" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Поиск снова включен" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Поиск отключен: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "загружено из" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Неверное имя поискового типа" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Этот поисковый тип уже существует" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Нет такого поискового типа" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Ошибка: опция не обнаружена!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Опция ядра " -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Изменить опцию ядра " -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Не указана папка" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Директория скрыта" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Нельзя расшарить временную папку с закачкам" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Неправильное имя файла обнаружено в процессе хеширования каталога %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Пропущен нерасшаренный файл: %1% (Размер: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Пропущен нерасшаренный временный файл: %1% (Размер: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" "Дубликат файла не будет расшарен: %1% (Размер: %2% B) Копия совпала с: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -536,218 +633,161 @@ "Выполняется обновление списка файлов, пожалуйста, дождитесь окончания, " "прежде чем обновлять список вновь" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Не удалось обновить список файлов: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Запущено обновление списка файлов" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Обновление списка файлов завершено" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Запущено обновление списка файлов %1%" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Неизвестная ошибка: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socks серверу не удалось установить соединение" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socks серверу требуется авторизация" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socks сервер не поддерживает авторизацию" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Авторизация на socks сервере отклонена, возможно неверный логин или пароль" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" "Не удалось настроить socks сервер для UDP (проверьте socks адрес и порт)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Невозможно создать поток" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Нет доступной реализации UPnP" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Другая попытка проброса портов через UPnP еще не завершена..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Не удалось инициализировать интерфейс %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Порт передачи (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Попытка пробросить порт %2% на %3% провалилась для интерфейса %1%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Порт шифрованной передачи (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Порт для поиска (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr " DHT порт (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Успешно выполнен проброс портов (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"используется интерфейс %5%" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Успешно выполнен проброс портов (TCP: %1%, UDP: %2%, TLS: %3%), используется " -"интерфейс %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Не удалось получить внешний IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Невозможно создать перенаправление портов" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Успешно удален проброс портов с интерфейса %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Не удалось удалить проброс портов с интерфейса %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Соединение уже существует." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Невозможно передать файл %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: заблокировано входящее соединение к " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Пользователь %1% отключился и покинул хаб" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Неверные данные" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Данные не в UTF-8 при ADC подключении" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d Б" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f КиБ" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f КБ" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f МиБ" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f МБ" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f ГиБ" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f ГБ" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f ТиБ" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f ТБ" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f ПиБ" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f ПБ" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s Б" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld Б" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Несовпадение TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Записано больше байт чем требуется" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "Начальная загрузка DHT" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "Начальная загрузка DHT успешно завершена." + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "Ошибка начальной загрузки DHT: " diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sk.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sk.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sk.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sk.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Boris Pek , 2017\n" "Language-Team: Slovak (https://www.transifex.com/tehnick/teams/11818/sk/)\n" @@ -23,23 +23,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Zahodiť" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) má rovnaký CID {%3%} ako %4% (%5%), ignoruje sa" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Nepodarilo sa vyjednať základný protokol" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,315 +47,404 @@ "Hub pravdepodobne používa starú verziu ADC, prosím, navrhnite vlastníkovi, " "aby ho aktualizoval" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%2% vykopol %1%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% bol vykopnutý: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Nepočúvajú sa nové spojenia - prosím reštartujte %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Chyba počas kompresie" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Chyba počas dekompresie" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Vypršal maximálny čas nečinnosti spojenia" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Spojenie ukončené" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Bola prekročená maximálna dĺžka príkazu" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Odpojený" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Odpojený" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Všetky sťahovacie sloty sú obsadené" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Konektivita bola obnovená" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Chyba konektivity: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Nebol vybraný súbor s privátnym kľúčom" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Nebol zvolený súbor s certifikátom" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Chyba pri tvorbe certifikátu" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS vypnuté, nebol nastavený súbor s certifikátom" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Vytvorený nový TLS certifikát" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS vypnuté, nepodarilo sa vygenerovať certifikát: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Nepodarilo sa načítať súbor s certifikátom" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Nepodarilo sa načítať privátny kľúč" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Databáza hašov" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Zdieľané súbory" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Front sťahovaní" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Užívatelia" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Adresáru chýba atribút názov" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Neplatná veľkosť" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Odpoveď nezodpovedá požiadavke" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Nebolo možné otvoriť cieľový súbor: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Úplný strom nezodpovedá TTH koreňu" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Nie sú dostupné sloty" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Súbor nie je dostupný" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Vykopnúť používateľa" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Presmerovať používateľov" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Nepodarilo sa hašovanie: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Skončilo hašovanie: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Chyba pri ukladaní hašov: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Nepodarilo sa prečítať súbor s hašmi" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Chyba pri vytváraní dátového súboru hašov: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Databáza hašov znovu zostavená" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nie je zdieľaný; vypočítaný CRC32 sa nezhoduje so súčtom v SFV súbore." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Chyba pri vytváraní hašu %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (neznáma prezývka)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Súbor s rovnakým hašom sa už nachádza vo fronte" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Tento súbor sa už nachádza vo fronte" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Súbor s inou veľkosťou sa už nachádza vo fronte" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Pokúšate sa sťahovať sám od seba!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Cieľový názov súboru je príliš dlhý" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -363,162 +452,162 @@ "Neplatný cieľový súbor (chýba adresár, skontrolujte štandardné nastavenie " "adresára pre sťahovanie)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Duplicitný zdroj: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Cieľ bol odstránený" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Cieľový súbor chýba alebo má chybnú veľkosť" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Nepodarilo sa otvoriť zoznam súborov: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "nekonzistentný CRC32 (kontrola v SFV)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Chyba SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Priečinok" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Hľadanie znova zapnuté" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Hľadanie vypnuté: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nebol zadaný adresár" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Dočasný adresár sťahovaní nemožno zdieľať" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" "Duplicitný súbor sa nebude zdieľať: %1% (Veľkosť: %2% B) Zhoduje sa s: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -526,46 +615,46 @@ "Prebieha obnovenie zoznamu súborov, počkajte prosím, kým skončí, než ho " "skúsite znova obnoviť" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Nepodarilo sa obnoviť zoznam súborov: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Obnovenie zoznamu súborov sa začalo" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Obnovenie zoznamu súborov bolo dokončené" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Neznáma chyba: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "SOCKS serveru sa nepodarilo nadviazať spojenie" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "SOCKS server vyžaduje overenie" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "SOCKS server nepodporuje overenie menom a heslom" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Zlyhalo overenie u SOCKS servera (chybné prihlasovacie meno alebo heslo?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -573,168 +662,115 @@ "Nepodarilo sa nastaviť SOCKS server, aby robil UDP relé (skontrolujte adresu " "a port SOCKS)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Nepodarilo sa vytvoriť vlákno" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Nepodarilo sa poslať súbor %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Používateľ, ktorý opustil hub, bol odpojený: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "nekonzistencia TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Bolo zapísaných viac bajtov ako bolo vyžiadaných" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sr@latin.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sr@latin.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sr@latin.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sr@latin.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: miroslav , 2018\n" "Language-Team: Serbian (Latin) (https://www.transifex.com/tehnick/" @@ -24,23 +24,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Odbaci" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) ima isti CID {%3%} kao %4% (%5%), ignorišem" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Ne mogu da uspostavim bazni protokol" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -48,85 +48,93 @@ "Hub verovatno koristi staru verziju ADC-a, molim predložite vlasniku da " "pređe na novu verziju" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% je izbačen od %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% je izbačen: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Ne osluškujem konekcije - molim restartujte %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Greška tokom pakovanja" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Greška tokom otpakivanja" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Vreme povezivanja je isteklo" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Veza je prekinuta" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Prekoračena maksimalna dužina komande" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Isključen" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Poslato" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Nije na mreži" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Svi slotovi za preuzimanje su popunjeni" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Veza ponovo uspostavljena" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Greška pri povezivanju: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Odredjivanje najboljih podešavanja za povezivanje..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Ne može se otvoriti %1% port(s); Podešavanja povezivanja moraju se ručno " "kofigurisati" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "Javna IP adresa otkrivena, izaberi aktivni režim sa direktnom vezom" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -134,7 +142,7 @@ "Lokalna mreža sa mogućim NAT detektovanim, pokušava da mapira portove " "koristeći UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -142,227 +150,313 @@ "Automatsko podešavanje aktivnog režima nije uspelo. Možda ćete želeti da " "podesite konekciju ručno za bolje povezivanje" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Transfer (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Pretraga (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP) " -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Povezivanje:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Nije izabarana datoteka za privatni ključ" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Nije izabrana datoteka za sertifikat" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Greška pri kreiranju sertifikata" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS onemogućen, nije izabrana datoteka za sertifikat" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Napravljen je novi TLS sertifikat" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS onemogućen, ne mogu da napravim sertifikat: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Ne mogu da učitam datoteku sa sertifikatom" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Ne mogu da učitam privatni ključ" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Hash baze podataka" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Deljene datoteke" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Red za preuzimanje" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Korisnici" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Fascikli nedostaje ime" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Blokirana odlazna veza sa" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Pogrešna veličina" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Odgovor se ne poklapa sa zahtevom" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Ne mogu da otvorim datoteku: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Celo stablo ne odgovara TTH osnovi" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Nema slobodnih slotova" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Datoteka nije dostupna" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Izbaci korisnika(e)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Preusmeri korisnika(e)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Auto-povezana grupa (konvertovan)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Hashovanje nije uspelo: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Završen hash: %1% (%2% at %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Završen hash: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Završen hash: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Greška pri čuvanju hash podataka: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Ne mogu da pročitam datoteku sa hash podacima" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Greška pri kreiranju hash podataka za datoteku: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Obnavaljam hash bazu podataka" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% nije deljeno; izračunati CRC32 se ne poklapa sa onim u SFV datoteci." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Greška pri hashovanju %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr "Port transfer (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Beskrajna preusmerenja (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Nije dostupna UPnP implementacija" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Još jedan UPnP port mapiranje u progresu" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Neuspelo pokretanje %1% sučelja" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "Port transfer (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr " %1% interfejs greška mapiranja the %2% %3% port" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Šifrovani Transfer Port (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Pretraga porta (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "Port DHT (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Uspešno kreiran port maping(TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%) " +"mapiranje koristi %5% interfejsa" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Uspešno kreiran port maping(TCP: %1%, UDP: %2%, TLS: %3%) mapiranje koristi " +"%4% interfejsa" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Neuspelo dobijanje spoljašnje IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Ne mogu kreirati nit" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Pokrenuto osvežavanje liste deljenih datoteka" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Pokrenuto osvežavanje liste deljenih datoteka" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UpnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Nepoznat nadimak)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Hab tema:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "na" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Nema potreban deo" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Pretraga TTH alternative za: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Datoteka sa istim hashom već postoji u vašim deljenim datotekama" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Ova datoteka se već deli" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Datoteka različite veličine već postoji u redu" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Datoteka različite tth osnove već postoji u redu" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Pokušavate skidati od samog sebe!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Datoteka različite tth osnove već postoji u redu" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Ova datoteka je već završila preuzimanje" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Ime odredišne datoteke je predugačko" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -370,157 +464,157 @@ "Neispravna odredišna datoteka (nema direktorijuma, proveri podešavanje " "standardnog direktorijuma za preuzimanje)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Datoteka iste ili veće veličine već postoji na ciljnoj lokaciji" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Izvor duplikata: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Odredište obrisano" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Odredišna datoteka nedostaje ili je pogrešne veličine" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Onemogućeno pokretanje %1% to %2% (%3%); preimenovano %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "Onemogućeno pokretanje %1% to %2% (%3%) nemoguće preimenovati %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Ne mogu otvoriti listu datoteka: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1% Podudaranje: %2% fajla" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Ciljna putanja za ovu stavku nije dostupna: %1%; pauziraj ovu stavku u redu." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 neusaglašenost (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% je uparen: %2%" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL Greška: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Bilo koji" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Audio" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Kompresovan" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokument" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Izvršni" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Slika" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Fascikla" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD Slika" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Pretraga ponovo omogućena" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Pretraga onemogućena: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "preuzeto od" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Nevažeći tip pretrage" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Taj tip pretrage već postoji" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Nema takvih tipova pretrage" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Greška: Podešavanje nije pronadjeno" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Osnovna podešavanja" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Promenite osnovna podešavanja" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Nije određen direktorijum" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Fascikla se već deli" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Direktorijum za privremeno preuzimanje se ne može deliti" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Invalid file name found while hashing folder %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Korisnik je izabrao da ne delite fajl: %1% (Veličina: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Korisnik je izabrao da ne delite privremeni fajl: %1% (Veličina: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -528,7 +622,7 @@ "Duplikat datoteke neće biti deljen: %1%%2% (Veličina: %3% B) Duplikat " "potvrđen sa: %4%%5%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -536,45 +630,45 @@ "Osvežavanje liste deljenih datoteka je u toku, molim sačekajte da se završi " "pre ponovnog pokretanja" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Osvežavanje liste deljenih datoteka nije uspelo: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Pokrenuto osvežavanje liste deljenih datoteka" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Osvežavanje liste deljenih datoteka završeno" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Pokrenuto osvežavanje liste deljenih datoteka" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Nepoznata greška: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socks server nije uspeo uspostaviti vezu" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socks server zahteva proveru" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socks server ne podržava proveru korisničko ime / lozinka" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Socks server provera nije uspela (loše korisničko ime / lozinka?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -582,172 +676,115 @@ "Greška pri podešavanju socks servera za UDP prenos (proveriti socks adresu i " "port)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Ne mogu kreirati temu" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Nije dostupna UPnP implementacija" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Još jedan UPnP port mapiranje u progresu" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Neuspelo pokretanje %1% sučelja" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "Port transfer (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr " %1% interfejs greška mapiranja the %2% %3% port" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Šifrovani Transfer Port (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Pretraga porta (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "Port DHT (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Uspešno kreiran port maping(TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%) " -"mapiranje koristi %5% interfejsa" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Uspešno kreiran port maping(TCP: %1%, UDP: %2%, TLS: %3%) mapiranje koristi " -"%4% interfejsa" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Neuspelo dobijanje spoljašnje IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Ne mogu kreirati nit" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Pokrenuto osvežavanje liste deljenih datoteka" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Pokrenuto osvežavanje liste deljenih datoteka" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UpnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Veza već postoji." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Ne mogu poslati datoteku %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFilter: Blokirana dolazna konekicija" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Isključen korisnik koji je napustio hub: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Pogrešna veličina" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Ne-UTF-8 podatak u ADC konekciji" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH neusaglašenost" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Više bajtova zapisano nego što je traženo" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sr.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sr.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sr.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sr.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: markosm , 2018\n" "Language-Team: Serbian (https://www.transifex.com/tehnick/teams/11818/sr/)\n" @@ -23,23 +23,23 @@ msgid "" msgstr "<Унесите текст>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Одбаци" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) има исти CID {%3%} као %4% (%5%), игноришем" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Не могу дас успоставим базни протокол" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,85 +47,93 @@ "Хаб вероватно користи стару верзију АДЦ-а, молим предложите власнику да " "пређе на нову верзију" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% је избачен од %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% је избачнен: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Не ослушкујем конекције - молим рестартујте %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Грешка при компресији" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Грешка при декомпресији" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Време повезивања је истекло" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Веза је прекинута" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Прекорачена максимална дужина команде" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Искључен" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Послато" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Ван мреже" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Сви слотови за преузимање су попуњени" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Веза поново успостављена" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Грешка код повезивања: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Одређивање најбољих подешавања за повезивање..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Није могуће отворити %1% порт(ове); подешавање мора бити ручно конфигурисано" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Јавна ИП адреса откривена, одабери активни режим са директним повезивањем" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -133,7 +141,7 @@ "Локална мрежа са могућим NAT детектованим, покушава да мапира портове " "користећи UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,226 +149,312 @@ "Аутоматско подешавање активног режима није успело. Можда ћете желети да " "подесите конекцију ручно за боље повезивање" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Трансфер (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Претрага (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "ДХТ (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Повезивање:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Није изабрана датотека за приватни кључ" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Није изабрана сертификат датотека" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Грешка генерисања сертификата" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS искључен, није подешен сертификат" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Направљен је нови TLS сертификат" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS искључен, неуспело генерисање сертификата: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Неуспело учитавање сертификата" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Неуспело учитавање приватног кључа" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Хеш базе података" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Дељене датотеке" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Ред за преузимање" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Корисници" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Фасцикли недостаје име" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFilter: Блокирана одлазна веза за" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Погрешна величина" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Одговор се не поклапа са захтевом" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Не могу да отворим одредишну датотеку: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Цело стабло не одговара TTH основи" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Нема слободних слотова" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Датотека није доступна" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Избаци корисника(е)" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Преусмери корисника(е)" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Ауто-повезана група (конвертовано)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Хешовање није успело: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Завршено хешовање: %1% (%2% at %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Хешовање завршено: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Хешовање завршено: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Грешка код чувања хеш података: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Не могу да читам хеш податке" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Грешка при креирању хеш података: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Обнављам хеш базу података" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "%1% није дељено; израчунати CRC32 се не поклапа са оним у SFV фајлу." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Грешка хешовања %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Трансфер порт (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Бескрајна преусмерења (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Nije dostupna UPnP impementacija" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Још један UPnP порт мапирања у прогресу..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Неуспело покретање %1% сучеља" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Трансфер порт (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr " %1% сучеље грешка мапирања за %2% %3% порт" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Шифровани трасфер порт (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Претрага порта (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "ДХТ порт (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Успешно креирано мапирање порта (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%) " +"мапирање користи %5% сучеља" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Успешно креирано мапирање порта (TCP: %1%, UDP: %2%, TLS: %3%) мапирање " +"користи %4% сучеља" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Неуспело добијање спољне ИП" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Неуспело мапирање порта" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Успешно уклоњено мапирање порта са %1% сучеља" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Неуспело уклањање мапирања порта са %1% сучеља" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Надимак непознат)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Хаб тема:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "на" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Нема потребан део" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Претрага TTH алтернативе за: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Датотека са истим хешом већ постоји у твом дељеном" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Ова датотека већ постоји у реду" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Датотека са различитом величином већ се дели" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Датотека са различитом tth већ постоји у реду" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Покушавате преузимати од самог себе!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Датотека за различитим TTH већ постоји у реду" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Ова датотека је већ завршила преузимање" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Име одредишне датотеке је предугачко" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -368,156 +462,156 @@ "Неисправна одредишна датотека (нема фасцикле, провери подешавање стандардне " "фасцикле за преузимање)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Датотека већ постоји на одредишној локацији" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Извор дупликата: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Одредиште уклоњено" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Одредишна датотека недостаје или је погрешне величине" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Онемогућено покретање %1% to %2% (%3%); преименовање у %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "Онемогућено покретање %1% to %2% (%3%) преименовање у %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Онемогућено отварање фајл листе: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Подударање %2% фајла" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Циљна путања за ову ставку није доступна: %1%; паузирај ову ставку у реду." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 неусаглашеност (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : Подударање %2% фајлова" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL Грешка: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Било који" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Аудио" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Компресован" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Документ" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Извршни" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Слика" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Видео" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Фасцикла" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "ЦД слика" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Претрага поново омогућена" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Претрага онемогућена: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "преузето од" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Неважећи режим претраге" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Тај режим претраге већ постоји" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Нема таквих режима претраге" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Грешка: подешавање није пронађено!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Основна подешавања" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Измени основна подешавања" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Није одређена фасцикла" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Фасцикла је сакривена" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Привремена фасцикла за преузимање не може бити дељена" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Неисправна датотека нађена при хеширању фасцикле %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Прескочи дељени фајл: %1% (Величина: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Прескочи дељену привремену датотеку: %1% (Величина: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -525,7 +619,7 @@ "Дупликат датотеке неће бити дељен: %1%%2% (Величина: %3% B) Дуплика потврђен " "са: %4%%5%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -533,217 +627,160 @@ "Освежавање листе дељених датотека је у току, молим сачекајте да се заврши " "пре поновног покретања" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Неуспело освежавање фајл листе: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Покренуто освежавање фајл листе" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Завршено освежавање фајл листе" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Фајл листа %1% генерисана" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Непозната грешка: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socks сервер није успоставио конекцију" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socks сервер захтева ауторизацију" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socks сервер не подржава логовање / лозинка ауторизацију" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "Socks сервер ауторизација није успела (лоше логовање / лозинка?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" "Неуспело подешавање socks сервера за UDP пренос (проверити адресу и порт)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Не могу креирати тему" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Nije dostupna UPnP impementacija" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Још један UPnP порт мапирања у прогресу..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Неуспело покретање %1% сучеља" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Трансфер порт (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr " %1% сучеље грешка мапирања за %2% %3% порт" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Шифровани трасфер порт (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Претрага порта (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "ДХТ порт (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Успешно креирано мапирање порта (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%) " -"мапирање користи %5% сучеља" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Успешно креирано мапирање порта (TCP: %1%, UDP: %2%, TLS: %3%) мапирање " -"користи %4% сучеља" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Неуспело добијање спољне ИП" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Неуспело мапирање порта" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Успешно уклоњено мапирање порта са %1% сучеља" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Неуспело уклањање мапирања порта са %1% сучеља" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Веза већ постоји." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Не могу послати фајл %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "ИПФилтер: Блокирана долазна конекција" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Искључен корисник који је напустио хаб: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Погрешан податак" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Не-UTF-8 податак у ADC конекцији" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH неусаглашеност" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Више бајтова записано него што је захтевано" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sv_SE.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sv_SE.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/sv_SE.po 2018-10-12 23:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/sv_SE.po 2019-05-06 22:23:37.000000000 +0000 @@ -3,14 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Boris Pek , 2017 +# Sopor, 2019 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-10-13 01:23+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Sopor, 2018\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" +"PO-Revision-Date: 2017-06-18 13:35+0000\n" +"Last-Translator: Sopor, 2019\n" "Language-Team: Swedish (Sweden) (https://www.transifex.com/tehnick/" "teams/11818/sv_SE/)\n" "Language: sv_SE\n" @@ -23,23 +27,23 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Kassera" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) har samma CID {%3%} som %4% (%5%), ignorerar" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Kunde inte upprätthålla basprotokoll" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -47,93 +51,101 @@ "Hubben använder troligen en äldre version av ADC, be ägaren av hubben att " "uppdatera" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% blev kickad av %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% blev kickad: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Lyssnar ej på inkommande anslutningar - %1% behöver startas om" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Fel vid komprimering" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Fel vid uppackning" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Anslutningen tog för lång tid" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Anslutningen stängdes" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Maximal kommandolängd överskriden" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Frånkopplad" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Skickat" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Frånkopplad" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Alla nedladdningsslottar är upptagna" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Anslutningen återställd" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Anslutningsfel: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Fastställer bästa anslutningsinställningar..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Kan inte öppna %1% port(ar); anslutningsinställningarna måste konfigureras " "manuellt" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "En publik IP-adress upptäcktes, väljer aktivt läge med direktanslutning" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" "Lokalt nätverk med NAT upptäckt, försöker skapa portmappning med UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,229 +153,315 @@ "Den automatiska uppkopplingen för aktivt läge har misslyckats. Du " "rekommeneras att manuellt konfigurera för en bättre anslutning" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Överföring (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Sök (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Anslutning:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Ingen privat nyckel vald" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Ingen certifikatfil vald" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Kunde inte skapa certifikatfilen" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS är inaktiverad, ingen certifikatfil angiven" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Ett nytt TLS-certifikat skapades" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS inaktiverad, kunde inte skapa certifikat: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Kunde inte ladda certifikatfil" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Kunde inte ladda privat nyckel" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Indexdatabas" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Delade filer" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Nedladdningskö" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Användare" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "Filändelsen för fillistan är ogiltigt (måste vara .xml eller .bz2)" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Katalogen saknas namnattribut" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IP-filter: Blockerar utgående anslutning till" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Ogiltig storlek" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Svaret matchar inte förfrågningen" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Kan inte öppna målfil: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "" "Felaktigt TTH-värde nedladdat för filen eller så är indexdatabasen korrupt" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Inga slottar lediga" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Filen är inte tillgänglig" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Kicka användare" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Omdirigera användare" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Anslut automatiskt till grupp (konverterad)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "Ogiltig URL: %1%" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Indexeringen misslyckades: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Indexeringen klar: %1% (%2% i %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Indexeringen klar: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Indexeringen klar: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Kunde inte spara indexeringsdata: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Kan inte läsa indexdatabasfilen" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Kunde inte skapa indexeringsdatabasfil: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Indexdatabas återskapad" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% inte utdelad; beräknat CRC32-värde stämmer inte med det värdet som finns " "i SFV-filen." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Indexeringsfel %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Överföringsport (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Ändlös omdirgeringsloop (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Ingen UPnP tillgänglig" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Det pågår redan en portmappning med UPnP..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Kunde inte starta gränssnittet %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Överföringsport (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Gränssnittet %1% kunde inte mappa %2% %3% port" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Krypterad överföringsport (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Sökport (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "DHT-port (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Lyckades skapa portmappningar (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), via " +"gränssnittet %5%" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Lyckades skapa portmappningar (Överföring: %1%, Sök: %2%, Krypterad " +"överföring: %3%) på enheten %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Kan inte hämta den publika IP-adressen" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Kunde inte skapa portmappningar" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Lyckades ta bort portmappningar med gränssnittet %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Misslyckades att ta bort portmappningar med gränssnittet %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Användarnamn okänt)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Hubbtopic:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "Utdelning är för liten för att kunna ladda ner från" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "Nekad till att skicka fil" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "till" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Ingen del behövs" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Sök efter TTH-alternativ för: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "En fil med samma indexvärde finns redan i din utdelning" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Denna filen finns redan i kön" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "En fil med ett annat TTH-värde finns redan i nedladdningskön" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "En fil med ett annat tth-värde finns redan i nedladdningskön" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Du försöker ladda ned från dig själv!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "En fil med ett annat TTH-värde finns redan i nedladdningskön" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Denna filen är redan nedladdad" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Målfilens namn är för långt" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -371,156 +469,156 @@ "Ogiltig målfil (katalogen finns inte, kontrollera inställningarna för " "standard nedladdningskatalog)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Filen finns redan i målmappen" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Dubblettkälla: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Målfilen borttagen" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Målfilen finns inte eller har fel storlek" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Kan inte flytta %1% till %2% (%3%); döpt om till %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "Kan inte flytta %1% till %2% (%3%) eller döpa om till %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Kan inte öppna fillistan: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Matchar %2% filen" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Målsökvägen för detta objekt finns inte tillgängligt: %1%; objektet pausad." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32-värden stämmer inte överens (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : Matchade %2% filer" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL-fel: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Alla" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Ljud" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Komprimerat" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Dokument" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Körbara" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Bild" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Katalog" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD-avbild" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Sök är aktivt igen" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Sökning inaktiverad: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "nedladdat från" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Ogiltig söktyp" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Denna söktyp finns redan" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Söktypen finns inte" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Fel: inställning finns inte!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Inställning" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Ändra huvudinställning" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Ingen katalog är specificerad" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Katalogen är dold" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Kataloger med pågående nedladdningar kan inte delas ut" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Hittade ogiltigt filnamn vid indexeringen av mappen %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Uteslut utdelad fil: %1% (Storlek: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Uteslut utdelad temp-fil: %1% (Storlek: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -528,7 +626,7 @@ "Dubblettfil kommer inte att delas ut: %1% (Storlek: %2% B) Dubblett matchad " "mot: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -536,46 +634,46 @@ "Fillistan uppdateras, du måste vänta tills den är klar innan du uppdaterar " "igen" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Uppdatering av fillistan misslyckades: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Uppdatering av fillistan har startat" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Fillistan har uppdaterats" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Fillistan %1% har skapats" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Okänt fel: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Socks-servern har misslyckats med att upprätta en anslutning" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Socks-servern kräver autentisering" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Socks-servern stöder inte användarnamn / lösenords autentisering" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Kunde inte logga in på socks-server (ogiltligt användarnamn / lösenord?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -583,172 +681,118 @@ "Misslyckades med att upprätta socks-server för UDP-relä (kontrollera socks-" "adress och port)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Kan inte skapa tråd" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Ingen UPnP tillgänglig" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Det pågår redan en portmappning med UPnP..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Kunde inte starta gränssnittet %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Överföringsport (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Gränssnittet %1% kunde inte mappa %2% %3% port" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Krypterad överföringsport (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Sökport (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "DHT-port (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Lyckades skapa portmappningar (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), via " -"gränssnittet %5%" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Lyckades skapa portmappningar (Överföring: %1%, Sök: %2%, Krypterad " -"överföring: %3%) på enheten %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Kan inte hämta den publika IP-adressen" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Kunde inte skapa portmappningar" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Lyckades ta bort portmappningar med gränssnittet %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Misslyckades att ta bort portmappningar med gränssnittet %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Anslutningen finns redan." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Kunde inte skicka filen %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IP-filter: Blockera inkommanda anslutningar till" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Frånkopplade användare lämnar hubben: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Ogiltig data" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Non-UTF-8 data i ADC-anslutningen" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH-värden stämmer inte överens" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Fler bytes skrivna än begärt" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" + +#~ msgid "%1% (%2%)" +#~ msgstr "%1% (%2%)" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/tr.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/tr.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/tr.po 2018-10-12 23:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/tr.po 2019-05-06 22:23:37.000000000 +0000 @@ -3,14 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +# Translators: +# Boris Pek , 2017 +# mauron, 2019 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-10-13 01:23+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: mauron, 2018\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" +"PO-Revision-Date: 2017-06-18 13:35+0000\n" +"Last-Translator: mauron, 2019\n" "Language-Team: Turkish (https://www.transifex.com/tehnick/teams/11818/tr/)\n" "Language: tr\n" "MIME-Version: 1.0\n" @@ -22,25 +26,25 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "At" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "" "%1% (%2%) unsurunun {%3%} CID değeri %4% (%5%) unsuruyla aynı, görmezden " "geliniyor" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/s" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Temel protokol görüşmesi başarısız oldu" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -48,84 +52,94 @@ "Hub muhtemelen eski bir ADC sürümü kullanıyor, lütfen sahibini güncellemeye " "teşvik edin" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1%, %2% tarafından kovuldu: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% kovuldu: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "Bağlantılar dinlenilmiyor - lütfen %1% unsurunu tekrar başlatın" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Sıkıştırmada hata" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Sıkıştırma açılmasında hata" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Bağlantı zaman aşımı" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "Bağlantı kesildi" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Azami komut boyutu aşıldı" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Çevrimdışı" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Gönderildi" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Çevrimdışı" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Tüm indirme olukları meşgul" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "Bağlantı onarıldı" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Bağlantı hatası: %1%" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" +"Bir hub'a C-C (istemci - istemci) bağlantısı engellendi ('%1%:%2%'; talep " +"şuradan: '%3%')" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "'%1%' engellendi, muhtemel DDoS tespit edildi (kaynak hub '%2%')" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "En iyi bağlanabilirlik ayarları belirleniyor..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "%1% port açılamadı, bağlantı ayarları elle ayarlanmalıdır" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Kamu IP adresi tespit edildi, doğrudan bağlantı ile etkin kip seçiliyor" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -133,7 +147,7 @@ "Muhtemel NAT ve yerel ağ tespit edildi, portlar UPnP ile haritalanmaya " "çalışılıyor..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -141,226 +155,312 @@ "Etkin kipin otomatik kurulması başarısız oldu. Daha iyi bağlantı için " "bağlantınızı elle ayarlamak isteyebilirsiniz" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Aktarım (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Ara (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Bağlantı:" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Hiçbir özel anahtar seçilmedi" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Hiçbir sertifika dosyası seçilmedi" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Sertifikanın oluşturulmasında hata" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS devre dışı, hiçbir sertifika dosyası ayarlanmadı" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Yeni TLS sertifikası oluştur" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS devre dışı, sertifika oluşturulması başarısız oldu: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Sertifika dosyasının yüklenmesi başarısız oldu" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Özel anahtarın yüklenmesi başarısız oldu" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Karma değer veritabanı" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Paylaşılan Dosyalar" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "İndirme Kuyruğu" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Kullanıcılar" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "Geçersiz dosya listesi uzantısı (.xml veya .bz2 olmalıdır)" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Klasörde eksik isim özniteliği" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "IPFiltresi: şuraya giden bağlantı engellendi:" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Geçersiz boyut" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Cevap taleple eşleşmiyor" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Hedef dosya açılamadı: %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Tüm ağaç TTH köküyle eşleşmiyor" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Hiçbir mevcut oluk yok" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: dosya mevcut değil" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Kullanıcıyı kov" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Kullanıcıyı yeniden yönlendir" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Otomatik bağlantı grubu (dönüştürülmüş)" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "Geçersiz URL: %1%" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Karma değeri elde edilmesi başarısız oldu: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Karma değeri elde edilmesi tamamlandı: %1% (%2% şu hızda: %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Karma değeri hesaplanması tamamlandı: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Karma değeri hesaplanması tamamlandı: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Karma değer verileri kaydında hata: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Karma değer veri dosyası okunamadı" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Karma değer veri dosyası oluşturulmasında hata: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Karma değer veritabanı yeniden derlendi" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "%1% paylaşılmıyor, hesaplanan CRC32 SFV dosyasındakiyle eşleşmiyor." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "%1% karma değeri hesaplanmasında hata: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Aktarım Portu (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Sonsuz yeniden yönlendirme döngüsü (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Hiçbir UPnP desteği bulunamadı" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Başka bir UPnP haritalama teşebbüsü sürmektedir..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "%1% arayüzü başlatılamadı." + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Aktarım Portu (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "%1% arayüzü %2% %3% portunu haritalamayı başaramadı" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "Şifrelenmiş Aktarım Portu (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "Arama Portu (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "DHT Portu (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" +"Başarıyla port haritalama yapıldı (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"%5% arayüzü kullanılarak haritalandı" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Başarıyla port haritalama yapıldı (TCP: %1%, UDP: %2%, TLS: %3%), %4% " +"arayüzü kullanılarak haritalandı" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Harici IP alımı başarısız oldu" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Port haritalaması başarısız oldu" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "%1% arayüzündeki port haritalaması başarıyla kaldırıldı" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "%1% arayüzündeki port haritalamasının kaldırılması başarısız oldu" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (bilinmeyen rumuz)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Hub konusu:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "Şundan indirmek için çok düşük paylaşım:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "Dosya gönderimi reddedildi" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr " şuna" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Hiçbir ihtiyaç duyulan kısım yok" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Şunun için TTH alternatifleri aranıyor: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Aynı karma değerli bir dosya zaten paylaşımınızda mevcut" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Bu dosya zaten kuyrukta" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Farklı boyutlu bir dosya zaten kuyrukta mevcut" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Farklı tth köklü bir dosya zaten kuyrukta mevcut" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Kendinizden indirmeye çalışıyorsunuz!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Farklı TTH köklü bir dosya zaten kuyrukta mevcut" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Bu dosyanın indirilmesi zaten tamamlandı" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Hedef dosya ismi çok uzun" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -368,158 +468,158 @@ "Geçersiz hedef dosya (eksik klasör, varsayılan indirme klasörü ayarını " "kontrol edin)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Dosya hedef konumda zaten mevcut" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Çift kaynak: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Hedef kaldırıldı" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Hedef dosya eksik ya da boyutu yanlış" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "%1%, %2% (%3%) konumuna taşınamadı; %4% olarak yeniden adlandırıldı" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" "%1%, %2% (%3%) konumuna taşınamadı ve %4% (%5%) olarak yeniden " "adlandırılamadı" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Dosya listesi açılamadı: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: %2% dosya ile eşleşti" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Bu unsur için hedef yol mevcut değildir: %1%; bu kuyruk unsurunu duraklat." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 tutarsızlığı (SFV-Check)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : %2% dosya ile eşleşti" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "SSL Hatası: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Herhangi biri" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Ses" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Sıkıştırılmış" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Belge" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Çalıştırılabilir " -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Resim" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Video" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Klasör" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "CD Kalıbı" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Arama tekrar etkinleştirildi" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Arama devre dışı bırakıldı: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "şundan indirildi" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Geçersiz arama türü ismi" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Bu arama türü zaten mevcuttur" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Böyle bir arama türü yoktur" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Hata: ayar bulunamadı!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Çekirdek ayarı" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Çekirdek ayarını değiştir" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Hiçbir klasör belirtilmedi" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Klasör gizli" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Geçici indirme klasörü paylaşılamaz" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "%1% klasörünün karma değeri hesaplanırken geçersiz isim bulundu" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Dosyanın paylaşımını atla: %1% (Boyut: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Geçici dosyanın paylaşımını atla: %1% (Boyut: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" @@ -527,7 +627,7 @@ "Çift dosyanın ikinci nüshası paylaşılmayacaktır: %1% (Boyut: %2% B) Çift " "şununla eşleşti: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -535,48 +635,48 @@ "Dosya listesinin tazelenmesi sürmektedir, tekrar tazelemeden lütfen bu " "işlemin bitmesini bekleyin" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Dosya listesinin tazelenmesi başarısız oldu: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Dosya listesinin tazelenmesine başlandı" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Dosya listesinin tazelenmesi tamamlandı" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "%1% dosya listesi oluşturuldu" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Bilinmeyen hata: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "SOCKS sunucusu bağlantı kurmada başarısız oldu" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "SOCKS sunucusu kimlik doğrulama gerektiriyor" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" "SOCKS sunucusu kullanıcı ismi / parola ile kimlik doğrulamayı desteklemiyor" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "SOCKS sunucusunda kimlik doğrulama başarısız oldu (yanlış rumuz / parola " "olmasın?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -584,172 +684,118 @@ "UDP geçişi için SOCKS sunucu kurulumu başarısız oldu (SOCKS adresini ve " "portunu kontrol edin)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "İş parçacığı oluşturulamıyor" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Hiçbir UPnP desteği bulunamadı" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Başka bir UPnP haritalama teşebbüsü sürmektedir..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "%1% arayüzü başlatılamadı." - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Aktarım Portu (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "%1% arayüzü %2% %3% portunu haritalamayı başaramadı" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "Şifrelenmiş Aktarım Portu (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "Arama Portu (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "DHT Portu (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" -"Başarıyla port haritalama yapıldı (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"%5% arayüzü kullanılarak haritalandı" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Başarıyla port haritalama yapıldı (TCP: %1%, UDP: %2%, TLS: %3%), %4% " -"arayüzü kullanılarak haritalandı" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Harici IP alımı başarısız oldu" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Port haritalaması başarısız oldu" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "%1% arayüzündeki port haritalaması başarıyla kaldırıldı" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "%1% arayüzündeki port haritalamasının kaldırılması başarısız oldu" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "Bağlantı zaten mevcut." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "%1% dosyası gönderilemedi: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IPFiltresi: şuraya gelen bağlantı engellendi:" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Bağlantı kesildi, kullanıcı hub'dan çıkıyor: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Geçersiz veri" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "ADC bağlantısında UTF-8 olmayan veri" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d B" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f KiB" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "%.02f KB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f MiB" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "%.02f MB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f GiB" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "%.02f GB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f TiB" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "%.02f TB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f PiB" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "%.02f PB" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s B" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld B" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "TTH tutarsızlığı" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Talep edilenden çok bayt yazıldı" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" + +#~ msgid "%1% (%2%)" +#~ msgstr "%1% (%2%)" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/uk.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/uk.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/uk.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/uk.po 2019-05-06 22:23:37.000000000 +0000 @@ -1,18 +1,15 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR EiskaltDC++ team # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Boris Pek , 2019. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: gray , 2018\n" -"Language-Team: Ukrainian (https://www.transifex.com/tehnick/teams/11818/" -"uk/)\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" +"PO-Revision-Date: 2019-04-09 17:26+0300\n" +"Last-Translator: Boris Pek \n" +"Language-Team: Russian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,28 +18,29 @@ "11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % " "100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || " "(n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n" +"X-Generator: Lokalize 2.0\n" #: ../ADLSearch.cpp:40 msgid "" msgstr "<Введіть рядок>" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "Не зважати" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "%1% (%2%) має цей самий CID {%3%} як %4% (%5%), ігноровано" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "%1%/с" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "Не вдалось визначити базовий протокол" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" @@ -50,87 +48,95 @@ "Можливо, хаб використовує стару версію ADC, будь ласка, сповістіть володаря " "про оновлення." -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "%1% був відкинутий %2%: %3%" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "%1% був відкинутий: %2%" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "З'єднання не прослуховуються - будь ласка, перезапустіть %1%" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "Помилка під час компресії" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "Помилка під час декомпресії" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "Час з'єднання вичерпався" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "З'єднання закрито" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "Перевищена максимальна довжина команди" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "Відключено" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "Відправлено " -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "Поза мережею" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "Усі слоти скачування зайняті" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "З'єднання відновлено" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "Помилка SSL: %1% (%2%, %3%)" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "Заблоковано C-C підключення до хабу ('%1%:%2%'; запит від '%3%')" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "Визначення найкращих налаштувань з'єднання ..." -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" "Неможливо відкрити порт(и) %1%. Налаштування підключення повинні бути " "встановлені вручну" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" "Публічна IP-адреса виявлена, вибирається активний режим із прямим " "підключенням" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." @@ -138,7 +144,7 @@ "Виявлена локальна мережа з можливим використанням NAT, роблю спробу " "прокинути порти, використовуючи UPnP..." -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" @@ -146,227 +152,311 @@ "Автоматичне встановлення активного режиму провалилося. Ви можете спробувати " "встановити своє підключення вручну для кращого зв'язку" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "Порт передач (TCP)" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "Порт пошуку (UDP)" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "DHT (UDP)" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "Підключення: " -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "Не вибрано файл приватного ключа" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "Не вибраний файл сертифікату" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "Помилка генерування сертифікату" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "TLS заборонений, не встановлено сертифікат файлу" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "Новий TLS сертифікат згенеровано" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "TLS заборонений, не вдалось сгенерувати сертифікат: %1%" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "Файл сертифікату не завантажено" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "Особовий ключ не завантажено" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "Хешувати базу даних" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "Файли у доступі" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "В черзі" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "Користувачі" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "Відсутнє ім'я теки" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "ІР-Фільтр: Блоковано вихідне з'єднання з " -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "Невірний розмір" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "Відгук не відповідає запиту" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "Неможливо відкрити цільовий файл %1%" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Повне дерево не співпадає з TTH коренем" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "Немає вільних слотів" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "%1%: Файл недоступний" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "Відкинути користувача" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "Перенаправити користувача" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "Автопідключення групи" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "Не вдалось виконати хешування: %1%" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "Хешування закінчено: %1% (%2% at %3%/s)" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "Хешування закінчено: %1% (%2%)" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "Хешування закінчено: %1%" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "Помилка зберігання хеш даних: %1%" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "Неможливо прочитати хеш файлу" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "Помилка створення файлу даних хеша: %1%" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "Хешувати перебудовану базу" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" "%1% не розшарено; підрахована CRC32 не відповідає знайденій у SFV файлі." -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "Помилка хешування %1%: %2%" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +#, fuzzy +msgid "Transfer-encoding error (%1%)" +msgstr " Порт передачі (%1% TCP)" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "Нескінченний цикл перенаправлення (%1%)" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "Немає доступної реалізації UPnP" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "Інша спроба прокидання портів через UPnP ще не завершена..." + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "Не вдалося ініціалізувати інтерфейс %1%" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr " Порт передачі (%1% TCP)" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "Спроба прокинути порт %2% на %3% провалилася для інтерфейсу %1%" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr " Порт шифрованої передачі (%1% TCP)" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr " Порт для пошуку (%1% UDP)" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "DHT порт (%1% UDP)" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" +"Успішно виконане прокидання портів (TCP: %1%, UDP: %2%, TLS: %3%), " +"використовується інтерфейс %4%" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "Не вдалося отримати зовнішній IP" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "Неможливо створити перенаправлення портів" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "Успішно видалено кидок портів з інтерфейсу %1%" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "Не вдалося видалити кидок портів з інтерфейсу %1%" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "UPnP: %1%" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "%1% (Нік невідомий)" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "Топік хабу:" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "ГіБ" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "в" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "Немає необхідної частини" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "Пошук TTH альтернатив для: %1%" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "Файл з ідентичним хешом уже існує у вашому доступі" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "Цей файл вже є у черзі" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "Файл з іншим розміром уже існує в черзі" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "Файл з іншим tth коренем уже існує в черзі" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "Ви намагаєтесь завантажити у себе!" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "Файл з іншим кореневим TTH вже існує в черзі" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "Завантаження цього файлу вже завершилось" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "Назва файла призначення надто довге" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" @@ -374,164 +464,164 @@ "Невірний файл призначення (відсутня папка, перевірте конфігурацію папки " "завантаження за вмовчуванням)" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "Файл вже існує в пункті призначення" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "Джерело копії: %1%" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "Видалено" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "Цільовий файл відсутній або має неправильний розмір" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "Не вдалося перемістити %1% до %2% (%3%); перейменовано на %4%" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "Не вдалося перемістити %1% до %2% (%3%); перейменовано на %4% (%5%)" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "Неможливо відкрити список файлів: %1%" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "%1%: Узгоджений файл %2%" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" "Каталог призначення для цього елемента недоступний: %1%; завантаження " "припинено." -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "CRC32 несумісність (SFV перевірка цілісності файла)" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "%1% : Погоджено %2% файлів" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "Помилка SSL: %1% (%2%, %3%)" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "Будь-який" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "Аудіо" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "Архів" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "Документ" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "Виконувані" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "Зображення" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "Відео" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Тека" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "Образ" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "Пошук знову увімкнено" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "Пошук відключений: %1%" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "завантажено з" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "Неправильне ім'я типу пошуку" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "Цей тип пошуку вже використовується" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "Немає такого типу пошуку" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "Помилка: опцію не знайдено!" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "Опція ядра" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "Змінити опцію ядра" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "Папка не вказана" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "Директорія прихована" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "Тимчасова папка скачування не може бути в доступі" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "Знайдено неправильне ім'я файлу під час хешування папки %1%" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "Пропущен нерасшаренний файл: %1% (Розмір: %2%)" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "Пропущен нерасшаренний тимчасовий файл: %1% (Розмір: %2%)" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" "Дублікат файла не буде розшарено: %1% (Розмір: %2% Б) Копія співпала з: %3%" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" @@ -539,46 +629,46 @@ "Виконується оновлення списку файлів, будь ласка, зачекайте закінчення перед " "спробою оновити знов" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "Не вдалось оновити список файлів: %1%" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "Оновлення списку файлів розпочато" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "Оновлення списку файлів закінчено" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "Список файлів %1% згенеровано" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "Невідома помилка: 0x%1$x" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "Сокет-серверу не вдалось встановити зв’язок" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "Сокет-сервер вимагає авторизацію" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "Сокет-сервер на підтримує авторизацію користувач / пароль" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" "Сокет-сервер авторизація не вдалась (неправильне ім’я користувача / паролю?)" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" @@ -586,170 +676,118 @@ "Не вдалось налаштувати сокет-сервер для UDP передачі (перевірте адресу і " "порт сокета)" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "Неможливо створити потік" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "Немає доступної реалізації UPnP" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "Інша спроба прокидання портів через UPnP ще не завершена..." - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "Не вдалося ініціалізувати інтерфейс %1%" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr " Порт передачі (%1% TCP)" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "Спроба прокинути порт %2% на %3% провалилася для інтерфейсу %1%" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr " Порт шифрованої передачі (%1% TCP)" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr " Порт для пошуку (%1% UDP)" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "DHT порт (%1% UDP)" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" -"Успішно виконане прокидання портів (TCP: %1%, UDP: %2%, TLS: %3%), " -"використовується інтерфейс %4%" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "Не вдалося отримати зовнішній IP" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "Неможливо створити перенаправлення портів" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "Успішно видалено кидок портів з інтерфейсу %1%" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "Не вдалося видалити кидок портів з інтерфейсу %1%" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "UPnP: %1%" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "З'єднання вже існує." -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "Неможливо відправити файл %1%: %2%" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "IP-Фільтр: Блоковано вхідне з'єдання з " -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "Відключений користувач залишає хаб: %1%" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "Невірні дані" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "Дані не в UTF-8 у ADC з'єднанні" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "%d Б" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "%.02f КБ" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "%.02f МБ" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "%.02f ГБ" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "%.02f ТБ" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "%.02f ПБ" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "%s Б" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "%'lld Б" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "Незбіг TTH" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "Записано більше байтів ніж потрібно" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" + +#~ msgid "%1% (%2%)" +#~ msgstr "%1% (%2%)" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/vi.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/vi.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/vi.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/vi.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Anh Phan , 2017\n" "Language-Team: Vietnamese (https://www.transifex.com/tehnick/teams/11818/" @@ -23,707 +23,743 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" msgstr "" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "Hàng đợi tải xuống" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "Cây dạng đầy đủ không khớp với TTH root" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" msgstr "" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "Thư mục" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/zh_CN.po eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/zh_CN.po --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/po/zh_CN.po 2018-08-31 23:00:27.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/po/zh_CN.po 2019-05-06 22:23:37.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://github.com/eiskaltdcpp/eiskaltdcpp/issues\n" -"POT-Creation-Date: 2018-08-31 01:04+0300\n" +"POT-Creation-Date: 2019-05-07 01:10+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Syaoming Lai , 2017\n" "Language-Team: Chinese (China) (https://www.transifex.com/tehnick/" @@ -23,707 +23,743 @@ msgid "" msgstr "" -#: ../ADLSearch.cpp:487 +#: ../ADLSearch.cpp:444 msgid "Discard" msgstr "" -#: ../AdcHub.cpp:156 +#: ../AdcHub.cpp:155 msgid "%1% (%2%) has same CID {%3%} as %4% (%5%), ignoring" msgstr "" -#: ../AdcHub.cpp:193 ../QueueManager.cpp:2209 ../Transfer.cpp:91 +#: ../AdcHub.cpp:192 ../QueueManager.cpp:2188 ../Transfer.cpp:91 msgid "%1%/s" msgstr "" -#: ../AdcHub.cpp:228 +#: ../AdcHub.cpp:227 msgid "Failed to negotiate base protocol" msgstr "" -#: ../AdcHub.cpp:234 +#: ../AdcHub.cpp:233 msgid "" "Hub probably uses an old version of ADC, please encourage the owner to " "upgrade" msgstr "" -#: ../AdcHub.cpp:305 +#: ../AdcHub.cpp:304 msgid "%1% was kicked by %2%: %3%" msgstr "" -#: ../AdcHub.cpp:308 +#: ../AdcHub.cpp:307 msgid "%1% was kicked: %2%" msgstr "" -#: ../AdcHub.cpp:694 +#: ../AdcHub.cpp:709 msgid "Not listening for connections - please restart %1%" msgstr "" -#: ../BZUtils.cpp:33 ../BZUtils.cpp:54 ../BZUtils.cpp:62 ../ZUtils.cpp:37 -#: ../ZUtils.cpp:58 ../ZUtils.cpp:80 ../ZUtils.cpp:90 +#: ../BZUtils.cpp:34 ../BZUtils.cpp:55 ../BZUtils.cpp:63 ../ZUtils.cpp:36 +#: ../ZUtils.cpp:65 ../ZUtils.cpp:92 ../ZUtils.cpp:102 msgid "Error during compression" msgstr "" -#: ../BZUtils.cpp:74 ../BZUtils.cpp:96 ../BZUtils.cpp:99 -#: ../CryptoManager.cpp:405 ../CryptoManager.cpp:424 ../CryptoManager.cpp:438 -#: ../ZUtils.cpp:104 ../ZUtils.cpp:127 ../ZUtils.cpp:137 +#: ../BZUtils.cpp:75 ../BZUtils.cpp:97 ../BZUtils.cpp:100 +#: ../CryptoManager.cpp:406 ../CryptoManager.cpp:425 ../CryptoManager.cpp:439 +#: ../ZUtils.cpp:116 ../ZUtils.cpp:138 ../ZUtils.cpp:152 msgid "Error during decompression" msgstr "" -#: ../BufferedSocket.cpp:153 ../BufferedSocket.cpp:169 -#: ../ConnectionManager.cpp:186 ../Socket.cpp:221 +#: ../BufferedSocket.cpp:159 ../BufferedSocket.cpp:175 +#: ../ConnectionManager.cpp:204 ../Socket.cpp:220 msgid "Connection timeout" msgstr "" -#: ../BufferedSocket.cpp:184 ../SSLSocket.cpp:161 +#: ../BufferedSocket.cpp:190 ../SSLSocket.cpp:197 msgid "Connection closed" msgstr "" -#: ../BufferedSocket.cpp:275 +#: ../BufferedSocket.cpp:281 msgid "Maximum command length exceeded" msgstr "" -#: ../BufferedSocket.cpp:461 +#: ../BufferedSocket.cpp:467 msgid "Disconnected" msgstr "" -#: ../ChatMessage.cpp:33 +#: ../ChatMessage.cpp:35 msgid "Sent " msgstr "" -#: ../ClientManager.cpp:178 ../QueueManager.cpp:2180 ../QueueManager.cpp:2186 -#: ../QueueManager.cpp:2192 ../SearchManager.cpp:281 ../SearchManager.cpp:368 -#: ../SearchManager.cpp:370 ../Transfer.cpp:81 ../Transfer.cpp:85 +#: ../ClientManager.cpp:186 ../QueueManager.cpp:2159 ../QueueManager.cpp:2165 +#: ../QueueManager.cpp:2171 ../SearchManager.cpp:279 ../SearchManager.cpp:366 +#: ../SearchManager.cpp:368 ../Transfer.cpp:81 ../Transfer.cpp:85 msgid "Offline" msgstr "" -#: ../ConnectionManager.cpp:179 +#: ../ConnectionManager.cpp:197 msgid "All download slots taken" msgstr "" -#: ../ConnectionManager.cpp:253 +#: ../ConnectionManager.cpp:278 msgid "Connectivity restored" msgstr "" -#: ../ConnectionManager.cpp:261 +#: ../ConnectionManager.cpp:286 msgid "Connectivity error: %1%" msgstr "" -#: ../ConnectivityManager.cpp:80 +#: ../ConnectionManager.cpp:817 +msgid "Blocked a C-C connection to a hub ('%1%:%2%'; request from '%3%')" +msgstr "" + +#: ../ConnectionManager.cpp:835 +msgid "Blocking '%1%', potential DDoS detected (originating hub '%2%')" +msgstr "" + +#: ../ConnectivityManager.cpp:83 msgid "Determining the best connectivity settings..." msgstr "" -#: ../ConnectivityManager.cpp:85 +#: ../ConnectivityManager.cpp:88 msgid "" "Unable to open %1% port(s); connectivity settings must be configured manually" msgstr "" -#: ../ConnectivityManager.cpp:95 +#: ../ConnectivityManager.cpp:98 msgid "" "Public IP address detected, selecting active mode with direct connection" msgstr "" -#: ../ConnectivityManager.cpp:102 +#: ../ConnectivityManager.cpp:105 msgid "" "Local network with possible NAT detected, trying to map the ports using " "UPnP..." msgstr "" -#: ../ConnectivityManager.cpp:130 +#: ../ConnectivityManager.cpp:133 msgid "" "Automatic setup of active mode has failed. You may want to set up your " "connection manually for better connectivity" msgstr "" -#: ../ConnectivityManager.cpp:142 +#: ../ConnectivityManager.cpp:145 msgid "Transfer (TCP)" msgstr "" -#: ../ConnectivityManager.cpp:148 +#: ../ConnectivityManager.cpp:151 msgid "Search (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:154 +#: ../ConnectivityManager.cpp:157 msgid "DHT (UDP)" msgstr "" -#: ../ConnectivityManager.cpp:169 +#: ../ConnectivityManager.cpp:172 msgid "Connectivity: " msgstr "" -#: ../CryptoManager.cpp:167 +#: ../CryptoManager.cpp:166 msgid "No private key file chosen" msgstr "" -#: ../CryptoManager.cpp:170 +#: ../CryptoManager.cpp:169 msgid "No certificate file chosen" msgstr "" -#: ../CryptoManager.cpp:182 +#: ../CryptoManager.cpp:181 msgid "Error generating certificate" msgstr "" -#: ../CryptoManager.cpp:245 +#: ../CryptoManager.cpp:244 msgid "TLS disabled, no certificate file set" msgstr "" -#: ../CryptoManager.cpp:253 +#: ../CryptoManager.cpp:252 msgid "Generated new TLS certificate" msgstr "" -#: ../CryptoManager.cpp:255 +#: ../CryptoManager.cpp:254 msgid "TLS disabled, failed to generate certificate: %1%" msgstr "" -#: ../CryptoManager.cpp:260 ../CryptoManager.cpp:264 ../CryptoManager.cpp:269 -#: ../CryptoManager.cpp:273 +#: ../CryptoManager.cpp:259 ../CryptoManager.cpp:263 ../CryptoManager.cpp:268 +#: ../CryptoManager.cpp:272 msgid "Failed to load certificate file" msgstr "" -#: ../CryptoManager.cpp:278 ../CryptoManager.cpp:282 ../CryptoManager.cpp:287 -#: ../CryptoManager.cpp:291 +#: ../CryptoManager.cpp:277 ../CryptoManager.cpp:281 ../CryptoManager.cpp:286 +#: ../CryptoManager.cpp:290 msgid "Failed to load private key" msgstr "" -#: ../DCPlusPlus.cpp:121 +#: ../DCPlusPlus.cpp:115 msgid "Hash database" msgstr "" -#: ../DCPlusPlus.cpp:124 +#: ../DCPlusPlus.cpp:118 msgid "Shared Files" msgstr "" -#: ../DCPlusPlus.cpp:133 +#: ../DCPlusPlus.cpp:127 msgid "Download Queue" msgstr "下载队列" -#: ../DCPlusPlus.cpp:136 +#: ../DCPlusPlus.cpp:130 msgid "Users" msgstr "用户" -#: ../DirectoryListing.cpp:209 +#: ../DirectoryListing.cpp:95 +msgid "Invalid file list extension (must be .xml or .bz2)" +msgstr "" + +#: ../DirectoryListing.cpp:214 msgid "Directory missing name attribute" msgstr "" -#: ../DownloadManager.cpp:135 +#: ../DownloadManager.cpp:133 msgid "IPFilter: Blocked outgoing connection to " msgstr "" -#: ../DownloadManager.cpp:237 +#: ../DownloadManager.cpp:233 msgid "Invalid size" msgstr "" -#: ../DownloadManager.cpp:242 +#: ../DownloadManager.cpp:238 msgid "Response does not match request" msgstr "" -#: ../DownloadManager.cpp:249 +#: ../DownloadManager.cpp:245 msgid "Could not open target file: %1%" msgstr "" -#: ../DownloadManager.cpp:328 +#: ../DownloadManager.cpp:324 msgid "Full tree does not match TTH root" msgstr "完整的树与 TTH 根不符" -#: ../DownloadManager.cpp:393 +#: ../DownloadManager.cpp:388 msgid "No slots available" msgstr "" -#: ../DownloadManager.cpp:504 +#: ../DownloadManager.cpp:499 msgid "%1%: File not available" msgstr "" -#: ../FavoriteManager.cpp:429 +#: ../FavoriteManager.cpp:409 msgid "Kick user(s)" msgstr "" -#: ../FavoriteManager.cpp:433 +#: ../FavoriteManager.cpp:413 msgid "Redirect user(s)" msgstr "" -#: ../FavoriteManager.cpp:489 +#: ../FavoriteManager.cpp:469 msgid "Auto-connect group (converted)" msgstr "" -#: ../HashManager.cpp:218 ../HashManager.cpp:418 +#: ../FavoriteManager.cpp:667 +msgid "Invalid URL: %1%" +msgstr "" + +#: ../HashManager.cpp:230 ../HashManager.cpp:428 msgid "Hashing failed: %1%" msgstr "" -#: ../HashManager.cpp:225 +#: ../HashManager.cpp:237 msgid "Finished hashing: %1% (%2% at %3%/s)" msgstr "" -#: ../HashManager.cpp:228 +#: ../HashManager.cpp:240 msgid "Finished hashing: %1% (%2%)" msgstr "" -#: ../HashManager.cpp:231 +#: ../HashManager.cpp:243 msgid "Finished hashing: %1%" msgstr "" -#: ../HashManager.cpp:260 ../HashManager.cpp:474 +#: ../HashManager.cpp:271 ../HashManager.cpp:483 msgid "Error saving hash data: %1%" msgstr "" -#: ../HashManager.cpp:273 +#: ../HashManager.cpp:284 msgid "Unable to read hash data file" msgstr "" -#: ../HashManager.cpp:606 +#: ../HashManager.cpp:616 msgid "Error creating hash data file: %1%" msgstr "" -#: ../HashManager.cpp:958 +#: ../HashManager.cpp:967 msgid "Hash database rebuilt" msgstr "" -#: ../HashManager.cpp:1052 +#: ../HashManager.cpp:1061 msgid "" "%1% not shared; calculated CRC32 does not match the one found in SFV file." msgstr "" -#: ../HashManager.cpp:1057 +#: ../HashManager.cpp:1066 msgid "Error hashing %1%: %2%" msgstr "" -#: ../HttpConnection.cpp:166 +#: ../HttpConnection.cpp:218 +msgid "Transfer-encoding error (%1%)" +msgstr "" + +#: ../HttpConnection.cpp:257 msgid "Endless redirection loop (%1%)" msgstr "" -#: ../NmdcHub.cpp:295 +#: ../HttpConnection.cpp:301 +msgid "Too much data in response body (%1%)" +msgstr "" + +#: ../MappingManager.cpp:44 +msgid "No UPnP implementation available" +msgstr "" + +#: ../MappingManager.cpp:49 +msgid "Another UPnP port mapping attempt is in progress..." +msgstr "" + +#: ../MappingManager.cpp:81 +msgid "Failed to initialize the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:85 +msgid " Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:86 ../MappingManager.cpp:91 ../MappingManager.cpp:96 +#: ../MappingManager.cpp:101 +msgid "The %1% interface has failed to map the %2% %3% port" +msgstr "" + +#: ../MappingManager.cpp:90 +msgid " Encrypted Transfer Port (%1% TCP)" +msgstr "" + +#: ../MappingManager.cpp:95 +msgid " Search Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:100 +msgid " DHT Port (%1% UDP)" +msgstr "" + +#: ../MappingManager.cpp:110 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " +"mapped using the %5% interface" +msgstr "" + +#: ../MappingManager.cpp:112 ../MappingManager.cpp:114 +msgid "" +"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " +"using the %4% interface" +msgstr "" + +#: ../MappingManager.cpp:126 +msgid "Failed to get external IP" +msgstr "" + +#: ../MappingManager.cpp:136 +msgid "Failed to create port mappings" +msgstr "" + +#: ../MappingManager.cpp:145 +msgid "Successfully removed port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:146 +msgid "Failed to remove port mappings with the %1% interface" +msgstr "" + +#: ../MappingManager.cpp:151 +msgid "UPnP: %1%" +msgstr "" + +#: ../NmdcHub.cpp:299 msgid "%1% (Nick unknown)" msgstr "" -#: ../NmdcHub.cpp:672 +#: ../NmdcHub.cpp:680 msgid "Hub topic:" msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "Too small share to download from " msgstr "" -#: ../PerFolderLimit.cpp:88 +#: ../PerFolderLimit.cpp:87 msgid "GiB" msgstr "GiB" -#: ../PerFolderLimit.cpp:90 +#: ../PerFolderLimit.cpp:89 msgid "Denied to send file" msgstr "" -#: ../PerFolderLimit.cpp:91 ../SettingsManager.cpp:614 +#: ../PerFolderLimit.cpp:90 ../SettingsManager.cpp:618 msgid " to " msgstr "" -#: ../QueueManager.cpp:252 +#: ../QueueManager.cpp:231 msgid "No needed part" msgstr "" -#: ../QueueManager.cpp:642 +#: ../QueueManager.cpp:619 msgid "Searching TTH alternates for: %1%" msgstr "" -#: ../QueueManager.cpp:693 ../QueueManager.cpp:754 +#: ../QueueManager.cpp:670 ../QueueManager.cpp:731 msgid "A file with the same hash already exists in your share" msgstr "" -#: ../QueueManager.cpp:719 ../QueueManager.cpp:796 +#: ../QueueManager.cpp:695 ../QueueManager.cpp:772 msgid "This file is already queued" msgstr "" -#: ../QueueManager.cpp:732 ../QueueManager.cpp:808 +#: ../QueueManager.cpp:708 ../QueueManager.cpp:784 msgid "A file with a different size already exists in the queue" msgstr "" -#: ../QueueManager.cpp:736 +#: ../QueueManager.cpp:712 msgid "A file with different tth root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:748 +#: ../QueueManager.cpp:725 msgid "You're trying to download from yourself!" msgstr "" -#: ../QueueManager.cpp:811 +#: ../QueueManager.cpp:787 msgid "A file with a different TTH root already exists in the queue" msgstr "" -#: ../QueueManager.cpp:815 +#: ../QueueManager.cpp:791 msgid "This file has already finished downloading" msgstr "" -#: ../QueueManager.cpp:852 ../QueueManager.cpp:861 +#: ../QueueManager.cpp:828 ../QueueManager.cpp:837 msgid "Target filename too long" msgstr "" -#: ../QueueManager.cpp:857 ../QueueManager.cpp:865 +#: ../QueueManager.cpp:833 ../QueueManager.cpp:841 msgid "" "Invalid target file (missing directory, check default download directory " "setting)" msgstr "" -#: ../QueueManager.cpp:873 +#: ../QueueManager.cpp:849 msgid "File already exists at the target location" msgstr "" -#: ../QueueManager.cpp:886 ../QueueManager.cpp:890 +#: ../QueueManager.cpp:862 ../QueueManager.cpp:866 msgid "Duplicate source: %1%" msgstr "" -#: ../QueueManager.cpp:1157 +#: ../QueueManager.cpp:1144 msgid "Target removed" msgstr "" -#: ../QueueManager.cpp:1165 +#: ../QueueManager.cpp:1152 msgid "Target file is missing or wrong size" msgstr "" -#: ../QueueManager.cpp:1214 +#: ../QueueManager.cpp:1201 msgid "Unable to move %1% to %2% (%3%); renamed to %4%" msgstr "" -#: ../QueueManager.cpp:1217 +#: ../QueueManager.cpp:1204 msgid "Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)" msgstr "" -#: ../QueueManager.cpp:1412 +#: ../QueueManager.cpp:1402 msgid "Unable to open filelist: %1%" msgstr "" -#: ../QueueManager.cpp:1435 +#: ../QueueManager.cpp:1424 msgid "%1%: Matched %2% file" msgstr "" -#: ../QueueManager.cpp:1805 +#: ../QueueManager.cpp:1794 msgid "Target path for this item is not available: %1%; pause this queue item." msgstr "" -#: ../QueueManager.cpp:2044 ../QueueManager.cpp:2053 +#: ../QueueManager.cpp:2027 ../QueueManager.cpp:2036 msgid "CRC32 inconsistency (SFV-Check)" msgstr "" -#: ../QueueManager.cpp:2234 +#: ../QueueManager.cpp:2210 msgid "%1% : Matched %2% files" msgstr "" -#: ../SSLSocket.cpp:167 +#: ../SSLSocket.cpp:203 msgid "SSL Error: %1% (%2%, %3%)" msgstr "" -#: ../SearchManager.cpp:36 +#: ../SearchManager.cpp:37 msgid "Any" msgstr "" -#: ../SearchManager.cpp:37 +#: ../SearchManager.cpp:38 msgid "Audio" msgstr "" -#: ../SearchManager.cpp:38 +#: ../SearchManager.cpp:39 msgid "Compressed" msgstr "" -#: ../SearchManager.cpp:39 +#: ../SearchManager.cpp:40 msgid "Document" msgstr "" -#: ../SearchManager.cpp:40 +#: ../SearchManager.cpp:41 msgid "Executable" msgstr "" -#: ../SearchManager.cpp:41 +#: ../SearchManager.cpp:42 msgid "Picture" msgstr "" -#: ../SearchManager.cpp:42 +#: ../SearchManager.cpp:43 msgid "Video" msgstr "" -#: ../SearchManager.cpp:43 +#: ../SearchManager.cpp:44 msgid "Directory" msgstr "目录" -#: ../SearchManager.cpp:44 +#: ../SearchManager.cpp:45 msgid "TTH" msgstr "TTH" -#: ../SearchManager.cpp:45 +#: ../SearchManager.cpp:46 msgid "CD Image" msgstr "" -#: ../SearchManager.cpp:149 +#: ../SearchManager.cpp:148 msgid "Search enabled again" msgstr "" -#: ../SearchManager.cpp:157 +#: ../SearchManager.cpp:156 msgid "Search disabled: %1%" msgstr "" -#: ../SettingsManager.cpp:182 +#: ../SettingsManager.cpp:187 msgid "downloaded from" msgstr "" -#: ../SettingsManager.cpp:523 +#: ../SettingsManager.cpp:527 msgid "Invalid search type name" msgstr "" -#: ../SettingsManager.cpp:527 ../SettingsManager.cpp:549 +#: ../SettingsManager.cpp:531 ../SettingsManager.cpp:553 msgid "This search type already exists" msgstr "" -#: ../SettingsManager.cpp:581 +#: ../SettingsManager.cpp:585 msgid "No such search type" msgstr "" -#: ../SettingsManager.cpp:609 ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:613 ../SettingsManager.cpp:618 msgid "Error: setting not found!" msgstr "" -#: ../SettingsManager.cpp:609 +#: ../SettingsManager.cpp:613 msgid "Core setting " msgstr "" -#: ../SettingsManager.cpp:614 +#: ../SettingsManager.cpp:618 msgid "Change core setting " msgstr "" -#: ../ShareManager.cpp:446 +#: ../ShareManager.cpp:452 msgid "No directory specified" msgstr "" -#: ../ShareManager.cpp:450 +#: ../ShareManager.cpp:456 msgid "Directory is hidden" msgstr "" -#: ../ShareManager.cpp:454 +#: ../ShareManager.cpp:460 msgid "The temporary download directory cannot be shared" msgstr "" -#: ../ShareManager.cpp:642 +#: ../ShareManager.cpp:651 msgid "Invalid file name found while hashing folder %1%" msgstr "" -#: ../ShareManager.cpp:661 +#: ../ShareManager.cpp:670 msgid "Skip share file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:682 +#: ../ShareManager.cpp:691 msgid "Skip share temp file: %1% (Size: %2%)" msgstr "" -#: ../ShareManager.cpp:772 +#: ../ShareManager.cpp:781 msgid "" "Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: " "%3%" msgstr "" -#: ../ShareManager.cpp:793 +#: ../ShareManager.cpp:803 msgid "" "File list refresh in progress, please wait for it to finish before trying to " "refresh again" msgstr "" -#: ../ShareManager.cpp:814 +#: ../ShareManager.cpp:824 msgid "File list refresh failed: %1%" msgstr "" -#: ../ShareManager.cpp:837 +#: ../ShareManager.cpp:845 msgid "File list refresh initiated" msgstr "" -#: ../ShareManager.cpp:862 +#: ../ShareManager.cpp:870 msgid "File list refresh finished" msgstr "" -#: ../ShareManager.cpp:944 +#: ../ShareManager.cpp:952 msgid "File list %1% generated" msgstr "" -#: ../Socket.cpp:86 +#: ../Socket.cpp:85 #, c-format msgid "Unknown error: 0x%1$x" msgstr "" -#: ../Socket.cpp:229 ../Socket.cpp:237 ../Socket.cpp:270 ../Socket.cpp:274 -#: ../Socket.cpp:298 ../Socket.cpp:313 +#: ../Socket.cpp:228 ../Socket.cpp:236 ../Socket.cpp:269 ../Socket.cpp:273 +#: ../Socket.cpp:297 ../Socket.cpp:312 msgid "The socks server failed establish a connection" msgstr "" -#: ../Socket.cpp:302 +#: ../Socket.cpp:301 msgid "The socks server requires authentication" msgstr "" -#: ../Socket.cpp:316 +#: ../Socket.cpp:315 msgid "The socks server doesn't support login / password authentication" msgstr "" -#: ../Socket.cpp:330 ../Socket.cpp:334 +#: ../Socket.cpp:329 ../Socket.cpp:333 msgid "Socks server authentication failed (bad login / password?)" msgstr "" -#: ../Socket.cpp:471 +#: ../Socket.cpp:518 msgid "" "Failed to set up the socks server for UDP relay (check socks address and " "port)" msgstr "" -#: ../Thread.cpp:34 ../Thread.cpp:42 +#: ../Thread.cpp:29 ../Thread.cpp:37 msgid "Unable to create thread" msgstr "" -#: ../UPnPManager.cpp:45 -msgid "No UPnP implementation available" -msgstr "" - -#: ../UPnPManager.cpp:50 -msgid "Another UPnP port mapping attempt is in progress..." -msgstr "" - -#: ../UPnPManager.cpp:82 -msgid "Failed to initialize the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:86 -msgid " Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:87 ../UPnPManager.cpp:92 ../UPnPManager.cpp:97 -#: ../UPnPManager.cpp:102 -msgid "The %1% interface has failed to map the %2% %3% port" -msgstr "" - -#: ../UPnPManager.cpp:91 -msgid " Encrypted Transfer Port (%1% TCP)" -msgstr "" - -#: ../UPnPManager.cpp:96 -msgid " Search Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:101 -msgid " DHT Port (%1% UDP)" -msgstr "" - -#: ../UPnPManager.cpp:111 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%, DHT: %4%), " -"mapped using the %5% interface" -msgstr "" - -#: ../UPnPManager.cpp:113 ../UPnPManager.cpp:115 -msgid "" -"Successfully created port mappings (TCP: %1%, UDP: %2%, TLS: %3%), mapped " -"using the %4% interface" -msgstr "" - -#: ../UPnPManager.cpp:127 -msgid "Failed to get external IP" -msgstr "" - -#: ../UPnPManager.cpp:137 -msgid "Failed to create port mappings" -msgstr "" - -#: ../UPnPManager.cpp:146 -msgid "Successfully removed port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:147 -msgid "Failed to remove port mappings with the %1% interface" -msgstr "" - -#: ../UPnPManager.cpp:152 -msgid "UPnP: %1%" -msgstr "" - -#: ../UploadManager.cpp:133 +#: ../UploadManager.cpp:134 msgid "Connection already exists." msgstr "" -#: ../UploadManager.cpp:268 +#: ../UploadManager.cpp:269 msgid "Unable to send file %1%: %2%" msgstr "" -#: ../UploadManager.cpp:555 +#: ../UploadManager.cpp:549 msgid "IPFilter: Blocked incoming connection to " msgstr "" -#: ../UploadManager.cpp:625 +#: ../UploadManager.cpp:617 msgid "Disconnected user leaving the hub: %1%" msgstr "" -#: ../UserConnection.cpp:53 ../UserConnection.cpp:68 ../UserConnection.cpp:145 +#: ../UserConnection.cpp:56 ../UserConnection.cpp:71 ../UserConnection.cpp:145 msgid "Invalid data" msgstr "" -#: ../UserConnection.cpp:59 +#: ../UserConnection.cpp:62 msgid "Non-UTF-8 data in an ADC connection" msgstr "" -#: ../Util.cpp:681 +#: ../Util.cpp:715 #, c-format msgid "%d B" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KiB" msgstr "" -#: ../Util.cpp:683 +#: ../Util.cpp:717 #, c-format msgid "%.02f KB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MiB" msgstr "" -#: ../Util.cpp:685 +#: ../Util.cpp:719 #, c-format msgid "%.02f MB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GiB" msgstr "" -#: ../Util.cpp:687 +#: ../Util.cpp:721 #, c-format msgid "%.02f GB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TiB" msgstr "" -#: ../Util.cpp:689 +#: ../Util.cpp:723 #, c-format msgid "%.02f TB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PiB" msgstr "" -#: ../Util.cpp:691 +#: ../Util.cpp:725 #, c-format msgid "%.02f PB" msgstr "" -#: ../Util.cpp:725 +#: ../Util.cpp:759 #, c-format msgid "%s B" msgstr "" -#: ../Util.cpp:729 +#: ../Util.cpp:763 #, c-format msgid "%'lld B" msgstr "" -#: ../MerkleCheckOutputStream.h:52 ../MerkleCheckOutputStream.h:112 +#: ../MerkleCheckOutputStream.h:50 ../MerkleCheckOutputStream.h:110 msgid "TTH inconsistency" msgstr "" -#: ../Streams.h:141 +#: ../Streams.h:157 msgid "More bytes written than requested" msgstr "" + +#: ../../dht/BootstrapManager.cpp:50 +msgid "DHT bootstrapping started" +msgstr "" + +#: ../../dht/BootstrapManager.cpp:113 +msgid "DHT bootstrapping is finished successfully." +msgstr "" + +#: ../../dht/BootstrapManager.cpp:117 ../../dht/BootstrapManager.cpp:124 +msgid "DHT bootstrap error: " +msgstr "" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Pointer.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Pointer.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Pointer.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Pointer.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,18 +13,22 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include -#include -#include "noexcept.h" + +#include + +#include namespace dcpp { +using std::unique_ptr; +using std::forward; + template class intrusive_ptr_base { @@ -42,18 +47,18 @@ protected: intrusive_ptr_base() noexcept : ref(0) { } - virtual ~intrusive_ptr_base() { } + private: - friend void intrusive_ptr_add_ref(intrusive_ptr_base* p) {++p->ref;} + friend void intrusive_ptr_add_ref(intrusive_ptr_base* p) { ++p->ref; } friend void intrusive_ptr_release(intrusive_ptr_base* p) { if(--p->ref == 0) { delete static_cast(p); } } - boost::detail::atomic_count ref; + std::atomic ref; }; - struct DeleteFunction { template void operator()(const T& p) const { delete p; } }; } // namespace dcpp + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueItem.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueItem.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueItem.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueItem.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,13 +13,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "QueueItem.h" + #include "HashManager.h" #include "Download.h" #include "File.h" @@ -27,29 +27,29 @@ namespace dcpp { namespace { - const string TEMP_EXTENSION = ".dctmp"; +const string TEMP_EXTENSION = ".dctmp"; - string getTempName(const string& aFileName, const TTHValue& aRoot) { - string tmp(aFileName); - tmp += "." + aRoot.toBase32(); - tmp += TEMP_EXTENSION; - return tmp; - } +string getTempName(const string& aFileName, const TTHValue& aRoot) { + string tmp(aFileName); + tmp += "." + aRoot.toBase32(); + tmp += TEMP_EXTENSION; + return tmp; +} } int QueueItem::countOnlineUsers() const { int n = 0; - for(auto i = sources.begin(), iend = sources.end(); i != iend; ++i) { - if(i->getUser().user->isOnline()) - n++; + for(auto& i: sources) { + if(i.getUser().user->isOnline()) + n++; } return n; } void QueueItem::getOnlineUsers(HintedUserList& l) const { - for(auto i = sources.begin(), iend = sources.end(); i != iend; ++i) - if(i->getUser().user->isOnline()) - l.push_back(i->getUser()); + for(auto& i: sources) + if(i.getUser().user->isOnline()) + l.push_back(i.getUser()); } void QueueItem::addSource(const HintedUser& aUser) { @@ -59,7 +59,7 @@ sources.push_back(*i); badSources.erase(i); } else { - sources.push_back(Source(aUser)); + sources.emplace_back(aUser); } } @@ -162,7 +162,7 @@ if(targetSize > blockSize) { // Round off to nearest block size - targetSize = Util::roundDown(targetSize, blockSize); + targetSize = Util::roundDown(targetSize, blockSize); } else { targetSize = blockSize; } @@ -171,13 +171,13 @@ int64_t curSize = targetSize; while(start < getSize()) { - int64_t end = std::min(getSize(), start + curSize); + const int64_t end = std::min(getSize(), start + curSize); Segment block(start, end - start); bool overlaps = false; for(auto i = done.begin(); !overlaps && i != done.end(); ++i) { if(curSize <= blockSize) { - int64_t dstart = i->getStart(); - int64_t dend = i->getEnd(); + const int64_t dstart = i->getStart(); + const int64_t dend = i->getEnd(); // We accept partial overlaps, only consider the block done if it is fully consumed by the done block if(dstart <= start && dend >= end) { overlaps = true; @@ -199,18 +199,14 @@ int64_t b = max(start, *j); int64_t e = min(end, *(j+1)); - // segment must be blockSize aligned - dcassert(b % blockSize == 0); - dcassert(e % blockSize == 0 || e == getSize()); - bool merged = false; if(!neededParts.empty()) { Segment& prev = neededParts.back(); if(b == prev.getEnd() && e > prev.getEnd()) { - prev.setSize(prev.getSize() + (e - b)); - merged = true; + prev.setSize(prev.getSize() + (e - b)); + merged = true; } } @@ -244,30 +240,28 @@ if(partialSource == NULL && BOOLSETTING(OVERLAP_CHUNKS) && lastSpeed > 0) { // overlap slow running chunk - for(auto i = downloads.begin(); i != downloads.end(); ++i) { - Download* d = *i; + for(auto d: downloads) { // current chunk mustn't be already overlapped if(d->getOverlapped()) - continue; + continue; // current chunk must be running at least for 2 seconds if(d->getStart() == 0 || GET_TIME() - d->getStart() < 2000) - continue; + continue; // current chunk mustn't be finished in next 10 seconds if(d->getSecondsLeft() < 10) - continue; + continue; // overlap current chunk at last block boundary - int64_t pos = d->getPos() - (d->getPos() % blockSize); - int64_t size = d->getSize() - pos; + const int64_t pos = d->getPos() - (d->getPos() % blockSize); + const int64_t size = d->getSize() - pos; // new user should finish this chunk more than 2x faster - int64_t newChunkLeft = size / lastSpeed; + const int64_t newChunkLeft = size / lastSpeed; if(2 * newChunkLeft < d->getSecondsLeft()) { - dcdebug("Overlapping... old user: %I64d s, new user: %I64d s\n", static_cast(d->getSecondsLeft()), static_cast(newChunkLeft)); - return Segment(d->getStartPos() + pos, size/*, true*/);//TODO bool + return Segment(d->getStartPos() + pos, size/*, true*/); // TODO: bool } } } @@ -278,8 +272,8 @@ int64_t QueueItem::getDownloadedBytes() const { int64_t total = 0; - for(auto i = done.begin(); i != done.end(); ++i) { - total += i->getSize(); + for(auto& i: done) { + total += i.getSize(); } return total; } @@ -304,33 +298,40 @@ } } } -//Partial -bool QueueItem::isNeededPart(const PartsInfo& partsInfo, int64_t blockSize) -{ - dcassert(partsInfo.size() % 2 == 0); - SegmentConstIter i = done.begin(); - for(PartsInfo::const_iterator j = partsInfo.begin(); j != partsInfo.end(); j+=2) { +string QueueItem::getListName() const { + dcassert(isSet(QueueItem::FLAG_USER_LIST)); + if(isSet(QueueItem::FLAG_XML_BZLIST)) { + return getTarget() + ".xml.bz2"; + } else { + return getTarget() + ".xml"; + } +} + +// Partial +bool QueueItem::isNeededPart(const PartsInfo& partsInfo, int64_t blockSize) const { + auto i = done.begin(); + for(auto j = partsInfo.begin(); j != partsInfo.end(); j+=2) { while(i != done.end() && (*i).getEnd() <= (*j) * blockSize) ++i; if(i == done.end() || !((*i).getStart() <= (*j) * blockSize && (*i).getEnd() >= (*(j+1)) * blockSize)) - return true; + return true; } return false; - } void QueueItem::getPartialInfo(PartsInfo& partialInfo, int64_t blockSize) const { size_t maxSize = min(done.size() * 2, (size_t)510); partialInfo.reserve(maxSize); - SegmentConstIter i = done.begin(); - for(; i != done.end() && partialInfo.size() < maxSize; ++i) { + for(auto& i : done) { + if(partialInfo.size() >= maxSize) + break; - uint16_t s = (uint16_t)((*i).getStart() / blockSize); - uint16_t e = (uint16_t)(((*i).getEnd() - 1) / blockSize + 1); + uint16_t s = (uint16_t)(i.getStart() / blockSize); + uint16_t e = (uint16_t)((i.getEnd() - 1) / blockSize + 1); partialInfo.push_back(s); partialInfo.push_back(e); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueItem.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueItem.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueItem.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueItem.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -24,6 +24,9 @@ #include "Flags.h" #include "forward.h" #include "Segment.h" +#include "Util.h" +#include "GetSet.h" +#include "HintedUser.h" namespace dcpp { @@ -77,8 +80,8 @@ */ class PartialSource : public FastAlloc, public intrusive_ptr_base { public: - PartialSource(const string& aMyNick, const string& aHubIpPort, const string& aIp, uint16_t udp) : - myNick(aMyNick), hubIpPort(aHubIpPort), ip(aIp), udpPort(udp), nextQueryTime(0), pendingQueryCount(0) { } + PartialSource(const string& aMyNick, const string& aHubIpPort, const string& aIp, const string& udp) : + myNick(aMyNick), hubIpPort(aHubIpPort), ip(aIp), udpPort(udp), nextQueryTime(0), pendingQueryCount(0) { } ~PartialSource() { } @@ -88,7 +91,7 @@ GETSET(string, myNick, MyNick); // for NMDC support only GETSET(string, hubIpPort, HubIpPort); GETSET(string, ip, Ip); - GETSET(uint16_t, udpPort, UdpPort); + GETSET(string, udpPort, UdpPort); GETSET(uint64_t, nextQueryTime, NextQueryTime); GETSET(uint8_t, pendingQueryCount, PendingQueryCount); }; @@ -113,8 +116,8 @@ FLAG_UNTRUSTED = 0x400, FLAG_UNENCRYPTED = 0x450, FLAG_MASK = FLAG_FILE_NOT_AVAILABLE - | FLAG_PASSIVE | FLAG_REMOVED | FLAG_CRC_FAILED | FLAG_CRC_WARN - | FLAG_BAD_TREE | FLAG_NO_TREE | FLAG_SLOW_SOURCE | FLAG_TTH_INCONSISTENCY | FLAG_UNTRUSTED | FLAG_UNENCRYPTED + | FLAG_PASSIVE | FLAG_REMOVED | FLAG_CRC_FAILED | FLAG_CRC_WARN + | FLAG_BAD_TREE | FLAG_NO_TREE | FLAG_SLOW_SOURCE | FLAG_TTH_INCONSISTENCY | FLAG_UNTRUSTED | FLAG_UNENCRYPTED }; Source(const HintedUser& aUser) : user(aUser), partialSource(NULL) { } @@ -136,7 +139,7 @@ typedef SegmentSet::const_iterator SegmentConstIter; QueueItem(const string& aTarget, int64_t aSize, Priority aPriority, int aFlag, - time_t aAdded, const TTHValue& tth) : + time_t aAdded, const TTHValue& tth) : Flags(aFlag), target(aTarget), size(aSize), priority(aPriority), added(aAdded), tthRoot(tth), nextPublishingTime(0) { } @@ -170,7 +173,7 @@ bool isSource(const UserPtr& aUser) const { return getSource(aUser) != sources.end(); } bool isBadSource(const UserPtr& aUser) const { return getBadSource(aUser) != badSources.end(); } bool isBadSourceExcept(const UserPtr& aUser, Flags::MaskType exceptions) const { - SourceConstIter i = getBadSource(aUser); + auto i = getBadSource(aUser); if(i != badSources.end()) return i->isAnySet(exceptions^Source::FLAG_MASK); return false; @@ -202,7 +205,7 @@ /** * Is specified parts needed by this download? */ - bool isNeededPart(const PartsInfo& partsInfo, int64_t blockSize); + bool isNeededPart(const PartsInfo& partsInfo, int64_t blockSize) const; /** * Get shared parts info, max 255 parts range pairs */ @@ -223,14 +226,7 @@ return downloads.empty(); } - string getListName() const { - dcassert(isSet(QueueItem::FLAG_USER_LIST)); - if(isSet(QueueItem::FLAG_XML_BZLIST)) { - return getTarget() + ".xml.bz2"; - } else { - return getTarget() + ".xml"; - } - } + string getListName() const; const string& getTempTarget(); void setTempTarget(const string& aTempTarget) { tempTarget = aTempTarget; } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManager.cpp 2019-02-17 19:01:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManager.cpp 2019-05-06 22:23:37.000000000 +0000 @@ -13,35 +13,32 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "QueueManager.h" -#include "format.h" #include "ClientManager.h" #include "ConnectionManager.h" #include "DirectoryListing.h" #include "Download.h" #include "DownloadManager.h" +#include "FilteredFile.h" +#include "FinishedItem.h" +#include "FinishedManager.h" #include "HashManager.h" #include "LogManager.h" +#include "MerkleCheckOutputStream.h" #include "SearchManager.h" +#include "SearchResult.h" +#include "SFVReader.h" #include "ShareManager.h" #include "SimpleXML.h" #include "StringTokenizer.h" #include "Transfer.h" #include "UserConnection.h" #include "version.h" -#include "SearchResult.h" -#include "MerkleCheckOutputStream.h" -#include "SFVReader.h" -#include "FilteredFile.h" -#include "FinishedItem.h" -#include "FinishedManager.h" #include "ZUtils.h" #ifdef WITH_DHT @@ -49,7 +46,7 @@ #endif #include -#if !defined(_WIN32) && !defined(PATH_MAX) // Extra PATH_MAX check for Mac OS X +#if !defined(_WIN32) && !defined(PATH_MAX) // Extra PATH_MAX check for macOS #if defined(__linux) #include #elif defined(__GNU__) @@ -68,8 +65,8 @@ namespace dcpp { QueueItem* QueueManager::FileQueue::add(const string& aTarget, int64_t aSize, - int aFlags, QueueItem::Priority p, const string& aTempTarget, - time_t aAdded, const TTHValue& root) + int aFlags, QueueItem::Priority p, const string& aTempTarget, + time_t aAdded, const TTHValue& root) { if(p == QueueItem::DEFAULT) { p = QueueItem::NORMAL; @@ -94,14 +91,13 @@ qi->setTempTarget(aTempTarget); - dcassert(find(aTarget) == NULL); add(qi); return qi; } void QueueManager::FileQueue::add(QueueItem* qi) { if(lastInsert == queue.end()) - lastInsert = queue.insert(make_pair(const_cast(&qi->getTarget()), qi)).first; + lastInsert = queue.emplace(const_cast(&qi->getTarget()), qi).first; else lastInsert = queue.insert(lastInsert, make_pair(const_cast(&qi->getTarget()), qi)); } @@ -114,39 +110,23 @@ } QueueItem* QueueManager::FileQueue::find(const string& target) { - QueueItem::StringIter i = queue.find(const_cast(&target)); + auto i = queue.find(const_cast(&target)); return (i == queue.end()) ? NULL : i->second; } -void QueueManager::FileQueue::find(QueueItem::List& sl, int64_t aSize, const string& suffix) { - for(QueueItem::StringIter i = queue.begin(); i != queue.end(); ++i) { - if(i->second->getSize() == aSize) { - const string& t = i->second->getTarget(); - if(suffix.empty() || (suffix.length() < t.length() && - Util::stricmp(suffix.c_str(), t.c_str() + (t.length() - suffix.length())) == 0) ) - sl.push_back(i->second); - } - } -} - -void QueueManager::FileQueue::find(QueueItem::List& ql, const TTHValue& tth) { - for(QueueItem::StringIter i = queue.begin(); i != queue.end(); ++i) { - QueueItem* qi = i->second; +QueueManager::QueueItemList QueueManager::FileQueue::find(const TTHValue& tth) { + QueueItemList ql; + for(auto& i: queue) { + auto qi = i.second; if(qi->getTTH() == tth) { ql.push_back(qi); } } -} - -bool QueueManager::FileQueue::exists(const TTHValue& tth) const { - for(QueueItem::StringMap::const_iterator i = queue.begin(); i != queue.end(); ++i) - if(i->second->getTTH() == tth) - return true; - return false; + return ql; } static QueueItem* findCandidate(QueueItem* cand, QueueItem::StringIter start, QueueItem::StringIter end, const StringList& recent) { - for(QueueItem::StringIter i = start; i != end; ++i) { + for(auto i = start; i != end; ++i) { QueueItem* q = i->second; // We prefer to search for things that are not running... @@ -180,7 +160,7 @@ // We pick a start position at random, hoping that we will find something to search for... QueueItem::StringMap::size_type start = (QueueItem::StringMap::size_type)Util::rand((uint32_t)queue.size()); - QueueItem::StringIter i = queue.begin(); + auto i = queue.begin(); advance(i, start); QueueItem* cand = findCandidate(NULL, i, queue.end(), recent); @@ -201,7 +181,7 @@ bool QueueManager::getQueueInfo(const UserPtr& aUser, string& aTarget, int64_t& aSize, int& aFlags) noexcept { Lock l(cs); QueueItem* qi = userQueue.getNext(aUser); - if(qi == NULL) + if(!qi) return false; aTarget = qi->getTarget(); @@ -212,13 +192,13 @@ } void QueueManager::UserQueue::add(QueueItem* qi) { - for(QueueItem::SourceConstIter i = qi->getSources().begin(); i != qi->getSources().end(); ++i) { - add(qi, i->getUser()); + for(auto& i: qi->getSources()) { + add(qi, i.getUser()); } } void QueueManager::UserQueue::add(QueueItem* qi, const UserPtr& aUser) { - QueueItem::List& l = userQueue[qi->getPriority()][aUser]; + auto& l = userQueue[qi->getPriority()][aUser]; if(qi->getDownloadedBytes() > 0) { l.push_front(qi); @@ -229,18 +209,17 @@ QueueItem* QueueManager::UserQueue::getNext(const UserPtr& aUser, QueueItem::Priority minPrio, int64_t wantedSize,int64_t lastSpeed,bool allowRemove) { int p = QueueItem::LAST - 1; - string lastError = Util::emptyString; + string lastError = Util::emptyString; do { - QueueItem::UserListIter i = userQueue[p].find(aUser); + auto i = userQueue[p].find(aUser); if(i != userQueue[p].end()) { dcassert(!i->second.empty()); - for(QueueItem::Iter j = i->second.begin(); j != i->second.end(); ++j) { - QueueItem* qi = *j; + for(auto qi: i->second) { QueueItem::SourceConstIter source = qi->getSource(aUser); if(source->isSet(QueueItem::Source::FLAG_PARTIAL)) { // check partial source - int64_t blockSize = HashManager::getInstance()->getBlockSize(qi->getTTH()); + auto blockSize = HashManager::getInstance()->getBlockSize(qi->getTTH()); if(blockSize == 0) blockSize = qi->getSize(); @@ -263,7 +242,7 @@ continue; } if(!qi->isSet(QueueItem::FLAG_USER_LIST)) { - int64_t blockSize = HashManager::getInstance()->getBlockSize(qi->getTTH()); + auto blockSize = HashManager::getInstance()->getBlockSize(qi->getTTH()); if(blockSize == 0) blockSize = qi->getSize(); if(qi->getNextSegment(blockSize, wantedSize,lastSpeed, source->getPartialSource()).getSize() == 0) { @@ -286,14 +265,13 @@ qi->getDownloads().push_back(d); // Only one download per user... - dcassert(running.find(d->getUser()) == running.end()); running[d->getUser()] = qi; } void QueueManager::UserQueue::removeDownload(QueueItem* qi, const UserPtr& user) { running.erase(user); - for(DownloadList::iterator i = qi->getDownloads().begin(); i != qi->getDownloads().end(); ++i) { + for(auto i = qi->getDownloads().begin(); i != qi->getDownloads().end(); ++i) { if((*i)->getUser() == user) { qi->getDownloads().erase(i); break; @@ -310,14 +288,13 @@ int64_t QueueManager::UserQueue::getQueued(const UserPtr& aUser) const { int64_t total = 0; for(size_t i = QueueItem::LOWEST; i < QueueItem::LAST; ++i) { - const QueueItem::UserListMap& ulm = userQueue[i]; - QueueItem::UserListMap::const_iterator iulm = ulm.find(aUser); + const auto& ulm = userQueue[i]; + auto iulm = ulm.find(aUser); if(iulm == ulm.end()) { continue; } - for(QueueItem::List::const_iterator j = iulm->second.begin(); j != iulm->second.end(); ++j) { - const QueueItem::Ptr qi = *j; + for(auto& qi: iulm->second) { if(qi->getSize() != -1) { total += qi->getSize() - qi->getDownloadedBytes(); } @@ -327,13 +304,13 @@ } QueueItem* QueueManager::UserQueue::getRunning(const UserPtr& aUser) { - QueueItem::UserIter i = running.find(aUser); + auto i = running.find(aUser); return (i == running.end()) ? 0 : i->second; } void QueueManager::UserQueue::remove(QueueItem* qi, bool removeRunning) { - for(QueueItem::SourceConstIter i = qi->getSources().begin(); i != qi->getSources().end(); ++i) { - remove(qi, i->getUser(), removeRunning); + for(auto& i: qi->getSources()) { + remove(qi, i.getUser(), removeRunning); } } @@ -343,11 +320,11 @@ } dcassert(qi->isSource(aUser)); - QueueItem::UserListMap& ulm = userQueue[qi->getPriority()]; - QueueItem::UserListIter j = ulm.find(aUser); + auto& ulm = userQueue[qi->getPriority()]; + auto j = ulm.find(aUser); dcassert(j != ulm.end()); - QueueItem::List& l = j->second; - QueueItem::Iter i = find(l.begin(), l.end(), qi); + auto& l = j->second; + auto i = find(l.begin(), l.end(), qi); dcassert(i != l.end()); l.erase(i); @@ -358,7 +335,7 @@ void QueueManager::FileMover::moveFile(const string& source, const string& target) { Lock l(cs); - files.push_back(make_pair(source, target)); + files.emplace_back(source, target); if(!active) { active = true; start(); @@ -366,8 +343,7 @@ } int QueueManager::FileMover::run() { - setThreadName("FileMover"); - for(;;) { + while(true) { FilePair next; { Lock l(cs); @@ -378,8 +354,10 @@ next = files.back(); files.pop_back(); } + moveFile_(next.first, next.second); } + return 0; } void QueueManager::Rechecker::add(const string& file) { @@ -392,12 +370,11 @@ } int QueueManager::Rechecker::run() { - setThreadName("Rechecker"); while(true) { string file; { Lock l(cs); - StringIter i = files.begin(); + auto i = files.begin(); if(i == files.end()) { active = false; return 0; @@ -468,7 +445,7 @@ tempTarget = q->getTempTarget(); } - //Merklecheck + // Merklecheck int64_t startPos=0; DummyOutputStream dummy; int64_t blockSize = tt.getBlockSize(); @@ -502,7 +479,7 @@ } check.flush(); - sizes.push_back(make_pair(startPos, segmentSize)); + sizes.emplace_back(startPos, segmentSize); } catch(const Exception&) { hasBadBlocks = true; dcdebug("Found bad block at " I64_FMT "\n", static_cast(startPos)); @@ -524,8 +501,8 @@ continue; } - for(Sizes::const_iterator i = sizes.begin(); i != sizes.end(); ++i) - q->addSegment(Segment(i->first, i->second)); + for(auto& i : sizes) + q->addSegment(Segment(i.first, i.second)); qm->rechecked(q); } @@ -533,11 +510,11 @@ } QueueManager::QueueManager() : -lastSave(0), -queueFile(Util::getPath(Util::PATH_USER_CONFIG) + "Queue.xml"), -rechecker(this), -dirty(true), -nextSearch(0) + lastSave(0), + queueFile(Util::getPath(Util::PATH_USER_CONFIG) + "Queue.xml"), + rechecker(this), + dirty(true), + nextSearch(0) { TimerManager::getInstance()->addListener(this); SearchManager::getInstance()->addListener(this); @@ -556,15 +533,15 @@ std::sort(protectedFileLists.begin(), protectedFileLists.end()); - StringList filelists = File::findFiles(path, "*.xml.bz2"); + auto filelists = File::findFiles(path, "*.xml*"); std::sort(filelists.begin(), filelists.end()); std::for_each(filelists.begin(), std::set_difference(filelists.begin(), filelists.end(), - protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()), &File::deleteFile); + protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()), &File::deleteFile); filelists = File::findFiles(path, "*.DcLst"); std::sort(filelists.begin(), filelists.end()); std::for_each(filelists.begin(), std::set_difference(filelists.begin(), filelists.end(), - protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()), &File::deleteFile); + protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()), &File::deleteFile); } } @@ -584,7 +561,7 @@ string myNick; string hubIpPort; string ip; - uint16_t udpPort; + string udpPort; }; void QueueManager::on(TimerManagerListener::Minute, uint64_t aTick) noexcept { @@ -646,7 +623,6 @@ // Request parts info from partial file sharing sources for(vector::const_iterator i = params.begin(); i != params.end(); ++i){ const PartsInfoReqParam* param = *i; - dcassert(param->udpPort > 0); try { AdcCommand cmd = SearchManager::getInstance()->toPSR(true, param->myNick, param->hubIpPort, param->tth, param->parts); @@ -659,12 +635,12 @@ delete param; } - // DHT PFS announce + // DHT PFS announce if(tthPub) { - #ifdef WITH_DHT +#ifdef WITH_DHT dht::IndexManager::getInstance()->publishPartialFile(*tthPub); - #endif +#endif delete tthPub; } @@ -682,7 +658,8 @@ string nick = nicks.empty() ? Util::emptyString : Util::cleanPathChars(nicks[0]) + "."; return checkTarget(Util::getListPath() + nick + user.user->getCID().toBase32(), /*checkExistence*/ false); } -//NOTE: freedcpp + +// NOTE: freedcpp: begin void QueueManager::add(const string& aTarget, int64_t aSize, const TTHValue& root) { // Check if we're not downloading something already in our share @@ -713,8 +690,7 @@ // This will be pretty slow on large queues... if (BOOLSETTING(DONT_DL_ALREADY_QUEUED)) { - QueueItem::List ql; - fileQueue.find(ql, root); + auto ql = fileQueue.find(root); if (!ql.empty()) throw QueueException(_("This file is already queued")); } @@ -724,7 +700,7 @@ if(q == NULL) { q = fileQueue.add(target, aSize, 0, QueueItem::DEFAULT/*QueueItem::Priority*/, Util::emptyString/*aTempTarget*/, - GET_TIME()/*time_t aAdded*/, root/*TTHValue& root*/); + GET_TIME()/*time_t aAdded*/, root/*TTHValue& root*/); fire(QueueManagerListener::Added(), q); } else { if(q->getSize() != aSize) @@ -736,10 +712,11 @@ throw QueueException(_("A file with different tth root already exists in the queue")); } } -}//NOTE: freedcpp +} +// NOTE: freedcpp: end void QueueManager::add(const string& aTarget, int64_t aSize, const TTHValue& root, const HintedUser& aUser, - int aFlags /* = 0 */, bool addBad /* = true */) + int aFlags /* = 0 */, bool addBad /* = true */) { bool wantConnection = true; @@ -778,15 +755,14 @@ // This will be pretty slow on large queues... if(BOOLSETTING(DONT_DL_ALREADY_QUEUED) && !(aFlags & QueueItem::FLAG_USER_LIST)) { - QueueItem::List ql; - fileQueue.find(ql, root); + auto ql = fileQueue.find(root); if (!ql.empty()) { // Found one or more existing queue items, lets see if we can add the source to them bool sourceAdded = false; - for(QueueItem::Iter i = ql.begin(); i != ql.end(); ++i) { - if(!(*i)->isSource(aUser)) { + for(auto& i : ql) { + if(!i->isSource(aUser)) { try { - wantConnection = addSource(*i, aUser, addBad ? QueueItem::Source::FLAG_MASK : 0); + wantConnection = addSource(i, aUser, addBad ? QueueItem::Source::FLAG_MASK : 0); sourceAdded = true; } catch(...) { } } @@ -853,7 +829,7 @@ } // Check that target starts with a drive or is an UNC path if( (aTarget[1] != ':' || aTarget[2] != '\\') && - (aTarget[0] != '\\' && aTarget[1] != '\\') ) { + (aTarget[0] != '\\' && aTarget[1] != '\\') ) { throw QueueException(_("Invalid target file (missing directory, check default download directory setting)")); } #else @@ -912,15 +888,15 @@ { Lock l(cs); - DirectoryItem::DirectoryPair dp = directories.equal_range(aUser); + auto dp = directories.equal_range(aUser); - for(DirectoryItem::DirectoryIter i = dp.first; i != dp.second; ++i) { - if(Util::stricmp(aTarget.c_str(), i->second->getName().c_str()) == 0) + for(auto i = dp.first; i != dp.second; ++i) { + if(Util::stricmp(aDir.c_str(), i->second->getName().c_str()) == 0) return; } // Unique directory, fine... - directories.insert(make_pair(aUser, new DirectoryItem(aUser, aDir, aTarget, p))); + directories.emplace(aUser, new DirectoryItem(aUser, aDir, aTarget, p)); needList = (dp.first == dp.second); setDirty(); } @@ -942,41 +918,38 @@ } return qi->getPriority(); } -namespace { -typedef unordered_map TTHMap; -// *** WARNING *** -// Lock(cs) makes sure that there's only one thread accessing this -static TTHMap tthMap; - -void buildMap(const DirectoryListing::Directory* dir) noexcept { - for(DirectoryListing::Directory::List::const_iterator j = dir->directories.begin(); j != dir->directories.end(); ++j) { - if(!(*j)->getAdls()) - buildMap(*j); - } +typedef unordered_map TTHMap; - for(DirectoryListing::File::List::const_iterator i = dir->files.begin(); i != dir->files.end(); ++i) { - const DirectoryListing::File* df = *i; - tthMap.insert(make_pair(df->getTTH(), df)); - } +namespace { +void buildMap(const DirectoryListing::Directory* dir, TTHMap& tthMap) noexcept { + std::for_each(dir->directories.cbegin(), dir->directories.cend(), [&](DirectoryListing::Directory* d) { + if(!d->getAdls()) + buildMap(d, tthMap); + }); + + std::for_each(dir->files.cbegin(), dir->files.cend(), [&](DirectoryListing::File* f) { + tthMap.emplace(f->getTTH(), f); + }); } } int QueueManager::matchListing(const DirectoryListing& dl) noexcept { int matches = 0; + { Lock l(cs); - tthMap.clear(); - buildMap(dl.getRoot()); + TTHMap tthMap; + buildMap(dl.getRoot(), tthMap); - for(QueueItem::StringMap::const_iterator i = fileQueue.getQueue().begin(); i != fileQueue.getQueue().end(); ++i) { - QueueItem* qi = i->second; + for(auto& i: fileQueue.getQueue()) { + auto qi = i.second; if(qi->isFinished()) continue; if(qi->isSet(QueueItem::FLAG_USER_LIST)) continue; - TTHMap::iterator j = tthMap.find(qi->getTTH()); - if(j != tthMap.end() && i->second->getSize() == qi->getSize()) { + auto j = tthMap.find(qi->getTTH()); + if(j != tthMap.end() && j->second->getSize() == qi->getSize()) { try { addSource(qi, dl.getUser(), QueueItem::Source::FLAG_FILE_NOT_AVAILABLE); } catch(...) { @@ -1009,6 +982,16 @@ return -1; } +void QueueManager::getSizeInfo(int64_t& size, int64_t& pos, const string& target) noexcept { + Lock l(cs); + QueueItem* qi = fileQueue.find(target); + if(qi) { + size = qi->getSize(); + pos = qi->getDownloadedBytes(); + } else { + size = -1; + } +} void QueueManager::move(const string& aSource, const string& aTarget) noexcept { string target = Util::validateFileName(aTarget); @@ -1040,10 +1023,11 @@ if(qs->getSize() != qt->getSize() || qs->getTTH() != qt->getTTH()) return; - for(QueueItem::SourceConstIter i = qs->getSources().begin(); i != qs->getSources().end(); ++i) { + for(auto& i: qs->getSources()) { try { - addSource(qt, i->getUser(), QueueItem::Source::FLAG_MASK); - } catch(const Exception&) { } + addSource(qt, i.getUser(), QueueItem::Source::FLAG_MASK); + } catch(const Exception&) { + } } delSource = true; } @@ -1054,13 +1038,14 @@ } } -void QueueManager::getTargets(const TTHValue& tth, StringList& sl) { +StringList QueueManager::getTargets(const TTHValue& tth) { Lock l(cs); - QueueItem::List ql; - fileQueue.find(ql, tth); - for(QueueItem::Iter i = ql.begin(); i != ql.end(); ++i) { - sl.push_back((*i)->getTarget()); + auto ql = fileQueue.find(tth); + StringList sl; + for(auto& i: ql) { + sl.push_back(i->getTarget()); } + return sl; } Download* QueueManager::getDownload(UserConnection& aSource, bool supportsTrees) noexcept { @@ -1113,6 +1098,7 @@ class TreeOutputStream : public OutputStream { public: TreeOutputStream(TigerTree& aTree) : tree(aTree), bufPos(0) { + memset(&buf, 0, sizeof(buf)); } virtual size_t write(const void* xbuf, size_t len) { @@ -1140,6 +1126,7 @@ virtual size_t flush() { return 0; } + private: TigerTree& tree; uint8_t buf[TigerTree::BYTES]; @@ -1157,7 +1144,7 @@ throw QueueException(_("Target removed")); } - string target = d->getDownloadTarget(); + const string target = d->getDownloadTarget(); if(d->getSegment().getStart() > 0) { if(File::getSize(target) != qi->getSize()) { @@ -1187,7 +1174,7 @@ } d->setFile(new File(target, File::WRITE, File::OPEN | File::TRUNCATE | File::CREATE)); } else if(d->getType() == Transfer::TYPE_PARTIAL_LIST) { - d->setFile(new StringOutputStream(d->getPFS())); + d->setFile(new StringRefOutputStream(d->getPFS())); } else if(d->getType() == Transfer::TYPE_TREE) { d->setFile(new TreeOutputStream(d->getTigerTree())); } @@ -1212,10 +1199,10 @@ try { File::renameFile(source, newTarget); LogManager::getInstance()->message(str(F_("Unable to move %1% to %2% (%3%); renamed to %4%") % - Util::addBrackets(source) % Util::addBrackets(target) % e1.getError() % Util::addBrackets(newTarget))); + Util::addBrackets(source) % Util::addBrackets(target) % e1.getError() % Util::addBrackets(newTarget))); } catch(const FileException& e2) { LogManager::getInstance()->message(str(F_("Unable to move %1% to %2% (%3%) nor to rename to %4% (%5%)") % - Util::addBrackets(source) % Util::addBrackets(target) % e1.getError() % Util::addBrackets(newTarget) % e2.getError())); + Util::addBrackets(source) % Util::addBrackets(target) % e1.getError() % Util::addBrackets(newTarget) % e2.getError())); } } } @@ -1253,27 +1240,35 @@ HintedUser fl_user(UserPtr(), Util::emptyString); int fl_flag = 0; + // Make sure the download gets killed + unique_ptr d(aDownload); + aDownload = nullptr; + { Lock l(cs); - delete aDownload->getFile(); - aDownload->setFile(0); + delete d->getFile(); + d->setFile(0); - if(aDownload->getType() == Transfer::TYPE_PARTIAL_LIST) { - QueueItem* q = fileQueue.find(getListPath(aDownload->getHintedUser())); + if(d->getType() == Transfer::TYPE_PARTIAL_LIST) { + QueueItem* q = nullptr; + try { + q = fileQueue.find(getListPath(d->getHintedUser())); + } + catch(const Exception&) { } if(q) { - if(!aDownload->getPFS().empty()) { - if( (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) && directories.find(aDownload->getUser()) != directories.end()) || + if(!d->getPFS().empty()) { + if( (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) && directories.find(d->getUser()) != directories.end()) || (q->isSet(QueueItem::FLAG_MATCH_QUEUE)) ) { dcassert(finished); - fl_fname = aDownload->getPFS(); - fl_user = aDownload->getHintedUser(); + fl_fname = d->getPFS(); + fl_user = d->getHintedUser(); fl_flag = (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) ? (QueueItem::FLAG_DIRECTORY_DOWNLOAD) : 0) | (q->isSet(QueueItem::FLAG_MATCH_QUEUE) ? QueueItem::FLAG_MATCH_QUEUE : 0) | QueueItem::FLAG_TEXT; } else { - fire(QueueManagerListener::PartialList(), aDownload->getHintedUser(), aDownload->getPFS()); + fire(QueueManagerListener::PartialList(), d->getHintedUser(), d->getPFS()); } } else { // partial filelist probably failed, redownload full list @@ -1282,19 +1277,15 @@ } fire(QueueManagerListener::Removed(), q); - userQueue.remove(q); - fileQueue.remove(q); - //} else { - //userQueue.removeDownload(q, aDownload->getUser()); - //fire(QueueManagerListener::StatusUpdated(), q); - //} + userQueue.remove(q); + fileQueue.remove(q); } } else { - QueueItem* q = fileQueue.find(aDownload->getPath()); + QueueItem* q = fileQueue.find(d->getPath()); if(q) { - if(aDownload->getType() == Transfer::TYPE_FULL_LIST) { - if(aDownload->isSet(Download::FLAG_XML_BZ_LIST)) { + if(d->getType() == Transfer::TYPE_FULL_LIST) { + if(d->isSet(Download::FLAG_XML_BZ_LIST)) { q->setFlag(QueueItem::FLAG_XML_BZLIST); } else { q->unsetFlag(QueueItem::FLAG_XML_BZLIST); @@ -1302,64 +1293,64 @@ } if(finished) { - if(aDownload->getType() == Transfer::TYPE_TREE) { + if(d->getType() == Transfer::TYPE_TREE) { // Got a full tree, now add it to the HashManager - dcassert(aDownload->getTreeValid()); - HashManager::getInstance()->addTree(aDownload->getTigerTree()); + dcassert(d->getTreeValid()); + HashManager::getInstance()->addTree(d->getTigerTree()); - userQueue.removeDownload(q, aDownload->getUser()); + userQueue.removeDownload(q, d->getUser()); fire(QueueManagerListener::StatusUpdated(), q); } else { // Now, let's see if this was a directory download filelist... - if( (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) && directories.find(aDownload->getUser()) != directories.end()) || - (q->isSet(QueueItem::FLAG_MATCH_QUEUE)) ) + if( (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) && directories.find(d->getUser()) != directories.end()) || + (q->isSet(QueueItem::FLAG_MATCH_QUEUE)) ) { fl_fname = q->getListName(); - fl_user = aDownload->getHintedUser(); + fl_user = d->getHintedUser(); fl_flag = (q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD) ? QueueItem::FLAG_DIRECTORY_DOWNLOAD : 0) - | (q->isSet(QueueItem::FLAG_MATCH_QUEUE) ? QueueItem::FLAG_MATCH_QUEUE : 0); + | (q->isSet(QueueItem::FLAG_MATCH_QUEUE) ? QueueItem::FLAG_MATCH_QUEUE : 0); } string dir; bool crcError = false; - if(aDownload->getType() == Transfer::TYPE_FULL_LIST) { + if(d->getType() == Transfer::TYPE_FULL_LIST) { dir = q->getTempTarget(); q->addSegment(Segment(0, q->getSize())); - } else if(aDownload->getType() == Transfer::TYPE_FILE) { - q->addSegment(aDownload->getSegment()); + } else if(d->getType() == Transfer::TYPE_FILE) { + q->addSegment(d->getSegment()); } if (q->isFinished() && BOOLSETTING(SFV_CHECK)) { - crcError = checkSfv(q, aDownload); + crcError = checkSfv(q, d.get()); } - if(aDownload->getType() != Transfer::TYPE_FILE || q->isFinished()) { + if(d->getType() != Transfer::TYPE_FILE || q->isFinished()) { // Check if we need to move the file - if( aDownload->getType() == Transfer::TYPE_FILE && !aDownload->getTempTarget().empty() && (Util::stricmp(aDownload->getPath().c_str(), aDownload->getTempTarget().c_str()) != 0) ) { - moveFile(aDownload->getTempTarget(), aDownload->getPath()); + if( d->getType() == Transfer::TYPE_FILE && !d->getTempTarget().empty() && (Util::stricmp(d->getPath().c_str(), d->getTempTarget().c_str()) != 0) ) { + moveFile(d->getTempTarget(), d->getPath()); } - if (BOOLSETTING(LOG_FINISHED_DOWNLOADS) && aDownload->getType() == Transfer::TYPE_FILE) { - logFinishedDownload(q, aDownload, crcError); + if (BOOLSETTING(LOG_FINISHED_DOWNLOADS) && d->getType() == Transfer::TYPE_FILE) { + logFinishedDownload(q, d.get(), crcError); } - fire(QueueManagerListener::Finished(), q, dir, aDownload->getAverageSpeed()); + fire(QueueManagerListener::Finished(), q, dir, d->getAverageSpeed()); userQueue.remove(q); - if(!BOOLSETTING(KEEP_FINISHED_FILES) || aDownload->getType() == Transfer::TYPE_FULL_LIST) { + if(!BOOLSETTING(KEEP_FINISHED_FILES) || d->getType() == Transfer::TYPE_FULL_LIST) { fire(QueueManagerListener::Removed(), q); fileQueue.remove(q); } else { fire(QueueManagerListener::StatusUpdated(), q); } } else { - userQueue.removeDownload(q, aDownload->getUser()); + userQueue.removeDownload(q, d->getUser()); fire(QueueManagerListener::StatusUpdated(), q); } setDirty(); } } else { - if(aDownload->getType() != Transfer::TYPE_TREE) { + if(d->getType() != Transfer::TYPE_TREE) { if(q->getDownloadedBytes() == 0) { q->setTempTarget(Util::emptyString); } @@ -1367,13 +1358,13 @@ // Blah...no use keeping an unfinished file list... File::deleteFile(q->getListName()); } - if(aDownload->getType() == Transfer::TYPE_FILE) { + if(d->getType() == Transfer::TYPE_FILE) { // mark partially downloaded chunk, but align it to block size - int64_t downloaded = aDownload->getPos(); - downloaded -= downloaded % aDownload->getTigerTree().getBlockSize(); + int64_t downloaded = d->getPos(); + downloaded -= downloaded % d->getTigerTree().getBlockSize(); if(downloaded > 0) { - q->addSegment(Segment(aDownload->getStartPos(), downloaded)); + q->addSegment(Segment(d->getStartPos(), downloaded)); setDirty(); } } @@ -1383,20 +1374,19 @@ q->getOnlineUsers(getConn); } - userQueue.removeDownload(q, aDownload->getUser()); + userQueue.removeDownload(q, d->getUser()); fire(QueueManagerListener::StatusUpdated(), q); } - } else if(aDownload->getType() != Transfer::TYPE_TREE) { - if(!aDownload->getTempTarget().empty() && (aDownload->getType() == Transfer::TYPE_FULL_LIST || aDownload->getTempTarget() != aDownload->getPath())) { - File::deleteFile(aDownload->getTempTarget()); + } else if(d->getType() != Transfer::TYPE_TREE) { + if(!d->getTempTarget().empty() && (d->getType() == Transfer::TYPE_FULL_LIST || d->getTempTarget() != d->getPath())) { + File::deleteFile(d->getTempTarget()); } } } - delete aDownload; } - for(HintedUserList::iterator i = getConn.begin(); i != getConn.end(); ++i) { - ConnectionManager::getInstance()->getDownloadConnection(*i); + for(auto& i: getConn) { + ConnectionManager::getInstance()->getDownloadConnection(i); } if(!fl_fname.empty()) { @@ -1417,15 +1407,14 @@ DirectoryItem::List dl; { Lock l(cs); - DirectoryItem::DirectoryPair dp = directories.equal_range(user); - for(DirectoryItem::DirectoryIter i = dp.first; i != dp.second; ++i) { + auto dp = directories.equal_range(user); + for(auto i = dp.first; i != dp.second; ++i) { dl.push_back(i->second); } directories.erase(user); } - for(DirectoryItem::Iter i = dl.begin(); i != dl.end(); ++i) { - DirectoryItem* di = *i; + for(auto di: dl) { dirList.download(di->getName(), di->getTarget(), false); delete di; } @@ -1433,7 +1422,7 @@ if(flags & QueueItem::FLAG_MATCH_QUEUE) { size_t files = matchListing(dirList); LogManager::getInstance()->message(str(FN_("%1%: Matched %2% file", "%1%: Matched %2% files", files) % - Util::toString(ClientManager::getInstance()->getNicks(user)) % files)); + Util::toString(ClientManager::getInstance()->getNicks(user)) % files)); } } @@ -1452,17 +1441,16 @@ return; if(q->isSet(QueueItem::FLAG_DIRECTORY_DOWNLOAD)) { - dcassert(q->getSources().size() == 1); - DirectoryItem::DirectoryPair dp = directories.equal_range(q->getSources()[0].getUser()); - for(DirectoryItem::DirectoryIter i = dp.first; i != dp.second; ++i) { + auto dp = directories.equal_range(q->getSources()[0].getUser()); + for(auto i = dp.first; i != dp.second; ++i) { delete i->second; } directories.erase(q->getSources()[0].getUser()); } if(q->isRunning()) { - for(DownloadList::iterator i = q->getDownloads().begin(); i != q->getDownloads().end(); ++i) { - x.push_back((*i)->getUser()); + for(auto& i: q->getDownloads()) { + x.push_back(i->getUser()); } } else if(!q->getTempTarget().empty() && q->getTempTarget() != q->getTarget()) { File::deleteFile(q->getTempTarget()); @@ -1478,11 +1466,13 @@ setDirty(); } - for(UserList::iterator i = x.begin(); i != x.end(); ++i) { - ConnectionManager::getInstance()->disconnect(*i, true); + for(auto& i: x) { + ConnectionManager::getInstance()->disconnect(i, true); } } +#define MAX_SIZE_WO_TREE 20*1024*1024 + void QueueManager::removeSource(const string& aTarget, const UserPtr& aUser, int reason, bool removeConn /* = true */) noexcept { bool isRunning = false; bool removeCompletely = false; @@ -1502,7 +1492,9 @@ if(reason == QueueItem::Source::FLAG_NO_TREE) { q->getSource(aUser)->setFlag(reason); - return; + if (q->getSize() < MAX_SIZE_WO_TREE) { + return; + } } if(q->isRunning() && userQueue.getRunning(aUser) == q) { @@ -1585,7 +1577,7 @@ if( (q != NULL) && (q->getPriority() != p) && !q->isFinished() ) { if(q->getPriority() == QueueItem::PAUSED || p == QueueItem::HIGHEST) { // Problem, we have to request connections to all these users... - q->getOnlineUsers(getConn); + q->getOnlineUsers(getConn); } userQueue.setPriority(q, p); setDirty(); @@ -1593,14 +1585,28 @@ } } - for(HintedUserList::iterator i = getConn.begin(); i != getConn.end(); ++i) { - ConnectionManager::getInstance()->getDownloadConnection(*i); + for(auto& i: getConn) { + ConnectionManager::getInstance()->getDownloadConnection(i); } } +int QueueManager::countOnlineSources(const string& aTarget) { + Lock l(cs); + + QueueItem* qi = fileQueue.find(aTarget); + if(!qi) + return 0; + int onlineSources = 0; + for(auto& i: qi->getSources()) { + if(i.getUser().user->isOnline()) + onlineSources++; + } + return onlineSources; +} + void QueueManager::saveQueue(bool force) noexcept { if(!dirty && !force) - return; + return; std::vector cids; @@ -1611,14 +1617,12 @@ BufferedOutputStream f(&ff); f.write(SimpleXML::utf8Header); - f.write(LIT("\r\n")); + f.write(LIT("\r\n")); string tmp; string b32tmp; - for(QueueItem::StringIter i = fileQueue.getQueue().begin(); i != fileQueue.getQueue().end(); ++i) { - QueueItem* qi = i->second; - if(!qi->isSet(QueueItem::FLAG_USER_LIST) - || (qi->isSet(QueueItem::FLAG_USER_LIST) - && SETTING(KEEP_LISTS))) { + for(auto& i: fileQueue.getQueue()) { + QueueItem* qi = i.second; + if(!qi->isSet(QueueItem::FLAG_USER_LIST) || (qi->isSet(QueueItem::FLAG_USER_LIST) && SETTING(KEEP_LISTS))) { f.write(LIT("\tgetTarget(), tmp, true)); f.write(LIT("\" Size=\"")); @@ -1636,23 +1640,25 @@ } f.write(LIT("\">\r\n")); - for(QueueItem::SegmentSet::const_iterator i = qi->getDone().begin(); i != qi->getDone().end(); ++i) { + for(auto& j: qi->getDone()) { f.write(LIT("\t\tgetStart())); + f.write(Util::toString(j.getStart())); f.write(LIT("\" Size=\"")); - f.write(Util::toString(i->getSize())); + f.write(Util::toString(j.getSize())); f.write(LIT("\"/>\r\n")); } - for(QueueItem::SourceConstIter j = qi->sources.begin(); j != qi->sources.end(); ++j) { - if(j->isSet(QueueItem::Source::FLAG_PARTIAL) + for(auto& j: qi->sources) { #ifdef WITH_DHT - || j->getUser().hint == "DHT" + if(j.isSet(QueueItem::Source::FLAG_PARTIAL)|| j.getUser().hint == "DHT") + continue; +#else + if(j.isSet(QueueItem::Source::FLAG_PARTIAL)) + continue; #endif - ) continue; - const CID& cid = j->getUser().user->getCID(); - const string& hint = j->getUser().hint; + const CID& cid = j.getUser().user->getCID(); + const string& hint = j.getUser().hint; f.write(LIT("\t\t\r\n"); + f.write(LIT("\r\n")); f.flush(); ff.close(); File::deleteFile(getQueueFile()); @@ -1682,24 +1688,20 @@ // Put this here to avoid very many saves tries when disk is full... lastSave = GET_TICK(); - //NOTE: freedcpp, save user cids and nicks to Users.xml see dcplusplus revision 1771 - ClientManager* cm = ClientManager::getInstance(); -//#ifdef _WIN32 -// std::for_each(cids.begin(), cids.end(), std::bind(&ClientManager::saveUser, cm, std::placeholders::_1)); -//#else - for (vector::const_iterator it = cids.begin(); it != cids.end(); ++it) - { - cm->saveUser(*it); + for(auto& cid : cids) { + ClientManager::getInstance()->saveUser(cid); } -//#endif } class QueueLoader : public SimpleXMLReader::CallBack { public: - QueueLoader() : cur(NULL), inDownloads(false) { } - virtual ~QueueLoader() { } - virtual void startTag(const string& name, StringPairList& attribs, bool simple); - virtual void endTag(const string& name, const string& data); + QueueLoader() : + cur(NULL), + inDownloads(false) + { } + void startTag(const string& name, StringPairList& attribs, bool simple); + void endTag(const string& name); + private: string target; @@ -1720,20 +1722,7 @@ } } -int QueueManager::countOnlineSources(const string& aTarget) { - Lock l(cs); - - QueueItem* qi = fileQueue.find(aTarget); - if(!qi) - return 0; - int onlineSources = 0; - for(QueueItem::SourceConstIter i = qi->getSources().begin(); i != qi->getSources().end(); ++i) { - if(i->getUser().user->isOnline()) - onlineSources++; - } - return onlineSources; -} - +static const string sDownloads = "Downloads"; static const string sDownload = "Download"; static const string sTempTarget = "TempTarget"; static const string sTarget = "Target"; @@ -1752,10 +1741,10 @@ void QueueLoader::startTag(const string& name, StringPairList& attribs, bool simple) { QueueManager* qm = QueueManager::getInstance(); - if(!inDownloads && name == "Downloads") { + if(!inDownloads && name == sDownloads) { inDownloads = true; } else if(inDownloads) { - if(cur == NULL && name == sDownload) { + if(cur == nullptr && name == sDownload) { int64_t size = Util::toInt64(getAttrib(attribs, sSize, 1)); if(size == 0) return; @@ -1784,7 +1773,7 @@ QueueItem* qi = qm->fileQueue.find(target); - if(qi == NULL) { + if(qi == nullptr) { qi = qm->fileQueue.add(target, size, 0, p, tempTarget, added, TTHValue(tthRoot)); if(downloaded > 0) { qi->addSegment(Segment(0, downloaded)); @@ -1823,11 +1812,11 @@ } } -void QueueLoader::endTag(const string& name, const string&) { +void QueueLoader::endTag(const string& name) { if(inDownloads) { if(name == sDownload) { - cur = NULL; - } else if(name == "Downloads") { + cur = nullptr; + } else if(name == sDownloads) { inDownloads = false; } } @@ -1846,13 +1835,9 @@ { Lock l(cs); - QueueItem::List matches; - - fileQueue.find(matches, sr->getTTH()); - - for(QueueItem::Iter i = matches.begin(); i != matches.end(); ++i) { - QueueItem* qi = *i; + auto matches = fileQueue.find(sr->getTTH()); + for(auto qi : matches) { // Size compare to avoid popular spoof if(qi->getSize() == sr->getSize() && !qi->isSource(sr->getUser())) { try { @@ -1886,10 +1871,10 @@ { Lock l(cs); for(int i = 0; i < QueueItem::LAST; ++i) { - QueueItem::UserListIter j = userQueue.getList(i).find(aUser); + auto j = userQueue.getList(i).find(aUser); if(j != userQueue.getList(i).end()) { - for(QueueItem::Iter m = j->second.begin(); m != j->second.end(); ++m) - fire(QueueManagerListener::StatusUpdated(), *m); + for(auto& m: j->second) + fire(QueueManagerListener::StatusUpdated(), m); if(i != QueueItem::PAUSED) hasDown = true; } @@ -1905,10 +1890,10 @@ void QueueManager::on(ClientManagerListener::UserDisconnected, const UserPtr& aUser) noexcept { Lock l(cs); for(int i = 0; i < QueueItem::LAST; ++i) { - QueueItem::UserListIter j = userQueue.getList(i).find(aUser); + auto j = userQueue.getList(i).find(aUser); if(j != userQueue.getList(i).end()) { - for(QueueItem::Iter m = j->second.begin(); m != j->second.end(); ++m) - fire(QueueManagerListener::StatusUpdated(), *m); + for(auto& m: j->second) + fire(QueueManagerListener::StatusUpdated(), m); } } } @@ -1927,15 +1912,14 @@ Lock l(cs); // Locate target QueueItem in download queue - QueueItem::List ql; - fileQueue.find(ql, tth); + auto ql = fileQueue.find(tth); if(ql.empty()){ dcdebug("Not found in download queue\n"); return false; } - QueueItem::Ptr qi = ql[0]; + QueueItemPtr qi = ql[0]; // don't add sources to finished files // this could happen when "Keep finished files in queue" is enabled if(qi->isFinished()) @@ -1974,7 +1958,7 @@ si->setFlag(QueueItem::Source::FLAG_PARTIAL); QueueItem::PartialSource* ps = new QueueItem::PartialSource(partialSource.getMyNick(), - partialSource.getHubIpPort(), partialSource.getIp(), partialSource.getUdpPort()); + partialSource.getHubIpPort(), partialSource.getIp(), partialSource.getUdpPort()); si->setPartialSource(ps); userQueue.add(qi, aUser); @@ -2001,14 +1985,13 @@ Lock l(cs); // Locate target QueueItem in download queue - QueueItem::List ql; - fileQueue.find(ql, tth); + auto ql = fileQueue.find(tth); if(ql.empty()){ return false; } - QueueItem::Ptr qi = ql[0]; + QueueItemPtr qi = ql[0]; if(qi->getSize() < PARTIAL_SHARE_MIN_SIZE){ return false; } @@ -2046,16 +2029,16 @@ setPriority(qi->getTarget(), QueueItem::PAUSED); QueueItem::SourceList sources = qi->getSources(); - for(QueueItem::SourceConstIter i = sources.begin(); i != sources.end(); ++i) { - removeSource(qi->getTarget(), i->getUser(), QueueItem::Source::FLAG_CRC_FAILED, false); + for(auto& i: sources) { + removeSource(qi->getTarget(), i.getUser(), QueueItem::Source::FLAG_CRC_FAILED, false); } fire(QueueManagerListener::CRCFailed(), d, _("CRC32 inconsistency (SFV-Check)")); - return true; + } else { + dcdebug("QueueManager: CRC32 match for %s\n", qi->getTarget().c_str()); + fire(QueueManagerListener::CRCChecked(), d); } - - dcdebug("QueueManager: CRC32 match for %s\n", qi->getTarget().c_str()); - fire(QueueManagerListener::CRCChecked(), d); + return true; } return false; } @@ -2065,7 +2048,7 @@ CalcInputStream f(&ff); const size_t BUF_SIZE = 1024*1024; - boost::scoped_array b(new uint8_t[BUF_SIZE]); + std::unique_ptr b(new uint8_t[BUF_SIZE]); size_t n = BUF_SIZE; while(f.read(&b[0], n) > 0) ; // Keep on looping... @@ -2090,18 +2073,18 @@ for(QueueItem::SourceConstIter j = sources.begin(); j != sources.end(); ++j) { if( (*j).isSet(QueueItem::Source::FLAG_PARTIAL) && (*j).getPartialSource()->getNextQueryTime() <= now && - (*j).getPartialSource()->getPendingQueryCount() < 10 && (*j).getPartialSource()->getUdpPort() > 0) + (*j).getPartialSource()->getPendingQueryCount() < 10 && Util::toInt((*j).getPartialSource()->getUdpPort()) > 0) { - buffer.insert(make_pair((*j).getPartialSource()->getNextQueryTime(), make_pair(j, q))); + buffer.emplace((*j).getPartialSource()->getNextQueryTime(), make_pair(j, q)); } } for(QueueItem::SourceConstIter j = badSources.begin(); j != badSources.end(); ++j) { if( (*j).isSet(QueueItem::Source::FLAG_TTH_INCONSISTENCY) == false && (*j).isSet(QueueItem::Source::FLAG_PARTIAL) && - (*j).getPartialSource()->getNextQueryTime() <= now && (*j).getPartialSource()->getPendingQueryCount() < 10 && - (*j).getPartialSource()->getUdpPort() > 0) + (*j).getPartialSource()->getNextQueryTime() <= now && (*j).getPartialSource()->getPendingQueryCount() < 10 && + Util::toInt((*j).getPartialSource()->getUdpPort()) > 0) { - buffer.insert(make_pair((*j).getPartialSource()->getNextQueryTime(), make_pair(j, q))); + buffer.emplace((*j).getPartialSource()->getNextQueryTime(), make_pair(j, q)); } } } @@ -2138,25 +2121,21 @@ cand->setNextPublishingTime(now + PFS_REPUBLISH_TIME); // one hour return new TTHValue(cand->getTTH()); } - return NULL; + return NULL; } #endif -void QueueManager::logFinishedDownload(QueueItem* qi, Download* d, bool crcError) +void QueueManager::logFinishedDownload(QueueItem* qi, Download*, bool crcChecked) { StringMap params; params["target"] = qi->getTarget(); params["fileSI"] = Util::toString(qi->getSize()); params["fileSIshort"] = Util::formatBytes(qi->getSize()); params["fileTR"] = qi->getTTH().toBase32(); - params["sfv"] = Util::toString(crcError ? 1 : 0); + params["sfv"] = Util::toString(crcChecked ? 1 : 0); { -#ifdef DO_NOT_USE_MUTEX - FinishedManager::getInstance()->lockLists(); -#else // DO_NOT_USE_MUTEX auto lock = FinishedManager::getInstance()->lockLists(); -#endif // DO_NOT_USE_MUTEX const FinishedManager::MapByFile& map = FinishedManager::getInstance()->getMapByFile(false); FinishedManager::MapByFile::const_iterator it = map.find(qi->getTarget()); if(it != map.end()) { @@ -2212,33 +2191,30 @@ } LOG(LogManager::FINISHED_DOWNLOAD, params); -#ifdef DO_NOT_USE_MUTEX - FinishedManager::getInstance()->unlockLists(); -#endif // DO_NOT_USE_MUTEX } class ListMatcher : public dcpp::Thread { - public: - ListMatcher(const StringList& files_) : files(files_) { } - int run() { - for (auto i = files.cbegin(); i != files.cend(); ++i) { - UserPtr u = DirectoryListing::getUserFromFilename(*i); - if (!u) - continue; +public: + ListMatcher(const StringList& files_) : files(files_) { } + int run() { + for (auto i = files.cbegin(); i != files.cend(); ++i) { + UserPtr u = DirectoryListing::getUserFromFilename(*i); + if (!u) + continue; - HintedUser user(u, Util::emptyString); - DirectoryListing dl(user); - try { - dl.loadFile(*i); - LogManager::getInstance()->message(str(F_("%1% : Matched %2% files") % Util::toString(ClientManager::getInstance()->getNicks(user)) % QueueManager::getInstance()->matchListing(dl))); - } catch (const Exception&) { } - } - delete this;// Cleanup the thread object - return 0; + HintedUser user(u, Util::emptyString); + DirectoryListing dl(user); + try { + dl.loadFile(*i); + LogManager::getInstance()->message(str(F_("%1% : Matched %2% files") % Util::toString(ClientManager::getInstance()->getNicks(user)) % QueueManager::getInstance()->matchListing(dl))); + } catch (const Exception&) { } } - private: - StringList files; + delete this;// Cleanup the thread object + return 0; + } +private: + StringList files; }; void QueueManager::matchAllListings() { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManager.h 2019-04-15 19:00:34.000000000 +0000 @@ -12,27 +12,30 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once -#include "TimerManager.h" +#include + +#include "ClientManagerListener.h" #include "CriticalSection.h" +#include "DirectoryListing.h" #include "Exception.h" -#include "User.h" #include "File.h" -#include "QueueItem.h" -#include "Singleton.h" -#include "DirectoryListing.h" #include "MerkleTree.h" +#include "QueueItem.h" #include "QueueManagerListener.h" #include "SearchManagerListener.h" -#include "ClientManagerListener.h" +#include "Singleton.h" +#include "TimerManager.h" +#include "User.h" namespace dcpp { +using std::deque; + STANDARD_EXCEPTION(QueueException); class UserConnection; @@ -49,7 +52,7 @@ DirectoryItem() : priority(QueueItem::DEFAULT) { } DirectoryItem(const UserPtr& aUser, const string& aName, const string& aTarget, - QueueItem::Priority p) : name(aName), target(aTarget), priority(p), user(aUser) { } + QueueItem::Priority p) : name(aName), target(aTarget), priority(p), user(aUser) { } ~DirectoryItem() { } UserPtr& getUser() { return user; } @@ -66,22 +69,23 @@ class QueueLoader; class QueueManager : public Singleton, public Speaker, private TimerManagerListener, - private SearchManagerListener, private ClientManagerListener + private SearchManagerListener, private ClientManagerListener { public: - //NOTE: freedcpp - void add(const string& aTarget, int64_t aSize, const TTHValue& root); + typedef deque QueueItemList; + + void add(const string& aTarget, int64_t aSize, const TTHValue& root); // NOTE: freedcpp /** Add a file to the queue. */ void add(const string& aTarget, int64_t aSize, const TTHValue& root, const HintedUser& aUser, - int aFlags = 0, bool addBad = true); + int aFlags = 0, bool addBad = true); /** Add a user's filelist to the queue. */ void addList(const HintedUser& HintedUser, int aFlags, const string& aInitialDir = Util::emptyString); /** Readd a source that was removed */ void readd(const string& target, const HintedUser& aUser); /** Add a directory to the queue (downloads filelist and matches the directory). */ void addDirectory(const string& aDir, const HintedUser& aUser, const string& aTarget, - QueueItem::Priority p = QueueItem::DEFAULT) noexcept; + QueueItem::Priority p = QueueItem::DEFAULT) noexcept; int matchListing(const DirectoryListing& dl) noexcept; void matchAllListings(); @@ -90,6 +94,7 @@ int64_t getSize(const string& target) noexcept; int64_t getPos(const string& target) noexcept; + void getSizeInfo(int64_t& size, int64_t& pos, const string& target) noexcept; /** Move the target location of a queued item. Running items are silently ignored */ void move(const string& aSource, const string& aTarget) noexcept; @@ -102,7 +107,7 @@ void setPriority(const string& aTarget, QueueItem::Priority p) noexcept; - void getTargets(const TTHValue& tth, StringList& sl); + StringList getTargets(const TTHValue& tth); QueueItem::StringMap& lockQueue() noexcept { cs.lock(); return fileQueue.getQueue(); } void unlockQueue() noexcept { cs.unlock(); } @@ -129,8 +134,7 @@ bool isChunkDownloaded(const TTHValue& tth, int64_t startPos, int64_t& bytes, string& tempTarget, int64_t& size) { Lock l(cs); - QueueItem::List ql; - fileQueue.find(ql, tth); + auto ql = fileQueue.find(tth); if(ql.empty()) return false; @@ -145,7 +149,8 @@ GETSET(uint64_t, lastSave, LastSave); GETSET(string, queueFile, QueueFile); private: - enum { MOVER_LIMIT = 10*1024*1024 }; + static const int64_t MOVER_LIMIT = 10*1024*1024; + class FileMover : public Thread { public: FileMover() : active(false) { } @@ -155,13 +160,11 @@ virtual int run(); private: typedef pair FilePair; - typedef vector FileList; - typedef FileList::iterator FileIter; bool active; - - FileList files; CriticalSection cs; + + vector files; } mover; typedef vector > PFSSourceList; @@ -192,19 +195,17 @@ public: FileQueue() : lastInsert(queue.end()) { } ~FileQueue() { - for(QueueItem::StringIter i = queue.begin(); i != queue.end(); ++i) - delete i->second; + for(auto& i : queue) + delete i.second; } void add(QueueItem* qi); QueueItem* add(const string& aTarget, int64_t aSize, int aFlags, QueueItem::Priority p, - const string& aTempTarget, time_t aAdded, const TTHValue& root); + const string& aTempTarget, time_t aAdded, const TTHValue& root); QueueItem* find(const string& target); - void find(QueueItem::List& sl, int64_t aSize, const string& ext); - void find(QueueItem::List& ql, const TTHValue& tth); + QueueManager::QueueItemList find(const TTHValue& tth); // find some PFS sources to exchange parts info void findPFSSources(PFSSourceList&); - bool exists(const TTHValue& tth) const; #ifdef WITH_DHT // return a PFS tth to DHT publish @@ -290,7 +291,7 @@ bool checkSfv(QueueItem* qi, Download* d); uint32_t calcCrc32(const string& file); - void logFinishedDownload(QueueItem* qi, Download* d, bool crcError); + void logFinishedDownload(QueueItem* qi, Download* d, bool crcChecked); // TimerManagerListener virtual void on(TimerManagerListener::Second, uint64_t aTick) noexcept; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/QueueManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/QueueManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,17 +12,20 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include +#include + #include "forward.h" -#include "noexcept.h" namespace dcpp { +using std::string; + class QueueManagerListener { public: virtual ~QueueManagerListener() { } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ResourceManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ResourceManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ResourceManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ResourceManager.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ResourceManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ResourceManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ResourceManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ResourceManager.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScopedFunctor.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScopedFunctor.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScopedFunctor.h 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScopedFunctor.h 2019-04-17 17:00:30.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +namespace dcpp { + +/* helper class to run a functor when the object goes out of scope. +the additional #defines generate a unique object name thanks to the __COUNTER__ macro. +for example, the call: + ScopedFunctor([] { printf("hello"); }); +will print "hello" when the current scope ends. */ + +template +struct ScopedFunctor { + explicit ScopedFunctor(F f_) : f(f_) { } + ~ScopedFunctor() { f(); } +private: + F f; +}; + +template +ScopedFunctor makeScopedFunctor(F f) { return ScopedFunctor(f); } + +#define ScopedFunctor_gen(ScopedFunctor_name, ScopedFunctor_counter) ScopedFunctor_name##ScopedFunctor_counter +#define ScopedFunctor_(ScopedFunctor_f, ScopedFunctor_counter) \ + auto ScopedFunctor_gen(ScopedFunctor_object, ScopedFunctor_counter) = makeScopedFunctor(ScopedFunctor_f) +#define ScopedFunctor(ScopedFunctor_f) ScopedFunctor_(ScopedFunctor_f, __COUNTER__) + +} // namespace dcpp + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScriptManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScriptManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScriptManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScriptManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -49,50 +48,50 @@ static int aux_do (lua_State *L, int status) { - if (status == 0) { /* parse OK? */ - status = lua_pcall(L, 0, LUA_MULTRET, 0); /* call main */ - } - callalert(L, status); - return status; + if (status == 0) { /* parse OK? */ + status = lua_pcall(L, 0, LUA_MULTRET, 0); /* call main */ + } + callalert(L, status); + return status; } LUALIB_API int lua_dofile (lua_State *L, const char *filename) { - return aux_do(L, luaL_loadfile(L, filename)); + return aux_do(L, luaL_loadfile(L, filename)); } LUALIB_API int lua_dobuffer (lua_State *L, const char *buff, size_t size, const char *name) { - return aux_do(L, luaL_loadbuffer(L, buff, size, name)); + return aux_do(L, luaL_loadbuffer(L, buff, size, name)); } LUALIB_API int lua_dostring (lua_State *L, const char *str) { - return lua_dobuffer(L, str, strlen(str), str); + return lua_dobuffer(L, str, strlen(str), str); } const char LuaManager::className[] = "DC"; Lunar::RegType LuaManager::methods[] = { - {"SendHubMessage", &LuaManager::SendHubMessage }, - {"SendClientMessage", &LuaManager::SendClientMessage }, - {"SendUDP", &LuaManager::SendUDPPacket}, - {"PrintDebug", &LuaManager::GenerateDebugMessage}, - {"GetClientIp", &LuaManager::GetClientIp}, - {"GetHubIpPort", &LuaManager::GetHubIpPort}, - {"GetHubUrl", &LuaManager::GetHubUrl}, - {"InjectHubMessage", &LuaManager::InjectHubMessageNMDC}, - {"InjectHubMessageADC", &LuaManager::InjectHubMessageADC}, - //{"FindWindowHandle", &LuaManager::FindWindow}, - //{"SendWindowMessage", &LuaManager::PostMessage}, - {"CreateClient", &LuaManager::CreateClient}, - {"DeleteClient", &LuaManager::DeleteClient}, - {"RunTimer", &LuaManager::RunTimer}, - {"GetSetting", &LuaManager::GetSetting}, - {"ToUtf8", &LuaManager::ToUtf8}, - {"FromUtf8", &LuaManager::FromUtf8}, - {"GetAppPath", &LuaManager::GetAppPath}, - {"GetConfigPath", &LuaManager::GetConfigPath}, - {"GetScriptsPath", &LuaManager::GetScriptsPath}, - {"GetConfigScriptsPath", &LuaManager::GetConfigScriptsPath}, - {"DropUserConnection", &LuaManager::DropUserConnection}, - {0} + {"SendHubMessage", &LuaManager::SendHubMessage }, + {"SendClientMessage", &LuaManager::SendClientMessage }, + {"SendUDP", &LuaManager::SendUDPPacket}, + {"PrintDebug", &LuaManager::GenerateDebugMessage}, + {"GetClientIp", &LuaManager::GetClientIp}, + {"GetHubIpPort", &LuaManager::GetHubIpPort}, + {"GetHubUrl", &LuaManager::GetHubUrl}, + {"InjectHubMessage", &LuaManager::InjectHubMessageNMDC}, + {"InjectHubMessageADC", &LuaManager::InjectHubMessageADC}, + //{"FindWindowHandle", &LuaManager::FindWindow}, + //{"SendWindowMessage", &LuaManager::PostMessage}, + {"CreateClient", &LuaManager::CreateClient}, + {"DeleteClient", &LuaManager::DeleteClient}, + {"RunTimer", &LuaManager::RunTimer}, + {"GetSetting", &LuaManager::GetSetting}, + {"ToUtf8", &LuaManager::ToUtf8}, + {"FromUtf8", &LuaManager::FromUtf8}, + {"GetAppPath", &LuaManager::GetAppPath}, + {"GetConfigPath", &LuaManager::GetConfigPath}, + {"GetScriptsPath", &LuaManager::GetScriptsPath}, + {"GetConfigScriptsPath", &LuaManager::GetConfigScriptsPath}, + {"DropUserConnection", &LuaManager::DropUserConnection}, + {0, nullptr} }; int LuaManager::DeleteClient(lua_State* L){ @@ -135,22 +134,22 @@ } //int LuaManager::PostMessage(lua_State* L) { - //if (lua_gettop(L) == 4 && lua_islightuserdata(L, -4) && lua_isnumber(L, -3) && - //lua_islightuserdata(L, -2) && lua_islightuserdata(L, -1)) { - //::SendMessage(reinterpret_cast(lua_touserdata(L, -4)), static_cast(lua_tonumber(L, -3)), - //reinterpret_cast(lua_touserdata(L, -2)), reinterpret_cast(lua_touserdata(L, -1))); - //} +//if (lua_gettop(L) == 4 && lua_islightuserdata(L, -4) && lua_isnumber(L, -3) && +//lua_islightuserdata(L, -2) && lua_islightuserdata(L, -1)) { +//::SendMessage(reinterpret_cast(lua_touserdata(L, -4)), static_cast(lua_tonumber(L, -3)), +//reinterpret_cast(lua_touserdata(L, -2)), reinterpret_cast(lua_touserdata(L, -1))); +//} - //return 0; +//return 0; //} //int LuaManager::FindWindow(lua_State* L) { - //if (lua_gettop(L) == 2 && lua_isstring(L, -2) && lua_isstring(L, -1)) { - //lua_pushlightuserdata(L, ::FindWindow(Text::toT(string(lua_tostring(L, -2))).c_str(), Text::toT(string(lua_tostring(L, -1))).c_str())); - //return 1; - //} +//if (lua_gettop(L) == 2 && lua_isstring(L, -2) && lua_isstring(L, -1)) { +//lua_pushlightuserdata(L, ::FindWindow(Text::toT(string(lua_tostring(L, -2))).c_str(), Text::toT(string(lua_tostring(L, -1))).c_str())); +//return 1; +//} - //return 0; +//return 0; //} int LuaManager::SendClientMessage(lua_State* L) { @@ -181,7 +180,7 @@ /* arguments: ip:port, data */ if (lua_gettop(L) == 2 && lua_isstring(L, -2) && lua_isstring(L, -1)) { StringList sl = StringTokenizer(lua_tostring(L, -2), ':').getTokens(); - ScriptManager::getInstance()->s.writeTo(sl[0], static_cast(Util::toInt(sl[1])), lua_tostring(L, -1), string(lua_tostring(L, -1)).size()); + ScriptManager::getInstance()->s.writeTo(sl[0], sl[1], lua_tostring(L, -1), string(lua_tostring(L, -1)).size()); } return 0; @@ -198,7 +197,8 @@ int LuaManager::GetSetting(lua_State* L) { /* arguments: string */ - int n, type; + int n; + SettingsManager::Types type; if(lua_gettop(L) == 1 && lua_isstring(L, -1) && SettingsManager::getInstance()->getType(lua_tostring(L, -1), n, type)) { if(type == SettingsManager::TYPE_STRING) { lua_pushstring(L, SettingsManager::getInstance()->get((SettingsManager::StrSetting)n).c_str()); @@ -309,7 +309,7 @@ int LuaManager::RunTimer(lua_State* L) { /* arguments: bool:on/off */ if(lua_gettop(L) == 1 && lua_isnumber(L, -1)) { - bool on = lua_tonumber(L, 1) != 0; //shut VC++ up + bool on = lua_tonumber(L, 1) != 0; //shut VC++ up ScriptManager* sm = ScriptManager::getInstance(); if(on != sm->getTimerEnabled()) { if(on) @@ -355,10 +355,10 @@ "end )" " return \"{\\\\urtf1\\n\"..\n" " \"{\\\\colortbl ;" - "\\\\red" + Util::toString(color & 0xFF) + - "\\\\green" + Util::toString((color >> 8) & 0xFF) + - "\\\\blue" + Util::toString((color >> 16) & 0xFF) + - ";}\\n\"..\n" + "\\\\red" + Util::toString(color & 0xFF) + + "\\\\green" + Util::toString((color >> 8) & 0xFF) + + "\\\\blue" + Util::toString((color >> 16) & 0xFF) + + ";}\\n\"..\n" " \"\\\\cf1 \"..text..\"}\\n\"\n" "end\n"; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScriptManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScriptManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ScriptManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ScriptManager.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* along with this program. If not, see . */ #pragma once @@ -29,81 +28,81 @@ namespace dcpp { class ScriptManagerListener { - public: - typedef ScriptManagerListener* Ptr; - typedef vector List; - typedef List::iterator Iter; +public: + typedef ScriptManagerListener* Ptr; + typedef vector List; + typedef List::iterator Iter; - enum Types { + enum Types { DEBUG_MESSAGE - }; - virtual void onAction(Types, const string&) noexcept = 0; }; + virtual void onAction(Types, const string&) noexcept = 0; +}; struct LuaManager { static const char className[]; static Lunar::RegType methods[]; LuaManager(lua_State* /* L */) { } - int SendClientMessage(lua_State* L); - int SendHubMessage(lua_State* L); - int GenerateDebugMessage(lua_State* L); - int GetHubIpPort(lua_State* L); - int GetHubUrl(lua_State* L); - int GetClientIp(lua_State* L); - int SendUDPPacket(lua_State* L); - int InjectHubMessageNMDC(lua_State* L); - int InjectHubMessageADC(lua_State* L); - //int FindWindow(lua_State* L); - //int PostMessage(lua_State* L); - int DropUserConnection(lua_State* L); - - int CreateClient(lua_State* L); - int DeleteClient(lua_State* L); - - int RunTimer(lua_State* L); - - int GetSetting(lua_State* L); - int GetAppPath(lua_State* L); - int GetConfigPath(lua_State* L); - int GetScriptsPath(lua_State* L); - int GetConfigScriptsPath(lua_State* L); + int SendClientMessage(lua_State* L); + int SendHubMessage(lua_State* L); + int GenerateDebugMessage(lua_State* L); + int GetHubIpPort(lua_State* L); + int GetHubUrl(lua_State* L); + int GetClientIp(lua_State* L); + int SendUDPPacket(lua_State* L); + int InjectHubMessageNMDC(lua_State* L); + int InjectHubMessageADC(lua_State* L); + //int FindWindow(lua_State* L); + //int PostMessage(lua_State* L); + int DropUserConnection(lua_State* L); + + int CreateClient(lua_State* L); + int DeleteClient(lua_State* L); + + int RunTimer(lua_State* L); + + int GetSetting(lua_State* L); + int GetAppPath(lua_State* L); + int GetConfigPath(lua_State* L); + int GetScriptsPath(lua_State* L); + int GetConfigScriptsPath(lua_State* L); - int ToUtf8(lua_State* L); - int FromUtf8(lua_State* L); + int ToUtf8(lua_State* L); + int FromUtf8(lua_State* L); }; class ScriptInstance { - bool MakeCallRaw(const string& table, const string& method , int args, int ret) noexcept; - protected: - virtual ~ScriptInstance() { } - static lua_State* L; - static CriticalSection cs; + bool MakeCallRaw(const string& table, const string& method , int args, int ret) noexcept; +protected: + virtual ~ScriptInstance() { } + static lua_State* L; + static CriticalSection cs; - template bool MakeCall(const string& table, const string& method, - int ret, const T& t) noexcept { + template bool MakeCall(const string& table, const string& method, + int ret, const T& t) noexcept { Lock l(cs); dcassert(lua_gettop(L) == 0); LuaPush(t); return MakeCallRaw(table, method, 1 , ret); - } - template bool MakeCall(const string& table, const string& method, - int ret, const T& t, const T2& t2) noexcept { + } + template bool MakeCall(const string& table, const string& method, + int ret, const T& t, const T2& t2) noexcept { Lock l(cs); dcassert(lua_gettop(L) == 0); LuaPush(t); LuaPush(t2); return MakeCallRaw(table, method, 2, ret); - } - template void LuaPush(T* p) { lua_pushlightuserdata(L, p); } + } + template void LuaPush(T* p) { lua_pushlightuserdata(L, p); } - void LuaPush(int i); - void LuaPush(const string& s); - bool GetLuaBool(); - string GetClientType(Client* aClient); - public: - void EvaluateFile(const string& fn); - void EvaluateChunk(const string& chunk); + void LuaPush(int i); + void LuaPush(const string& s); + bool GetLuaBool(); + string GetClientType(Client* aClient); +public: + void EvaluateFile(const string& fn); + void EvaluateChunk(const string& chunk); }; class ScriptManager: public ScriptInstance, public Singleton, public Speaker, private ClientManagerListener, private TimerManagerListener diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManager.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManager.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,7 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers + * Copyright (C) 2019 Boris Pek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -33,23 +34,22 @@ namespace dcpp { const char* SearchManager::types[TYPE_LAST] = { - N_("Any"), - N_("Audio"), - N_("Compressed"), - N_("Document"), - N_("Executable"), - N_("Picture"), - N_("Video"), - N_("Directory"), - N_("TTH"), - N_("CD Image") + N_("Any"), + N_("Audio"), + N_("Compressed"), + N_("Document"), + N_("Executable"), + N_("Picture"), + N_("Video"), + N_("Directory"), + N_("TTH"), + N_("CD Image") }; const char* SearchManager::getTypeStr(int type) { return _(types[type]); } SearchManager::SearchManager() : - port(0), stop(false) { queue.start(); @@ -92,7 +92,7 @@ socket->create(Socket::TYPE_UDP); socket->setBlocking(true); socket->setSocketOpt(SO_REUSEADDR, 1); - port = socket->bind(static_cast(SETTING(UDP_PORT)), SETTING(BIND_IFACE)? socket->getIfaceI4(SETTING(BIND_IFACE_NAME)).c_str() : SETTING(BIND_ADDRESS)); + port = socket->bind(Util::toString(SETTING(UDP_PORT)), SETTING(BIND_IFACE)? socket->getIfaceI4(SETTING(BIND_IFACE_NAME)).c_str() : SETTING(BIND_ADDRESS)); start(); } catch(...) { socket.reset(); @@ -105,7 +105,7 @@ stop = true; queue.shutdown(); socket->disconnect(); - port = 0; + port.clear(); join(); @@ -117,8 +117,7 @@ #define BUFSIZE 8192 int SearchManager::run() { - setThreadName("SearchManager"); - boost::scoped_array buf(new uint8_t[BUFSIZE]); + std::unique_ptr buf(new uint8_t[BUFSIZE]); int len; sockaddr_in remoteAddr = { 0 }; @@ -159,7 +158,7 @@ } // Spin for 60 seconds - for(int i = 0; i < 60 && !stop; ++i) { + for(auto i = 0; i < 60 && !stop; ++i) { Thread::sleep(1000); } } @@ -169,11 +168,10 @@ } int SearchManager::UdpQueue::run() { - setThreadName("UdpQueue"); string x = Util::emptyString; string remoteIp = Util::emptyString; stop = false; -; + ; while(true) { if (resultList.empty()) s.wait(); @@ -190,129 +188,129 @@ resultList.pop_front(); } - if(x.compare(0, 4, "$SR ") == 0) { - string::size_type i, j; - // Directories: $SR <0x20><0x20>/<0x05><0x20>() - // Files: $SR <0x20><0x05><0x20>/<0x05><0x20>() - i = 4; - if( (j = x.find(' ', i)) == string::npos) { - continue; - } - string nick = x.substr(i, j-i); - i = j + 1; - - // A file has 2 0x05, a directory only one - size_t cnt = count(x.begin() + j, x.end(), 0x05); - - SearchResult::Types type = SearchResult::TYPE_FILE; - string file; - int64_t size = 0; - - if(cnt == 1) { - // We have a directory...find the first space beyond the first 0x05 from the back - // (dirs might contain spaces as well...clever protocol, eh?) - type = SearchResult::TYPE_DIRECTORY; - // Get past the hubname that might contain spaces - if((j = x.rfind(0x05)) == string::npos) { + if(x.compare(0, 4, "$SR ") == 0) { + string::size_type i, j; + // Directories: $SR <0x20><0x20>/<0x05><0x20>() + // Files: $SR <0x20><0x05><0x20>/<0x05><0x20>() + i = 4; + if( (j = x.find(' ', i)) == string::npos) { continue; } - // Find the end of the directory info - if((j = x.rfind(' ', j-1)) == string::npos) { - continue; + string nick = x.substr(i, j-i); + i = j + 1; + + // A file has 2 0x05, a directory only one + size_t cnt = count(x.begin() + j, x.end(), 0x05); + + SearchResult::Types type = SearchResult::TYPE_FILE; + string file; + int64_t size = 0; + + if(cnt == 1) { + // We have a directory...find the first space beyond the first 0x05 from the back + // (dirs might contain spaces as well...clever protocol, eh?) + type = SearchResult::TYPE_DIRECTORY; + // Get past the hubname that might contain spaces + if((j = x.rfind(0x05)) == string::npos) { + continue; + } + // Find the end of the directory info + if((j = x.rfind(' ', j-1)) == string::npos) { + continue; + } + if(j < i + 1) { + continue; + } + file = x.substr(i, j-i) + '\\'; + } else if(cnt == 2) { + if( (j = x.find((char)5, i)) == string::npos) { + continue; + } + file = x.substr(i, j-i); + i = j + 1; + if( (j = x.find(' ', i)) == string::npos) { + continue; + } + size = Util::toInt64(x.substr(i, j-i)); } - if(j < i + 1) { + i = j + 1; + + if( (j = x.find('/', i)) == string::npos) { continue; } - file = x.substr(i, j-i) + '\\'; - } else if(cnt == 2) { + uint8_t freeSlots = (uint8_t)Util::toInt(x.substr(i, j-i)); + i = j + 1; if( (j = x.find((char)5, i)) == string::npos) { continue; } - file = x.substr(i, j-i); + uint8_t slots = (uint8_t)Util::toInt(x.substr(i, j-i)); i = j + 1; - if( (j = x.find(' ', i)) == string::npos) { + if( (j = x.rfind(" (")) == string::npos) { + continue; + } + string hubName = x.substr(i, j-i); + i = j + 2; + if( (j = x.rfind(')')) == string::npos) { continue; } - size = Util::toInt64(x.substr(i, j-i)); - } - i = j + 1; - if( (j = x.find('/', i)) == string::npos) { - continue; - } - uint8_t freeSlots = (uint8_t)Util::toInt(x.substr(i, j-i)); - i = j + 1; - if( (j = x.find((char)5, i)) == string::npos) { - continue; - } - uint8_t slots = (uint8_t)Util::toInt(x.substr(i, j-i)); - i = j + 1; - if( (j = x.rfind(" (")) == string::npos) { - continue; - } - string hubName = x.substr(i, j-i); - i = j + 2; - if( (j = x.rfind(')')) == string::npos) { - continue; - } + string hubIpPort = x.substr(i, j-i); + string url = ClientManager::getInstance()->findHub(hubIpPort); - string hubIpPort = x.substr(i, j-i); - string url = ClientManager::getInstance()->findHub(hubIpPort); + string encoding = ClientManager::getInstance()->findHubEncoding(url); + nick = Text::toUtf8(nick, encoding); + file = Text::toUtf8(file, encoding); + hubName = Text::toUtf8(hubName, encoding); + + UserPtr user = ClientManager::getInstance()->findUser(nick, url); + if(!user) { + // Could happen if hub has multiple URLs / IPs + user = ClientManager::getInstance()->findLegacyUser(nick); + if(!user) + continue; + } - string encoding = ClientManager::getInstance()->findHubEncoding(url); - nick = Text::toUtf8(nick, encoding); - file = Text::toUtf8(file, encoding); - hubName = Text::toUtf8(hubName, encoding); + ClientManager::getInstance()->setIPUser(user, remoteIp); - UserPtr user = ClientManager::getInstance()->findUser(nick, url); - if(!user) { - // Could happen if hub has multiple URLs / IPs - user = ClientManager::getInstance()->findLegacyUser(nick); - if(!user) + string tth; + if(hubName.compare(0, 4, "TTH:") == 0) { + tth = hubName.substr(4); + StringList names = ClientManager::getInstance()->getHubNames(user->getCID(), Util::emptyString); + hubName = names.empty() ? _("Offline") : Util::toString(names); + } + + if(tth.empty() && type == SearchResult::TYPE_FILE) { continue; - } + } - ClientManager::getInstance()->setIPUser(user, remoteIp); + SearchResultPtr sr(new SearchResult(user, type, slots, freeSlots, size, + file, hubName, url, remoteIp, TTHValue(tth), Util::emptyString)); + SearchManager::getInstance()->fire(SearchManagerListener::SR(), sr); - string tth; - if(hubName.compare(0, 4, "TTH:") == 0) { - tth = hubName.substr(4); - StringList names = ClientManager::getInstance()->getHubNames(user->getCID(), Util::emptyString); - hubName = names.empty() ? _("Offline") : Util::toString(names); - } - - if(tth.empty() && type == SearchResult::TYPE_FILE) { - continue; - } + } else if(x.compare(1, 4, "RES ") == 0 && x[x.length() - 1] == 0x0a) { + AdcCommand c(x.substr(0, x.length()-1)); + if(c.getParameters().empty()) + continue; + string cid = c.getParam(0); + if(cid.size() != 39) + continue; - SearchResultPtr sr(new SearchResult(user, type, slots, freeSlots, size, - file, hubName, url, remoteIp, TTHValue(tth), Util::emptyString)); - SearchManager::getInstance()->fire(SearchManagerListener::SR(), sr); - - } else if(x.compare(1, 4, "RES ") == 0 && x[x.length() - 1] == 0x0a) { - AdcCommand c(x.substr(0, x.length()-1)); - if(c.getParameters().empty()) - continue; - string cid = c.getParam(0); - if(cid.size() != 39) - continue; - - UserPtr user = ClientManager::getInstance()->findUser(CID(cid)); - if(!user) - continue; + UserPtr user = ClientManager::getInstance()->findUser(CID(cid)); + if(!user) + continue; - // This should be handled by AdcCommand really... - c.getParameters().erase(c.getParameters().begin()); + // This should be handled by AdcCommand really... + c.getParameters().erase(c.getParameters().begin()); - SearchManager::getInstance()->onRES(c, user, remoteIp); + SearchManager::getInstance()->onRES(c, user, remoteIp); - } if(x.compare(1, 4, "PSR ") == 0 && x[x.length() - 1] == 0x0a) { + } if(x.compare(1, 4, "PSR ") == 0 && x[x.length() - 1] == 0x0a) { AdcCommand c(x.substr(0, x.length()-1)); if(c.getParameters().empty()) - continue; + continue; string cid = c.getParam(0); if(cid.size() != 39) - continue; + continue; UserPtr user = ClientManager::getInstance()->findUser(CID(cid)); // when user == NULL then it is probably NMDC user, check it later @@ -321,7 +319,7 @@ SearchManager::getInstance()->onPSR(c, user, remoteIp); - } /*else if(x.compare(1, 4, "SCH ") == 0 && x[x.length() - 1] == 0x0a) { + } /*else if(x.compare(1, 4, "SCH ") == 0 && x[x.length() - 1] == 0x0a) { try { respond(AdcCommand(x.substr(0, x.length()-1))); } catch(ParseException& ) { @@ -329,9 +327,9 @@ }*/ // Needs further DoS investigation - Thread::sleep(10); - } - return 0; + Thread::sleep(10); + } + return 0; } void SearchManager::onData(const uint8_t* buf, size_t aLen, const string& remoteIp) { @@ -371,18 +369,18 @@ SearchResult::Types type = (file[file.length() - 1] == '\\' ? SearchResult::TYPE_DIRECTORY : SearchResult::TYPE_FILE); if(type == SearchResult::TYPE_FILE && tth.empty()) - return; + return; uint8_t slots = ClientManager::getInstance()->getSlots(from->getCID()); SearchResultPtr sr(new SearchResult(from, type, slots, (uint8_t)freeSlots, size, - file, hubName, hub, remoteIp, TTHValue(tth), token)); + file, hubName, hub, remoteIp, TTHValue(tth), token)); fire(SearchManagerListener::SR(), sr); } } void SearchManager::onPSR(const AdcCommand& cmd, UserPtr from, const string& remoteIp) { - uint16_t udpPort = 0; + string udpPort; uint32_t partialCount = 0; string tth; string hubIpPort; @@ -392,7 +390,7 @@ for(StringIterC i = cmd.getParameters().begin(); i != cmd.getParameters().end(); ++i) { const string& str = *i; if(str.compare(0, 2, "U4") == 0) { - udpPort = static_cast(Util::toInt(str.substr(2))); + udpPort = str.substr(2); } else if(str.compare(0, 2, "NI") == 0) { nick = str.substr(2); } else if(str.compare(0, 2, "HI") == 0) { @@ -403,8 +401,8 @@ partialCount = Util::toUInt32(str.substr(2))*2; } else if(str.compare(0, 2, "PI") == 0) { StringTokenizer tok(str.substr(2), ','); - for(StringIter i = tok.getTokens().begin(); i != tok.getTokens().end(); ++i) { - partialInfo.push_back((uint16_t)Util::toInt(*i)); + for(auto& i : tok.getTokens()) { + partialInfo.push_back((uint16_t)Util::toInt(i)); } } } @@ -441,7 +439,7 @@ QueueManager::getInstance()->handlePartialResult(from, url, TTHValue(tth), ps, outPartialInfo); - if((udpPort > 0) && !outPartialInfo.empty()) { + if((Util::toInt(udpPort) > 0) && !outPartialInfo.empty()) { try { AdcCommand cmd = SearchManager::getInstance()->toPSR(false, ps.getMyNick(), hubIpPort, tth, outPartialInfo); ClientManager::getInstance()->send(cmd, from->getCID()); @@ -512,7 +510,7 @@ cmd.addParam("NI", Text::utf8ToAcp(myNick)); cmd.addParam("HI", hubIpPort); - cmd.addParam("U4", Util::toString(wantResponse && ClientManager::getInstance()->isActive(hubIpPort) ? SearchManager::getInstance()->getPort() : 0)); + cmd.addParam("U4", (wantResponse && ClientManager::getInstance()->isActive(hubIpPort)) ? SearchManager::getInstance()->getPort() : Util::emptyString); cmd.addParam("TR", tth); cmd.addParam("PC", Util::toString(partialInfo.size() / 2)); cmd.addParam("PI", getPartsString(partialInfo)); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManager.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -74,7 +74,7 @@ void respond(const AdcCommand& cmd, const CID& cid, bool isUdpActive, const string& hubIpPort); - uint16_t getPort() const + const string &getPort() const { return port; } @@ -103,7 +103,7 @@ void addResult(const string& buf, const string& ip) { { Lock l(csudp); - resultList.push_back(make_pair(buf, ip)); + resultList.emplace_back(buf, ip); } s.signal(); } @@ -119,7 +119,7 @@ CriticalSection cs; std::unique_ptr socket; - uint16_t port; + string port; bool stop; friend class Singleton; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManagerListener.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManagerListener.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchManagerListener.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchManagerListener.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "forward.h" -#include "noexcept.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchQueue.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchQueue.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchQueue.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchQueue.cpp 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchQueue.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchQueue.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchQueue.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchQueue.h 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -33,7 +32,7 @@ std::unordered_set owners; bool operator==(const SearchCore& rhs) const { - return this->sizeType == rhs.sizeType && + return this->sizeType == rhs.sizeType && this->size == rhs.size && this->fileType == rhs.fileType && this->query == rhs.query && diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchResult.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchResult.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchResult.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchResult.cpp 2019-03-23 22:00:27.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -28,9 +27,9 @@ namespace dcpp { SearchResult::SearchResult(const UserPtr& aUser, Types aType, int aSlots, int aFreeSlots, - int64_t aSize, const string& aFile, const string& aHubName, - const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken) : -file(aFile), hubName(aHubName), hubURL(aHubURL), user(aUser), + int64_t aSize, const string& aFile, const string& aHubName, + const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken) : + file(aFile), hubName(aHubName), hubURL(aHubURL), user(aUser), size(aSize), type(aType), aslots(aSlots), freeSlots(aFreeSlots), IP(ip), tth(aTTH), token(aToken) { } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchResult.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchResult.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SearchResult.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SearchResult.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,17 +12,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #include "forward.h" +#include "AdcCommand.h" #include "FastAlloc.h" +#include "HintedUser.h" #include "MerkleTree.h" -#include "AdcCommand.h" #include "Pointer.h" +#include "Util.h" namespace dcpp { @@ -38,8 +39,8 @@ SearchResult(Types aType, int64_t aSize, const string& name, const TTHValue& aTTH); SearchResult(const UserPtr& aUser, Types aType, int aSlots, int aFreeSlots, - int64_t aSize, const string& aFile, const string& aHubName, - const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken); + int64_t aSize, const string& aFile, const string& aHubName, + const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken); string getBaseName() const; string toSR(const Client& client) const; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Segment.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Segment.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Segment.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Segment.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,12 +13,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include "GetSet.h" + namespace dcpp { // minimum file size to be PFS : 20M diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Semaphore.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Semaphore.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/Semaphore.h 2018-08-24 00:00:48.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/Semaphore.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2009-2019 EiskaltDC++ developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,33 +13,32 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once #ifndef _WIN32 - #if defined(__APPLE__) && defined(__MACH__) - #include "CriticalSection.h" - #else - #include - #include - #endif +#if defined(__APPLE__) && defined(__MACH__) +#include "CriticalSection.h" +#else +#include +#include +#endif #include #endif -#include "noexcept.h" +#include "NonCopyable.h" namespace dcpp { -class Semaphore +class Semaphore : private NonCopyable { #if defined(_WIN32) public: - Semaphore() noexcept { - h = CreateSemaphore(NULL, 0, MAXLONG, NULL); - } + Semaphore() noexcept : + h(CreateSemaphore(NULL, 0, MAXLONG, NULL)) + { } void signal() noexcept { ReleaseSemaphore(h, 1, NULL); @@ -141,8 +141,6 @@ private: sem_t semaphore; #endif - Semaphore(const Semaphore&); - Semaphore& operator=(const Semaphore&); }; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SettingsManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SettingsManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SettingsManager.cpp 2018-02-16 23:06:23.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SettingsManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -84,7 +83,7 @@ "DontDlAlreadyQueued", "MaxCommandLength", "AllowUntrustedHubs", "AllowUntrustedClients", "TLSPort", "FastHash", "SegmentedDL", "FollowLinks", "SendBloom", - "Coral", "SearchFilterShared", "FinishedDLOnlyFull", + "SearchFilterShared", "FinishedDLOnlyFull", "SearchMerge", "HashBufferSize", "HashBufferPopulate", "HashBufferNoReserve", "HashBufferPrivate", "UseDHT", "DHTPort", @@ -144,12 +143,14 @@ setDefault(DOWNLOAD_DIRECTORY, Util::getPath(Util::PATH_DOWNLOADS)); setDefault(TEMP_DOWNLOAD_DIRECTORY, Util::getPath(Util::PATH_DOWNLOADS) + "Incomplete" PATH_SEPARATOR_STR); + setDefault(BIND_ADDRESS, "0.0.0.0"); setDefault(SLOTS, 5); setDefault(TCP_PORT, 3000); setDefault(UDP_PORT, 3000); setDefault(TLS_PORT, 3001); setDefault(INCOMING_CONNECTIONS, INCOMING_DIRECT); setDefault(OUTGOING_CONNECTIONS, OUTGOING_DIRECT); + setDefault(AUTO_DETECT_CONNECTION, false); setDefault(AUTO_FOLLOW, true); setDefault(SHARE_HIDDEN, false); setDefault(FILTER_MESSAGES, true); @@ -162,8 +163,12 @@ setDefault(LIST_DUPES, true); setDefault(BUFFER_SIZE, 64); setDefault(HUBLIST_SERVERS, - "http://dchublist.com/hublist.xml.bz2;" - "http://dchublist.ru/hublist.xml.bz2" + "https://www.te-home.net/?do=hublist&get=hublist.xml.bz2;" + "https://tankafett.biz/?do=hublist&get=hublist.xml.bz2;" + "https://dchublist.ru/hublist.xml.bz2;" + "https://dchublist.org/hublist.xml.bz2;" + "https://dchublist.biz/hublist.xml.bz2;" + "https://hublist.eu/hublist.xml.bz2" ); setDefault(DOWNLOAD_SLOTS, 3); setDefault(SKIPLIST_SHARE, "*.~*|*.*~"); @@ -194,10 +199,8 @@ setDefault(LOG_FILE_DOWNLOAD, "Downloads.log"); setDefault(LOG_FILE_FINISHED_DOWNLOAD, "Finished_downloads.log"); setDefault(LOG_FILE_SYSTEM, "System.log"); - setDefault(LOG_FILE_SPY, "Spy.log"); - setDefault(LOG_FILE_CMD_DEBUG, "CmdDebug.log"); - setDefault(AUTO_AWAY, false); - setDefault(BIND_ADDRESS, "0.0.0.0"); + setDefault(LOG_FILE_SPY, "Spy.log"); + setDefault(LOG_FILE_CMD_DEBUG, "CmdDebug.log"); setDefault(SOCKS_PORT, 1080); setDefault(SOCKS_RESOLVE, 1); setDefault(CONFIG_VERSION, "0.181"); // 0.181 is the last version missing configversion @@ -206,6 +209,7 @@ setDefault(COMPRESS_TRANSFERS, true); setDefault(SFV_CHECK, true); setDefault(DEFAULT_AWAY_MESSAGE, "I'm away. State your business and I might answer later if you're lucky."); + setDefault(AUTO_AWAY, false); setDefault(TIME_STAMPS_FORMAT, "%H:%M"); setDefault(MAX_COMPRESSION, 6); setDefault(NO_AWAYMSG_TO_BOTS, true); @@ -251,9 +255,9 @@ setDefault(TLS_TRUSTED_CERTIFICATES_PATH, Util::getPath(Util::PATH_USER_CONFIG) + "Certificates" PATH_SEPARATOR_STR); setDefault(TLS_PRIVATE_KEY_FILE, Util::getPath(Util::PATH_USER_CONFIG) + "Certificates" PATH_SEPARATOR_STR "client.key"); setDefault(TLS_CERTIFICATE_FILE, Util::getPath(Util::PATH_USER_CONFIG) + "Certificates" PATH_SEPARATOR_STR "client.crt"); - setDefault(AUTO_REFRESH_TIME, 60); // minutes - setDefault(HASHING_START_DELAY, 60); // seconds setDefault(USE_TLS, true); + setDefault(HASHING_START_DELAY, 60); // seconds + setDefault(AUTO_REFRESH_TIME, 60); setDefault(AUTO_SEARCH_LIMIT, 5); setDefault(AUTO_KICK_NO_FAVS, false); setDefault(PROMPT_PASSWORD, false); @@ -265,7 +269,6 @@ setDefault(SEGMENTED_DL, true); setDefault(FOLLOW_LINKS, false); setDefault(SEND_BLOOM, true); - setDefault(CORAL, true); setDefault(FINISHED_DL_ONLY_FULL, true); setDefault(SEARCH_MERGE, true); setDefault(HASH_BUFFER_SIZE_MB, 8); @@ -274,19 +277,18 @@ setDefault(HASH_BUFFER_PRIVATE, true); setDefault(RECONNECT_DELAY, 15); setDefault(DHT_PORT, 6250); - setDefault(USE_DHT, false); + setDefault(USE_DHT, true); setDefault(SEARCH_PASSIVE, false); - setDefault(AUTO_DETECT_CONNECTION, false); setDefault(MAX_UPLOAD_SPEED_MAIN, 0); setDefault(MAX_DOWNLOAD_SPEED_MAIN, 0); setDefault(TIME_DEPENDENT_THROTTLE, false); - setDefault(THROTTLE_ENABLE, false); setDefault(MAX_DOWNLOAD_SPEED_ALTERNATE, 0); setDefault(MAX_UPLOAD_SPEED_ALTERNATE, 0); setDefault(BANDWIDTH_LIMIT_START, 1); setDefault(BANDWIDTH_LIMIT_END, 1); setDefault(SLOTS_ALTERNATE_LIMITING, 1); setDefault(SLOTS_PRIMARY, 3); + setDefault(THROTTLE_ENABLE, false); setDefault(KEEP_FINISHED_FILES, false); setDefault(USE_IP, true); setDefault(SHOW_FREE_SLOTS_DESC, false); @@ -308,6 +310,8 @@ setDefault(CHECK_TARGETS_PATHS_ON_START, false); setDefault(SHARE_SKIP_ZERO_BYTE, false); setDefault(APP_UNIT_BASE, 0); + setDefault(REQUIRE_TLS, true); // True by default: We assume TLS is commonplace enough among ADC clients. + setSearchTypeDefaults(); } @@ -390,7 +394,7 @@ } } - if(SETTING(PRIVATE_ID).length() != 39 || CID(SETTING(PRIVATE_ID)).isZero()) { + if(SETTING(PRIVATE_ID).length() != 39 || !CID(SETTING(PRIVATE_ID))) { set(PRIVATE_ID, CID::generate().toBase32()); } @@ -424,7 +428,7 @@ set(AUTO_SEARCH_LIMIT, 5); else if(SETTING(AUTO_SEARCH_LIMIT) < 1) set(AUTO_SEARCH_LIMIT, 1); - if(SETTING(MAX_FILELIST_SIZE) && SETTING(MAX_FILELIST_SIZE) < 1024) + if(SETTING(MAX_FILELIST_SIZE) < 1024) set(MAX_FILELIST_SIZE, 1024); #ifdef _DEBUG @@ -439,10 +443,10 @@ xml.stepOut(); } catch(const Exception&) { - if(CID(SETTING(PRIVATE_ID)).isZero()) + if(!CID(SETTING(PRIVATE_ID))) set(PRIVATE_ID, CID::generate().toBase32()); } - if (SETTING(DHT_KEY).length() != 39 || CID(SETTING(DHT_KEY)).isZero()) + if (SETTING(DHT_KEY).length() != 39 || !CID(SETTING(DHT_KEY))) set(DHT_KEY, CID::generate().toBase32()); } @@ -460,7 +464,7 @@ for(i=STR_FIRST; isecond)); - xml.addChildAttrib("Id", i->first); + for(auto& i: searchTypes) { + xml.addTag("SearchType", Util::toString(";", i.second)); + xml.addChildAttrib("Id", i.first); } xml.stepOut(); @@ -533,7 +537,7 @@ searchTypes.clear(); // for conveniency, the default search exts will be the same as the ones defined by SEGA. - const vector& searchExts = AdcHub::getSearchExts(); + const auto& searchExts = AdcHub::getSearchExts(); for(size_t i = 0, n = searchExts.size(); i < n; ++i) searchTypes[string(1, '1' + i)] = searchExts[i]; @@ -583,7 +587,7 @@ return ret; } -bool SettingsManager::getType(const char* name, int& n, int& type) const { +bool SettingsManager::getType(const char* name, int& n, Types &type) const { for(n = 0; n < INT64_LAST; n++) { if (strcmp(settingTags[n].c_str(), name) == 0) { if (n < STR_LAST) { @@ -601,7 +605,7 @@ return false; } -const std::string SettingsManager::parseCoreCmd(const std::string& cmd) { +const std::string SettingsManager::parseCoreCmd(const string& cmd) { StringTokenizer sl(cmd, ' '); if (sl.getTokens().size() == 1) { string ret; @@ -616,13 +620,14 @@ return Util::emptyString; } -bool SettingsManager::parseCoreCmd(string& ret, const std::string& key, const string& value) { +bool SettingsManager::parseCoreCmd(string& ret, const string& key, const string& value) { if (key.empty()) { return false; } - int n,type; - getType(key.c_str(),n,type); + int n; + SettingsManager::Types type; + getType(key.c_str(), n, type); if (type == SettingsManager::TYPE_INT) { if (!value.empty()) { int i = atoi(value.c_str()); diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SettingsManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SettingsManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SettingsManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SettingsManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once @@ -49,107 +48,119 @@ typedef std::unordered_map SearchTypes; typedef SearchTypes::iterator SearchTypesIter; typedef SearchTypes::const_iterator SearchTypesIterC; + + enum Types { + TYPE_STRING, + TYPE_INT, + TYPE_INT64 + }; + static StringList connectionSpeeds; enum StrSetting { STR_FIRST, - NICK = STR_FIRST, UPLOAD_SPEED, DESCRIPTION, DOWNLOAD_DIRECTORY, - EMAIL, EXTERNAL_IP, HUBLIST_SERVERS, - HTTP_PROXY, LOG_DIRECTORY, LOG_FORMAT_POST_DOWNLOAD, LOG_FORMAT_POST_FINISHED_DOWNLOAD, - LOG_FORMAT_POST_UPLOAD, LOG_FORMAT_MAIN_CHAT, - LOG_FORMAT_PRIVATE_CHAT, TEMP_DOWNLOAD_DIRECTORY, - BIND_ADDRESS, SOCKS_SERVER, SOCKS_USER, SOCKS_PASSWORD, - CONFIG_VERSION, DEFAULT_AWAY_MESSAGE, TIME_STAMPS_FORMAT, - PRIVATE_ID, LOG_FILE_MAIN_CHAT, LOG_FILE_PRIVATE_CHAT, - LOG_FILE_STATUS, LOG_FILE_UPLOAD, - LOG_FILE_DOWNLOAD, LOG_FILE_FINISHED_DOWNLOAD, LOG_FILE_SYSTEM, LOG_FORMAT_SYSTEM, - LOG_FORMAT_STATUS, LOG_FILE_SPY, LOG_FORMAT_SPY, TLS_PRIVATE_KEY_FILE, - TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH, - LANGUAGE, SKIPLIST_SHARE, INTERNETIP, BIND_IFACE_NAME, - DHT_KEY, DYNDNS_SERVER, MIME_HANDLER, - LOG_FILE_CMD_DEBUG, LOG_FORMAT_CMD_DEBUG, - STR_LAST }; + NICK = STR_FIRST, UPLOAD_SPEED, DESCRIPTION, DOWNLOAD_DIRECTORY, + EMAIL, EXTERNAL_IP, HUBLIST_SERVERS, + HTTP_PROXY, LOG_DIRECTORY, LOG_FORMAT_POST_DOWNLOAD, LOG_FORMAT_POST_FINISHED_DOWNLOAD, + LOG_FORMAT_POST_UPLOAD, LOG_FORMAT_MAIN_CHAT, + LOG_FORMAT_PRIVATE_CHAT, TEMP_DOWNLOAD_DIRECTORY, + BIND_ADDRESS, SOCKS_SERVER, SOCKS_USER, SOCKS_PASSWORD, + CONFIG_VERSION, DEFAULT_AWAY_MESSAGE, TIME_STAMPS_FORMAT, + PRIVATE_ID, LOG_FILE_MAIN_CHAT, LOG_FILE_PRIVATE_CHAT, + LOG_FILE_STATUS, LOG_FILE_UPLOAD, + LOG_FILE_DOWNLOAD, LOG_FILE_FINISHED_DOWNLOAD, LOG_FILE_SYSTEM, LOG_FORMAT_SYSTEM, + LOG_FORMAT_STATUS, LOG_FILE_SPY, LOG_FORMAT_SPY, TLS_PRIVATE_KEY_FILE, + TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH, + LANGUAGE, SKIPLIST_SHARE, INTERNETIP, BIND_IFACE_NAME, + DHT_KEY, DYNDNS_SERVER, MIME_HANDLER, + LOG_FILE_CMD_DEBUG, LOG_FORMAT_CMD_DEBUG, + STR_LAST }; enum IntSetting { INT_FIRST = STR_LAST + 1, - INCOMING_CONNECTIONS = INT_FIRST, TCP_PORT, SLOTS, - AUTO_FOLLOW, SHARE_HIDDEN, FILTER_MESSAGES, - AUTO_SEARCH, AUTO_SEARCH_TIME, - REPORT_ALTERNATES, TIME_STAMPS, - IGNORE_HUB_PMS, IGNORE_BOT_PMS, LIST_DUPES, BUFFER_SIZE, - DOWNLOAD_SLOTS, MAX_DOWNLOAD_SPEED, LOG_MAIN_CHAT, - LOG_PRIVATE_CHAT, LOG_DOWNLOADS, LOG_FINISHED_DOWNLOADS, - LOG_UPLOADS, MIN_UPLOAD_SPEED, - AUTO_AWAY, SOCKS_PORT, SOCKS_RESOLVE, - KEEP_LISTS, AUTO_KICK, COMPRESS_TRANSFERS, - SFV_CHECK, MAX_COMPRESSION, NO_AWAYMSG_TO_BOTS, SKIP_ZERO_BYTE, - ADLS_BREAK_ON_FIRST, HUB_USER_COMMANDS, AUTO_SEARCH_AUTO_MATCH, - LOG_SYSTEM, - LOG_FILELIST_TRANSFERS, SEND_UNKNOWN_COMMANDS, MAX_HASH_SPEED, - GET_USER_COUNTRY, LOG_STATUS_MESSAGES, SEARCH_PASSIVE, - ADD_FINISHED_INSTANTLY, DONT_DL_ALREADY_SHARED, UDP_PORT, - SHOW_LAST_LINES_LOG, ADC_DEBUG, - SEARCH_HISTORY, SET_MINISLOT_SIZE, MAX_FILELIST_SIZE, - PRIO_HIGHEST_SIZE, PRIO_HIGH_SIZE, PRIO_NORMAL_SIZE, - PRIO_LOW_SIZE, PRIO_LOWEST, AUTODROP_SPEED, AUTODROP_INTERVAL, - AUTODROP_ELAPSED, AUTODROP_INACTIVITY, AUTODROP_MINSOURCES, - AUTODROP_FILESIZE, AUTODROP_ALL, AUTODROP_FILELISTS, - AUTODROP_DISCONNECT, OUTGOING_CONNECTIONS, NO_IP_OVERRIDE, - NO_USE_TEMP_DIR, SHARE_TEMP_FILES, SEARCH_ONLY_FREE_SLOTS, - LAST_SEARCH_TYPE, - SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, - AUTO_REFRESH_TIME, HASHING_START_DELAY, USE_TLS, AUTO_SEARCH_LIMIT, - AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, - DONT_DL_ALREADY_QUEUED, - MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS, - TLS_PORT, FAST_HASH, SEGMENTED_DL, - FOLLOW_LINKS, SEND_BLOOM, CORAL, - SEARCH_FILTER_SHARED, FINISHED_DL_ONLY_FULL, - SEARCH_MERGE, HASH_BUFFER_SIZE_MB, HASH_BUFFER_POPULATE, - HASH_BUFFER_NORESERVE, HASH_BUFFER_PRIVATE, - USE_DHT, DHT_PORT, - RECONNECT_DELAY, AUTO_DETECT_CONNECTION, BANDWIDTH_LIMIT_START, - BANDWIDTH_LIMIT_END, THROTTLE_ENABLE, TIME_DEPENDENT_THROTTLE, - MAX_DOWNLOAD_SPEED_ALTERNATE, MAX_UPLOAD_SPEED_ALTERNATE, - MAX_DOWNLOAD_SPEED_MAIN, MAX_UPLOAD_SPEED_MAIN, - SLOTS_ALTERNATE_LIMITING, SLOTS_PRIMARY, KEEP_FINISHED_FILES, - SHOW_FREE_SLOTS_DESC, USE_IP, OVERLAP_CHUNKS, CASESENSITIVE_FILELIST, - IPFILTER, TEXT_COLOR, USE_LUA, ALLOW_NATT, IP_TOS_VALUE, SEGMENT_SIZE, - BIND_IFACE, MINIMUM_SEARCH_INTERVAL, DYNDNS_ENABLE, ALLOW_UPLOAD_MULTI_HUB, - USE_ADL_ONLY_OWN_LIST, ALLOW_SIM_UPLOADS, CHECK_TARGETS_PATHS_ON_START, - NMDC_DEBUG, SHARE_SKIP_ZERO_BYTE, REQUIRE_TLS, LOG_SPY, - APP_UNIT_BASE, - LOG_CMD_DEBUG, - INT_LAST }; + INCOMING_CONNECTIONS = INT_FIRST, TCP_PORT, SLOTS, + AUTO_FOLLOW, SHARE_HIDDEN, FILTER_MESSAGES, + AUTO_SEARCH, AUTO_SEARCH_TIME, + REPORT_ALTERNATES, TIME_STAMPS, + IGNORE_HUB_PMS, IGNORE_BOT_PMS, LIST_DUPES, BUFFER_SIZE, + DOWNLOAD_SLOTS, MAX_DOWNLOAD_SPEED, LOG_MAIN_CHAT, + LOG_PRIVATE_CHAT, LOG_DOWNLOADS, LOG_FINISHED_DOWNLOADS, + LOG_UPLOADS, MIN_UPLOAD_SPEED, + AUTO_AWAY, SOCKS_PORT, SOCKS_RESOLVE, + KEEP_LISTS, AUTO_KICK, COMPRESS_TRANSFERS, + SFV_CHECK, MAX_COMPRESSION, NO_AWAYMSG_TO_BOTS, SKIP_ZERO_BYTE, + ADLS_BREAK_ON_FIRST, HUB_USER_COMMANDS, AUTO_SEARCH_AUTO_MATCH, + LOG_SYSTEM, + LOG_FILELIST_TRANSFERS, SEND_UNKNOWN_COMMANDS, MAX_HASH_SPEED, + GET_USER_COUNTRY, LOG_STATUS_MESSAGES, SEARCH_PASSIVE, + ADD_FINISHED_INSTANTLY, DONT_DL_ALREADY_SHARED, UDP_PORT, + SHOW_LAST_LINES_LOG, ADC_DEBUG, + SEARCH_HISTORY, SET_MINISLOT_SIZE, MAX_FILELIST_SIZE, + PRIO_HIGHEST_SIZE, PRIO_HIGH_SIZE, PRIO_NORMAL_SIZE, + PRIO_LOW_SIZE, PRIO_LOWEST, AUTODROP_SPEED, AUTODROP_INTERVAL, + AUTODROP_ELAPSED, AUTODROP_INACTIVITY, AUTODROP_MINSOURCES, + AUTODROP_FILESIZE, AUTODROP_ALL, AUTODROP_FILELISTS, + AUTODROP_DISCONNECT, OUTGOING_CONNECTIONS, NO_IP_OVERRIDE, + NO_USE_TEMP_DIR, SHARE_TEMP_FILES, SEARCH_ONLY_FREE_SLOTS, + LAST_SEARCH_TYPE, + SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, + AUTO_REFRESH_TIME, HASHING_START_DELAY, USE_TLS, AUTO_SEARCH_LIMIT, + AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, + DONT_DL_ALREADY_QUEUED, + MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS, + TLS_PORT, FAST_HASH, SEGMENTED_DL, + FOLLOW_LINKS, SEND_BLOOM, + SEARCH_FILTER_SHARED, FINISHED_DL_ONLY_FULL, + SEARCH_MERGE, HASH_BUFFER_SIZE_MB, HASH_BUFFER_POPULATE, + HASH_BUFFER_NORESERVE, HASH_BUFFER_PRIVATE, + USE_DHT, DHT_PORT, + RECONNECT_DELAY, AUTO_DETECT_CONNECTION, BANDWIDTH_LIMIT_START, + BANDWIDTH_LIMIT_END, THROTTLE_ENABLE, TIME_DEPENDENT_THROTTLE, + MAX_DOWNLOAD_SPEED_ALTERNATE, MAX_UPLOAD_SPEED_ALTERNATE, + MAX_DOWNLOAD_SPEED_MAIN, MAX_UPLOAD_SPEED_MAIN, + SLOTS_ALTERNATE_LIMITING, SLOTS_PRIMARY, KEEP_FINISHED_FILES, + SHOW_FREE_SLOTS_DESC, USE_IP, OVERLAP_CHUNKS, CASESENSITIVE_FILELIST, + IPFILTER, TEXT_COLOR, USE_LUA, ALLOW_NATT, IP_TOS_VALUE, SEGMENT_SIZE, + BIND_IFACE, MINIMUM_SEARCH_INTERVAL, DYNDNS_ENABLE, ALLOW_UPLOAD_MULTI_HUB, + USE_ADL_ONLY_OWN_LIST, ALLOW_SIM_UPLOADS, CHECK_TARGETS_PATHS_ON_START, + NMDC_DEBUG, SHARE_SKIP_ZERO_BYTE, REQUIRE_TLS, LOG_SPY, + APP_UNIT_BASE, + LOG_CMD_DEBUG, + INT_LAST }; enum Int64Setting { INT64_FIRST = INT_LAST + 1, - TOTAL_UPLOAD = INT64_FIRST, TOTAL_DOWNLOAD, - INT64_LAST }; + TOTAL_UPLOAD = INT64_FIRST, TOTAL_DOWNLOAD, + INT64_LAST }; enum FloatSetting { FLOAT_FIRST = INT64_LAST +1, - FLOAT_LAST, SETTINGS_LAST = FLOAT_LAST }; - enum { INCOMING_DIRECT, INCOMING_FIREWALL_UPNP, INCOMING_FIREWALL_NAT, - INCOMING_FIREWALL_PASSIVE }; + FLOAT_LAST, SETTINGS_LAST = FLOAT_LAST }; + + enum { + INCOMING_DIRECT, + INCOMING_FIREWALL_UPNP, + INCOMING_FIREWALL_NAT, + INCOMING_FIREWALL_PASSIVE + }; + enum { OUTGOING_DIRECT, OUTGOING_SOCKS5 }; enum { MAGNET_AUTO_SEARCH, MAGNET_AUTO_DOWNLOAD }; const string& get(StrSetting key, bool useDefault = true) const { return (isSet[key] || !useDefault) ? strSettings[key - STR_FIRST] : strDefaults[key - STR_FIRST]; - } + } - int get(IntSetting key, bool useDefault = true) const { + int get(IntSetting key, bool useDefault = true) const { return (isSet[key] || !useDefault) ? intSettings[key - INT_FIRST] : intDefaults[key - INT_FIRST]; } + bool getBool(IntSetting key, bool useDefault = true) const { + return (get(key, useDefault) != 0); + } int64_t get(Int64Setting key, bool useDefault = true) const { return (isSet[key] || !useDefault) ? int64Settings[key - INT64_FIRST] : int64Defaults[key - INT64_FIRST]; - } - float get(FloatSetting key, bool useDefault = true) const { + } + float get(FloatSetting key, bool useDefault = true) const { return (isSet[key] || !useDefault) ? floatSettings[key - FLOAT_FIRST] : floatDefaults[key - FLOAT_FIRST]; } - bool getBool(IntSetting key, bool useDefault = true) const { - return (get(key, useDefault) != 0); - } - void set(StrSetting key, string const& value) { if(((key == DESCRIPTION) || (key == NICK)) && (value.size() > 35)) { strSettings[key - STR_FIRST] = value.substr(0, 35); @@ -233,13 +244,7 @@ void load(const string& aFileName); void save(const string& aFileName); - enum Types { - TYPE_STRING, - TYPE_INT, - TYPE_INT64 - }; - - bool getType(const char* name, int& n, int& type) const; + bool getType(const char* name, int& n, Types& type) const; // Search types void validateSearchTypeName(const string& name) const; void setSearchTypeDefaults(); @@ -253,13 +258,13 @@ } const StringList& getExtensions(const string& name); - const std::string parseCoreCmd(const std::string& cmd); - bool parseCoreCmd(string& ret, const std::string& key, const string& value); + const string parseCoreCmd(const string& cmd); + bool parseCoreCmd(string& ret, const string& key, const string& value); private: friend class Singleton; SettingsManager(); - virtual ~SettingsManager() noexcept { } + virtual ~SettingsManager() { } static const string settingTags[SETTINGS_LAST+1]; @@ -275,7 +280,7 @@ bool isSet[SETTINGS_LAST]; - string getConfigFile() { return Util::getPath(Util::PATH_USER_CONFIG) + "DCPlusPlus.xml"; } + static string getConfigFile() { return Util::getPath(Util::PATH_USER_CONFIG) + "DCPlusPlus.xml"; } // Search types SearchTypes searchTypes; // name, extlist diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SFVReader.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SFVReader.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SFVReader.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SFVReader.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" @@ -56,9 +55,9 @@ string fname = Util::getFileName(fileName); StringList files = File::findFiles(path, "*.sfv"); - for(StringIter i = files.begin(); i != files.end(); ++i) { + for(auto& i : files) { try { - if (tryFile(*i, fname)) { + if (tryFile(i, fname)) { return; } } catch(const FileException&) { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SFVReader.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SFVReader.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SFVReader.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SFVReader.h 2019-04-17 17:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include #include -#include "noexcept.h" namespace dcpp { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ShareManager.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ShareManager.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ShareManager.cpp 2018-02-16 23:06:23.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ShareManager.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -12,37 +12,36 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "ShareManager.h" + #include "AdcHub.h" -#include "CryptoManager.h" +#include "BZUtils.h" #include "ClientManager.h" +#include "CryptoManager.h" +#include "Download.h" +#include "File.h" +#include "FilteredFile.h" #include "LogManager.h" +#include "HashBloom.h" #include "HashManager.h" #include "QueueManager.h" -#include "UploadManager.h" +#include "ScopedFunctor.h" +#include "SearchResult.h" #include "SimpleXML.h" #include "StringTokenizer.h" -#include "File.h" -#include "FilteredFile.h" -#include "BZUtils.h" #include "Wildcards.h" #include "Transfer.h" +#include "UploadManager.h" #include "UserConnection.h" -#include "Download.h" -#include "HashBloom.h" -#include "SearchResult.h" #include "version.h" #ifdef WITH_DHT #include "dht/IndexManager.h" #endif #ifndef _WIN32 -#include #include #include #include @@ -53,6 +52,8 @@ namespace dcpp { +using std::numeric_limits; + ShareManager::ShareManager() : hits(0), xmlListLen(0), bzXmlListLen(0), xmlDirty(true), forceXmlRefresh(false), refreshDirs(false), update(false), initial(true), listN(0), refreshing(false), lastXmlUpdate(0), lastFullUpdate(GET_TICK()), bloom(1<<20) @@ -114,22 +115,22 @@ } string ShareManager::findRealRoot(const string& virtualRoot, const string& virtualPath) const { - for(auto i = shares.begin(); i != shares.end(); ++i) { - if(Util::stricmp(i->second, virtualRoot) == 0) { - std::string name = i->first + virtualPath; + for(auto& i : shares) { + if(Util::stricmp(i.second, virtualRoot) == 0) { + std::string name = i.first + virtualPath; dcdebug("Matching %s\n", name.c_str()); - if (File::getSize(name) != -1)//NOTE: see core 0.750 + if (File::getSize(name) != -1) //NOTE: see core 0.750 return name; - } } + } throw ShareException(UserConnection::FILE_NOT_AVAILABLE); } int64_t ShareManager::Directory::getSize() const noexcept { int64_t tmp = size; - for(auto i = directories.begin(); i != directories.end(); ++i) - tmp+=i->second->getSize(); + for(auto& i : directories) + tmp += i.second->getSize(); return tmp; } @@ -177,11 +178,11 @@ if(d->getParent()) { ret.push_back(d->getParent()->getRealPath(d->getName())); } else { - for(auto i = shares.begin(); i != shares.end(); ++i) { - if(Util::stricmp(i->second, d->getName()) == 0) { + for(auto& i : shares) { + if(Util::stricmp(i.second, d->getName()) == 0) { // remove the trailing path sep - if(FileFindIter(i->first.substr(0, i->first.size() - 1)) != FileFindIter()) { - ret.push_back(i->first); + if(FileFindIter(i.first.substr(0, i.first.size() - 1)) != FileFindIter()) { + ret.push_back(i.first); } } } @@ -300,7 +301,7 @@ auto v = splitVirtual(virtualFile); auto it = find_if(v.first->files.begin(), v.first->files.end(), - Directory::File::StringComp(v.second)); + Directory::File::StringComp(v.second)); if(it == v.first->files.end()) throw ShareException(UserConnection::FILE_NOT_AVAILABLE); return it; @@ -344,7 +345,10 @@ directories.push_back(Directory::create(vName)); } } - aXml.stepOut(); + try { + aXml.stepOut(); + } + catch(const Exception&) { } } } @@ -361,9 +365,9 @@ const string& name = getAttrib(attribs, SNAME, 0); if(!name.empty()) { if(depth == 0) { - for(auto i = dirs.begin(); i != dirs.end(); ++i) { - if(Util::stricmp((*i)->getName(), name) == 0) { - cur = *i; + for(auto& i : dirs) { + if(Util::stricmp(i->getName(), name) == 0) { + cur = i; break; } } @@ -391,7 +395,7 @@ cur->files.insert(ShareManager::Directory::File(fname, Util::toInt64(size), cur, TTHValue(root))); } } - virtual void endTag(const string& name, const string&) { + virtual void endTag(const string& name) { if(name == SDIRECTORY) { depth--; if(cur) { @@ -417,8 +421,7 @@ xml.parse(f); - for(auto i = directories.begin(); i != directories.end(); ++i) { - const Directory::Ptr& d = *i; + for(auto& d : directories) { updateIndices(*d); } @@ -434,11 +437,14 @@ aXml.addTag("Share"); aXml.stepIn(); - for(auto i = shares.begin(); i != shares.end(); ++i) { - aXml.addTag("Directory", i->first); - aXml.addChildAttrib("Virtual", i->second); + for(auto& i: shares) { + aXml.addTag("Directory", i.first); + aXml.addChildAttrib("Virtual", i.second); + } + try { + aXml.stepOut(); } - aXml.stepOut(); + catch(const Exception&) { } } void ShareManager::addDirectory(const string& realPath, const string& virtualName) { @@ -457,26 +463,25 @@ { Lock l(cs); - for(auto i = shares.begin(); i != shares.end(); ++i) { - if(Util::strnicmp(realPath, i->first, i->first.length()) == 0) { + for(auto& i: shares) { + if(Util::strnicmp(realPath, i.first, i.first.length()) == 0) { // Trying to share an already shared directory //throw ShareException(_("Directory already shared")); - removeMap.push_front(i->first); - } else if(Util::strnicmp(realPath, i->first, realPath.length()) == 0) { + removeMap.push_front(i.first); + } else if(Util::strnicmp(realPath, i.first, realPath.length()) == 0) { // Trying to share a parent directory //throw ShareException(_("Remove all subdirectories before adding this one")); - removeMap.push_front(i->first); + removeMap.push_front(i.first); } } } - for(list::const_iterator i = removeMap.begin(); i != removeMap.end(); ++i) { - removeDirectory(*i); + for(auto& i : removeMap) { + removeDirectory(i); } - HashManager::HashPauser pauser; - Directory::Ptr dp = buildTree(realPath, Directory::Ptr()); + auto dp = buildTree(realPath, Directory::Ptr()); string vName = validateVirtual(virtualName); dp->setName(vName); @@ -492,11 +497,11 @@ } ShareManager::Directory::Ptr ShareManager::merge(const Directory::Ptr& directory) { - for(auto i = directories.begin(); i != directories.end(); ++i) { - if(Util::stricmp((*i)->getName(), directory->getName()) == 0) { + for(auto& i : directories) { + if(Util::stricmp(i->getName(), directory->getName()) == 0) { dcdebug("Merging directory %s\n", directory->getName().c_str()); - (*i)->merge(directory); - return *i; + i->merge(directory); + return i; } } @@ -507,18 +512,21 @@ } void ShareManager::Directory::merge(const Directory::Ptr& source) { - for(auto i = source->directories.begin(); i != source->directories.end(); ++i) { - auto subSource = i->second; + // merge directories + for(auto& i: source->directories) { + auto subSource = i.second; auto ti = directories.find(subSource->getName()); if(ti == directories.end()) { if(findFile(subSource->getName()) != files.end()) { dcdebug("File named the same as directory"); } else { - directories.insert(std::make_pair(subSource->getName(), subSource)); - subSource->parent = this; + // the directory doesn't exist; create it. + directories.emplace(subSource->getName(), subSource); + subSource->parent = this; } } else { + // the directory was already existing; merge into it. auto subTarget = ti->second; subTarget->merge(subSource); } @@ -527,12 +535,13 @@ // All subdirs either deleted or moved to target... source->directories.clear(); - for(auto i = source->files.begin(); i != source->files.end(); ++i) { - if(findFile(i->getName()) == files.end()) { - if(directories.find(i->getName()) != directories.end()) { + // merge files + for(auto& i: source->files) { + if(findFile(i.getName()) == files.end()) { + if(directories.find(i.getName()) != directories.end()) { dcdebug("Directory named the same as file"); } else { - auto added = files.insert(*i); + auto added = files.insert(i); if(added.second) { const_cast(*added.first).setParent(this); } @@ -570,7 +579,7 @@ // Readd all directories with the same vName for(i = shares.begin(); i != shares.end(); ++i) { if(Util::stricmp(i->second, vName) == 0 && checkHidden(i->first)) { - Directory::Ptr dp = buildTree(i->first, 0); + auto dp = buildTree(i->first, 0); dp->setName(i->second); merge(dp); } @@ -611,8 +620,8 @@ int64_t ShareManager::getShareSize() const noexcept { Lock l(cs); int64_t tmp = 0; - for(auto i = tthIndex.begin(); i != tthIndex.end(); ++i) { - tmp += i->second->getSize(); + for(auto& i: tthIndex) { + tmp += i.second->getSize(); } return tmp; } @@ -659,7 +668,7 @@ if (Wildcard::patternMatch(fileName , l_skip_list, '|')) { LogManager::getInstance()->message(str(F_("Skip share file: %1% (Size: %2%)") - % Util::addBrackets(fileName) % Util::formatBytes(size))); + % Util::addBrackets(fileName) % Util::formatBytes(size))); continue; } } @@ -674,13 +683,13 @@ // Not a directory, assume it's a file...make sure we're not sharing the settings file... const string l_ext = Util::getFileExt(name); if ((name != "Thumbs.db") && - (name != "desktop.ini") && - (name != "folder.htt") - ) { + (name != "desktop.ini") && + (name != "folder.htt") + ) { if (!BOOLSETTING(SHARE_TEMP_FILES) && - (::strcmp(l_ext.c_str(), ".dctmp") == 0)) { + (::strcmp(l_ext.c_str(), ".dctmp") == 0)) { LogManager::getInstance()->message(str(F_("Skip share temp file: %1% (Size: %2%)") - % Util::addBrackets(fileName) % Util::formatBytes(size))); + % Util::addBrackets(fileName) % Util::formatBytes(size))); continue; } if (BOOLSETTING(SHARE_SKIP_ZERO_BYTE) && size == 0) @@ -703,36 +712,36 @@ //NOTE: freedcpp [+ #ifdef _WIN32 bool ShareManager::checkHidden(const string& aName) const { - FileFindIter ff = FileFindIter(aName.substr(0, aName.size() - 1)); + FileFindIter ff = FileFindIter(aName.substr(0, aName.size() - 1)); - if (ff != FileFindIter()) { - return (BOOLSETTING(SHARE_HIDDEN) || !ff->isHidden()); - } + if (ff != FileFindIter()) { + return (BOOLSETTING(SHARE_HIDDEN) || !ff->isHidden()); + } - return true; + return true; } #else // !_WIN32 bool ShareManager::checkHidden(const string& aName) const { - // check open a directory - if (!(FileFindIter(aName) != FileFindIter())) - return true; + // check open a directory + if (!(FileFindIter(aName) != FileFindIter())) + return true; - // check hidden directory - bool hidden = false; - string path = aName.substr(0, aName.size() - 1); - string::size_type i = path.rfind(PATH_SEPARATOR); + // check hidden directory + bool hidden = false; + string path = aName.substr(0, aName.size() - 1); + string::size_type i = path.rfind(PATH_SEPARATOR); - if (i != string::npos) - { - string dir = path.substr(i + 1); - if (dir[0] == '.') - hidden = true; - } + if (i != string::npos) + { + string dir = path.substr(i + 1); + if (dir[0] == '.') + hidden = true; + } - return (BOOLSETTING(SHARE_HIDDEN) || !hidden); + return (BOOLSETTING(SHARE_HIDDEN) || !hidden); } #endif // !_WIN32 //NOTE: freedcpp +] @@ -740,8 +749,8 @@ void ShareManager::updateIndices(Directory& dir) { bloom.add(Text::toLower(dir.getName())); - for(auto i = dir.directories.begin(); i != dir.directories.end(); ++i) { - updateIndices(*i->second); + for(auto& i : dir.directories) { + updateIndices(*i.second); } dir.size = 0; @@ -755,12 +764,12 @@ tthIndex.clear(); bloom.clear(); - for(auto i = directories.begin(); i != directories.end(); ++i) { - updateIndices(**i); + for(auto& i: directories) { + updateIndices(*i); } } -void ShareManager::updateIndices(Directory& dir, const Directory::File::Set::iterator& i) { +void ShareManager::updateIndices(Directory& dir, const decltype(std::declval().files.begin())& i) { const Directory::File& f = *i; auto j = tthIndex.find(f.getTTH()); @@ -770,16 +779,17 @@ if(!SETTING(LIST_DUPES)) { try { LogManager::getInstance()->message(str(F_("Duplicate file will not be shared: %1% (Size: %2% B) Dupe matched against: %3%") - % Util::addBrackets(dir.getRealPath(f.getName())) % Util::toString(f.getSize()) % Util::addBrackets(j->second->getParent()->getRealPath(j->second->getName())))); - dir.files.erase(i); - } catch (const ShareException&) { } + % Util::addBrackets(dir.getRealPath(f.getName())) % Util::toString(f.getSize()) % Util::addBrackets(j->second->getParent()->getRealPath(j->second->getName())))); + dir.files.erase(i); + } catch (const ShareException&) { + } return; } } dir.addType(getType(f.getName())); - tthIndex.insert(make_pair(f.getTTH(), i)); + tthIndex.emplace(f.getTTH(), i); bloom.add(Text::toLower(f.getName())); #ifdef WITH_DHT dht::IndexManager* im = dht::IndexManager::getInstance(); @@ -818,15 +828,13 @@ StringPairList ShareManager::getDirectories() const noexcept { Lock l(cs); StringPairList ret; - for(auto i = shares.begin(); i != shares.end(); ++i) { - ret.push_back(make_pair(i->second, i->first)); + for(auto& i: shares) { + ret.emplace_back(i.second, i.first); } return ret; } int ShareManager::run() { - setThreadName("ShareManager"); - StringPairList dirs = getDirectories(); // Don't need to refresh if no directories are shared if(dirs.empty()) @@ -839,11 +847,11 @@ lastFullUpdate = GET_TICK(); DirList newDirs; - for(auto i = dirs.begin(); i != dirs.end(); ++i) { - if (checkHidden(i->second)) { - Directory::Ptr dp = buildTree(i->second, Directory::Ptr()); - dp->setName(i->first); - newDirs.push_back(dp); + for(auto& i: dirs) { + if (checkHidden(i.second)) { + auto dp = buildTree(i.second, Directory::Ptr()); + dp->setName(i.first); + newDirs.emplace_back(dp); } } @@ -851,8 +859,8 @@ Lock l(cs); directories.clear(); - for(auto i = newDirs.begin(); i != newDirs.end(); ++i) { - merge(*i); + for(auto& i: newDirs) { + merge(i); } rebuildIndices(); @@ -881,8 +889,8 @@ HashBloom bloom; bloom.reset(k, m, h); - for(auto i = tthIndex.begin(); i != tthIndex.end(); ++i) { - bloom.add(i->first); + for(auto& i: tthIndex) { + bloom.add(i.first); } bloom.copy_to(v); } @@ -906,9 +914,9 @@ CalcOutputStream, false> newXmlFile(&count); newXmlFile.write(SimpleXML::utf8Header); - newXmlFile.write("getMe()->getCID().toBase32() + "\" Base=\"/\" Generator=\"" EISKALTDCPP_APPNAME " " EISKALTDCPP_VERSION "\">\r\n"); - for(auto i = directories.begin(); i != directories.end(); ++i) { - (*i)->toXml(newXmlFile, indent, tmp2, true); + newXmlFile.write("getMe()->getCID().toBase32() + "\" Base=\"/\" Generator=\"" APPNAME " " VERSIONSTRING "\">\r\n"); + for(auto& i: directories) { + i->toXml(newXmlFile, indent, tmp2, true); } newXmlFile.write(""); newXmlFile.flush(); @@ -958,15 +966,15 @@ string xml = SimpleXML::utf8Header; string tmp; - xml += "getMe()->getCID().toBase32() + "\" Base=\"" + SimpleXML::escape(dir, tmp, false) + "\" Generator=\"" EISKALTDCPP_APPNAME " " EISKALTDCPP_VERSION "\">\r\n"; - StringOutputStream sos(xml); + xml += "getMe()->getCID().toBase32() + "\" Base=\"" + SimpleXML::escape(dir, tmp, false) + "\" Generator=\"" APPNAME " " VERSIONSTRING "\">\r\n"; + StringRefOutputStream sos(xml); string indent = "\t"; Lock l(cs); if(dir == "/") { - for(auto i = directories.begin(); i != directories.end(); ++i) { + for(auto& i: directories) { tmp.clear(); - (*i)->toXml(sos, indent, tmp, recurse); + i->toXml(sos, indent, tmp, recurse); } } else { string::size_type i = 1, j = 1; @@ -1001,8 +1009,8 @@ if(!root) return 0; - for(auto it2 = root->directories.begin(); it2 != root->directories.end(); ++it2) { - it2->second->toXml(sos, indent, tmp, recurse); + for(auto& it2: root->directories) { + it2.second->toXml(sos, indent, tmp, recurse); } root->filesToXml(sos, indent, tmp); } @@ -1021,8 +1029,8 @@ xmlFile.write(LITERAL("\">\r\n")); indent += '\t'; - for(auto i = directories.begin(); i != directories.end(); ++i) { - i->second->toXml(xmlFile, indent, tmp2, fullList); + for(auto& i: directories) { + i.second->toXml(xmlFile, indent, tmp2, fullList); } filesToXml(xmlFile, indent, tmp2); @@ -1040,9 +1048,7 @@ } void ShareManager::Directory::filesToXml(OutputStream& xmlFile, string& indent, string& tmp2) const { - for(auto i = files.begin(); i != files.end(); ++i) { - const Directory::File& f = *i; - + for(auto& f: files) { xmlFile.write(indent); xmlFile.write(LITERAL(" newStr; // Find any matches in the directory name - for(auto k = aStrings.begin(); k != aStrings.end(); ++k) { - if(k->match(name)) { + for(auto& k : aStrings) { + if(k.match(name)) { if(!newStr.get()) { newStr = unique_ptr(new StringSearch::List(aStrings)); } - newStr->erase(remove(newStr->begin(), newStr->end(), *k), newStr->end()); + newStr->erase(remove(newStr->begin(), newStr->end(), k), newStr->end()); } } @@ -1208,7 +1214,7 @@ bool sizeOk = (aSearchType != SearchManager::SIZE_ATLEAST) || (aSize == 0); if( (cur->empty()) && - (((aFileType == SearchManager::TYPE_ANY) && sizeOk) || (aFileType == SearchManager::TYPE_DIRECTORY)) ) { + (((aFileType == SearchManager::TYPE_ANY) && sizeOk) || (aFileType == SearchManager::TYPE_DIRECTORY)) ) { // We satisfied all the search words! Add the directory...(NMDC searches don't support directory size) SearchResultPtr sr(new SearchResult(SearchResult::TYPE_DIRECTORY, 0, getFullName(), TTHValue())); aResults.push_back(sr); @@ -1216,23 +1222,23 @@ } if(aFileType != SearchManager::TYPE_DIRECTORY) { - for(auto i = files.begin(); i != files.end(); ++i) { + for(auto& i : files) { - if(aSearchType == SearchManager::SIZE_ATLEAST && aSize > i->getSize()) { + if(aSearchType == SearchManager::SIZE_ATLEAST && aSize > i.getSize()) { continue; - } else if(aSearchType == SearchManager::SIZE_ATMOST && aSize < i->getSize()) { + } else if(aSearchType == SearchManager::SIZE_ATMOST && aSize < i.getSize()) { continue; } auto j = cur->begin(); - for(; j != cur->end() && j->match(i->getName()); ++j) + for(; j != cur->end() && j->match(i.getName()); ++j) ; // Empty if(j != cur->end()) continue; // Check file type... - if(checkType(i->getName(), aFileType)) { - SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, i->getSize(), getFullName() + i->getName(), i->getTTH())); + if(checkType(i.getName(), aFileType)) { + SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, i.getSize(), getFullName() + i.getName(), i.getTTH())); aResults.push_back(sr); ShareManager::getInstance()->setHits(ShareManager::getInstance()->getHits()+1); if(aResults.size() >= maxResults) { @@ -1255,7 +1261,7 @@ auto i = tthIndex.find(tth); if(i != tthIndex.end()) { SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, i->second->getSize(), - i->second->getParent()->getFullName() + i->second->getName(), i->second->getTTH())); + i->second->getParent()->getFullName() + i->second->getName(), i->second->getTTH())); results.push_back(sr); ShareManager::getInstance()->addHits(1); @@ -1269,9 +1275,9 @@ return; StringSearch::List ssl; - for(auto i = sl.begin(); i != sl.end(); ++i) { - if(!i->empty()) { - ssl.push_back(StringSearch(*i)); + for(auto& i : sl) { + if(!i.empty()) { + ssl.push_back(StringSearch(i)); } } if(ssl.empty()) @@ -1283,26 +1289,29 @@ } namespace { - inline uint16_t toCode(char a, char b) { return (uint16_t)a | ((uint16_t)b)<<8; } +inline uint16_t toCode(char a, char b) { return (uint16_t)a | ((uint16_t)b)<<8; } } -ShareManager::AdcSearch::AdcSearch(const StringList& params) : include(&includeX), gt(0), - lt(numeric_limits::max()), hasRoot(false), isDirectory(false) +ShareManager::AdcSearch::AdcSearch(const StringList& adcParams) : + include(&includeInit), + gt(0), + lt(numeric_limits::max()), + hasRoot(false), + isDirectory(false) { - for(auto i = params.begin(); i != params.end(); ++i) { - const string& p = *i; - if(p.length() <= 2) + for(auto& p: adcParams) { + if(p.size() <= 2) continue; - uint16_t cmd = toCode(p[0], p[1]); + auto cmd = toCode(p[0], p[1]); if(toCode('T', 'R') == cmd) { hasRoot = true; root = TTHValue(p.substr(2)); return; } else if(toCode('A', 'N') == cmd) { - includeX.push_back(StringSearch(p.substr(2))); + includeInit.emplace_back(p.substr(2)); } else if(toCode('N', 'O') == cmd) { - exclude.push_back(StringSearch(p.substr(2))); + exclude.emplace_back(p.substr(2)); } else if(toCode('E', 'X') == cmd) { ext.push_back(p.substr(2)); } else if(toCode('G', 'R') == cmd) { @@ -1323,8 +1332,8 @@ } bool ShareManager::AdcSearch::isExcluded(const string& str) { - for(auto i = exclude.begin(); i != exclude.end(); ++i) { - if(i->match(str)) + for(auto& i : exclude) { + if(i.match(str)) return true; } return false; @@ -1337,8 +1346,8 @@ ext = StringList(ext.begin(), set_difference(ext.begin(), ext.end(), noExt.begin(), noExt.end(), ext.begin())); noExt.clear(); } - for(auto i = ext.cbegin(), iend = ext.cend(); i != iend; ++i) { - if(name.length() >= i->length() && Util::stricmp(name.c_str() + name.length() - i->length(), i->c_str()) == 0) + for(auto& i : ext) { + if(name.length() >= i.length() && Util::stricmp(name.c_str() + name.length() - i.length(), i.c_str()) == 0) return true; } return false; @@ -1373,29 +1382,29 @@ } if(!aStrings.isDirectory) { - for(auto i = files.begin(); i != files.end(); ++i) { + for(auto& i : files) { - if(!(i->getSize() >= aStrings.gt)) { + if(!(i.getSize() >= aStrings.gt)) { continue; - } else if(!(i->getSize() <= aStrings.lt)) { + } else if(!(i.getSize() <= aStrings.lt)) { continue; } - if(aStrings.isExcluded(i->getName())) + if(aStrings.isExcluded(i.getName())) continue; auto j = cur->begin(); - for(; j != cur->end() && j->match(i->getName()); ++j) + for(; j != cur->end() && j->match(i.getName()); ++j) ; // Empty if(j != cur->end()) continue; // Check file type... - if(aStrings.hasExt(i->getName())) { + if(aStrings.hasExt(i.getName())) { SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, - i->getSize(), getFullName() + i->getName(), i->getTTH())); + i.getSize(), getFullName() + i.getName(), i.getTTH())); aResults.push_back(sr); ShareManager::getInstance()->addHits(1); if(aResults.size() >= maxResults) { @@ -1420,15 +1429,15 @@ auto i = tthIndex.find(srch.root); if(i != tthIndex.end()) { SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, - i->second->getSize(), i->second->getParent()->getFullName() + i->second->getName(), - i->second->getTTH())); + i->second->getSize(), i->second->getParent()->getFullName() + i->second->getName(), + i->second->getTTH())); results.push_back(sr); addHits(1); } return; } - for(auto i = srch.includeX.begin(); i != srch.includeX.end(); ++i) { + for(auto i = srch.includeInit.begin(); i != srch.includeInit.end(); ++i) { if(!bloom.match(i->getPattern())) return; } @@ -1439,12 +1448,12 @@ } ShareManager::Directory::Ptr ShareManager::getDirectory(const string& fname) { - for(auto mi = shares.begin(); mi != shares.end(); ++mi) { - if(Util::strnicmp(fname, mi->first, mi->first.length()) == 0) { + for(auto& mi : shares) { + if(Util::strnicmp(fname, mi.first, mi.first.length()) == 0) { Directory::Ptr d; - for(auto i = directories.begin(); i != directories.end(); ++i) { - if(Util::stricmp((*i)->getName(), mi->second) == 0) { - d = *i; + for(auto& i: directories) { + if(Util::stricmp(i->getName(), mi.second) == 0) { + d = i; } } @@ -1453,8 +1462,8 @@ } string::size_type i; - string::size_type j = mi->first.length(); - while( (i = fname.find(PATH_SEPARATOR, j)) != string::npos) { + string::size_type j = mi.first.length(); + while((i = fname.find(PATH_SEPARATOR, j)) != string::npos) { auto dmi = d->directories.find(fname.substr(j, i-j)); j = i + 1; if(dmi == d->directories.end()) @@ -1467,15 +1476,15 @@ return Directory::Ptr(); } -void ShareManager::on(QueueManagerListener::FileMoved, const string& n) noexcept { +void ShareManager::on(QueueManagerListener::FileMoved, const string& realPath) noexcept { if(BOOLSETTING(ADD_FINISHED_INSTANTLY)) { // Check if finished download is supposed to be shared Lock l(cs); - for(auto i = shares.begin(); i != shares.end(); ++i) { - if(Util::strnicmp(i->first, n, i->first.size()) == 0 && n[i->first.size() - 1] == PATH_SEPARATOR) { + for(auto& i: shares) { + if(Util::strnicmp(i.first, realPath, i.first.size()) == 0 && realPath[i.first.size() - 1] == PATH_SEPARATOR) { try { // Schedule for hashing, it'll be added automatically later on... - HashManager::getInstance()->checkTTH(n, File::getSize(n), 0); + HashManager::getInstance()->checkTTH(realPath, File::getSize(realPath), 0); } catch(const Exception&) { // Not a vital feature... } @@ -1485,21 +1494,21 @@ } } -void ShareManager::on(HashManagerListener::TTHDone, const string& fname, const TTHValue& root) noexcept { +void ShareManager::on(HashManagerListener::TTHDone, const string& realPath, const TTHValue& root) noexcept { Lock l(cs); - Directory::Ptr d = getDirectory(fname); + Directory::Ptr d = getDirectory(realPath); if(d) { - auto i = d->findFile(Util::getFileName(fname)); + auto i = d->findFile(Util::getFileName(realPath)); if(i != d->files.end()) { if(root != i->getTTH()) tthIndex.erase(i->getTTH()); // Get rid of false constness... auto f = const_cast(&(*i)); f->setTTH(root); - tthIndex.insert(make_pair(f->getTTH(), i)); + tthIndex.emplace(f->getTTH(), i); } else { - string name = Util::getFileName(fname); - int64_t size = File::getSize(fname); + string name = Util::getFileName(realPath); + int64_t size = File::getSize(realPath); auto it = d->files.insert(Directory::File(name, size, d, root)).first; updateIndices(*d, it); } @@ -1510,7 +1519,7 @@ void ShareManager::on(TimerManagerListener::Minute, uint64_t tick) noexcept { if (SETTING(AUTO_REFRESH_TIME) > 0) { - if (lastFullUpdate + SETTING(AUTO_REFRESH_TIME) * 60 * 1000 < tick) { + if(lastFullUpdate + SETTING(AUTO_REFRESH_TIME) * 60 * 1000 <= tick) { refresh(true, true); } } diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ShareManager.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ShareManager.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/ShareManager.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/ShareManager.h 2019-04-18 19:00:31.000000000 +0000 @@ -12,19 +12,29 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include +#include +#include +#include +#include +#include + +#include "NonCopyable.h" + #include "TimerManager.h" #include "SearchManager.h" #include "SettingsManager.h" #include "HashManagerListener.h" #include "QueueManagerListener.h" + #include "Exception.h" #include "CriticalSection.h" + #include "StringSearch.h" #include "Singleton.h" #include "BloomFilter.h" @@ -35,12 +45,18 @@ #ifdef WITH_DHT namespace dht { - class IndexManager; +class IndexManager; } #endif namespace dcpp { +using std::function; +using std::map; +using std::set; +using std::unique_ptr; +using std::unordered_map; + STANDARD_EXCEPTION(ShareException); class SimpleXML; @@ -51,7 +67,7 @@ struct ShareLoader; class ShareManager : public Singleton, private SettingsManagerListener, private Thread, private TimerManagerListener, - private HashManagerListener, private QueueManagerListener + private HashManagerListener, private QueueManagerListener { public: /** @@ -101,7 +117,7 @@ hits += aHits; } - string getOwnListFile() { + const string getOwnListFile() { generateXmlList(); return getBZXmlFile(); } @@ -111,30 +127,52 @@ return tthIndex.find(tth) != tthIndex.end(); } void publish(); + GETSET(uint32_t, hits, Hits); GETSET(string, bzXmlFile, BZXmlFile); + private: struct AdcSearch; - class Directory : public FastAlloc, public intrusive_ptr_base, boost::noncopyable { + class Directory : public FastAlloc, public intrusive_ptr_base, private NonCopyable { public: typedef boost::intrusive_ptr Ptr; typedef unordered_map Map; typedef Map::iterator MapIter; struct File { + File() : size(0), parent(0) { } + File(const string& aName, int64_t aSize, const Directory::Ptr& aParent, const TTHValue& aRoot) : + name(aName), tth(aRoot), size(aSize), parent(aParent.get()) { } + File(const File& rhs) : + name(rhs.getName()), tth(rhs.getTTH()), size(rhs.getSize()), parent(rhs.getParent()) { } + + File& operator=(const File& rhs) { + name = rhs.name; size = rhs.size; parent = rhs.parent; tth = rhs.tth; + return *this; + } + + bool operator==(const File& rhs) const { + if (BOOLSETTING(CASESENSITIVE_FILELIST)) + return getParent() == rhs.getParent() && (strcmp(getName().c_str(), rhs.getName().c_str()) == 0); + else + return getParent() == rhs.getParent() && (Util::stricmp(getName(), rhs.getName()) == 0); + } + struct StringComp { StringComp(const string& s) : a(s) { } bool operator()(const File& b) const { - if (BOOLSETTING(CASESENSITIVE_FILELIST)) - return strcmp(a.c_str(), b.getName().c_str()) == 0; - else - return Util::stricmp(a, b.getName()) == 0; + if (BOOLSETTING(CASESENSITIVE_FILELIST)) + return strcmp(a.c_str(), b.getName().c_str()) == 0; + else + return Util::stricmp(a, b.getName()) == 0; } const string& a; + private: StringComp& operator=(const StringComp&); }; + struct FileLess { bool operator()(const File& a, const File& b) const { if (BOOLSETTING(CASESENSITIVE_FILELIST)) @@ -143,27 +181,8 @@ return (Util::stricmp(a.getName(), b.getName()) < 0); } }; - typedef set Set; - File() : size(0), parent(0) { } - File(const string& aName, int64_t aSize, const Directory::Ptr& aParent, const TTHValue& aRoot) : - name(aName), tth(aRoot), size(aSize), parent(aParent.get()) { } - File(const File& rhs) : - name(rhs.getName()), tth(rhs.getTTH()), size(rhs.getSize()), parent(rhs.getParent()) { } - - ~File() { } - - File& operator=(const File& rhs) { - name = rhs.name; size = rhs.size; parent = rhs.parent; tth = rhs.tth; - return *this; - } - - bool operator==(const File& rhs) const { - if (BOOLSETTING(CASESENSITIVE_FILELIST)) - return getParent() == rhs.getParent() && (strcmp(getName().c_str(), rhs.getName().c_str()) == 0); - else - return getParent() == rhs.getParent() && (Util::stricmp(getName(), rhs.getName()) == 0); - } + typedef set Set; string getADCPath() const { return parent->getADCPath() + name; } string getFullName() const { return parent->getFullName() + name; } @@ -177,7 +196,7 @@ int64_t size; Map directories; - File::Set files; + set files; static Ptr create(const string& aName, const Ptr& aParent = Ptr()) { return Ptr(new Directory(aName, aParent)); } @@ -198,7 +217,7 @@ void toXml(OutputStream& xmlFile, string& indent, string& tmp2, bool fullList) const; void filesToXml(OutputStream& xmlFile, string& indent, string& tmp2) const; - File::Set::const_iterator findFile(const string& aFile) const { return find_if(files.begin(), files.end(), Directory::File::StringComp(aFile)); } + auto findFile(const string& aFile) const -> decltype(files.cbegin()) { return find_if(files.begin(), files.end(), Directory::File::StringComp(aFile)); } void merge(const Ptr& source); @@ -224,12 +243,12 @@ virtual ~ShareManager(); struct AdcSearch { - AdcSearch(const StringList& params); + AdcSearch(const StringList& adcParams); bool isExcluded(const string& str); bool hasExt(const string& name); StringSearch::List* include; - StringSearch::List includeX; + StringSearch::List includeInit; StringSearch::List exclude; StringList ext; StringList noExt; @@ -290,7 +309,7 @@ void rebuildIndices(); void updateIndices(Directory& aDirectory); - void updateIndices(Directory& dir, const Directory::File::Set::iterator& i); + void updateIndices(Directory& dir, const decltype(std::declval().files.begin())& i); Directory::Ptr merge(const Directory::Ptr& directory); @@ -306,9 +325,9 @@ virtual int run(); // QueueManagerListener - virtual void on(QueueManagerListener::FileMoved, const string& n) noexcept; + virtual void on(QueueManagerListener::FileMoved, const string& realPath) noexcept; // HashManagerListener - virtual void on(HashManagerListener::TTHDone, const string& fname, const TTHValue& root) noexcept; + virtual void on(HashManagerListener::TTHDone, const string& realPath, const TTHValue& root) noexcept; // SettingsManagerListener virtual void on(SettingsManagerListener::Save, SimpleXML& xml) noexcept { diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXML.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXML.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXML.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXML.cpp 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,13 +12,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #include "stdinc.h" - #include "SimpleXML.h" +#include "Streams.h" namespace dcpp { @@ -77,15 +76,15 @@ } void SimpleXML::Tag::appendAttribString(string& tmp) { - for(StringPairIter i = attribs.begin(); i!= attribs.end(); ++i) { - tmp.append(i->first); + for(auto& i: attribs) { + tmp.append(i.first); tmp.append("=\"", 2); - if(needsEscape(i->second, true)) { - string tmp2(i->second); + if(needsEscape(i.second, true)) { + string tmp2(i.second); escape(tmp2, true); tmp.append(tmp2); } else { - tmp.append(i->second); + tmp.append(i.second); } tmp.append("\" ", 2); } @@ -128,8 +127,8 @@ tmp.append(">\r\n", 3); f->write(tmp); tmp.clear(); - for(Iter i = children.begin(); i!=children.end(); ++i) { - (*i)->toXML(indent + 1, f); + for(auto& i: children) { + i->toXML(indent + 1, f); } tmp.append(indent, '\t'); } @@ -173,13 +172,13 @@ if(current == &root) throw SimpleXMLException("No tag is currently selected"); - current->attribs.push_back(make_pair(aName, aData)); + current->attribs.emplace_back(aName, aData); } void SimpleXML::addChildAttrib(const string& aName, const string& aData) { checkChildSelected(); - (*currentChild)->attribs.push_back(make_pair(aName, aData)); + (*currentChild)->attribs.emplace_back(aName, aData); } void SimpleXML::fromXML(const string& aXML) { @@ -189,7 +188,7 @@ } TagReader t(&root); - SimpleXMLReader(&t).parse(aXML.c_str(), aXML.size(), false); + SimpleXMLReader(&t).parse(aXML); if(root.children.size() != 1) { throw SimpleXMLException("Invalid XML file, missing or multiple root tags"); @@ -199,4 +198,10 @@ resetCurrentChild(); } +string SimpleXML::toXML() { + StringOutputStream os; + toXML(&os); + return os.getString(); +} + } // namespace dcpp diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXML.h eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXML.h --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXML.h 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXML.h 2019-04-18 19:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -12,14 +12,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * along with this program. If not, see . */ #pragma once +#include "NonCopyable.h" + +#include "forward.h" #include "Exception.h" #include "Streams.h" + #include "SimpleXMLReader.h" namespace dcpp { @@ -30,7 +33,7 @@ * A simple XML class that loads an XML-ish structure into an internal tree * and allows easy access to each element through a "current location". */ -class SimpleXML : private boost::noncopyable +class SimpleXML : private NonCopyable { public: SimpleXML() : root("BOGUSROOT", Util::emptyString, NULL), current(&root), found(false) { @@ -102,6 +105,15 @@ return (*currentChild)->data; } + StringMap getCurrentChildren() { + dcassert(current != NULL); + StringMap d; + for(Tag::Iter i = current->children.begin(); i != current->children.end(); ++i) { + d[(*i)->name] = (*i)->data; + } + return d; + } + const string& getChildAttrib(const string& aName, const string& aDefault = Util::emptyString) { checkChildSelected(); return (*currentChild)->getAttrib(aName, aDefault); @@ -119,11 +131,11 @@ checkChildSelected(); const string& tmp = getChildAttrib(aName); - return !tmp.empty() && tmp[0] == '1'; + return (!tmp.empty()) && tmp[0] == '1'; } void fromXML(const string& aXML); - string toXML() { string tmp; StringOutputStream os(tmp); toXML(&os); return tmp; } + string toXML(); void toXML(OutputStream* f) { if(!root.children.empty()) root.children[0]->toXML(0, f); } static const string& escape(const string& str, string& tmp, bool aAttrib, bool aLoading = false, const string &encoding = Text::utf8) { @@ -144,7 +156,7 @@ } static const string utf8Header; private: - class Tag { + class Tag : private NonCopyable { public: typedef Tag* Ptr; typedef vector List; @@ -178,7 +190,7 @@ } const string& getAttrib(const string& aName, const string& aDefault = Util::emptyString) { - StringPairIter i = find_if(attribs.begin(), attribs.end(), CompareFirst(aName)); + auto i = find_if(attribs.begin(), attribs.end(), CompareFirst(aName)); return (i == attribs.end()) ? aDefault : i->second; } void toXML(int indent, OutputStream* f); @@ -186,27 +198,24 @@ void appendAttribString(string& tmp); /** Delete all children! */ ~Tag() { - for(Iter i = children.begin(); i != children.end(); ++i) { - delete *i; + for(auto i: children) { + delete i; } } - - private: - Tag(const Tag&); - Tag& operator=(Tag&); }; class TagReader : public SimpleXMLReader::CallBack { public: TagReader(Tag* root) : cur(root) { } - virtual bool getData(string&) { return false; } - virtual void startTag(const string& name, StringPairList& attribs, bool simple) { + void startTag(const string& name, StringPairList& attribs, bool simple) { cur->children.push_back(new Tag(name, attribs, cur)); if(!simple) cur = cur->children.back(); } - virtual void endTag(const string&, const string& d) { - cur->data = d; + void data(const string& data) { + cur->data += data; + } + void endTag(const string&) { if(cur->parent == NULL) throw SimpleXMLException("Invalid end tag"); cur = cur->parent; diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXMLReader.cpp eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXMLReader.cpp --- eiskaltdcpp-2.2.10+340+g44d8aea4/dcpp/SimpleXMLReader.cpp 2018-02-01 21:20:35.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/dcpp/SimpleXMLReader.cpp 2019-04-17 17:00:30.000000000 +0000 @@ -1,18 +1,19 @@ /* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ + * Copyright (C) 2001-2019 Jacek Sieka, arnetheduck on gmail point com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "stdinc.h" @@ -25,11 +26,11 @@ namespace dcpp { static bool isSpace(int c) { - return c == 0x20 || c == 0x09 || c == 0x0d || c == 0x0a; + return c == 0x20 || c == 0x09 || c == 0x0d || c == 0x0a; } static bool inRange(int c, int a, int b) { - return c >= a && c <= b; + return c >= a && c <= b; } static bool isNameStartChar(int c) { @@ -38,19 +39,19 @@ || c == '_' || inRange(c, 'a', 'z') // Comment out some valid XML chars that we don't allow - || c == '+' //NOTE: freedcpp -/* || inRange(c, 0xC0, 0xD6) - || inRange(c, 0xD8, 0xF6) - || inRange(c, 0xF8, 0x2FF) - || inRange(c, 0x370, 0x37D) - || inRange(c, 0x37F, 0x1FFF) - || inRange(c, 0x200C, 0x200D) - || inRange(c, 0x2070, 0x218F) - || inRange(c, 0x2C00, 0x2FEF) - || inRange(c, 0x3001, 0xD7FF) - || inRange(c, 0xF900, 0xFDCF) - || inRange(c, 0xFDF0, 0xFFFD) - || inRange(c, 0x10000, 0xEFFFF) */ + || c == '+' // NOTE: freedcpp + /* || inRange(c, 0xC0, 0xD6) + || inRange(c, 0xD8, 0xF6) + || inRange(c, 0xF8, 0x2FF) + || inRange(c, 0x370, 0x37D) + || inRange(c, 0x37F, 0x1FFF) + || inRange(c, 0x200C, 0x200D) + || inRange(c, 0x2070, 0x218F) + || inRange(c, 0x2C00, 0x2FEF) + || inRange(c, 0x3001, 0xD7FF) + || inRange(c, 0xF900, 0xFDCF) + || inRange(c, 0xFDF0, 0xFFFD) + || inRange(c, 0x10000, 0xEFFFF) */ ; } @@ -60,9 +61,9 @@ || c == '.' || inRange(c, '0', '9') // Again, real XML is more permissive -/* || c == 0xB7 - || inRange(c, 0x0300, 0x036F) - || inRange(c, 0x203F, 0x2040) */ + /* || c == 0xB7 + || inRange(c, 0x0300, 0x036F) + || inRange(c, 0x203F, 0x2040) */ ; } @@ -100,7 +101,7 @@ const string& SimpleXMLReader::CallBack::getAttrib(StringPairList& attribs, const string& name, size_t hint) { hint = min(hint, attribs.size()); - StringPairIter i = find_if(attribs.begin() + hint, attribs.end(), CompareFirst(name)); + auto i = find_if(attribs.begin() + hint, attribs.end(), CompareFirst(name)); if(i == attribs.end()) { i = find_if(attribs.begin(), attribs.begin() + hint, CompareFirst(name)); return ((i == (attribs.begin() + hint)) ? Util::emptyString : i->second); @@ -136,22 +137,22 @@ bool SimpleXMLReader::element() { if(!needChars(2)) { - return true; + return true; } int c = charAt(1); - if(charAt(0) == '<' && isNameStartChar(c)) { - if(elements.size() >= MAX_NESTING) { - error("Max nesting exceeded"); - } + if(charAt(0) == '<' && isNameStartChar(c)) { + if(elements.size() >= MAX_NESTING) { + error("Max nesting exceeded"); + } - state = STATE_ELEMENT_NAME; - elements.push_back(std::string()); - append(elements.back(), MAX_NAME_SIZE, c); + state = STATE_ELEMENT_NAME; + elements.emplace_back(); + append(elements.back(), MAX_NAME_SIZE, c); - advancePos(2); + advancePos(2); - return true; + return true; } return false; @@ -201,7 +202,7 @@ int c = charAt(0); if(isNameStartChar(c)) { - attribs.push_back(StringPair()); + attribs.emplace_back(); append(attribs.back().first, MAX_NAME_SIZE, c); state = STATE_ELEMENT_ATTR_NAME; @@ -327,7 +328,7 @@ if((sep == '"' || sep == '\'') && charAt(1) == '1' && charAt(2) == '.') { // At least one more number if(!inRange(charAt(3), '0', '9')) { - return false; + return false; } // Now an unknown number of [0-9] @@ -361,7 +362,7 @@ return true; } else if(c == '&') { if(!entref(encoding)) { - return false; + return false; } } else { append(encoding, MAX_VALUE_SIZE, c); @@ -394,6 +395,28 @@ return true; } +bool SimpleXMLReader::cdata() { + while(bufSize() > 0) { + int c = charAt(0); + + if(c == ']') { + if(!needChars(3)) { + return true; + } + if(charAt(1) == ']' && charAt(2) == '>') { + state = STATE_CONTENT; + advancePos(3); + return true; + } + } + + append(value, MAX_VALUE_SIZE, c); + advancePos(1); + } + + return true; +} + bool SimpleXMLReader::entref(string& d) { if(d.size() + 1 >= MAX_VALUE_SIZE) { error("Buffer overflow"); @@ -421,7 +444,7 @@ advancePos(6); return true; - // Ignore � decimal and � hex values to avoid error, they wouldn't be parsed anyway + // Ignore � decimal and � hex values to avoid error, they wouldn't be parsed anyway } else if(charAt(1) == '#' && isdigit(charAt(2)) && charAt(3) == ';') { advancePos(4); return true; @@ -464,12 +487,6 @@ } int c = charAt(0); - if(c == '<') { - if(!value.empty()) { - error("Mixed content not supported"); - } - return false; - } if(c == '&') { return entref(value); @@ -507,11 +524,7 @@ } if(charAt(0) == '>') { - if(!encoding.empty() && encoding != Text::utf8) { - value = Text::toUtf8(encoding); - } - cb->endTag(elements.back(), value); - value.clear(); + cb->endTag(elements.back()); elements.pop_back(); state = STATE_CONTENT; @@ -570,10 +583,15 @@ } while(process()); } -bool SimpleXMLReader::parse(const char* data, size_t len, bool more) { +bool SimpleXMLReader::parse(const char* data, size_t len) { buf.append(data, len); return process(); } + +bool SimpleXMLReader::parse(const string& str) { + return parse(str.c_str(), str.size()); +} + bool SimpleXMLReader::spaceOrError(const char* message) { if(!skipSpace()) { error(message); @@ -588,119 +606,124 @@ while(true) { switch(state) { case STATE_START: - literal(LITN("\xef\xbb\xbf"), false, STATE_START) // Byte order mark - || literal(LITN(""), false, STATE_CONTENT) - || spaceOrError("Expecting encoding | standalone | ?>"); - break; + literal(LITN("encoding"), false, STATE_DECL_ENCODING_EQ) + || literal(LITN("standalone"), false, STATE_DECL_STANDALONE_EQ) + || literal(LITN("?>"), false, STATE_CONTENT) + || spaceOrError("Expecting encoding | standalone | ?>"); + break; case STATE_DECL_ENCODING_EQ: - character('=', STATE_DECL_ENCODING_NAME) - || spaceOrError("Expecting ="); - break; + character('=', STATE_DECL_ENCODING_NAME) + || spaceOrError("Expecting ="); + break; case STATE_DECL_ENCODING_NAME: - character('\'', STATE_DECL_ENCODING_NAME_APOS) - || character('"', STATE_DECL_ENCODING_NAME_QUOT) - || spaceOrError("Expecting encoding name start"); - break; + character('\'', STATE_DECL_ENCODING_NAME_APOS) + || character('"', STATE_DECL_ENCODING_NAME_QUOT) + || spaceOrError("Expecting encoding name start"); + break; case STATE_DECL_ENCODING_NAME_APOS: case STATE_DECL_ENCODING_NAME_QUOT: - declEncodingValue() - || spaceOrError("Expecting encoding value"); + declEncodingValue() + || spaceOrError("Expecting encoding value"); case STATE_DECL_STANDALONE: - literal(LITN("standalone"), false, STATE_DECL_STANDALONE_EQ) - || literal(LITN("?>"), false, STATE_CONTENT) - || spaceOrError("Expecting standalone | ?>"); - break; + literal(LITN("standalone"), false, STATE_DECL_STANDALONE_EQ) + || literal(LITN("?>"), false, STATE_CONTENT) + || spaceOrError("Expecting standalone | ?>"); + break; case STATE_DECL_STANDALONE_EQ: - character('=', STATE_DECL_STANDALONE_YES) - || spaceOrError("Expecting ="); - break; + character('=', STATE_DECL_STANDALONE_YES) + || spaceOrError("Expecting ="); + break; case STATE_DECL_STANDALONE_YES: - literal(LITN("\"yes\""), false, STATE_DECL_END) - || literal(LITN("'yes'"), false, STATE_DECL_END) - || spaceOrError("Expecting standalone=yes"); - break; + literal(LITN("\"yes\""), false, STATE_DECL_END) + || literal(LITN("'yes'"), false, STATE_DECL_END) + || spaceOrError("Expecting standalone=yes"); + break; case STATE_DECL_END: - literal(LITN("?>"), false, STATE_CONTENT) - || spaceOrError("Expecting ?>"); - break; + literal(LITN("?>"), false, STATE_CONTENT) + || spaceOrError("Expecting ?>"); + break; case STATE_ELEMENT_NAME: - elementName() - || error("Error while parsing element start"); - break; + elementName() + || error("Error while parsing element start"); + break; case STATE_ELEMENT_END_SIMPLE: - elementEndSimple() - || error("Expecting >"); - break; + elementEndSimple() + || error("Expecting >"); + break; case STATE_ELEMENT_END: - elementEnd() - || spaceOrError("Expecting element end"); - break; + elementEnd() + || spaceOrError("Expecting element end"); + break; case STATE_ELEMENT_END_END: - elementEndEnd() - || spaceOrError("Expecting >"); - break; + elementEndEnd() + || spaceOrError("Expecting >"); + break; case STATE_ELEMENT_ATTR: - elementAttr() - || elementEndComplex() - || character('/', STATE_ELEMENT_END_SIMPLE) - || spaceOrError("Expecting attribute | /> | >"); - break; + elementAttr() + || elementEndComplex() + || character('/', STATE_ELEMENT_END_SIMPLE) + || spaceOrError("Expecting attribute | /> | >"); + break; case STATE_ELEMENT_ATTR_NAME: - elementAttrName() - || error("Expecting attribute name"); - break; + elementAttrName() + || error("Expecting attribute name"); + break; case STATE_ELEMENT_ATTR_EQ: - character('=', STATE_ELEMENT_ATTR_VALUE) - || spaceOrError("Expecting attribute ="); - break; + character('=', STATE_ELEMENT_ATTR_VALUE) + || spaceOrError("Expecting attribute ="); + break; case STATE_ELEMENT_ATTR_VALUE: - character('\'', STATE_ELEMENT_ATTR_VALUE_APOS) - || character('"', STATE_ELEMENT_ATTR_VALUE_QUOT) - || spaceOrError("Expecting attribute value start"); - break; + character('\'', STATE_ELEMENT_ATTR_VALUE_APOS) + || character('"', STATE_ELEMENT_ATTR_VALUE_QUOT) + || spaceOrError("Expecting attribute value start"); + break; case STATE_ELEMENT_ATTR_VALUE_APOS: case STATE_ELEMENT_ATTR_VALUE_QUOT: - elementAttrValue() - || error("Expecting attribute value"); - break; + elementAttrValue() + || error("Expecting attribute value"); + break; case STATE_COMMENT: - comment() - || error("Error while parsing comment"); - break; + comment() + || error("Error while parsing comment"); + break; + case STATE_CDATA: + cdata() + || error("Error while parsing CDATA"); + break; case STATE_CONTENT: - skipSpace(true) - || literal(LITN(" + 1 + + + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/windows/dcppboot.xml eiskaltdcpp-2.2.10+583+g17a6b034/windows/dcppboot.xml --- eiskaltdcpp-2.2.10+340+g44d8aea4/windows/dcppboot.xml 2018-09-03 01:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/windows/dcppboot.xml 2019-04-21 10:00:28.000000000 +0000 @@ -17,7 +17,7 @@ %[PERSONAL] - My documents All % variables from strftime with the current time: - https://msdn.microsoft.com/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp + https://www.rapidee.com/en/environment-variables --> diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/windows/install-deps.cmake eiskaltdcpp-2.2.10+583+g17a6b034/windows/install-deps.cmake --- eiskaltdcpp-2.2.10+340+g44d8aea4/windows/install-deps.cmake 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/windows/install-deps.cmake 2019-04-28 19:00:26.000000000 +0000 @@ -0,0 +1,96 @@ +cmake_minimum_required (VERSION 2.6.3) + +if (CMAKE_PREFIX_PATH MATCHES "mxe" AND NOT STATIC) + set (LIBS_TARGET install-dependencies) + set (COMMON_LIBS_DIR "${CMAKE_PREFIX_PATH}/bin") + set (QT_LIBS_DIR "${CMAKE_PREFIX_PATH}/qt5/bin") + set (QT_PLUGINS_DIR "${CMAKE_PREFIX_PATH}/qt5/plugins") + + set (COMMON_LIBS + libaspell-15.dll + libboost_system-mt.dll + libbz2.dll + libcrypto-1_1.dll + libcrypto-1_1-x64.dll + libdbus-1-3.dll + libexpat-1.dll + libfontconfig-1.dll + libfreetype-6.dll + libgcc_s_seh-1.dll + libgcc_s_sjlj-1.dll + libglib-2.0-0.dll + libharfbuzz-0.dll + libharfbuzz-icu-0.dll + libiconv-2.dll + libidn-12.dll + libintl-8.dll + libjpeg-9.dll + libminiupnpc.dll + libpcre-1.dll + libpcre2-16-0.dll + libpcrecpp-0.dll + libpng16-16.dll + libsqlite3-0.dll + libssl-1_1.dll + libssl-1_1-x64.dll + libstdc++-6.dll + libwinpthread-1.dll + lua53.dll + zlib1.dll + ) + + set (QT_LIBS + Qt5Concurrent.dll + Qt5Core.dll + Qt5DBus.dll + Qt5Gui.dll + Qt5Multimedia.dll + Qt5Network.dll + Qt5Sql.dll + Qt5Widgets.dll + Qt5Xml.dll + ) + + set (QT_PLUGINS + audio + bearer + generic + iconengines + imageformats + mediaservice + platforms + platformthemes + playlistformats + printsupport + sqldrivers + styles + ) + + foreach (FILE ${COMMON_LIBS}) + if (EXISTS "${COMMON_LIBS_DIR}/${FILE}") + list (APPEND LIBS_TO_INSTALL "${COMMON_LIBS_DIR}/${FILE}") + else () + message (STATUS "!!! Missing file ${FILE}") + endif () + endforeach () + + foreach (FILE ${QT_LIBS}) + if (EXISTS "${QT_LIBS_DIR}/${FILE}") + list (APPEND LIBS_TO_INSTALL "${QT_LIBS_DIR}/${FILE}") + else () + message (STATUS "!!! Missing file ${FILE}") + endif () + endforeach () + + foreach (DIR ${QT_PLUGINS}) + if (EXISTS "${QT_PLUGINS_DIR}/${DIR}") + list (APPEND DIRS_TO_INSTALL "${QT_PLUGINS_DIR}/${DIR}") + else () + message (STATUS "!!! Missing directory ${DIR}") + endif () + endforeach () + + install (FILES ${LIBS_TO_INSTALL} windows/qt.conf DESTINATION ${BINDIR}) + install (DIRECTORY ${DIRS_TO_INSTALL} DESTINATION ${BINDIR}/plugins) +endif () + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/windows/qt.conf eiskaltdcpp-2.2.10+583+g17a6b034/windows/qt.conf --- eiskaltdcpp-2.2.10+340+g44d8aea4/windows/qt.conf 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/windows/qt.conf 2019-04-29 23:02:31.000000000 +0000 @@ -0,0 +1,3 @@ +[Paths] +Plugins = plugins +Translations = resources/translations diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/windows/Readme.aspell.txt eiskaltdcpp-2.2.10+583+g17a6b034/windows/Readme.aspell.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/windows/Readme.aspell.txt 1970-01-01 00:00:00.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/windows/Readme.aspell.txt 2019-05-01 11:00:26.000000000 +0000 @@ -0,0 +1,21 @@ +If you want use spellchecker in chats then: + +1) Download aspell resources and dictionaries from: + https://sourceforge.net/projects/eiskaltdcpp/files/Other/aspell.zip + +2) Unpack archive "aspell.zip" and put "aspell" directory into "resources" + subdirectory of main directory where "EiskaltDC++.exe" program is stored. + + For example "aspell" directory may be here: + * C:\Program Files\EiskaltDC++\resources\aspell\ + * C:\Program Files (x86)\EiskaltDC++\resources\aspell\ + * etc. + +3) For disabling and enabling of spellchecker just send special command in any + public or private chat: + /aspell off + /aspell on + + To see more chat commands send: + /help + diff -Nru eiskaltdcpp-2.2.10+340+g44d8aea4/windows/README.txt eiskaltdcpp-2.2.10+583+g17a6b034/windows/README.txt --- eiskaltdcpp-2.2.10+340+g44d8aea4/windows/README.txt 2018-09-03 01:00:28.000000000 +0000 +++ eiskaltdcpp-2.2.10+583+g17a6b034/windows/README.txt 2019-04-11 19:00:27.000000000 +0000 @@ -5,7 +5,7 @@ cd /path/to/mxe make aspell boost jsoncpp libidn lua miniupnpc qtmultimedia qttools MXE_TARGETS=x86_64-w64-mingw32.shared -/path/to/mxe/usr/bin/x86_64-w64-mingw32.shared-cmake -DCMAKE_INSTALL_PREFIX=./EiskaltDC++ -DSHARE_DIR=resources -DOPENSSL_MSVC=OFF -DDO_NOT_USE_MUTEX=ON -DUSE_ASPELL=ON -DFORCE_XDG=OFF -DDBUS_NOTIFY=OFF -DUSE_JS=OFF -DWITH_EXAMPLES=OFF -DUSE_MINIUPNP=ON -DLOCAL_MINIUPNP=OFF -DWITH_SOUNDS=ON -DPERL_REGEX=ON -DUSE_QT_QML=OFF -DLUA_SCRIPT=ON -DWITH_LUASCRIPTS=ON -DUSE_QT_SQLITE=ON -DNO_UI_DAEMON=ON -DJSONRPC_DAEMON=ON -DUSE_CLI_JSONRPC=ON /path/to/source/eiskaltdcpp +/path/to/mxe/usr/bin/x86_64-w64-mingw32.shared-cmake -DCMAKE_INSTALL_PREFIX=./EiskaltDC++ -DSHARE_DIR=resources -DOPENSSL_MSVC=OFF -DUSE_ASPELL=ON -DFORCE_XDG=OFF -DDBUS_NOTIFY=OFF -DUSE_JS=OFF -DWITH_EXAMPLES=OFF -DUSE_MINIUPNP=ON -DWITH_SOUNDS=ON -DPERL_REGEX=ON -DUSE_QT_QML=OFF -DLUA_SCRIPT=ON -DWITH_LUASCRIPTS=ON -DUSE_QT_SQLITE=ON -DNO_UI_DAEMON=ON -DJSONRPC_DAEMON=ON -DUSE_CLI_JSONRPC=ON /path/to/source/eiskaltdcpp make -j4 make install