diff options
author | Jim McDonough <jmcd@samba.org> | 2004-02-23 02:54:03 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2004-02-23 02:54:03 +0000 |
commit | 4319df7fdc2d878c509381923cc1db4d731620ba (patch) | |
tree | 7fbba4fa3a4fc4d414a2459d2d4fffc95db9145b | |
parent | 003318939f7e476f5f2a5f345e8a81a228fc89a7 (diff) | |
download | samba-4319df7fdc2d878c509381923cc1db4d731620ba.tar.gz samba-4319df7fdc2d878c509381923cc1db4d731620ba.tar.xz samba-4319df7fdc2d878c509381923cc1db4d731620ba.zip |
Janitor for tpot...bugzilla #1098, msleep already exists on aix
-rw-r--r-- | source/lib/smbldap.c | 4 | ||||
-rw-r--r-- | source/lib/util.c | 2 | ||||
-rw-r--r-- | source/lib/util_sock.c | 2 | ||||
-rw-r--r-- | source/libsmb/clilist.c | 2 | ||||
-rw-r--r-- | source/libsmb/clirap.c | 4 | ||||
-rw-r--r-- | source/sam/idmap_ldap.c | 2 | ||||
-rw-r--r-- | source/torture/msgtest.c | 4 | ||||
-rw-r--r-- | source/torture/torture.c | 8 |
8 files changed, 14 insertions, 14 deletions
diff --git a/source/lib/smbldap.c b/source/lib/smbldap.c index e122acd188d..77356150bca 100644 --- a/source/lib/smbldap.c +++ b/source/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/source/lib/util.c b/source/lib/util.c index 61dbc2cb2af..f169a3103e5 100644 --- a/source/lib/util.c +++ b/source/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/source/lib/util_sock.c b/source/lib/util_sock.c index 782f5f3f731..a275ddabb9a 100644 --- a/source/lib/util_sock.c +++ b/source/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/source/libsmb/clilist.c b/source/libsmb/clilist.c index 2c1831ae990..ab157d48e96 100644 --- a/source/libsmb/clilist.c +++ b/source/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/source/libsmb/clirap.c b/source/libsmb/clirap.c index 9c10e9d938c..f8204e05d68 100644 --- a/source/libsmb/clirap.c +++ b/source/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/source/sam/idmap_ldap.c b/source/sam/idmap_ldap.c index a2afd7d424a..55f45784481 100644 --- a/source/sam/idmap_ldap.c +++ b/source/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/source/torture/msgtest.c b/source/torture/msgtest.c index 8abb0a20d2e..c40973a75c8 100644 --- a/source/torture/msgtest.c +++ b/source/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/source/torture/torture.c b/source/torture/torture.c index 8c4d994b400..57ba24e63e3 100644 --- a/source/torture/torture.c +++ b/source/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) { |