fix linux compile errors

This commit is contained in:
Dario 2020-01-10 19:24:18 +01:00
parent b44f70bb95
commit 6221e168f8
2 changed files with 3 additions and 2 deletions

View File

@ -407,7 +407,7 @@ User::User(Poco::AutoPtr<controller::User> ctrl_user)
auto hexStringTemp = mm->getFreeMemory(hexSize);
//char* hexString = (char*)malloc(hexSize);
memset(*hexStringTemp, 0, hexSize);
sodium_bin2hex(*hexStringTemp, hexSize, pubkey, crypto_sign_PUBLICKEYBYTES);
sodium_bin2hex((char*)(*hexStringTemp), hexSize, pubkey, crypto_sign_PUBLICKEYBYTES);
mPublicHex = *hexStringTemp;
mm->releaseMemory(hexStringTemp);
}

View File

@ -139,7 +139,8 @@ namespace model {
size_t ModelBase::updateIntoDB(const std::string& fieldName, const T& fieldValue)
{
auto cm = ConnectionManager::getInstance();
Poco::Data::Statement update(cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER));
auto session = cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER)
Poco::Data::Statement update(session);
if (mID == 0) {
addError(new Error("ModelBase::updateIntoDB", "id is zero"));