From 3807cffe5278802ed7135056986e961d20d190c3 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 14 Dec 2007 06:59:09 +0000 Subject: [PATCH] (recvline): Remove the timeout feature. There are many other places where the client could wait indefinitely for the server. The user can always interrupt. [_WIN32] (alarm): Unused, remove. --- src/client/expect.c | 2 -- src/client/sysdep_w32.c | 9 --------- src/client/sysdep_w32.h | 1 - 3 files changed, 12 deletions(-) diff --git a/src/client/expect.c b/src/client/expect.c index 7ac8008c7..b681668a6 100644 --- a/src/client/expect.c +++ b/src/client/expect.c @@ -65,7 +65,6 @@ recvline(int s, char *buf) int cc; size = 1024; - (void)alarm(30); ptr = buf; n = recv(s, ptr, size, MSG_PEEK); if (n <= 0) { @@ -108,7 +107,6 @@ recvline(int s, char *buf) return 0; } buf[newline] = '\0'; - (void)alarm(0); if (!isxdigit(buf[0]) || buf[1] != ' ') { fprintf(stderr, "Malformed line %s\n", buf); return 0; diff --git a/src/client/sysdep_w32.c b/src/client/sysdep_w32.c index 9a3bad92f..4b0925dc3 100644 --- a/src/client/sysdep_w32.c +++ b/src/client/sysdep_w32.c @@ -42,15 +42,6 @@ #include "ringbuf.h" #include "secure.h" -/* - * Ignore alarm for WIN32 client - */ -int -alarm(int time) -{ - return 0; -} - /* * Get user name in the WIN32 environment */ diff --git a/src/client/sysdep_w32.h b/src/client/sysdep_w32.h index 2cb5580eb..8721aca8d 100644 --- a/src/client/sysdep_w32.h +++ b/src/client/sysdep_w32.h @@ -74,7 +74,6 @@ extern ssize_t w32_writev_socket(int fd, const struct iovec *iov, extern int w32_createfd(const char *fname, int oflag, ...); extern int w32_openhandle(const char *fname, int oflag); -extern int alarm(int time); extern struct passwd *w32_getpw(void); extern char *getpass(char *prompt); extern void sysdep_init(void); -- 2.43.0