Merge branch 'np/maint-sideband-favor-status'

* np/maint-sideband-favor-status:
  give priority to progress messages
This commit is contained in:
Junio C Hamano
2009-11-17 22:03:20 -08:00
2 changed files with 23 additions and 23 deletions

View File

@ -132,7 +132,6 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix)
while (1) {
struct pollfd pfd[2];
ssize_t processed[2] = { 0, 0 };
int status;
pfd[0].fd = fd1[0];
@ -147,15 +146,14 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix)
}
continue;
}
if (pfd[0].revents & POLLIN)
/* Data stream ready */
processed[0] = process_input(pfd[0].fd, 1);
if (pfd[1].revents & POLLIN)
/* Status stream ready */
processed[1] = process_input(pfd[1].fd, 2);
/* Always finish to read data when available */
if (processed[0] || processed[1])
continue;
if (process_input(pfd[1].fd, 2))
continue;
if (pfd[0].revents & POLLIN)
/* Data stream ready */
if (process_input(pfd[0].fd, 1))
continue;
if (waitpid(writer, &status, 0) < 0)
error_clnt("%s", lostchild);