summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/server_reload.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index 317a2507e9..e1b62d15e4 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -126,10 +126,6 @@ bool reload_services(struct smbd_server_connection *sconn,
struct smbXsrv_connection *xconn = NULL;
bool ret;
- if (sconn != NULL) {
- xconn = sconn->conn;
- }
-
if (lp_loaded()) {
char *fname = lp_next_configfile(talloc_tos());
if (file_exist(fname) &&
@@ -162,7 +158,10 @@ bool reload_services(struct smbd_server_connection *sconn,
load_interfaces();
- if (xconn != NULL) {
+ if (sconn != NULL && sconn->client != NULL) {
+ xconn = sconn->client->connections;
+ }
+ for (;xconn != NULL; xconn = xconn->next) {
set_socket_options(xconn->transport.sock, "SO_KEEPALIVE");
set_socket_options(xconn->transport.sock, lp_socket_options());
}