comparison lib/protocols.c @ 872:d7cbef177dfc

2007-2-4 Brian Masney <masneyb@gftp.org> * lib/sshv2.c (sshv2_start_login_sequence) - when checking for EINTR/EGAIN, only stop trying to connect if the current operation was to be cancelled. * lib/protocols.c (_do_sleep) - don't check for EINTR/EAGAIN. Allow a signal to interrupt the timer.
author masneyb
date Sun, 04 Feb 2007 21:25:46 +0000
parents 1fae947d4418
children 1808cebed602
comparison
equal deleted inserted replaced
871:f9a71e63edab 872:d7cbef177dfc
3011 3011
3012 static int 3012 static int
3013 _do_sleep (int sleep_time) 3013 _do_sleep (int sleep_time)
3014 { 3014 {
3015 struct timeval tv; 3015 struct timeval tv;
3016 int ret;
3017 3016
3018 tv.tv_sec = sleep_time; 3017 tv.tv_sec = sleep_time;
3019 tv.tv_usec = 0; 3018 tv.tv_usec = 0;
3020 3019
3021 /* FIXME - check for user aborted connection */ 3020 return (select (0, NULL, NULL, NULL, &tv));
3022 do
3023 {
3024 ret = select (0, NULL, NULL, NULL, &tv);
3025 }
3026 while (ret == -1 && (errno == EINTR || errno == EAGAIN));
3027
3028 return (ret);
3029 } 3021 }
3030 3022
3031 3023
3032 int 3024 int
3033 gftp_get_transfer_status (gftp_transfer * tdata, ssize_t num_read) 3025 gftp_get_transfer_status (gftp_transfer * tdata, ssize_t num_read)