s3: Remove "conn" param from notify_init()
authorVolker Lendecke <vl@samba.org>
Wed, 21 Mar 2012 10:59:27 +0000 (11:59 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 21 Mar 2012 11:52:10 +0000 (12:52 +0100)
source3/smbd/notify_internal.c
source3/smbd/proto.h
source3/smbd/service.c

index c600c30457c5da75cc0ead23debb1a8c74fc1515..63b7865b1315df50f8411c879b418a527be8ba93 100644 (file)
@@ -86,15 +86,10 @@ static int notify_destructor(struct notify_context *notify)
 */
 struct notify_context *notify_init(TALLOC_CTX *mem_ctx,
                                   struct messaging_context *messaging_ctx,
-                                  struct event_context *ev,
-                                  connection_struct *conn)
+                                  struct event_context *ev)
 {
        struct notify_context *notify;
 
-       if (!lp_change_notify(conn->params)) {
-               return NULL;
-       }
-
        notify = talloc(mem_ctx, struct notify_context);
        if (notify == NULL) {
                return NULL;
index fe09d0221e14731a2bcfe6f82cb1b67dcd10fcc4..ee91e9453d0196a2acf85a269c23d89074beaae3 100644 (file)
@@ -545,8 +545,7 @@ NTSTATUS inotify_watch(struct sys_notify_context *ctx,
 
 struct notify_context *notify_init(TALLOC_CTX *mem_ctx,
                                   struct messaging_context *messaging_ctx,
-                                  struct event_context *ev,
-                                  connection_struct *conn);
+                                  struct event_context *ev);
 bool notify_internal_parent_init(TALLOC_CTX *mem_ctx);
 NTSTATUS notify_add(struct notify_context *notify, connection_struct *conn,
                    struct notify_entry *e0,
index a78fa2921fb1b7a505321ee2569e20263295a3ab..79e935d5d2db6e5761459d6921e8b63c96a083eb 100644 (file)
@@ -697,11 +697,11 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
        /* Any error exit after here needs to call the disconnect hook. */
        on_err_call_dis_hook = true;
 
-       if ((!conn->printer) && (!conn->ipc)) {
+       if ((!conn->printer) && (!conn->ipc) &&
+           lp_change_notify(conn->params)) {
                conn->notify_ctx = notify_init(conn,
                                               sconn->msg_ctx,
-                                              sconn->ev_ctx,
-                                              conn);
+                                              sconn->ev_ctx);
        }
 
        /*