# HG changeset patch # User Pascal Bellard # Date 1300005377 -3600 # Node ID 6f9407bd4ad591308ef97a082c9ca75aab875c8b # Parent 2067efdf9cc26ca9f0020cb1e351512775f0a242 Up busybox (1.18.4) diff -r 2067efdf9cc2 -r 6f9407bd4ad5 busybox-pam/receipt --- a/busybox-pam/receipt Sat Mar 12 21:52:41 2011 +0000 +++ b/busybox-pam/receipt Sun Mar 13 09:36:17 2011 +0100 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="busybox-pam" -VERSION="1.18.3" +VERSION="1.18.4" CATEGORY="base-system" SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities." MAINTAINER="pascal.bellard@slitaz.org" diff -r 2067efdf9cc2 -r 6f9407bd4ad5 busybox-static/receipt --- a/busybox-static/receipt Sat Mar 12 21:52:41 2011 +0000 +++ b/busybox-static/receipt Sun Mar 13 09:36:17 2011 +0100 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="busybox-static" -VERSION="1.18.3" +VERSION="1.18.4" CATEGORY="base-system" SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities." MAINTAINER="pascal.bellard@slitaz.org" diff -r 2067efdf9cc2 -r 6f9407bd4ad5 busybox/receipt --- a/busybox/receipt Sat Mar 12 21:52:41 2011 +0000 +++ b/busybox/receipt Sun Mar 13 09:36:17 2011 +0100 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="busybox" -VERSION="1.18.3" +VERSION="1.18.4" CATEGORY="base-system" SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities." MAINTAINER="pascal.bellard@slitaz.org" @@ -21,7 +21,6 @@ patch -p1 < ../stuff/$PACKAGE-${VERSION%.*}-$file || return 1 touch done.$file done < 0) { -+ length += bytes_read; - crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table); - } - close(fd); diff -r 2067efdf9cc2 -r 6f9407bd4ad5 busybox/stuff/busybox-1.18-wget.u --- a/busybox/stuff/busybox-1.18-wget.u Sat Mar 12 21:52:41 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ ---- busybox-1.18.3/networking/wget.c -+++ busybox-1.18.3-wget/networking/wget.c -@@ -446,7 +446,7 @@ static FILE* prepare_ftp_session(FILE ** - - static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd) - { -- char buf[512]; -+ char buf[4*1024]; /* made bigger to speed up local xfers */ - #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT - # if ENABLE_FEATURE_WGET_TIMEOUT - unsigned second_cnt; -@@ -455,7 +455,6 @@ static void NOINLINE retrieve_file_data( - - polldata.fd = fileno(dfp); - polldata.events = POLLIN | POLLPRI; -- ndelay_on(polldata.fd); - #endif - progress_meter(PROGRESS_START); - -@@ -464,6 +463,10 @@ static void NOINLINE retrieve_file_data( - - /* Loops only if chunked */ - while (1) { -+ -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ ndelay_on(polldata.fd); -+#endif - while (1) { - int n; - unsigned rdsz; -@@ -493,22 +496,46 @@ static void NOINLINE retrieve_file_data( - progress_meter(PROGRESS_BUMP); - } - #endif -+ /* fread internally uses read loop, which in our case -+ * is usually exited when we get EAGAIN. -+ * In this case, libc sets error marker on the stream. -+ * Need to clear it before next fread to avoid possible -+ * rare false positive ferror below. Rare because usually -+ * fread gets more than zero bytes, and we don't fall -+ * into if (n <= 0) ... -+ */ -+ clearerr(dfp); -+ errno = 0; - n = safe_fread(buf, rdsz, dfp); -+ /* man fread: -+ * If error occurs, or EOF is reached, the return value -+ * is a short item count (or zero). -+ * fread does not distinguish between EOF and error. -+ */ - if (n <= 0) { -- if (ferror(dfp)) { -- /* perror will not work: ferror doesn't set errno */ -- bb_error_msg_and_die(bb_msg_read_error); -- } -- break; -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ if (errno == EAGAIN) /* poll lied, there is no data? */ -+ continue; /* yes */ -+#endif -+ if (ferror(dfp)) -+ bb_perror_msg_and_die(bb_msg_read_error); -+ break; /* EOF, not error */ - } -+ - xwrite(output_fd, buf, n); - #if ENABLE_FEATURE_WGET_STATUSBAR - G.transferred += n; - progress_meter(PROGRESS_BUMP); - #endif -- if (G.got_clen) -+ if (G.got_clen) { - G.content_len -= n; -+ if (G.content_len == 0) -+ break; -+ } - } -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ ndelay_off(polldata.fd); -+#endif - - if (!G.chunked) - break; -@@ -706,6 +733,11 @@ int wget_main(int argc UNUSED_PARAM, cha - fprintf(sfp, "Host: %s\r\nUser-Agent: %s\r\n", - target.host, user_agent); - -+ /* Ask server to close the connection as soon as we are done -+ * (IOW: we do not intend to send more requests) -+ */ -+ fprintf(sfp, "Connection: close\r\n"); -+ - #if ENABLE_FEATURE_WGET_AUTHENTICATION - if (target.user) { - fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6, -@@ -719,22 +751,25 @@ int wget_main(int argc UNUSED_PARAM, cha - - if (G.beg_range) - fprintf(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); -+ - #if ENABLE_FEATURE_WGET_LONG_OPTIONS - if (extra_headers) - fputs(extra_headers, sfp); - - if (opt & WGET_OPT_POST_DATA) { - char *estr = URL_escape(post_data); -- fprintf(sfp, "Content-Type: application/x-www-form-urlencoded\r\n"); -- fprintf(sfp, "Content-Length: %u\r\n" "\r\n" "%s", -- (int) strlen(estr), estr); -- /*fprintf(sfp, "Connection: Keep-Alive\r\n\r\n");*/ -- /*fprintf(sfp, "%s\r\n", estr);*/ -+ fprintf(sfp, -+ "Content-Type: application/x-www-form-urlencoded\r\n" -+ "Content-Length: %u\r\n" -+ "\r\n" -+ "%s", -+ (int) strlen(estr), estr -+ ); - free(estr); - } else - #endif -- { /* If "Connection:" is needed, document why */ -- fprintf(sfp, /* "Connection: close\r\n" */ "\r\n"); -+ { -+ fprintf(sfp, "\r\n"); - } - - fflush(sfp);