mirror of https://github.com/ceph/go-ceph
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. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
parent
a1c7418732
commit
022d69c468
|
@ -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)
|
ret := C.rados_read_op_operate(op, ioctx.ioctx, c_oid, 0)
|
||||||
|
|
||||||
if int(c_prval) != 0 {
|
if int(ret) != 0 {
|
||||||
return RadosError(int(c_prval))
|
|
||||||
} else if int(ret) != 0 {
|
|
||||||
return GetRadosError(int(ret))
|
return GetRadosError(int(ret))
|
||||||
|
} else if int(c_prval) != 0 {
|
||||||
|
return RadosError(int(c_prval))
|
||||||
}
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|
Loading…
Reference in New Issue