mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Improvements for V0.6 logins to support hidden nodes.
- Separated Acount stuff from rsinit.cc => rsaccounts.cc - Moved Account Directory to HID06_xxxxxxx, or STD06_xxxxx This allows us to check for Hidden immediately And prevents v0.5 accounts being used with 0.6 - Added functions to support Proxy, and Hidden stuff. - Changed Minimum port to 10 to allow port 80 to be used by those who must. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7027 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9d78ad8942
commit
39db508ce7
15 changed files with 1783 additions and 1177 deletions
|
@ -27,7 +27,7 @@
|
|||
#include <stdexcept>
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include "rsserver/rsaccounts.h"
|
||||
#include "rsdiscspace.h"
|
||||
#include <util/rsthreads.h>
|
||||
#ifndef WIN32
|
||||
|
@ -157,13 +157,13 @@ bool RsDiscSpace::checkForDiscSpace(RsDiscSpace::DiscLocation loc)
|
|||
#endif
|
||||
break ;
|
||||
|
||||
case RS_CONFIG_DIRECTORY: rs = crossSystemDiskStats(RsInit::RsConfigDirectory().c_str(),free_blocks,block_size) ;
|
||||
case RS_CONFIG_DIRECTORY: rs = crossSystemDiskStats(rsAccounts.PathAccountDirectory().c_str(),free_blocks,block_size) ;
|
||||
#ifdef DEBUG_RSDISCSPACE
|
||||
std::cerr << " path = " << RsInit::RsConfigDirectory() << std::endl ;
|
||||
#endif
|
||||
break ;
|
||||
|
||||
case RS_PGP_DIRECTORY: rs = crossSystemDiskStats(RsInit::RsPGPDirectory().c_str(),free_blocks,block_size) ;
|
||||
case RS_PGP_DIRECTORY: rs = crossSystemDiskStats(rsAccounts.PathPGPDirectory().c_str(),free_blocks,block_size) ;
|
||||
#ifdef DEBUG_RSDISCSPACE
|
||||
std::cerr << " path = " << RsInit::RsPGPDirectory() << std::endl ;
|
||||
#endif
|
||||
|
|
|
@ -304,3 +304,16 @@ void stringToLowerCase(const std::string& s, std::string &lower)
|
|||
if(lower[i] > 64 && lower[i] < 91)
|
||||
lower[i] += 97-65 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool isHexaString(const std::string& s)
|
||||
{
|
||||
for(uint32_t i=0;i<s.length();++i)
|
||||
if(!((s[i] >= 'A' && s[i] <= 'F') || (s[i] >= '0' && s[i] <= '9') || (s[i] >= 'a' && s[i] <= 'f')))
|
||||
return false ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,4 +48,6 @@ int rs_sprintf_append(std::string &str, const char *fmt, ...);
|
|||
void stringToUpperCase(const std::string& s, std::string &upper);
|
||||
void stringToLowerCase(const std::string& s, std::string &lower);
|
||||
|
||||
bool isHexaString(const std::string& s);
|
||||
|
||||
#endif // RSSTRING_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue