summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-07-22 21:40:45 +0000
committerTim Potter <tpot@samba.org>2002-07-22 21:40:45 +0000
commitfb5153a93be4427d288e8b0bd2f44d53227f3965 (patch)
treea33cf6bceda36c577a048644935571a1ca5fb749 /source3
parent029fba81c660f8a27f4b61f34ecb118f5018efda (diff)
downloadsamba-fb5153a93be4427d288e8b0bd2f44d53227f3965.tar.gz
samba-fb5153a93be4427d288e8b0bd2f44d53227f3965.tar.bz2
samba-fb5153a93be4427d288e8b0bd2f44d53227f3965.zip
Merge from APPLIANCE_HEAD.
(This used to be commit 825cdc49dbc3e6b9d08b8e722c82cc09e2479fa1)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/printing.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 3579ddd7a0..cb689c05d6 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -1221,7 +1221,7 @@ int print_queue_length(int snum, print_status_struct *pstatus)
static int get_total_jobs(void)
{
- int total_jobs;
+ int total_jobs = 0;
int snum;
int services = lp_numservices();
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index ca5557a0db..822800de11 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -101,7 +101,7 @@ typedef struct _counter_printer_0 {
static ubi_dlList counter_list;
-static struct cli_state cli;
+static struct cli_state notify_cli; /* print notify back-channel */
static uint32 smb_connections=0;
@@ -184,7 +184,7 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle)
return;
}
- result = cli_spoolss_reply_close_printer(&cli, cli.mem_ctx, handle);
+ result = cli_spoolss_reply_close_printer(&notify_cli, notify_cli.mem_ctx, handle);
if (!W_ERROR_IS_OK(result))
DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n",
@@ -192,9 +192,9 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle)
/* if it's the last connection, deconnect the IPC$ share */
if (smb_connections==1) {
- cli_nt_session_close(&cli);
- cli_ulogoff(&cli);
- cli_shutdown(&cli);
+ cli_nt_session_close(&notify_cli);
+ cli_ulogoff(&notify_cli);
+ cli_shutdown(&notify_cli);
message_deregister(MSG_PRINTER_NOTIFY2);
}
@@ -793,7 +793,7 @@ static void process_notify2_message(struct spoolss_notify_msg *msg,
if (!p->notify.flags)
cli_spoolss_rrpcn(
- &cli, mem_ctx, &p->notify.client_hnd,
+ &notify_cli, mem_ctx, &p->notify.client_hnd,
data_len, data, p->notify.change, 0);
else {
NT_PRINTER_INFO_LEVEL *printer = NULL;
@@ -810,7 +810,7 @@ static void process_notify2_message(struct spoolss_notify_msg *msg,
PRINTER_CHANGE_SET_PRINTER_DRIVER. */
cli_spoolss_routerreplyprinter(
- &cli, mem_ctx, &p->notify.client_hnd,
+ &notify_cli, mem_ctx, &p->notify.client_hnd,
0, printer->info_2->changeid);
free_a_printer(&printer, 2);
@@ -1970,7 +1970,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin
fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */
- if(!spoolss_connect_to_client(&cli, unix_printer))
+ if(!spoolss_connect_to_client(&notify_cli, unix_printer))
return False;
message_register(MSG_PRINTER_NOTIFY2, receive_notify2_message);
@@ -1978,7 +1978,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin
smb_connections++;
- result = cli_spoolss_reply_open_printer(&cli, cli.mem_ctx, printer, localprinter,
+ result = cli_spoolss_reply_open_printer(&notify_cli, notify_cli.mem_ctx, printer, localprinter,
type, handle);
if (!W_ERROR_IS_OK(result))