Make GUI work with new control client API, make control client look for user authtoken.secret if system unreadable.

This commit is contained in:
Adam Ierymenko 2014-04-02 17:12:04 -07:00
parent 81e5690410
commit f0223490be
9 changed files with 184 additions and 231 deletions

View file

@ -161,8 +161,9 @@ static int main(int argc,char **argv)
try {
volatile bool done = false;
Node::NodeControlClient client(hp,&_CBresultHandler,(void *)&done);
if (client.error()) {
fprintf(stderr,"%s: fatal error: unable to connect (is ZeroTier One running?)"ZT_EOL_S,argv[0]);
const char *err = client.error();
if (err) {
fprintf(stderr,"%s: fatal error: unable to connect (is ZeroTier One running?) (%s)"ZT_EOL_S,argv[0],err);
return 1;
}
client.send(query.c_str());