Commit 3136e23c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't forget to handle OIS_ERROR

Hit by:	scoof
parent cd0e1daf
......@@ -170,16 +170,24 @@ v1d_WriteDirObj(struct req *req)
oi = ObjIterBegin(req->wrk, req->obj);
XXXAN(oi);
while (1) {
do {
ois = ObjIter(oi, &ptr, &len);
if (ois == OIS_DONE) {
switch(ois) {
case OIS_DONE:
AZ(len);
break;
}
if (VDP_bytes(req,
ois == OIS_DATA ? VDP_NULL : VDP_FLUSH, ptr, len))
case OIS_ERROR:
break;
}
case OIS_DATA:
case OIS_STREAM:
if (VDP_bytes(req,
ois == OIS_DATA ? VDP_NULL : VDP_FLUSH, ptr, len))
ois = OIS_ERROR;
break;
default:
WRONG("Wrong OIS value");
}
} while (ois == OIS_DATA || ois == OIS_STREAM);
(void)VDP_bytes(req, VDP_FINISH, NULL, 0);
ObjIterEnd(&oi);
}
......
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