cls_lock_client: return error when decoding fails

Library code shouldn't be using cerr either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Josh Durgin 2012-08-31 13:06:12 -07:00
parent d1252ea21e
commit 67bbcf2c27

View File

@ -117,7 +117,7 @@ namespace rados {
try {
::decode(ret, iter);
} catch (buffer::error& err) {
cerr << __func__ << ": failed to decode response" << std::endl;
return -EBADMSG;
}
*locks = ret.locks;
@ -143,7 +143,7 @@ namespace rados {
try {
::decode(ret, iter);
} catch (buffer::error& err) {
cerr << __func__ << ": failed to decode response" << std::endl;
return -EBADMSG;
}
if (lockers) {