summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:37:47 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:25 +0200
commitbccb7c87cca02adacd7ede9b60d543b8b3b1eb29 (patch)
tree36dc92088233b6eb9eccbd1aa84ff8fa0ef31a91 /source3/printing
parent7d08c25f989df14131567d055a9c922e27247c14 (diff)
downloadsamba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.tar.gz
samba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.tar.bz2
samba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.zip
s3: Lift the smbd_messaging_context from check_published_printers
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c2
-rw-r--r--source3/printing/nt_printing_ads.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index c44a0ec2c7..0b23a9729e 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -96,7 +96,7 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
msgs. This is done in serverid_register() */
if ( lp_security() == SEC_ADS ) {
- win_rc = check_published_printers();
+ win_rc = check_published_printers(msg_ctx);
if (!W_ERROR_IS_OK(win_rc))
DEBUG(0, ("nt_printing_init: error checking published printers: %s\n", win_errstr(win_rc)));
}
diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c
index e981aca5e8..f0d568b8bf 100644
--- a/source3/printing/nt_printing_ads.c
+++ b/source3/printing/nt_printing_ads.c
@@ -311,7 +311,7 @@ done:
return win_rc;
}
-WERROR check_published_printers(void)
+WERROR check_published_printers(struct messaging_context *msg_ctx)
{
ADS_STATUS ads_rc;
ADS_STRUCT *ads = NULL;
@@ -357,16 +357,15 @@ WERROR check_published_printers(void)
continue;
}
- result = winreg_get_printer(tmp_ctx, server_info,
- smbd_messaging_context(), NULL,
- lp_servicename(snum), &pinfo2);
+ result = winreg_get_printer(tmp_ctx, server_info, msg_ctx,
+ NULL, lp_servicename(snum),
+ &pinfo2);
if (!W_ERROR_IS_OK(result)) {
continue;
}
if (pinfo2->attributes & PRINTER_ATTRIBUTE_PUBLISHED) {
- nt_printer_publish_ads(smbd_messaging_context(),
- ads, pinfo2);
+ nt_printer_publish_ads(msg_ctx, ads, pinfo2);
}
TALLOC_FREE(pinfo2);