mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
commit
ed6e839894
@ -47,6 +47,7 @@ Install all needed dependencies:
|
|||||||
pacman -S mingw-w64-i686-sqlcipher
|
pacman -S mingw-w64-i686-sqlcipher
|
||||||
pacman -S mingw-w64-i686-qt5
|
pacman -S mingw-w64-i686-qt5
|
||||||
pacman -S mingw32/mingw-w64-i686-cmake
|
pacman -S mingw32/mingw-w64-i686-cmake
|
||||||
|
pacman -S mingw-w64-i686-rapidjson
|
||||||
|
|
||||||
We're done installing MSYS2, close the shell terminal.
|
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)
|
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
|
// check whether ip filtering is enabled
|
||||||
// if not return 0 to signal that no filter is available
|
// if not return 0 to signal that no filter is available
|
||||||
if(!rsBanList->ipFilteringEnabled())
|
if(!rsBanList->ipFilteringEnabled())
|
||||||
|
@ -69,12 +69,12 @@ bool HashStorage::hashingProcessPaused()
|
|||||||
|
|
||||||
static std::string friendlyUnit(uint64_t val)
|
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] ;
|
char buf[50] ;
|
||||||
|
|
||||||
double fact = 1.0 ;
|
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)
|
if(double(val)/fact < 1024.0)
|
||||||
{
|
{
|
||||||
sprintf(buf,"%2.2f",double(val)/fact) ;
|
sprintf(buf,"%2.2f",double(val)/fact) ;
|
||||||
|
@ -973,11 +973,12 @@ void AboutWidget::on_copy_button_clicked()
|
|||||||
verInfo+=addLibraries("libretroshare", libraries);
|
verInfo+=addLibraries("libretroshare", libraries);
|
||||||
|
|
||||||
#ifdef RS_JSONAPI
|
#ifdef RS_JSONAPI
|
||||||
/* Add version numbers of RetroShare */
|
// Disabled because I could not find how to get restbed version number
|
||||||
// Add versions here. Find a better place.
|
// /* Add version numbers of RetroShare */
|
||||||
libraries.clear();
|
// // Add versions here. Find a better place.
|
||||||
libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version()));
|
// libraries.clear();
|
||||||
verInfo+=addLibraries("RetroShare", libraries);
|
// libraries.push_back(RsLibraryInfo("RestBed", restbed::get_version()));
|
||||||
|
// verInfo+=addLibraries("RetroShare", libraries);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Add version numbers of plugins */
|
/* Add version numbers of plugins */
|
||||||
|
@ -38,8 +38,8 @@ QString misc::friendlyUnit(float val)
|
|||||||
if(val < 0) {
|
if(val < 0) {
|
||||||
return tr("Unknown", "Unknown (size)");
|
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)") };
|
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<5; ++i) {
|
for(unsigned int i=0; i<6; ++i) {
|
||||||
if (val < 1024.) {
|
if (val < 1024.) {
|
||||||
return QString(QByteArray::number(val, 'f', 1)) + units[i];
|
return QString(QByteArray::number(val, 'f', 1)) + units[i];
|
||||||
}
|
}
|
||||||
|
@ -303,18 +303,15 @@ int main(int argc, char* argv[])
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
return -result;
|
return -result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start-up libretroshare server threads */
|
|
||||||
RsControl::instance()->StartupRetroShare();
|
|
||||||
}
|
}
|
||||||
#endif // def RS_SERVICE_TERMINAL_LOGIN
|
#endif // def RS_SERVICE_TERMINAL_LOGIN
|
||||||
|
|
||||||
#if (defined(RS_JSONAPI) && defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
#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->setHtmlFilesDirectory(webui_base_directory);
|
||||||
rsWebUI->setUserPassword(webui_pass1);
|
rsWebUi->setUserPassword(webui_pass1);
|
||||||
rsWebUI->restart();
|
rsWebUi->restart();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user