diff options
author | Jeremy Allison <jra@samba.org> | 2006-05-18 19:49:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:08 -0500 |
commit | e5787cf75b2e7d50f551f34f28d280c27b0aa134 (patch) | |
tree | b2b9e7088421be4e115608d370cf3d4470c8693e /source/nmbd/nmbd_subnetdb.c | |
parent | 7d766b5505e4099ef7dd4e88bb000ebe38d71bd0 (diff) | |
download | samba-e5787cf75b2e7d50f551f34f28d280c27b0aa134.tar.gz samba-e5787cf75b2e7d50f551f34f28d280c27b0aa134.tar.xz samba-e5787cf75b2e7d50f551f34f28d280c27b0aa134.zip |
r15700: Make nmbd udp sockets non-blocking to prevent problem
with select returning true but no data being available.
Fix for bug #3779.
Jeremy.
Diffstat (limited to 'source/nmbd/nmbd_subnetdb.c')
-rw-r--r-- | source/nmbd/nmbd_subnetdb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c index b2e1178bebc..c3640028d27 100644 --- a/source/nmbd/nmbd_subnetdb.c +++ b/source/nmbd/nmbd_subnetdb.c @@ -26,8 +26,6 @@ #include "includes.h" extern struct in_addr loopback_ip; -extern int ClientNMB; -extern int ClientDGRAM; extern int global_nmb_port; /* This is the broadcast subnets database. */ @@ -118,6 +116,10 @@ static struct subnet_record *make_subnet(const char *name, enum subnet_type type /* Make sure we can broadcast from these sockets. */ set_socket_options(nmb_sock,"SO_BROADCAST"); set_socket_options(dgram_sock,"SO_BROADCAST"); + + /* Set them non-blocking. */ + set_blocking(nmb_sock, False); + set_blocking(dgram_sock, False); } subrec = SMB_MALLOC_P(struct subnet_record); |