diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 28 |
1 files changed, 2 insertions, 26 deletions
@@ -45,7 +45,7 @@ | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include "includes.h" | 47 | #include "includes.h" |
48 | RCSID("$Id: scp.c,v 1.11 1999/11/25 01:31:26 damien Exp $"); | 48 | RCSID("$Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $"); |
49 | 49 | ||
50 | #include "ssh.h" | 50 | #include "ssh.h" |
51 | #include "xmalloc.h" | 51 | #include "xmalloc.h" |
@@ -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.11 1999/11/25 01:31:26 damien Exp $ | 977 | * $Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $ |
978 | */ | 978 | */ |
979 | 979 | ||
980 | char * | 980 | char * |
@@ -1065,30 +1065,6 @@ lostconn(signo) | |||
1065 | exit(1); | 1065 | exit(1); |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | /* | ||
1069 | * ensure all of data on socket comes through. f==read || f==write | ||
1070 | */ | ||
1071 | int | ||
1072 | atomicio(f, fd, s, n) | ||
1073 | int (*f) (); | ||
1074 | char *s; | ||
1075 | { | ||
1076 | int res, pos = 0; | ||
1077 | |||
1078 | while (n > pos) { | ||
1079 | res = (f) (fd, s + pos, n - pos); | ||
1080 | switch (res) { | ||
1081 | case -1: | ||
1082 | if (errno == EINTR || errno == EAGAIN) | ||
1083 | continue; | ||
1084 | case 0: | ||
1085 | return (res); | ||
1086 | default: | ||
1087 | pos += res; | ||
1088 | } | ||
1089 | } | ||
1090 | return (pos); | ||
1091 | } | ||
1092 | 1068 | ||
1093 | void | 1069 | void |
1094 | alarmtimer(int wait) | 1070 | alarmtimer(int wait) |