diff options
author | Tim Potter <tpot@samba.org> | 2004-02-20 22:42:39 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2004-02-20 22:42:39 +0000 |
commit | 9138aa18eb66d2c54cd0736c5e25800868c274f5 (patch) | |
tree | 7e149330c285b88f0e6f6b8d603cfd27983d06f9 | |
parent | db3d07c2f5c0764bbf55c0a11a85ae2e52dc481f (diff) | |
download | samba-9138aa18eb66d2c54cd0736c5e25800868c274f5.tar.gz samba-9138aa18eb66d2c54cd0736c5e25800868c274f5.tar.bz2 samba-9138aa18eb66d2c54cd0736c5e25800868c274f5.zip |
AIX has already has a function called msleep(). Bugzilla #1098.
(This used to be commit 90ae3667448be9b3445f401bcd9d7e3eba374215)
-rw-r--r-- | source3/lib/smbldap.c | 4 | ||||
-rw-r--r-- | source3/lib/util.c | 2 | ||||
-rw-r--r-- | source3/lib/util_sock.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clilist.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clirap.c | 4 | ||||
-rw-r--r-- | source3/sam/idmap_ldap.c | 2 | ||||
-rw-r--r-- | source3/torture/msgtest.c | 4 | ||||
-rw-r--r-- | source3/torture/torture.c | 8 |
8 files changed, 14 insertions, 14 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 925bc1fbf0..bb16517149 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -888,7 +888,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)++; @@ -935,7 +935,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 36bc403e0b..e403a78cdd 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); @@ -715,7 +715,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 2e6bc49d55..9d0a6bb79e 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", @@ -4464,12 +4464,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); @@ -4482,7 +4482,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) { |