summaryrefslogtreecommitdiffstats
path: root/src/torclient.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-01-14 02:37:59 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-01-14 02:37:59 +0100
commit355f00c2bd6f4b2870133d0423420ef8046b7156 (patch)
tree914337ce5bd4bd2bc984866f02c370c2a2788c7e /src/torclient.cpp
parent5962b7e681adb58055898f2e35665934bd08e235 (diff)
downloadtork-355f00c2bd6f4b2870133d0423420ef8046b7156.tar.gz
tork-355f00c2bd6f4b2870133d0423420ef8046b7156.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 <slavek.banko@axis.cz>
Diffstat (limited to 'src/torclient.cpp')
-rw-r--r--src/torclient.cpp6
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;