diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-10 17:34:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-10 17:34:08 +0000 |
commit | 8098d5cdf3a18b474da743cd392b506524fd0e4d (patch) | |
tree | 325215731b3093c8666013651e98c1fa57ce03f7 | |
parent | 6c951fd022ad613a9eddddedb63a8184fe367165 (diff) | |
download | perl-URPM-8098d5cdf3a18b474da743cd392b506524fd0e4d.tar perl-URPM-8098d5cdf3a18b474da743cd392b506524fd0e4d.tar.gz perl-URPM-8098d5cdf3a18b474da743cd392b506524fd0e4d.tar.bz2 perl-URPM-8098d5cdf3a18b474da743cd392b506524fd0e4d.tar.xz perl-URPM-8098d5cdf3a18b474da743cd392b506524fd0e4d.zip |
there is no use retrying after a headerRead failure since headerRead may have
consumed part of the input, and so next headerRead will read in the middle of
a header, and so always fail. The only real solution is to ensure rpmlib don't
timeout too quickly (and fd->rd_timeoutsecs is rpmlib internal only, so we
can't hint it from here. in any case 1sec timeout is really too low)
-rw-r--r-- | URPM.xs | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -3322,21 +3322,7 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) PUTBACK; do { - int count = 4; header=headerRead(fd, HEADER_MAGIC_YES); - while (header == NULL && count > 0) { - fd_set readfds; - struct timeval timeout; - - FD_ZERO(&readfds); - FD_SET(fdFileno(fd), &readfds); - timeout.tv_sec = 1; - timeout.tv_usec = 0; - select(fdFileno(fd)+1, &readfds, NULL, NULL, &timeout); - - header=headerRead(fd, HEADER_MAGIC_YES); - --count; - } if (header != NULL) { struct s_Package pkg, *_pkg; SV *sv_pkg; |