From 0648638fef56a65f9389c8a98f66c57663e8c401 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 May 2006 19:49:44 +0000 Subject: r15700: Make nmbd udp sockets non-blocking to prevent problem with select returning true but no data being available. Fix for bug #3779. Jeremy. (This used to be commit e5787cf75b2e7d50f551f34f28d280c27b0aa134) --- source3/nmbd/nmbd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/nmbd/nmbd.c') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index fca17d1ff7..9c8f99df25 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -605,6 +605,10 @@ static BOOL open_sockets(BOOL isdaemon, int port) set_socket_options( ClientNMB, "SO_BROADCAST" ); set_socket_options( ClientDGRAM, "SO_BROADCAST" ); + /* Ensure we're non-blocking. */ + set_blocking( ClientNMB, False); + set_blocking( ClientDGRAM, False); + DEBUG( 3, ( "open_sockets: Broadcast sockets opened.\n" ) ); return( True ); } -- cgit