mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
commit
ed6e839894
@ -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.
|
||||
|
||||
|
@ -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())
|
||||
|
@ -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) ;
|
||||
|
@ -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 */
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user