summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 14:35:50 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 16:03:25 +0200
commit7d08c25f989df14131567d055a9c922e27247c14 (patch)
tree2a6073c732fca44bdfb5eaf73c403c6a9a2fd4a7
parent61837197d8e0583d1ced7edd57353a72699495bb (diff)
downloadsamba-7d08c25f989df14131567d055a9c922e27247c14.tar.gz
samba-7d08c25f989df14131567d055a9c922e27247c14.tar.bz2
samba-7d08c25f989df14131567d055a9c922e27247c14.zip
s3: Lift the smbd_messaging_context from nt_printer_publish
-rw-r--r--source3/include/nt_printing.h1
-rw-r--r--source3/printing/nt_printing_ads.c7
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
-rw-r--r--source3/smbd/server_reload.c4
4 files changed, 9 insertions, 6 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index c98085b421..31d85a8e7b 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -243,6 +243,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info,
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *pinfo2,
int action);
diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c
index 42570389c4..e981aca5e8 100644
--- a/source3/printing/nt_printing_ads.c
+++ b/source3/printing/nt_printing_ads.c
@@ -237,6 +237,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
struct spoolss_PrinterInfo2 *pinfo2,
int action)
{
@@ -266,8 +267,7 @@ WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
sinfo2->attributes = pinfo2->attributes;
- win_rc = winreg_update_printer(mem_ctx, server_info,
- smbd_messaging_context(),
+ win_rc = winreg_update_printer(mem_ctx, server_info, msg_ctx,
pinfo2->sharename, info2_mask,
sinfo2, NULL, NULL);
if (!W_ERROR_IS_OK(win_rc)) {
@@ -299,8 +299,7 @@ WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
switch (action) {
case DSPRINT_PUBLISH:
case DSPRINT_UPDATE:
- win_rc = nt_printer_publish_ads(smbd_messaging_context(),
- ads, pinfo2);
+ win_rc = nt_printer_publish_ads(msg_ctx, ads, pinfo2);
break;
case DSPRINT_UNPUBLISH:
win_rc = nt_printer_unpublish_ads(ads, pinfo2->sharename);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index f3f1efcee8..b8a8526eec 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6122,7 +6122,8 @@ static WERROR publish_or_unpublish_printer(struct pipes_struct *p,
return WERR_BADFID;
}
- nt_printer_publish(pinfo2, p->server_info, pinfo2, info7->action);
+ nt_printer_publish(pinfo2, p->server_info, p->msg_ctx, pinfo2,
+ info7->action);
TALLOC_FREE(pinfo2);
return WERR_OK;
diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c
index 601f83fb15..220147da60 100644
--- a/source3/smbd/server_reload.c
+++ b/source3/smbd/server_reload.c
@@ -66,7 +66,9 @@ void reload_printers(void)
NULL, lp_servicename(snum),
NULL, &pinfo2)) {
nt_printer_publish(server_info,
- server_info, pinfo2,
+ server_info,
+ smbd_messaging_context(),
+ pinfo2,
DSPRINT_UNPUBLISH);
TALLOC_FREE(pinfo2);
}