mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Janitor for tpot...bugzilla #1098, msleep already exists on aix
This commit is contained in:
parent
003318939f
commit
4319df7fdc
@ -890,7 +890,7 @@ int smbldap_retry_open(struct smbldap_state *ldap_state, int *attempts)
|
||||
*/
|
||||
DEBUG(3, ("Sleeping for %u milliseconds before reconnecting\n",
|
||||
sleep_time));
|
||||
msleep(sleep_time);
|
||||
smb_msleep(sleep_time);
|
||||
}
|
||||
(*attempts)++;
|
||||
|
||||
@ -937,7 +937,7 @@ int smbldap_search(struct smbldap_state *ldap_state,
|
||||
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);
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n)
|
||||
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;
|
||||
|
@ -740,7 +740,7 @@ int open_socket_out(int type, struct in_addr *addr, int port ,int timeout)
|
||||
/* 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 */
|
||||
|
@ -232,7 +232,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
|
||||
cli_dos_error(cli, &eclass, &ecode);
|
||||
if (eclass != ERRSRV || ecode != ERRerror)
|
||||
break;
|
||||
msleep(100);
|
||||
smb_msleep(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
|
||||
uint32 ecode;
|
||||
cli_dos_error(cli, &eclass, &ecode);
|
||||
if (eclass != ERRSRV || ecode != ERRerror) break;
|
||||
msleep(100);
|
||||
smb_msleep(100);
|
||||
}
|
||||
} while (count-- && ret==False);
|
||||
|
||||
@ -720,7 +720,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin
|
||||
uint32 ecode;
|
||||
cli_dos_error(cli, &eclass, &ecode);
|
||||
if (eclass != ERRSRV || ecode != ERRerror) break;
|
||||
msleep(100);
|
||||
smb_msleep(100);
|
||||
}
|
||||
} while (count-- && ret==False);
|
||||
|
||||
|
@ -351,7 +351,7 @@ static NTSTATUS ldap_next_rid(struct ldap_idmap_state *state, uint32 *rid,
|
||||
attempts += 1;
|
||||
|
||||
sleeptime %= 100;
|
||||
msleep(sleeptime);
|
||||
smb_msleep(sleeptime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ void pong_message(int msg_type, pid_t src, void *buf, size_t len)
|
||||
|
||||
while (pong_count < i) {
|
||||
message_dispatch();
|
||||
msleep(1);
|
||||
smb_msleep(1);
|
||||
}
|
||||
|
||||
/* Now test that the duplicate filtering code works. */
|
||||
@ -78,7 +78,7 @@ void pong_message(int msg_type, pid_t src, void *buf, size_t len)
|
||||
|
||||
for (i=0;i<n;i++) {
|
||||
message_dispatch();
|
||||
msleep(1);
|
||||
smb_msleep(1);
|
||||
}
|
||||
|
||||
if (pong_count != 2) {
|
||||
|
@ -389,7 +389,7 @@ static BOOL rw_torture3(struct cli_state *c, char *lockfname)
|
||||
{
|
||||
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",
|
||||
@ -4475,12 +4475,12 @@ static double create_procs(BOOL (*fn)(int), BOOL *result)
|
||||
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);
|
||||
@ -4493,7 +4493,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result)
|
||||
if (child_status[i]) synccount++;
|
||||
}
|
||||
if (synccount == nprocs) break;
|
||||
msleep(10);
|
||||
smb_msleep(10);
|
||||
} while (end_timer() < 30);
|
||||
|
||||
if (synccount != nprocs) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user