commit - 80985c16b7649d82b559b180b486ac017c864e5a
commit + 8f137979fc5e284a136cf8950e8b3895d7ea208b
blob - 1b9cd072c5f6b42f27f9626ef92aa04fa7c9b34c
blob + 22b5fe916ef3380f1ead6796d6ddd366191190a2
--- lib/privsep.c
+++ lib/privsep.c
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_FETCH_SYMREFS:
if (datalen < sizeof(*isymrefs)) {
err = got_error(GOT_ERR_PRIVSEP_LEN);
return err;
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- goto done;
case GOT_IMSG_SEND_REMOTE_REF:
if (datalen < sizeof(iremote_ref)) {
err = got_error(GOT_ERR_PRIVSEP_MSG);
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_SEND_UPLOAD_PROGRESS:
if (datalen < sizeof(*bytes_sent)) {
err = got_error(GOT_ERR_PRIVSEP_MSG);
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_IDXPACK_PROGRESS:
if (datalen < sizeof(*iprogress)) {
err = got_error(GOT_ERR_PRIVSEP_LEN);
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_TREE:
/* This message should only appear once. */
if (*tree != NULL) {
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_GOTCONFIG_STR_VAL:
if (datalen == 0)
break;
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_GOTCONFIG_REMOTES:
if (datalen != sizeof(iremotes)) {
err = got_error(GOT_ERR_PRIVSEP_LEN);
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
switch (imsg.hdr.type) {
- case GOT_IMSG_ERROR:
- err = recv_imsg_error(&imsg, datalen);
- break;
case GOT_IMSG_GOTCONFIG_REMOTE:
remote = &(*remotes)[*nremotes];
memset(remote, 0, sizeof(*remote));