diff --git a/CMakeLists.txt b/CMakeLists.txt index 70aa3ee770c547acd4126afd3bf1c6ff78ffc8d6..6499f99fc8f4961d5d0e38535093bfc78154af49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8) -INCLUDE_DIRECTORIES(/home/tau/jreher/git/proddb-clientlib/) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../proddb-clientlib/) LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/libs) project(apdBatchSetter) diff --git a/main.cxx b/main.cxx index d85981658fd2c497d112d6657eeb5973a551bc91..df6df01c60dd62c2824b06df24e6e5d09fe0c7e2 100644 --- a/main.cxx +++ b/main.cxx @@ -4,6 +4,7 @@ #include <productiondatabaseclient.h> using namespace std; +using namespace ProductionDatabase; int main() { @@ -24,5 +25,11 @@ int main() cout << "Found APD no. " << nAPDs << ": " << newEntry << endl; } - return (apdSerials.empty()); + ProductionDatabaseClient *proddb = new ProductionDatabaseClient(); + + proddb->queryCredentials(); + DatabaseClientResponse response = proddb->checkConnectivityAndCredentials(); + if (response != Successful ) return response; + + return (-apdSerials.empty()); }