diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 14:37:47 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 16:03:25 +0200 |
commit | bccb7c87cca02adacd7ede9b60d543b8b3b1eb29 (patch) | |
tree | 36dc92088233b6eb9eccbd1aa84ff8fa0ef31a91 /source3 | |
parent | 7d08c25f989df14131567d055a9c922e27247c14 (diff) | |
download | samba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.tar.gz samba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.tar.bz2 samba-bccb7c87cca02adacd7ede9b60d543b8b3b1eb29.zip |
s3: Lift the smbd_messaging_context from check_published_printers
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/nt_printing.h | 2 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 2 | ||||
-rw-r--r-- | source3/printing/nt_printing_ads.c | 11 |
3 files changed, 7 insertions, 8 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 31d85a8e7b..97f70faf39 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -252,7 +252,7 @@ bool is_printer_published(TALLOC_CTX *mem_ctx, char *servername, char *printer, struct GUID *guid, struct spoolss_PrinterInfo2 **info2); -WERROR check_published_printers(void); +WERROR check_published_printers(struct messaging_context *msg_ctx); bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r, struct spoolss_DriverInfo8 *_info8); 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); |