s3-smbd provide struct smbd_server_connection * to conn_snum_used
[nivanova/samba-autobuild/.git] / source3 / smbd / server_reload.c
index 82b0cb03e95f66ccdcb0893b7e0a9f32055b8749..fef66dac6a573ee713d4b28d03def8ae403518a8 100644 (file)
@@ -113,7 +113,11 @@ bool reload_services(struct messaging_context *msg_ctx, int smb_sock,
        if (test && !lp_file_list_changed())
                return(True);
 
-       lp_killunused(conn_snum_used);
+       if (msg_ctx) {
+               lp_killunused(msg_ctx_to_sconn(msg_ctx), conn_snum_used);
+       } else {
+               lp_killunused(NULL, NULL);
+       }
 
        ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);