Merge pull request #38 from RetroShare/master

update to master
This commit is contained in:
defnax 2019-12-02 21:23:51 +01:00 committed by GitHub
commit ed6e839894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 16 deletions

View File

@ -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.

View File

@ -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())

View File

@ -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) ;

View File

@ -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 */

View File

@ -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];
}

View File

@ -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