*/
DEBUG(3, ("Sleeping for %u milliseconds before reconnecting\n",
sleep_time));
- msleep(sleep_time);
+ smb_msleep(sleep_time);
}
(*attempts)++;
if (sleep_time > 0) {
/* we wait for the LDAP replication */
DEBUG(5,("smbldap_search: waiting %d milliseconds for LDAP replication.\n",sleep_time));
- msleep(sleep_time);
+ smb_msleep(sleep_time);
DEBUG(5,("smbldap_search: go on!\n"));
ZERO_STRUCT(ldap_state->last_rebind);
}
Sleep for a specified number of milliseconds.
********************************************************************/
-void msleep(unsigned int t)
+void smb_msleep(unsigned int t)
{
unsigned int tdiff=0;
struct timeval tval,t1,t2;
/* Some systems return EAGAIN when they mean EINPROGRESS */
if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
errno == EAGAIN) && (connect_loop < timeout) ) {
- msleep(connect_loop);
+ smb_msleep(connect_loop);
connect_loop += increment;
if (increment < 250) {
/* After 8 rounds we end up at a max of 255 msec */
cli_dos_error(cli, &eclass, &ecode);
if (eclass != ERRSRV || ecode != ERRerror)
break;
- msleep(100);
+ smb_msleep(100);
continue;
}
uint32 ecode;
cli_dos_error(cli, &eclass, &ecode);
if (eclass != ERRSRV || ecode != ERRerror) break;
- msleep(100);
+ smb_msleep(100);
}
} while (count-- && ret==False);
uint32 ecode;
cli_dos_error(cli, &eclass, &ecode);
if (eclass != ERRSRV || ecode != ERRerror) break;
- msleep(100);
+ smb_msleep(100);
}
} while (count-- && ret==False);
attempts += 1;
sleeptime %= 100;
- msleep(sleeptime);
+ smb_msleep(sleeptime);
}
}
while (pong_count < i) {
message_dispatch();
- msleep(1);
+ smb_msleep(1);
}
/* Now test that the duplicate filtering code works. */
for (i=0;i<n;i++) {
message_dispatch();
- msleep(1);
+ smb_msleep(1);
}
if (pong_count != 2) {
{
fnum = cli_open(c, lockfname, O_RDONLY,
DENY_NONE);
- msleep(10);
+ smb_msleep(10);
}
if (fnum == -1) {
printf("second open read-only of %s failed (%s)\n",
printf("pid %d failed to start\n", (int)getpid());
_exit(1);
}
- msleep(10);
+ smb_msleep(10);
}
child_status[i] = getpid();
- while (child_status[i] && end_timer() < 5) msleep(2);
+ while (child_status[i] && end_timer() < 5) smb_msleep(2);
child_status_out[i] = fn(i);
_exit(0);
if (child_status[i]) synccount++;
}
if (synccount == nprocs) break;
- msleep(10);
+ smb_msleep(10);
} while (end_timer() < 30);
if (synccount != nprocs) {