summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/smbldap.c4
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/lib/util_sock.c2
-rw-r--r--source3/libsmb/clilist.c2
-rw-r--r--source3/libsmb/clirap.c4
-rw-r--r--source3/sam/idmap_ldap.c2
-rw-r--r--source3/torture/msgtest.c4
-rw-r--r--source3/torture/torture.c8
8 files changed, 14 insertions, 14 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index e122acd188..77356150bc 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -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);
}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 61dbc2cb2a..f169a3103e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -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;
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 782f5f3f73..a275ddabb9 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -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 */
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 2c1831ae99..ab157d48e9 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -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;
}
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 9c10e9d938..f8204e05d6 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -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);
diff --git a/source3/sam/idmap_ldap.c b/source3/sam/idmap_ldap.c
index a2afd7d424..55f4578448 100644
--- a/source3/sam/idmap_ldap.c
+++ b/source3/sam/idmap_ldap.c
@@ -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);
}
}
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index 8abb0a20d2..c40973a75c 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -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) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8c4d994b40..57ba24e63e 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -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) {