linux error

This commit is contained in:
Dario 2020-01-10 19:53:17 +01:00
parent 5c06bcb617
commit 762479fe33
2 changed files with 3 additions and 2 deletions

View File

@ -408,7 +408,7 @@ User::User(Poco::AutoPtr<controller::User> ctrl_user)
//char* hexString = (char*)malloc(hexSize);
memset(*hexStringTemp, 0, hexSize);
sodium_bin2hex((char*)(*hexStringTemp), hexSize, pubkey, crypto_sign_PUBLICKEYBYTES);
mPublicHex = *hexStringTemp;
mPublicHex = std::string((char*)(*hexStringTemp));
mm->releaseMemory(hexStringTemp);
}
if (model->existPrivateKeyCrypted()) {

View File

@ -84,7 +84,8 @@ namespace model {
return false;
}
auto cm = ConnectionManager::getInstance();
Poco::Data::Statement deleteStmt(cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER));
auto session = cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER);
Poco::Data::Statement deleteStmt(session);
deleteStmt << "delete from " << getTableName() << " where id = ?", Poco::Data::Keywords::use(mID);
try {