version 1.10, 2019/02/16 16:59:34 |
version 1.11, 2019/02/16 17:59:33 |
|
|
* A request from the receiver to download updated file data. |
* A request from the receiver to download updated file data. |
*/ |
*/ |
struct send_dl { |
struct send_dl { |
int32_t idx; /* index in our file list */ |
int32_t idx; /* index in our file list */ |
struct blkset *blks; /* the sender's block information */ |
struct blkset *blks; /* the sender's block information */ |
TAILQ_ENTRY(send_dl) entries; |
TAILQ_ENTRY(send_dl) entries; |
}; |
}; |
|
|
int32_t idx, const struct flist *fl, size_t flsz, int fd) |
int32_t idx, const struct flist *fl, size_t flsz, int fd) |
{ |
{ |
struct send_dl *s; |
struct send_dl *s; |
|
|
/* End-of-phase marker. */ |
/* End-of-phase marker. */ |
|
|
if (idx == -1) { |
if (idx == -1) { |
|
|
} |
} |
|
|
/* Validate the index. */ |
/* Validate the index. */ |
|
|
if (idx < 0 || (uint32_t)idx >= flsz) { |
if (idx < 0 || (uint32_t)idx >= flsz) { |
ERRX(sess, "file index out of bounds: invalid %" |
ERRX(sess, "file index out of bounds: invalid %" |
PRId32 " out of %zu", idx, flsz); |
PRId32 " out of %zu", idx, flsz); |
|
|
pfd[1].fd = fdout; |
pfd[1].fd = fdout; |
continue; |
continue; |
} |
} |
|
|
/* |
/* |
* Non-blocking open of file. |
* Non-blocking open of file. |
* This will be picked up in the state machine |
* This will be picked up in the state machine |