From f3fe53668f5f42123ab4d91de23ac4f16bf12733 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 21 Mar 2012 12:18:09 +0100 Subject: s3: Move the notify_ctx to the smbd_server_connection We only need one notify_ctx per smbd. The notify_array can become quite large. It's based on absolute paths, so there's no point in having a copy of the complete array in memory multiple times. Autobuild-User: Volker Lendecke Autobuild-Date: Wed Mar 21 14:26:07 CET 2012 on sn-devel-104 --- source3/smbd/service.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/smbd/service.c') diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 79e935d5d2..d28a51a9a7 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -698,10 +698,11 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn, on_err_call_dis_hook = true; if ((!conn->printer) && (!conn->ipc) && - lp_change_notify(conn->params)) { - conn->notify_ctx = notify_init(conn, - sconn->msg_ctx, - sconn->ev_ctx); + lp_change_notify(conn->params) && + sconn->notify_ctx == NULL) { + sconn->notify_ctx = notify_init(sconn, + sconn->msg_ctx, + sconn->ev_ctx); } /* -- cgit