s3:smbd: pass smbd_server_connection to smbd_setup_sig_hup_handler()
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2011 12:55:02 +0000 (13:55 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2011 19:31:09 +0000 (20:31 +0100)
metze

source3/smbd/process.c
source3/smbd/proto.h
source3/smbd/server.c

index a2cccaad436799a1378f2a604f015910017ee585..b3e4d0d9fbbf69782a6e11f1c1fd051d68cdfb28 100644 (file)
@@ -899,23 +899,24 @@ static void smbd_sig_hup_handler(struct tevent_context *ev,
                                  void *siginfo,
                                  void *private_data)
 {
-       struct messaging_context *msg_ctx = talloc_get_type_abort(
-               private_data, struct messaging_context);
+       struct smbd_server_connection *sconn =
+               talloc_get_type_abort(private_data,
+               struct smbd_server_connection);
+
        change_to_root_user();
        DEBUG(1,("Reloading services after SIGHUP\n"));
-       reload_services(msg_ctx, smbd_server_conn->sock, False);
-       if (am_parent) {
-               printing_subsystem_update(ev, msg_ctx, true);
-       }
+       reload_services(sconn->msg_ctx, sconn->sock, false);
 }
 
-void smbd_setup_sig_hup_handler(struct tevent_context *ev,
-                               struct messaging_context *msg_ctx)
+void smbd_setup_sig_hup_handler(struct smbd_server_connection *sconn)
 {
        struct tevent_signal *se;
 
-       se = tevent_add_signal(ev, ev, SIGHUP, 0, smbd_sig_hup_handler,
-                              msg_ctx);
+       se = tevent_add_signal(sconn->ev_ctx,
+                              sconn,
+                              SIGHUP, 0,
+                              smbd_sig_hup_handler,
+                              sconn);
        if (!se) {
                exit_server("failed to setup SIGHUP handler");
        }
index bf759f53048df3e39fb4e238d6dc24ea79a00513..0cc6b66d63178969e755230488665d9b9f67b9ef 100644 (file)
@@ -756,8 +756,7 @@ NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
 /* The following definitions come from smbd/process.c  */
 
 void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn);
-void smbd_setup_sig_hup_handler(struct tevent_context *ev,
-                               struct messaging_context *msg_ctx);
+void smbd_setup_sig_hup_handler(struct smbd_server_connection *sconn);
 bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer,
                  bool no_signing, uint32_t seqnum,
                  bool do_encrypt,
index f7edc9996e40e2ae88ee0912308a6138a571ee4f..9966cf46a0fc5f2aea40ac2031a37699dcde44b3 100644 (file)
@@ -461,8 +461,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
                }
 
                smbd_setup_sig_term_handler(sconn);
-               smbd_setup_sig_hup_handler(ev,
-                                          msg_ctx);
+               smbd_setup_sig_hup_handler(sconn);
 
                if (!serverid_register(messaging_server_id(msg_ctx),
                                       FLAG_MSG_GENERAL|FLAG_MSG_SMBD