summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-08-02 10:06:31 -0400
committerGünther Deschner <gd@samba.org>2011-08-02 17:37:44 +0200
commita68f16cb56923cb2287dfdbaf7b962a80a6cb306 (patch)
tree6b79bb9c74a5ec9ebd994273064e4b286ef196c9 /source3/printing
parent2e8a85ec72f2b23cc2b64caa129429971c2fa8c0 (diff)
downloadsamba-a68f16cb56923cb2287dfdbaf7b962a80a6cb306.tar.gz
samba-a68f16cb56923cb2287dfdbaf7b962a80a6cb306.tar.bz2
samba-a68f16cb56923cb2287dfdbaf7b962a80a6cb306.zip
s3:server Consolidate printing related initialization
Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Aug 2 17:37:44 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/printing.c5
-rw-r--r--source3/printing/queue_process.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index f1e2aeb265..ac9e768092 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -28,6 +28,7 @@
#include "../librpc/gen_ndr/netlogon.h"
#include "printing/notify.h"
#include "printing/pcap.h"
+#include "printing/printer_list.h"
#include "printing/queue_process.h"
#include "serverid.h"
#include "smbd/smbd.h"
@@ -197,6 +198,10 @@ bool print_backend_init(struct messaging_context *msg_ctx)
int services = lp_numservices();
int snum;
+ if (!printer_list_parent_init()) {
+ return false;
+ }
+
unlink(cache_path("printing.tdb"));
mkdir(cache_path("printing"),0755);
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 9fbdd811ab..791f2d7a33 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -273,6 +273,10 @@ bool printing_subsystem_init(struct tevent_context *ev_ctx,
use_background_queue = background_queue;
+ if (!print_backend_init(msg_ctx)) {
+ return false;
+ }
+
/* Publish nt printers, this requires a working winreg pipe */
pcap_cache_reload(ev_ctx, msg_ctx, &reload_printers);