aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-10 17:34:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-10 17:34:08 +0000
commit8098d5cdf3a18b474da743cd392b506524fd0e4d (patch)
tree325215731b3093c8666013651e98c1fa57ce03f7
parent6c951fd022ad613a9eddddedb63a8184fe367165 (diff)
downloadperl-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.xs14
1 files changed, 0 insertions, 14 deletions
diff --git a/URPM.xs b/URPM.xs
index 1ec5eb4..04e9502 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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;