diff options
author | Slávek Banko <[email protected]> | 2021-01-14 02:37:59 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-01-15 15:15:43 +0100 |
commit | ab700191fa487a238d9cd03c81c9e1ef7124548f (patch) | |
tree | c1d1e65ad31314bbe1aa782b2b699a52ca5c0cde /src/torclient.cpp | |
parent | fbb5b1424b098b844b4f744cdeea97ba5279764f (diff) | |
download | tork-ab700191fa487a238d9cd03c81c9e1ef7124548f.tar.gz tork-ab700191fa487a238d9cd03c81c9e1ef7124548f.zip |
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 355f00c2bd6f4b2870133d0423420ef8046b7156)
Diffstat (limited to 'src/torclient.cpp')
-rw-r--r-- | src/torclient.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/torclient.cpp b/src/torclient.cpp index 27c9477..c3efc5a 100644 --- a/src/torclient.cpp +++ b/src/torclient.cpp @@ -378,7 +378,7 @@ void TorClient::authenticate() if (TorkConfig::generateRandomPassword()){ crypto_seed_rng(); sendToServer(TQString("setconf HashedControlPassword=16:%2") - .arg(hashPassword(crypto_rand_string(16)))); + .arg(hashPassword(crypto_rand_string(16).latin1()))); } } @@ -839,7 +839,7 @@ void TorClient::parseServer(const TQString &info) if (gi){ int country_id = 0; - country_id = GeoIP_id_by_name(gi, ip); + country_id = GeoIP_id_by_name(gi, ip.latin1()); cc = GeoIP_country_name[country_id]; GeoIP_delete(gi); }else @@ -1258,7 +1258,7 @@ bool TorClient::noSpecialProcessing(const TDEConfigSkeletonItem* it) crypto_seed_rng(); sendToServer(TQString("setconf %1=16:%2") .arg((*it).name()) - .arg(hashPassword(crypto_rand_string(16)))); + .arg(hashPassword(crypto_rand_string(16).latin1()))); return false; } return true; |