Switched usleep to nanosleep for posix complience

This commit is contained in:
Jack Reacher 2016-02-06 02:16:01 -05:00
commit 554d66c768
35 changed files with 70 additions and 47 deletions

View file

@ -84,7 +84,7 @@ void service_ftp_core(char *ip, int sp, unsigned char options, char *miscptr, FI
case 1: /* connect and service init function */
if (sock >= 0)
sock = hydra_disconnect(sock);
// usleep(300000);
// sleepn(300);
if ((options & OPTION_SSL) == 0) {
if (port != 0)
myport = port;
@ -101,7 +101,7 @@ void service_ftp_core(char *ip, int sp, unsigned char options, char *miscptr, FI
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
hydra_child_exit(1);
}
usleep(250);
usleepn(250);
buf = hydra_receive_line(sock);
if (buf == NULL || buf[0] != '2') { /* check the first line */
if (verbose || debug)