Browse Source

Fix autostart of hushd

Since hushd is no longer a script but a real binary, our code to autostart hushd no longer
has any arguments. But QT gets angry with an empty list of arguments, because it
splits arguments into an array on space characters. So this bug ended up tring to start hush
via ./hushd "" instead of ./hushd, which creates an "Ooops" error from hushd, which thinks you
are trying to use hush-cli.

Now we provide two arguments, with default values, that allows the rest of the code to work correctly.
pull/81/head
Duke Leto 2 years ago
parent
commit
fcee06a5c3
  1. 6
      src/connection.cpp

6
src/connection.cpp

@ -359,6 +359,7 @@ bool ConnectionLoader::startEmbeddedHushd() {
main->logger->write("Can't find hushd at " + hushdProgram);
return false;
} else {
qDebug() << "Found hushd at " << hushdProgram;
main->logger->write("Found hushd at " + hushdProgram);
}
@ -373,7 +374,8 @@ bool ConnectionLoader::startEmbeddedHushd() {
});
QObject::connect(ehushd.get(), &QProcess::errorOccurred, [&] (QProcess::ProcessError error) {
qDebug() << "Couldn't start hushd at " << hushdProgram << ":" << error;
qDebug() << "Couldn't start hushd!";
qDebug() << "hushd at " << hushdProgram << ":" << error;
});
std::weak_ptr<QProcess> weak_obj(ehushd);
@ -386,7 +388,7 @@ bool ConnectionLoader::startEmbeddedHushd() {
// This string should be the exact arg list seperated by single spaces
// Could be modified to start different Hush Smart Chains
QString params = ""; // "-ac_name=TUSH";
QString params = "-tls=only -clientname=GoldenSandtrout"; // "-ac_name=TUSH";
/* This is now enabled by default in hushd
// Binaries come with this file

Loading…
Cancel
Save