From: Felix Dörre Date: Thu, 30 Jun 2016 08:29:06 +0000 (+0200) Subject: minifixes X-Git-Url: https://code.wpia.club/?p=cassiopeia.git;a=commitdiff_plain;h=6317d2fc4d161ab5f504cac0ac9620994829de62 minifixes --- diff --git a/src/apps/client.cpp b/src/apps/client.cpp index bfb7fb1..9a7add6 100644 --- a/src/apps/client.cpp +++ b/src/apps/client.cpp @@ -166,8 +166,9 @@ int main( int argc, const char* argv[] ) { continue; } - logger::note( "FINE: CERTIFICATE LOG:\n", res->log ); - logger::note( "FINE: CERTIFICATE:\n", res->certificate ); + logger::note( "FINE: CERTIFICATE LOG:\n", res->log, + "FINE: CERTIFICATE:\n", res->certificate ); + std::string fn = writeBackFile( job->target.c_str(), res->certificate, keyDir ); if( fn.empty() ) { diff --git a/src/util.cpp b/src/util.cpp index 3197b68..30f87b7 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -29,7 +29,7 @@ std::string writeBackFile( const std::string& serial, const std::string& cert, c if( 0 != mkdir( filename.c_str(), 0755 ) ) { if( EEXIST != errno ) { - return ""; + throw std::runtime_error("Storage location could not be determined"); } //! \FIXME: Check this is a directory