1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Merge from APPLIANCE_HEAD.

This commit is contained in:
Tim Potter -
parent 8e94f68a80
commit 825cdc49db
2 changed files with 10 additions and 10 deletions

View File

@ -1221,7 +1221,7 @@ int print_queue_length(int snum, print_status_struct *pstatus)
static int get_total_jobs(void) static int get_total_jobs(void)
{ {
int total_jobs; int total_jobs = 0;
int snum; int snum;
int services = lp_numservices(); int services = lp_numservices();

View File

@ -101,7 +101,7 @@ typedef struct _counter_printer_0 {
static ubi_dlList counter_list; 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; static uint32 smb_connections=0;
@ -184,7 +184,7 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle)
return; 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)) if (!W_ERROR_IS_OK(result))
DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n", 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 it's the last connection, deconnect the IPC$ share */
if (smb_connections==1) { if (smb_connections==1) {
cli_nt_session_close(&cli); cli_nt_session_close(&notify_cli);
cli_ulogoff(&cli); cli_ulogoff(&notify_cli);
cli_shutdown(&cli); cli_shutdown(&notify_cli);
message_deregister(MSG_PRINTER_NOTIFY2); message_deregister(MSG_PRINTER_NOTIFY2);
} }
@ -793,7 +793,7 @@ static void process_notify2_message(struct spoolss_notify_msg *msg,
if (!p->notify.flags) if (!p->notify.flags)
cli_spoolss_rrpcn( 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); data_len, data, p->notify.change, 0);
else { else {
NT_PRINTER_INFO_LEVEL *printer = NULL; 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. */ PRINTER_CHANGE_SET_PRINTER_DRIVER. */
cli_spoolss_routerreplyprinter( cli_spoolss_routerreplyprinter(
&cli, mem_ctx, &p->notify.client_hnd, &notify_cli, mem_ctx, &p->notify.client_hnd,
0, printer->info_2->changeid); 0, printer->info_2->changeid);
free_a_printer(&printer, 2); 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 */ 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; return False;
message_register(MSG_PRINTER_NOTIFY2, receive_notify2_message); message_register(MSG_PRINTER_NOTIFY2, receive_notify2_message);
@ -1978,7 +1978,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin
smb_connections++; 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); type, handle);
if (!W_ERROR_IS_OK(result)) if (!W_ERROR_IS_OK(result))