printing: remove unused arguments from delete_and_reload_printers()
authorStefan Metzmacher <metze@samba.org>
Wed, 23 May 2018 14:35:20 +0000 (16:35 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2018 18:52:20 +0000 (20:52 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/printing/queue_process.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpc_server/srvsvc/srv_srvsvc_nt.c
source3/smbd/lanman.c
source3/smbd/proto.h
source3/smbd/server_reload.c

index 76fd9349fb4514ed0ad21939dd4da75c8eb42922..c4648ce2b6ac200b29980030c1f02ce768b64e94 100644 (file)
@@ -123,7 +123,7 @@ static void delete_and_reload_printers_full(struct tevent_context *ev,
        }
 
        /* finally, purge old snums */
-       delete_and_reload_printers(ev, msg_ctx);
+       delete_and_reload_printers();
 
        TALLOC_FREE(session_info);
 }
index f9a89194cc573cc8e789b04a80022aa41cb80211..2bdce560c38ba297cecd03588b24051e9815c3ed 100644 (file)
@@ -1694,7 +1694,7 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
         * inventory on open as well.
         */
        become_root();
-       delete_and_reload_printers(server_event_context(), p->msg_ctx);
+       delete_and_reload_printers();
        unbecome_root();
 
        /* some sanity check because you can open a printer or a print server */
@@ -4403,7 +4403,7 @@ static WERROR enum_all_printers_info_level(TALLOC_CTX *mem_ctx,
         * printer process updates printer_list.tdb at regular intervals.
         */
        become_root();
-       delete_and_reload_printers(server_event_context(), msg_ctx);
+       delete_and_reload_printers();
        unbecome_root();
 
        n_services = lp_numservices();
index 2c33387bf6d043e2f855123608d911408567d005..c25abf01ac97fa43c740ae365db551c33ee3ee31 100644 (file)
@@ -563,7 +563,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p,
 
        /* Ensure all the usershares are loaded. */
        become_root();
-       delete_and_reload_printers(server_event_context(), p->msg_ctx);
+       delete_and_reload_printers();
        load_usershare_shares(NULL, connections_snum_used);
        load_registry_shares();
        num_services = lp_numservices();
index 6854527500dd723bb8d358f73915a8b6188c0e89..90906a204d4f5703ebd3739d45e318c55d07e519 100644 (file)
@@ -2100,7 +2100,7 @@ static bool api_RNetShareEnum(struct smbd_server_connection *sconn,
 
        /* Ensure all the usershares are loaded. */
        become_root();
-       delete_and_reload_printers(sconn->ev_ctx, sconn->msg_ctx);
+       delete_and_reload_printers();
        load_registry_shares();
        count = load_usershare_shares(NULL, connections_snum_used);
        unbecome_root();
index 7a5ac4c4bc8b1630a2eaf1e16195c36d2545239c..5f72da0f99633ef36cfd23f08089609390237182 100644 (file)
@@ -1051,8 +1051,7 @@ const struct security_token *sec_ctx_active_token(void);
 
 struct memcache *smbd_memcache(void);
 bool snum_is_shared_printer(int snum);
-void delete_and_reload_printers(struct tevent_context *ev,
-                               struct messaging_context *msg_ctx);
+void delete_and_reload_printers(void);
 bool reload_services(struct smbd_server_connection *sconn,
                     bool (*snumused) (struct smbd_server_connection *, int),
                     bool test);
index f07ad9254720e5170b0d9e7c33e27406630cf143..3715a51c15291a10035929cccc90da9d24eb76c3 100644 (file)
@@ -48,13 +48,8 @@ bool snum_is_shared_printer(int snum)
  *
  * This function should normally only be called as a callback on a successful
  * pcap_cache_reload(), or on client enumeration.
- *
- * @param[in] ev        The event context.
- *
- * @param[in] msg_ctx   The messaging context.
  */
-void delete_and_reload_printers(struct tevent_context *ev,
-                               struct messaging_context *msg_ctx)
+void delete_and_reload_printers(void)
 {
        int n_services;
        int pnum;