exit_server_cleanly("Invalid port in the config or on "
"the commandline specified!");
}
+
+ /* Keep the first port for mDNS service
+ * registration.
+ */
+ if (dns_port == 0) {
+ dns_port = port;
+ }
}
if (lp_interfaces() && lp_bind_interfaces_only()) {
for (j = 0; ports && ports[j]; j++) {
unsigned port = atoi(ports[j]);
- /* Keep the first port for mDNS service
- * registration.
- */
- if (dns_port == 0) {
- dns_port = port;
- }
-
if (!smbd_open_one_socket(parent,
ev_ctx,
ifss,
struct sockaddr_storage ss;
unsigned port = atoi(ports[j]);
- /* Keep the first port for mDNS service
- * registration.
- */
- if (dns_port == 0) {
- dns_port = port;
- }
-
/* open an incoming socket */
if (!interpret_string_addr(&ss, sock_tok,
AI_NUMERICHOST|AI_PASSIVE)) {