diff --git a/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md b/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md index c9ce0edd7..5d939d2de 100644 --- a/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md +++ b/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md @@ -47,6 +47,7 @@ Install all needed dependencies: pacman -S mingw-w64-i686-sqlcipher pacman -S mingw-w64-i686-qt5 pacman -S mingw32/mingw-w64-i686-cmake + pacman -S mingw-w64-i686-rapidjson We're done installing MSYS2, close the shell terminal. diff --git a/libretroshare/src/dht/p3bitdht.cc b/libretroshare/src/dht/p3bitdht.cc index f6ed68b68..e08a64ae6 100644 --- a/libretroshare/src/dht/p3bitdht.cc +++ b/libretroshare/src/dht/p3bitdht.cc @@ -79,6 +79,12 @@ virtual int dhtInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std:: virtual int dhtIsBannedCallback(const sockaddr_in *addr, bool *isBanned) { + if(!rsBanList) + { + *isBanned = true; // rsBanList is not enabled yet. For security, default to banned. + return 0; + } + // check whether ip filtering is enabled // if not return 0 to signal that no filter is available if(!rsBanList->ipFilteringEnabled()) diff --git a/libretroshare/src/file_sharing/hash_cache.cc b/libretroshare/src/file_sharing/hash_cache.cc index 340391f03..22955ae9d 100644 --- a/libretroshare/src/file_sharing/hash_cache.cc +++ b/libretroshare/src/file_sharing/hash_cache.cc @@ -69,12 +69,12 @@ bool HashStorage::hashingProcessPaused() static std::string friendlyUnit(uint64_t val) { - const std::string units[5] = {"B","KB","MB","GB","TB"}; + const std::string units[6] = {"B","KB","MB","GB","TB","PB"}; char buf[50] ; double fact = 1.0 ; - for(unsigned int i=0; i<5; ++i) + for(unsigned int i=0; i<6; ++i) if(double(val)/fact < 1024.0) { sprintf(buf,"%2.2f",double(val)/fact) ; diff --git a/retroshare-gui/src/gui/AboutWidget.cpp b/retroshare-gui/src/gui/AboutWidget.cpp index c2b07a6fe..20acafb8b 100644 --- a/retroshare-gui/src/gui/AboutWidget.cpp +++ b/retroshare-gui/src/gui/AboutWidget.cpp @@ -973,11 +973,12 @@ void AboutWidget::on_copy_button_clicked() verInfo+=addLibraries("libretroshare", libraries); #ifdef RS_JSONAPI - /* Add version numbers of RetroShare */ - // Add versions here. Find a better place. - libraries.clear(); - libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version())); - verInfo+=addLibraries("RetroShare", libraries); +// Disabled because I could not find how to get restbed version number +// /* Add version numbers of RetroShare */ +// // Add versions here. Find a better place. +// libraries.clear(); +// libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version())); +// verInfo+=addLibraries("RetroShare", libraries); #endif /* Add version numbers of plugins */ diff --git a/retroshare-gui/src/util/misc.cpp b/retroshare-gui/src/util/misc.cpp index adb422a4c..a66de053c 100644 --- a/retroshare-gui/src/util/misc.cpp +++ b/retroshare-gui/src/util/misc.cpp @@ -38,8 +38,8 @@ QString misc::friendlyUnit(float val) if(val < 0) { return tr("Unknown", "Unknown (size)"); } - const QString units[5] = {tr(" B", "bytes"), tr(" KB", "kilobytes (1024 bytes)"), tr(" MB", "megabytes (1024 kilobytes)"), tr(" GB", "gigabytes (1024 megabytes)"), tr(" TB", "terabytes (1024 gigabytes)") }; - for(unsigned int i=0; i<5; ++i) { + const QString units[6] = {tr(" B", "bytes"), tr(" KB", "kilobytes (1024 bytes)"), tr(" MB", "megabytes (1024 kilobytes)"), tr(" GB", "gigabytes (1024 megabytes)"), tr(" TB", "terabytes (1024 gigabytes)"), tr(" PB", "petabytes (1024 terabytes)") }; + for(unsigned int i=0; i<6; ++i) { if (val < 1024.) { return QString(QByteArray::number(val, 'f', 1)) + units[i]; } diff --git a/retroshare-service/src/retroshare-service.cc b/retroshare-service/src/retroshare-service.cc index 7242b08e4..a57fef2da 100644 --- a/retroshare-service/src/retroshare-service.cc +++ b/retroshare-service/src/retroshare-service.cc @@ -303,18 +303,15 @@ int main(int argc, char* argv[]) << std::endl; return -result; } - - /* Start-up libretroshare server threads */ - RsControl::instance()->StartupRetroShare(); } #endif // def RS_SERVICE_TERMINAL_LOGIN #if (defined(RS_JSONAPI) && defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD) - if(rsJsonAPI && !webui_pass1.empty()) + if(rsJsonApi && !webui_pass1.empty()) { - rsWebUI->setHtmlFilesDirectory(webui_base_directory); - rsWebUI->setUserPassword(webui_pass1); - rsWebUI->restart(); + rsWebUi->setHtmlFilesDirectory(webui_base_directory); + rsWebUi->setUserPassword(webui_pass1); + rsWebUi->restart(); } #endif