diff options
author | Jeremy Allison <jra@samba.org> | 1999-02-03 03:18:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1999-02-03 03:18:38 +0000 |
commit | 87dc4ff92fac7f4f74339180735e2a1132c63fb6 (patch) | |
tree | d7ed1981573aa80c15d5d35d4fa4a9df94423d67 /source/lib/util_sock.c | |
parent | 58ed592a48a04d777014817ff6fe8255a684d6d8 (diff) | |
download | samba-87dc4ff92fac7f4f74339180735e2a1132c63fb6.tar.gz samba-87dc4ff92fac7f4f74339180735e2a1132c63fb6.tar.xz samba-87dc4ff92fac7f4f74339180735e2a1132c63fb6.zip |
Fixed bug where cli->timeout was in milliseconds, but open_sockets_out
was in seconds. This meant that PDC -> BDC failover took so long it essentiually
didn't happen.
include/client.h: Added explicit comment that cli->timeout should be milliseconds.
include/local.h: Changed LONG_CONNECT_TIMEOUT & SHORT_CONNECT_TIMEOUT to be milliseconds.
lib/smbrun.c: Tidied up fork failure catching.
lib/util_sock.c: Ensured timeout treated as milliseconds.
libsmb/clientgen.c: Added comment.
rpc_server/srv_pipe_hnd.c: Luke's changes.
smbd/chgpasswd.c: Paranoia code for EINTR around sys_waitpid.
Jeremy.
Diffstat (limited to 'source/lib/util_sock.c')
-rw-r--r-- | source/lib/util_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index a05243d1689..6d395659c92 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -679,14 +679,14 @@ int open_socket_in(int type, int port, int dlevel,uint32 socket_addr) /**************************************************************************** - create an outgoing socket + create an outgoing socket. timeout is in milliseconds. **************************************************************************/ int open_socket_out(int type, struct in_addr *addr, int port ,int timeout) { struct sockaddr_in sock_out; int res,ret; int connect_loop = 250; /* 250 milliseconds */ - int loops = (timeout * 1000) / connect_loop; + int loops = (timeout) / connect_loop; /* create a socket to write to */ res = socket(PF_INET, type, 0); |