ioctx: check high-level error first
the problem was that the C-API was returning an error, but the error
pointer (from the op) was getting -EIO. That makes sense as the outer
error was resulting in junk being decode somewhere.
@@ -444,10 +444,10 @@ func (ioctx *IOContext) ListOmapValues(oid string, startAfter string, filterPref
ret := C.rados_read_op_operate(op, ioctx.ioctx, c_oid, 0)
- if int(c_prval) != 0 {
- return RadosError(int(c_prval))
- } else if int(ret) != 0 {
+ if int(ret) != 0 {
return GetRadosError(int(ret))
+ } else if int(c_prval) != 0 {
+ return RadosError(int(c_prval))
}
for {
