Mercurial > gftp.yaz
comparison lib/sshv2.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 |
---|---|
415 | 415 |
416 FD_SET (fdm, &eset); | 416 FD_SET (fdm, &eset); |
417 FD_SET (ptymfd, &eset); | 417 FD_SET (ptymfd, &eset); |
418 | 418 |
419 ret = select (maxfd + 1, &rset, NULL, &eset, NULL); | 419 ret = select (maxfd + 1, &rset, NULL, &eset, NULL); |
420 if (ret < 0 && (errno == EINTR || errno == EAGAIN)) | |
421 continue; | |
422 | |
423 if (ret < 0) | 420 if (ret < 0) |
424 { | 421 { |
425 request->logging_function (gftp_logging_error, request, | 422 if (errno == EINTR || errno == EAGAIN) |
426 _("Connection to %s timed out\n"), | 423 { |
427 request->hostname); | 424 if (request->cancel) |
428 gftp_disconnect (request); | 425 { |
429 return (GFTP_ERETRYABLE); | 426 gftp_disconnect (request); |
427 return (GFTP_ERETRYABLE); | |
428 } | |
429 | |
430 continue; | |
431 } | |
432 else | |
433 { | |
434 request->logging_function (gftp_logging_error, request, | |
435 _("Connection to %s timed out\n"), | |
436 request->hostname); | |
437 gftp_disconnect (request); | |
438 return (GFTP_ERETRYABLE); | |
439 } | |
430 } | 440 } |
431 | 441 |
432 if (FD_ISSET (fdm, &eset) || FD_ISSET (ptymfd, &eset)) | 442 if (FD_ISSET (fdm, &eset) || FD_ISSET (ptymfd, &eset)) |
433 { | 443 { |
434 request->logging_function (gftp_logging_error, request, | 444 request->logging_function (gftp_logging_error, request, |