Commit 71a81515 authored by Shane Snyder's avatar Shane Snyder

use new bake proxy read signature

parent 66fa1017
...@@ -208,14 +208,22 @@ void read_op_exec_read(void* u, uint64_t offset, size_t len, buffer_u buf, size_ ...@@ -208,14 +208,22 @@ void read_op_exec_read(void* u, uint64_t offset, size_t len, buffer_u buf, size_
uint64_t segment_size = r.end - r.start; uint64_t segment_size = r.end - r.start;
uint64_t region_offset = r.start - seg.start_index; uint64_t region_offset = r.start - seg.start_index;
uint64_t remote_offset = r.start - offset; uint64_t remote_offset = r.start - offset;
uint64_t bytes_read = 0;
ret = bake_proxy_read(bph, region, region_offset, remote_bulk, ret = bake_proxy_read(bph, region, region_offset, remote_bulk,
remote_offset, remote_addr_str, segment_size); remote_offset, remote_addr_str, segment_size, &bytes_read);
if(ret != 0) { if(ret != 0) {
*prval = -1; *prval = -1;
ERROR fprintf(stderr,"bake_proxy_read returned %d\n", ret); ERROR fprintf(stderr,"bake_proxy_read returned %d\n", ret);
LEAVING; LEAVING;
return; return;
} }
else if (bytes_read != segment_size) {
*prval = -1;
ERROR fprintf(stderr,"bake_proxy_read invalid read of %" PRIu64 \
" (requested=%" PRIu64 ")\n", bytes_read, segment_size);
LEAVING;
return;
}
} }
break; break;
} // end case seg_type_t::BAKE_REGION } // end case seg_type_t::BAKE_REGION
......
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