removed asserts and put proper error handling in compress.c

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6937 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-12-10 09:49:13 +00:00
parent 162ef94b70
commit 3e88b54ae3
5 changed files with 278 additions and 232 deletions

View file

@ -1139,7 +1139,12 @@ bool PGPHandler::encryptTextToFile(const PGPIdType& key_id,const std::string& te
return false ;
}
ops_encrypt_stream(info, public_key, NULL, ops_false, ops_true);
if(!ops_encrypt_stream(info, public_key, NULL, ops_false, ops_true))
{
std::cerr << "PGPHandler::encryptTextToFile(): ERROR: encryption failed." << std::endl;
return false ;
}
ops_write(text.c_str(), text.length(), info);
ops_teardown_file_write(info, fd);