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

@ -19,7 +19,7 @@ char *imap_read_server_capacity(int sock) {
if (buf != NULL) {
if (strstr(buf, "CAPABILITY") != NULL && buf[0] == '*') {
resp = 1;
usleep(300000);
sleepn(300);
/* we got the capability info then get the completed warning info from server */
while (hydra_data_ready(sock)) {
free(buf);
@ -362,7 +362,7 @@ void service_imap(char *ip, int sp, unsigned char options, char *miscptr, FILE *
case 1: /* connect and service init function */
if (sock >= 0)
sock = hydra_disconnect(sock);
// usleep(275000);
// sleepn(275);
if ((options & OPTION_SSL) == 0) {
if (port != 0)
myport = port;