Looks good, but the error handling in recover_object_from_replica could be further simplified. Given that the caller already checks the return value I'd say simply return rsp->result instead of special casing SD_RES_OLD_NODE_VER inside recover_object_from_replica. that'd give you a much more regular tail of the function ala: done: dprintf("recovered oid %"PRIx64" from %d to epoch %d\n", oid, tgt_epoch, epoch); objlist_cache_insert(oid); ret = 0; out: free(buf); return ret; too. |