diff --git a/src/cpp/SingletonManager/CronManager.cpp b/src/cpp/SingletonManager/CronManager.cpp index 54c5fa3e3..f5c998b9f 100644 --- a/src/cpp/SingletonManager/CronManager.cpp +++ b/src/cpp/SingletonManager/CronManager.cpp @@ -175,7 +175,7 @@ PingServerTask::~PingServerTask() int PingServerTask::run() { - return 0; + //return 0; auto current = Poco::DateTime(); if (model::table::NODE_SERVER_GRADIDO_COMMUNITY == mNodeServer->getModel()->getNodeServerType()) { std::string url_port = mNodeServer->getModel()->getUrlWithPort(); diff --git a/src/cpp/lib/DataTypeConverter.cpp b/src/cpp/lib/DataTypeConverter.cpp index 70ceb8055..a0fe756b1 100644 --- a/src/cpp/lib/DataTypeConverter.cpp +++ b/src/cpp/lib/DataTypeConverter.cpp @@ -54,6 +54,29 @@ namespace DataTypeConverter return NUMBER_PARSE_LOGIC_ERROR; } } + + NumberParseState strToInt(const std::string& input, Poco::UInt64& result) + { + try { + result = stoull(input); + return NUMBER_PARSE_OKAY; + } + catch (const std::invalid_argument& ia) + { + printf("[strToInt] exception: invalid argument: %s\n", ia.what()); + return NUMBER_PARSE_INVALID_ARGUMENT; + } + catch (const std::out_of_range& oor) + { + printf("[strToInt] exception: out or range: %s\n", oor.what()); + return NUMBER_PARSE_OUT_OF_RANGE; + } + catch (const std::logic_error & ler) + { + printf("[strToInt] exception: logical error: %s\n", ler.what()); + return NUMBER_PARSE_LOGIC_ERROR; + } + } NumberParseState strToDouble(const std::string& input, double& result) { diff --git a/src/cpp/lib/DataTypeConverter.h b/src/cpp/lib/DataTypeConverter.h index d6783c977..f93c40d87 100644 --- a/src/cpp/lib/DataTypeConverter.h +++ b/src/cpp/lib/DataTypeConverter.h @@ -27,6 +27,7 @@ namespace DataTypeConverter { NumberParseState strToInt(const std::string& input, int& result); NumberParseState strToInt(const std::string& input, unsigned long long& result); + NumberParseState strToInt(const std::string& input, Poco::UInt64& result); NumberParseState strToDouble(const std::string& input, double& result); MemoryBin* hexToBin(const std::string& hexString); diff --git a/src/cpp/model/gradido/GroupMemberUpdate.cpp b/src/cpp/model/gradido/GroupMemberUpdate.cpp index d8e898603..17776c56d 100644 --- a/src/cpp/model/gradido/GroupMemberUpdate.cpp +++ b/src/cpp/model/gradido/GroupMemberUpdate.cpp @@ -121,6 +121,8 @@ namespace model { // write new group_id in user table user_model->setGroupId(group_model->getID()); user_model->updateIntoDB("group_id", group_model->getID()); + + printf("[GroupMemberUpdate::transactionAccepted] finished\n"); } } else { diff --git a/src/cpp/model/gradido/Transaction.cpp b/src/cpp/model/gradido/Transaction.cpp index 1935241ed..b5677981a 100644 --- a/src/cpp/model/gradido/Transaction.cpp +++ b/src/cpp/model/gradido/Transaction.cpp @@ -307,7 +307,7 @@ namespace model { } //getModel()->updateIntoDB("request", ) - + printf("[Transaction::sign] reference-count: %d\n", mReferenceCount); return true; } @@ -590,6 +590,7 @@ namespace model { int SendTransactionTask::run() { auto result = mTransaction->runSendTransaction(); + printf("[SendTransactionTask::run] result: %d\n", result); // delete because of error if (-1 == result) { mTransaction->deleteFromDB();