summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:39:40 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:26 +0200
commit99b2da4504307b6eefc6afbd502d931d29625ea0 (patch)
treebf4bc40edd9df93c69828448b31fb75c30e73d15 /source3
parentbccb7c87cca02adacd7ede9b60d543b8b3b1eb29 (diff)
downloadsamba-99b2da4504307b6eefc6afbd502d931d29625ea0.tar.gz
samba-99b2da4504307b6eefc6afbd502d931d29625ea0.tar.bz2
samba-99b2da4504307b6eefc6afbd502d931d29625ea0.zip
s3: Lift the smbd_messaging_context from is_printer_published
Diffstat (limited to 'source3')
-rw-r--r--source3/include/nt_printing.h1
-rw-r--r--source3/printing/nt_printing_ads.c8
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
-rw-r--r--source3/smbd/server_reload.c1
4 files changed, 9 insertions, 5 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 97f70faf39..7ebacc6985 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -249,6 +249,7 @@ WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
bool is_printer_published(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
char *servername, char *printer, struct GUID *guid,
struct spoolss_PrinterInfo2 **info2);
diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c
index f0d568b8bf..e0ace23d4d 100644
--- a/source3/printing/nt_printing_ads.c
+++ b/source3/printing/nt_printing_ads.c
@@ -381,6 +381,7 @@ done:
bool is_printer_published(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
char *servername, char *printer, struct GUID *guid,
struct spoolss_PrinterInfo2 **info2)
{
@@ -391,8 +392,7 @@ bool is_printer_published(TALLOC_CTX *mem_ctx,
WERROR result;
NTSTATUS status;
- result = winreg_get_printer(mem_ctx, server_info,
- smbd_messaging_context(),
+ result = winreg_get_printer(mem_ctx, server_info, msg_ctx,
servername, printer, &pinfo2);
if (!W_ERROR_IS_OK(result)) {
return false;
@@ -409,8 +409,8 @@ bool is_printer_published(TALLOC_CTX *mem_ctx,
/* fetching printer guids really ought to be a separate function. */
- result = winreg_get_printer_dataex(mem_ctx, server_info,
- smbd_messaging_context(), printer,
+ result = winreg_get_printer_dataex(mem_ctx, server_info, msg_ctx,
+ printer,
SPOOL_DSSPOOLER_KEY, "objectGUID",
&type, &data, &data_size);
if (!W_ERROR_IS_OK(result)) {
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index b8a8526eec..9341809128 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3755,7 +3755,9 @@ static WERROR construct_printer_info7(TALLOC_CTX *mem_ctx,
return WERR_NOMEM;
}
- if (is_printer_published(mem_ctx, server_info, print_hnd->servername,
+ if (is_printer_published(mem_ctx, server_info,
+ smbd_messaging_context(),
+ print_hnd->servername,
lp_servicename(snum), &guid, NULL)) {
r->guid = talloc_strdup_upper(mem_ctx, GUID_string2(mem_ctx, &guid));
r->action = DSPRINT_PUBLISH;
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index 220147da60..4a499daf25 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -63,6 +63,7 @@ void reload_printers(void)
DEBUG(3, ("removing stale printer %s\n", pname));
if (is_printer_published(server_info, server_info,
+ smbd_messaging_context(),
NULL, lp_servicename(snum),
NULL, &pinfo2)) {
nt_printer_publish(server_info,