From: Jeremy Allison Date: Wed, 9 Sep 2009 00:22:39 +0000 (-0700) Subject: Second part of fix for bug 6696 - smbd 3.3.7 crashes (signal 11) in dns_register_smbd... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87c794f99d7909e907b1d115c317bebd55984ed;p=thirdparty%2Fsamba.git Second part of fix for bug 6696 - smbd 3.3.7 crashes (signal 11) in dns_register_smbd_reply. Restore the code from 3.2 that actually initializes the struct dns_reg_state handle. Jeremy. --- diff --git a/source/smbd/server.c b/source/smbd/server.c index e0f86a6b7ca..51294847307 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -652,6 +652,12 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ FD_ZERO(&w_fds); GetTimeOfDay(&now); + /* Kick off our mDNS registration. */ + if (dns_port != 0) { + dns_register_smbd(&dns_reg, dns_port, &maxfd, + &r_fds, &idle_timeout); + } + event_add_to_select_args(smbd_event_context(), &now, &r_fds, &w_fds, &idle_timeout, &maxfd);