Skip to content

Commit

Permalink
Return true/false from a function returning bool
Browse files Browse the repository at this point in the history
Return false in case the certificate is about to expire, causing the
(only) caller to subsequently verify the proxy.
  • Loading branch information
giacomini committed Jun 13, 2024
1 parent 19a84d8 commit 30d6817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/vomsclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,15 +1049,15 @@ bool Client::Test()
Print(WARN) << std::endl << "ERROR: Your certificate expired "
<< asctime(localtime(&time_after)) << std::endl;

return 2;
return true;
}

if (hours && time_diff < length) {
Print(WARN) << std::endl << "Warning: your certificate and proxy will expire "
<< asctime(localtime(&time_after))
<< "which is within the requested lifetime of the proxy"
<< std::endl;
return 1;
return false;
}

if (!quiet) {
Expand All @@ -1068,7 +1068,7 @@ bool Client::Test()
<< asctime(localtime(&time_after_proxy)) << std::flush;
}

return 0;
return false;
}

bool Client::AddToList(AC *ac)
Expand Down

0 comments on commit 30d6817

Please sign in to comment.