summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-15 11:04:25 +1100
committerDamien Miller <djm@mindrot.org>1999-12-15 11:04:25 +1100
commit864ea59da63b4941575e95f7dbbb361f88ee53ef (patch)
tree457cb7b63b7f5fbe40da5df875290d12ea4ef5cb
parent3b9d5e993ad50613fb990f1b70c0ce77793cba8c (diff)
- Integrated patchs from Juergen Keil <jk@tools.de>
- Fix SIGIO error in scp - Simplify status line printing in scp
-rw-r--r--ChangeLog2
-rw-r--r--scp.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6346a3202..183e25c04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
2 - Integrated patchs from Juergen Keil <jk@tools.de> 2 - Integrated patchs from Juergen Keil <jk@tools.de>
3 - Avoid void* pointer arithmatic 3 - Avoid void* pointer arithmatic
4 - Use LDFLAGS correctly 4 - Use LDFLAGS correctly
5 - Fix SIGIO error in scp
6 - Simplify status line printing in scp
5 - Added better test for inline functions compiler support from 7 - Added better test for inline functions compiler support from
6 Darren_Hall@progressive.com 8 Darren_Hall@progressive.com
7 9
diff --git a/scp.c b/scp.c
index 5a3ec4470..f045d4609 100644
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
45 */ 45 */
46 46
47#include "includes.h" 47#include "includes.h"
48RCSID("$Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $"); 48RCSID("$Id: scp.c,v 1.13 1999/12/15 00:04:25 damien Exp $");
49 49
50#include "ssh.h" 50#include "ssh.h"
51#include "xmalloc.h" 51#include "xmalloc.h"
@@ -548,7 +548,7 @@ next: (void) close(fd);
548 if (haderr) 548 if (haderr)
549 (void) write(remout, bp->buf, amt); 549 (void) write(remout, bp->buf, amt);
550 else { 550 else {
551 result = write(remout, bp->buf, amt); 551 result = atomicio(write, remout, bp->buf, amt);
552 if (result != amt) 552 if (result != amt)
553 haderr = result >= 0 ? EIO : errno; 553 haderr = result >= 0 ? EIO : errno;
554 statbytes += result; 554 statbytes += result;
@@ -974,7 +974,7 @@ run_err(const char *fmt,...)
974 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 974 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
975 * SUCH DAMAGE. 975 * SUCH DAMAGE.
976 * 976 *
977 * $Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $ 977 * $Id: scp.c,v 1.13 1999/12/15 00:04:25 damien Exp $
978 */ 978 */
979 979
980char * 980char *
@@ -1145,8 +1145,8 @@ progressmeter(int flag)
1145 i++; 1145 i++;
1146 abbrevsize >>= 10; 1146 abbrevsize >>= 10;
1147 } 1147 }
1148 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5qd %c%c ", 1148 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5d %c%c ",
1149 (quad_t) abbrevsize, prefixes[i], prefixes[i] == ' ' ? ' ' : 1149 (int) abbrevsize, prefixes[i], prefixes[i] == ' ' ? ' ' :
1150 'B'); 1150 'B');
1151 1151
1152 timersub(&now, &lastupdate, &wait); 1152 timersub(&now, &lastupdate, &wait);
@@ -1184,7 +1184,11 @@ progressmeter(int flag)
1184 atomicio(write, fileno(stdout), buf, strlen(buf)); 1184 atomicio(write, fileno(stdout), buf, strlen(buf));
1185 1185
1186 if (flag == -1) { 1186 if (flag == -1) {
1187 signal(SIGALRM, (void *) updateprogressmeter); 1187 struct sigaction sa;
1188 sa.sa_handler = updateprogressmeter;
1189 sigemptyset(&sa.sa_mask);
1190 sa.sa_flags = SA_RESTART;
1191 sigaction(SIGALRM, &sa, NULL);
1188 alarmtimer(1); 1192 alarmtimer(1);
1189 } else if (flag == 1) { 1193 } else if (flag == 1) {
1190 alarmtimer(0); 1194 alarmtimer(0);