]> WPIA git - cassiopeia.git/blobdiff - src/apps/client.cpp
Merge "upd: improve format script"
[cassiopeia.git] / src / apps / client.cpp
index 9a7add6badb44fcb0a07817e50b070afa7057cc9..87447431665c9c31340aedc737d734f3e5d36648 100644 (file)
@@ -16,6 +16,7 @@
 #include "io/bios.h"
 #include "io/slipBio.h"
 #include "config.h"
+#include <internal/bio.h>
 
 #ifdef NO_DAEMON
 #define DAEMON false
@@ -65,7 +66,7 @@ int main( int argc, const char* argv[] ) {
     std::string path;
 
 #ifdef NDEBUG
-    path = "/etc/cacert/cassiopeia/cassiopeia.conf";
+    path = "/etc/wpia/cassiopeia/cassiopeia.conf";
 #else
     path = "config.txt";
 #endif
@@ -81,7 +82,8 @@ int main( int argc, const char* argv[] ) {
     }
     std::shared_ptr<JobProvider> jp = std::make_shared<PostgresJobProvider>( sqlHost, sqlUser, sqlPass, sqlDB );
     std::shared_ptr<BIO> b = openSerial( serialPath );
-    std::shared_ptr<BIO> slip1( BIO_new( toBio<SlipBIO>() ), BIO_free );
+    std::shared_ptr<BIO_METHOD> m( toBio<SlipBIO>(), BIO_meth_free);
+    std::shared_ptr<BIO> slip1( BIO_new( m.get() ), BIO_free );
     static_cast<SlipBIO*>( slip1->ptr )->setTarget( std::make_shared<OpensslBIOWrapper>( b ), false );
     auto sign = std::make_shared<RemoteSigner>( slip1, generateSSLContext( false ) );
     // std::shared_ptr<Signer> sign( new SimpleOpensslSigner() );
@@ -118,7 +120,6 @@ int main( int argc, const char* argv[] ) {
                 logger::errorf ( "Exception while fetchJob: %s", e.what() );
            }
             if( !job ) {
-                logger::note( "Nothing to work on." );
                 sleep( 5 );
                 continue;
             }