commit - 22b6b4901ad36a6f5cfe1dc2355449d23bbd4816
commit + 279090e1480dee1b500b53c0c727ac8771e1f840
blob - 7c5ea03802b44902eb819f4ae290a12547b6ee54
blob + 5c2553421bc50539d3a80177ddb039e4d715f2a4
--- lib/fetch.c
+++ lib/fetch.c
return got_error_from_errno("close");
imsg_init(&ibuf, imsg_idxfds[0]);
- err = got_privsep_send_index_pack_req(&ibuf, npackfd, packhash);
+ err = got_privsep_send_index_pack_req(&ibuf, npackfd, &packhash);
if (err != NULL)
return err;
err = got_privsep_send_tmpfd(&ibuf, nidxfd);
blob - 12c2aa8b4562b5dd11c9ca5b15c97f9a982ae80a
blob + 59fe6e94625525b13953eb5216f966b0a6bd6cac
--- lib/got_lib_privsep.h
+++ lib/got_lib_privsep.h
const struct got_error *got_privsep_send_obj(struct imsgbuf *,
struct got_object *);
const struct got_error *got_privsep_send_index_pack_req(struct imsgbuf *, int,
- struct got_object_id);
+ struct got_object_id *);
const struct got_error *got_privsep_send_index_pack_done(struct imsgbuf *);
const struct got_error *got_privsep_wait_index_pack_done(struct imsgbuf *);
const struct got_error *got_privsep_send_fetch_req(struct imsgbuf *, int);
blob - 90f056a189e8a0d3cc60f7f8c9c99c95e89c2053
blob + b60af9d2e6fe22b7f41fd7338722e30865a82684
--- lib/privsep.c
+++ lib/privsep.c
const struct got_error *
-got_privsep_send_index_pack_req(struct imsgbuf *ibuf, int fd, struct got_object_id hash)
+got_privsep_send_index_pack_req(struct imsgbuf *ibuf, int fd, struct got_object_id *hash)
{
const struct got_error *err = NULL;
if (imsg_compose(ibuf, GOT_IMSG_IDXPACK_REQUEST, 0, 0, fd,
- hash.sha1, SHA1_DIGEST_LENGTH) == -1) {
+ hash->sha1, SHA1_DIGEST_LENGTH) == -1) {
err = got_error_from_errno("imsg_compose INDEX_REQUEST");
close(fd);
return err;
blob - cd6e4f449903bc09a611098583a07691ac6e59f8
blob + 752b92dd5f9a3f2cafeb270279cde5e9e72b5f1f
--- libexec/got-index-pack/got-index-pack.c
+++ libexec/got-index-pack/got-index-pack.c
}
int
-indexpack(int packfd, int idxfd, struct got_object_id packhash)
+indexpack(int packfd, int idxfd, struct got_object_id *packhash)
{
char hdr[4*3], buf[8];
int nobj, nvalid, nbig, n, i, step;
hwrite(f, buf, 8, &ctx);
}
}
- hwrite(f, packhash.sha1, sizeof(packhash.sha1), &ctx);
+ hwrite(f, packhash->sha1, sizeof(packhash->sha1), &ctx);
SHA1Final(h.sha1, &ctx);
fwrite(h.sha1, 1, sizeof(h.sha1), f);
}
idxfd = imsg.fd;
- indexpack(packfd, idxfd, packhash);
+ indexpack(packfd, idxfd, &packhash);
done:
if(err != NULL)
got_privsep_send_error(&ibuf, err);