diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-07 18:39:38 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 16:03:15 +0200 |
commit | 5acb5b09ee4d00cee83b7df3bc0a52894e9f303d (patch) | |
tree | 427297f45c67293b0fc1e54bd041961c66a80a73 /source3/rpc_server | |
parent | 43c2dcaf4caa8b0ff471bcceaf4141ddcd78faee (diff) | |
download | samba-5acb5b09ee4d00cee83b7df3bc0a52894e9f303d.tar.gz samba-5acb5b09ee4d00cee83b7df3bc0a52894e9f303d.tar.bz2 samba-5acb5b09ee4d00cee83b7df3bc0a52894e9f303d.zip |
s3: Remove references to smbd_messaging_context()
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 71df106a13..05876a9a4e 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -159,7 +159,9 @@ static int nt_printq_status(int v) Disconnect from the client ****************************************************************************/ -static void srv_spoolss_replycloseprinter(int snum, struct policy_handle *handle) +static void srv_spoolss_replycloseprinter( + int snum, struct policy_handle *handle, + struct messaging_context *msg_ctx) { WERROR result; NTSTATUS status; @@ -194,15 +196,19 @@ static void srv_spoolss_replycloseprinter(int snum, struct policy_handle *handle */ notify_cli_pipe = NULL; - messaging_deregister(smbd_messaging_context(), - MSG_PRINTER_NOTIFY2, NULL); + if (msg_ctx != NULL) { + messaging_deregister(msg_ctx, MSG_PRINTER_NOTIFY2, + NULL); - /* Tell the connections db we're no longer interested in - * printer notify messages. */ + /* + * Tell the serverid.tdb we're no longer + * interested in printer notify messages. + */ - serverid_register_msg_flags( - messaging_server_id(smbd_messaging_context()), - false, FLAG_MSG_PRINT_NOTIFY); + serverid_register_msg_flags( + messaging_server_id(msg_ctx), + false, FLAG_MSG_PRINT_NOTIFY); + } } smb_connections--; @@ -219,12 +225,15 @@ static int printer_entry_destructor(Printer_entry *Printer) if ( Printer->printer_type == SPLHND_SERVER) { snum = -1; - srv_spoolss_replycloseprinter(snum, &Printer->notify.client_hnd); + srv_spoolss_replycloseprinter( + snum, &Printer->notify.client_hnd, + Printer->notify.msg_ctx); } else if (Printer->printer_type == SPLHND_PRINTER) { snum = print_queue_snum(Printer->sharename); if (snum != -1) - srv_spoolss_replycloseprinter(snum, - &Printer->notify.client_hnd); + srv_spoolss_replycloseprinter( + snum, &Printer->notify.client_hnd, + Printer->notify.msg_ctx); } } @@ -2410,6 +2419,7 @@ WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct pipes_struct *p, Printer->notify.flags = r->in.flags; Printer->notify.options = r->in.options; Printer->notify.printerlocal = r->in.printer_local; + Printer->notify.msg_ctx = p->msg_ctx; TALLOC_FREE(Printer->notify.option); Printer->notify.option = dup_spoolss_NotifyOption(Printer, option); @@ -6150,7 +6160,8 @@ WERROR _spoolss_FindClosePrinterNotify(struct pipes_struct *p, !get_printer_snum(p, r->in.handle, &snum, NULL) ) return WERR_BADFID; - srv_spoolss_replycloseprinter(snum, &Printer->notify.client_hnd); + srv_spoolss_replycloseprinter( + snum, &Printer->notify.client_hnd, p->msg_ctx); } Printer->notify.flags=0; |