From: Jeremy Allison Date: Fri, 23 Sep 2016 19:31:00 +0000 (-0700) Subject: s3: nmbd: Change over to using tevent functions from direct poll. X-Git-Tag: samba-4.3.12~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4212718f2c211b994429ac38be003f6381a02ea2;p=thirdparty%2Fsamba.git s3: nmbd: Change over to using tevent functions from direct poll. This will allow us to eventually remove source3/lib/events.c dependency and make nmbd purely tevent based. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283 Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke (cherry picked from commit b857bf9b3fa3a836647edc40ead92db7b782d367) --- diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 8d40eaf568c..10a0c0ae145 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1909,14 +1909,16 @@ bool listen_for_packets(struct messaging_context *msg, bool run_election) static int listen_number = 0; int num_sockets; int i; + int loop_rtn; + int timeout_secs; - int pollrtn; - int timeout; #ifndef SYNC_DNS int dns_fd; int dns_pollidx = -1; #endif struct processed_packet *processed_packet_list = NULL; + struct tevent_timer *te = NULL; + bool got_timeout = false; TALLOC_CTX *frame = talloc_stackframe(); if ((fds == NULL) || rescan_listen_set) { @@ -1972,13 +1974,17 @@ bool listen_for_packets(struct messaging_context *msg, bool run_election) #endif for (i=0; i