Add error handling for last-resort VDP_END

We lacked error handling in the call to ensure that VDP_END is being sent.

Now we return the first error seen, which can be the one from the last
resort VDP_END call.

Flexelint c2d45aef

Ref #3298
parent cfed0152
...@@ -243,7 +243,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc, ...@@ -243,7 +243,7 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
const struct stevedore *stv; const struct stevedore *stv;
ssize_t checkpoint_len = 0; ssize_t checkpoint_len = 0;
ssize_t len = 0; ssize_t len = 0;
int ret = 0; int ret = 0, ret2;
ssize_t ol; ssize_t ol;
ssize_t nl; ssize_t nl;
ssize_t sl; ssize_t sl;
...@@ -343,8 +343,11 @@ sml_iterator(struct worker *wrk, struct objcore *oc, ...@@ -343,8 +343,11 @@ sml_iterator(struct worker *wrk, struct objcore *oc,
break; break;
} }
HSH_DerefBoc(wrk, oc); HSH_DerefBoc(wrk, oc);
if ((u & OBJ_ITER_END) == 0) if ((u & OBJ_ITER_END) == 0) {
func(priv, OBJ_ITER_END, NULL, 0); ret2 = func(priv, OBJ_ITER_END, NULL, 0);
if (ret == 0)
ret = ret2;
}
return (ret); return (ret);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment