1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-25 14:50:24 +03:00

printing: Remove "start_daemons" from printing_subsystem_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2021-11-28 20:29:26 +01:00
parent a7c65958a1
commit 9e3ee8c40c
3 changed files with 3 additions and 27 deletions

View File

@ -416,8 +416,7 @@ fail:
/* Run before the parent forks */
bool printing_subsystem_init(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx,
bool start_daemons)
struct dcesrv_context *dce_ctx)
{
pid_t pid = -1;
@ -425,28 +424,6 @@ bool printing_subsystem_init(struct tevent_context *ev_ctx,
return false;
}
/* start spoolss daemon */
/* start as a separate daemon only if enabled */
if (!start_daemons) {
bool ret;
struct bq_state *state;
state = talloc_zero(NULL, struct bq_state);
if (state == NULL) {
exit(1);
}
state->ev = ev_ctx;
state->msg = msg_ctx;
ret = printing_subsystem_queue_tasks(state);
/* Publish nt printers, this requires a working winreg pipe */
pcap_cache_reload(ev_ctx, msg_ctx,
delete_and_reload_printers_full);
return ret;
}
pid = start_background_queue(NULL, NULL, NULL);
if (pid == -1) {
return false;

View File

@ -27,8 +27,7 @@ struct dcesrv_context;
bool printing_subsystem_init(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx,
bool start_daemons);
struct dcesrv_context *dce_ctx);
pid_t start_background_queue(struct tevent_context *ev,
struct messaging_context *msg,
char *logfile);

View File

@ -62,7 +62,7 @@ static size_t spoolss_servers(
lp_load_with_shares(get_dyn_CONFIGFILE());
ok = printing_subsystem_init(ev_ctx, msg_ctx, dce_ctx, true);
ok = printing_subsystem_init(ev_ctx, msg_ctx, dce_ctx);
if (!ok) {
DBG_WARNING("printing_subsystem_init() failed\n");
exit(1);