s3: Remove the separate server_id arg to notify_init
authorVolker Lendecke <vl@samba.org>
Wed, 14 Mar 2012 09:31:13 +0000 (10:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Mar 2012 10:00:24 +0000 (11:00 +0100)
The server_id is tied to the messaging_context

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/notify_internal.c
source3/smbd/proto.h
source3/smbd/service.c

index b01b10dd1c8e156a485ff1f643be52bd39005ae4..4dbb331b50edca688fbf2c660803065626f1da66 100644 (file)
@@ -84,7 +84,7 @@ static int notify_destructor(struct notify_context *notify)
   talloc_free(). We need the messaging_ctx to allow for notifications
   via internal messages
 */
-struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
+struct notify_context *notify_init(TALLOC_CTX *mem_ctx,
                                   struct messaging_context *messaging_ctx,
                                   struct event_context *ev,
                                   connection_struct *conn)
@@ -118,7 +118,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
                return NULL;
        }
 
-       notify->server = server;
+       notify->server = messaging_server_id(messaging_ctx);
        notify->messaging_ctx = messaging_ctx;
        notify->list = NULL;
        notify->array = NULL;
index f9eabce0a342b0325fdb8c17f3a999fa803c4336..0fbf9a0fcb46b54bdf41bbf16b6c461f239566d5 100644 (file)
@@ -541,7 +541,7 @@ NTSTATUS inotify_watch(struct sys_notify_context *ctx,
 
 /* The following definitions come from smbd/notify_internal.c  */
 
-struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
+struct notify_context *notify_init(TALLOC_CTX *mem_ctx,
                                   struct messaging_context *messaging_ctx,
                                   struct event_context *ev,
                                   connection_struct *conn);
index 3b14634b6c1e3fb62e5fcaaf40421cca4e51f73a..a78fa2921fb1b7a505321ee2569e20263295a3ab 100644 (file)
@@ -699,7 +699,6 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
 
        if ((!conn->printer) && (!conn->ipc)) {
                conn->notify_ctx = notify_init(conn,
-                                              messaging_server_id(sconn->msg_ctx),
                                               sconn->msg_ctx,
                                               sconn->ev_ctx,
                                               conn);